NYCPHP Meetup

NYPHP.org

[joomla] How to override the Newsflash module HTML?

Chris French contact at chrisfrench.me
Thu Jun 21 00:19:51 EDT 2012


i just looked at it again, you i think need to edit the all videos plugin to strip those out not the news module. 

Chris
On Jun 20, 2012, at 7:38 PM, Helvécio da Silva wrote:

> I've tried to, but I can't find the <p></p> tags in it. The ones I want to get rid of.
> 
> This is the code in _item.php
> 
> <?php if ($params->get('item_title')) : ?>
> 
>     <<?php echo $params->get('item_heading'); ?> class="newsflash-title<?php echo $params->get('moduleclass_sfx'); ?>">
>     <?php if ($params->get('link_titles') && $item->link != '') : ?>
>         <a href="<?php echo $item->link;?>">
>             <?php echo $item->title;?></a>
>     <?php else : ?>
>         <?php echo $item->title; ?>
>     <?php endif; ?>
>     </<?php echo $params->get('item_heading'); ?>>
> 
> <?php endif; ?>
> 
> <?php if (!$params->get('intro_only')) :
>     echo $item->afterDisplayTitle;
> endif; ?>
> 
> <?php echo $item->beforeDisplayContent; ?>
> 
> <?php echo $item->introtext; ?>
> 
> <?php if (isset($item->link) && $item->readmore && $params->get('readmore')) :
>     echo '<a class="readmore" href="'.$item->link.'">'.$item->linkText.'</a>';
> endif; ?>
> 
> 
> 2012/6/20 Chris French <contact at chrisfrench.me>
> You need to edit the file _item.php, it would be in the tmpl folder of the module but you should put it in you templates html over ride file not the core module
> 
> On Jun 20, 2012 7:06 PM, "Helvécio da Silva" <helvecio.rj at gmail.com> wrote:
> This is the source code in modules/mod_articles_news/tmpl/vertical.php
> 
> <ul class="newsflash-vert<?php echo $params->get('moduleclass_sfx'); ?>">
> <?php for ($i = 0, $n = count($list); $i < $n; $i ++) :
>     $item = $list[$i]; ?>
>     <li class="newsflash-item">
>     <?php require JModuleHelper::getLayoutPath('mod_articles_news', '_item');
>     if ($n > 1 && (($i < $n - 1) || $params->get('showLastSeparator'))) : ?>
>         <span class="article-separator">&#160;</span>
>     <?php endif; ?>
>     </li>
> <?php endfor; ?>
> </ul>
> 
> I'm using the AllVideos plugin to display a youtube video:
> 
> <ul class="newsflash-vert-caixa">
>     <li class="newsflash-item">
>     
>     <h4 class="newsflash-title-caixa">
>             <a href="/campanha/11-videos/10-manifestacao-bonde-de-santa-teresa.html">
>             Manifestação Bonde de Santa Teresa</a>
>         </h4>
> <p>
> <!-- JoomlaWorks "AllVideos" Plugin (v4.4) starts here -->
> </p>
> <div class="avPlayerWrapper avVideo">
>     <div class="avPlayerContainer" style="width:130px;">
>         <div class="avPlayerBlock" id="AVPlayerID_9ffa13bf_1746384842">
>             <iframe width="130" height="100" frameborder="0" title="JoomlaWorks AllVideos Player" allowfullscreen="" src="http://www.youtube.com/embed/pfoKa2BDW2k?rel=0&amp;fs=1&amp;wmode=transparent"></iframe>                    </div>
>     </div>
> </div>
> 
> <!-- JoomlaWorks "AllVideos" Plugin (v4.4) ends here -->
> 
> <p></p>
>         <span class="article-separator">&nbsp;</span>
>         </li>
>     <li class="newsflash-item">
>     
>     <h4 class="newsflash-title-caixa">
>             <a href="/campanha/11-videos/11-eliomar-coelho-no-buraco-do-lume.html">
>             Eliomar Coelho no Buraco do Lume</a>
>         </h4>
> 
> 
> 
> <p>
> 
> <!-- JoomlaWorks "AllVideos" Plugin (v4.4) starts here -->
> 
> </p><div class="avPlayerWrapper avVideo">
>     <div class="avPlayerContainer" style="width:130px;">
>         <div class="avPlayerBlock" id="AVPlayerID_734f2a4c_948345506">
>             <iframe width="130" height="100" frameborder="0" title="JoomlaWorks AllVideos Player" allowfullscreen="" src="http://www.youtube.com/embed/ojXYe0l8LeM?rel=0&amp;fs=1&amp;wmode=transparent"></iframe>                    </div>
>     </div>
> </div>
> 
> <!-- JoomlaWorks "AllVideos" Plugin (v4.4) ends here -->
> 
> <p></p>
>         <span class="article-separator">&nbsp;</span>
>         </li>
>     <li class="newsflash-item">
>     
>     <h4 class="newsflash-title-caixa">
>             <a href="/campanha/11-videos/12-insercao-do-psol-com-milton-temer-marcelo-freixo-e-chico-alencar.html">
>             Inserção do PSOL com Milton Temer, Marcelo Freixo e Chico Alencar</a>
>         </h4>
> 
> 
> 
> <p>
> 
> <!-- JoomlaWorks "AllVideos" Plugin (v4.4) starts here -->
> 
> </p><div class="avPlayerWrapper avVideo">
>     <div class="avPlayerContainer" style="width:130px;">
>         <div class="avPlayerBlock" id="AVPlayerID_5715564f_679276548">
>             <iframe width="130" height="100" frameborder="0" title="JoomlaWorks AllVideos Player" allowfullscreen="" src="http://www.youtube.com/embed/SahnvYpIWWQ?rel=0&amp;fs=1&amp;wmode=transparent"></iframe>                    </div>
>     </div>
> </div>
> 
> <!-- JoomlaWorks "AllVideos" Plugin (v4.4) ends here -->
> 
> <p></p>
>     </li>
> </ul>
> 
> I want to get rid of the <p></p> tags, so I can reposition the h4 tag on the side of the video.
> 
> I can't find where it's coming from.
> 
> Thanks a million!!!
> 
> 2012/6/20 Chris French <contact at chrisfrench.me>
> 
> 
> are you talking about functions like ? 
> 
> require JModuleHelper::getLayoutPath('')
> 
> if so you need to look at the other files int he tmpl directory
> 
> Chris
> On Jun 20, 2012, at 6:26 PM, Helvécio da Silva wrote:
> 
>> Hi everyone!
>> 
>> I need to make a change in the HTML output provided by the newsflash module in J 2.5.
>> 
>> I thought this would be easy, but in the module files all I see are function calls that I have NO idea where it's retrieving the HTML code to display the module on the page.
>> 
>> Can someone shed some light on this for me?
>> 
>> Thanks a million
>> 
>> -- 
>> Helvecio "Elvis" da Silva
>> Rio de Janeiro - Brasil - helvecio.rj at gmail.com
>> http://www.helvecio.com - http://blog.helvecio.com
>> 
>> _______________________________________________
>> New York PHP SIG: Joomla! Mailing List
>> http://lists.nyphp.org/mailman/listinfo/joomla
>> 
>> NYPHPCon 2006 Presentations Online
>> http://www.nyphpcon.com
>> 
>> Show Your Participation in New York PHP
>> http://www.nyphp.org/show_participation.php
> 
> 
> _______________________________________________
> New York PHP SIG: Joomla! Mailing List
> http://lists.nyphp.org/mailman/listinfo/joomla
> 
> NYPHPCon 2006 Presentations Online
> http://www.nyphpcon.com
> 
> Show Your Participation in New York PHP
> http://www.nyphp.org/show_participation.php
> 
> 
> 
> -- 
> Helvecio "Elvis" da Silva
> Rio de Janeiro - Brasil - helvecio.rj at gmail.com
> http://www.helvecio.com - http://blog.helvecio.com
> 
> 
> _______________________________________________
> New York PHP SIG: Joomla! Mailing List
> http://lists.nyphp.org/mailman/listinfo/joomla
> 
> NYPHPCon 2006 Presentations Online
> http://www.nyphpcon.com
> 
> Show Your Participation in New York PHP
> http://www.nyphp.org/show_participation.php
> 
> _______________________________________________
> New York PHP SIG: Joomla! Mailing List
> http://lists.nyphp.org/mailman/listinfo/joomla
> 
> NYPHPCon 2006 Presentations Online
> http://www.nyphpcon.com
> 
> Show Your Participation in New York PHP
> http://www.nyphp.org/show_participation.php
> 
> 
> 
> -- 
> Helvecio "Elvis" da Silva
> Rio de Janeiro - Brasil - helvecio.rj at gmail.com
> http://www.helvecio.com - http://blog.helvecio.com
> 
> _______________________________________________
> New York PHP SIG: Joomla! Mailing List
> http://lists.nyphp.org/mailman/listinfo/joomla
> 
> NYPHPCon 2006 Presentations Online
> http://www.nyphpcon.com
> 
> Show Your Participation in New York PHP
> http://www.nyphp.org/show_participation.php

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/joomla/attachments/20120620/226ed612/attachment.html>


More information about the Joomla mailing list