Re-salut, voici des portions de php des différents fichiers du module mosets:
<?php
<div id="listing">
<h2><?php
$link_name = $this->fields->getFieldById(1);
$this->plugin( 'ahreflisting', $this->link, $link_name->getOutput(1), '', array("delete"=>true,"link"=>false) )
?></h2>
////////////////////////////////////
if(!is_null($this->fields->getFieldById(2))) {
$link_desc = $this->fields->getFieldById(2);
echo $link_desc->getOutput(1);
///////////////////////////////////
echo '<div class="rating">';
$this->plugin( 'ratableRating', $this->link, $this->link->link_rating, $this->link->link_votes);
echo '<div id="total-votes">';
if( $this->link->link_votes <= 1 ) {
echo $this->link->link_votes . " " . strtolower(JText::_( 'Vote' ));
} elseif ($this->link->link_votes > 1 ) {
echo $this->link->link_votes . " " . strtolower(JText::_( 'Votes' ));
}
echo '</div>';
//////////////////////////////////
if(
(
(!$field->hasInputField() && !$field->isCore() && empty($value)) || (!empty($value) || $value == '0')
&&
// This condition ensure that fields listed in array() are skipped
!in_array($field->getName(),array('link_name','link_desc'))
////////////////////////////////
// Fields in array() are always displayed regardless of its value.
in_array($field->getName(),array('link_featured'))
/////////////////////////////////
<div class="actions-rating-fav">
<?php if( $this->show_actions ) { ?>
<div class="actions">
<?php
$this->plugin( 'ahrefreview', $this->link, array("rel"=>"nofollow") );
$this->plugin( 'ahrefrecommend', $this->link, array("rel"=>"nofollow") );
$this->plugin( 'ahrefprint', $this->link );
$this->plugin( 'ahrefcontact', $this->link, array("rel"=>"nofollow") );
$this->plugin( 'ahrefvisit', $this->link );
$this->plugin( 'ahrefreport', $this->link, array("rel"=>"nofollow") );
$this->plugin( 'ahrefclaim', $this->link, array("rel"=>"nofollow") );
$this->plugin( 'ahrefownerlisting', $this->link );
$this->plugin( 'ahrefmap', $this->link );
?></div><?php
//Page_listing.tpl.php//
//sub_listingDetails.tpl.php//
if( !empty($modules) )
{
$contents .= '<div class="columns1-modules-inner">';
foreach ($modules as $mod) {
$params = new JRegistry( $mod->params );
$contents .= '<div class="module'.$params->get('moduleclass_sfx').'">';
$contents .= '<h3>' . $mod->title . '</h3>';
$contents .= '<div class="triangle"></div>';
$contents .= $renderer->render($mod);
$contents .= '</div>';
}
$contents .= '</div>';
}
$modules = JModuleHelper::getModules('listing2-footer');
if( !empty($modules) )
{
$contents .= '<div class="columns2-modules-inner">';
foreach ($modules as $mod) {
$params = new JRegistry( $mod->params );
$contents .= '<div class="module'.$params->get('moduleclass_sfx').'">';
$contents .= '<h3>' . $mod->title . '</h3>';
$contents .= '<div class="triangle"></div>';
$contents .= $renderer->render($mod);
$contents .= '</div>';
}
$contents .= '</div>';
}
//sub_listingSummary.tpl.php//
echo '<span class="reviews">';
echo '<a href="' . JRoute::_( 'index.php?option=com_mtree&task=viewlink&link_id=' . $link->link_id . '&Itemid=' . $this->Itemid ) . '">' . $this->reviews[$link->link_id]->total . ' ' . strtolower(JText::_( 'Reviews' )) . '</a>';
echo '</span>';
}
echo '</div>';
} else {
echo '</div>';
// Rating
echo '<div class="rating-review">';
$this->plugin( 'rating', $link->link_rating, $link->link_votes, $link->attribs);
if( $this->config->get('show_review') )
{
echo '<span class="reviews">';
echo '<a href="' . JRoute::_( 'index.php?option=com_mtree&task=viewlink&link_id=' . $link->link_id . '&Itemid=' . $this->Itemid ) . '">' . $this->reviews[$link->link_id]->total . ' ' . strtolower(JText::_( 'Reviews' )) . '</a>';
echo '</span>';
}
echo '</div>';
}
if( $this->config->getTemParam('showImageInSummary',1) )
{
if ($link->link_image ) {
$this->plugin( 'ahreflistingimage', $link, 'class="image' . (($this->config->getTemParam('imageDirectionListingSummary','left')=='right') ? '':'-left') . '" alt="'.htmlspecialchars($link->link_name).'"' );
}
else if ( $this->config->getTemParam('showFillerImage',1) )
{
?>
<a href="<?php echo JRoute::_('index.php?option=com_mtree&task=viewlink&link_id=' . $link->link_id . '&Itemid=' . $this->Itemid); ?>">
<img src="<?php echo $this->config->getjconf('live_site'); ?>/components/com_mtree/templates/kinabalu/images/noimage_thb.png" width="<?php echo $this->config->get('resize_listing_size'); ?>" height="<?php echo $this->config->get('resize_listing_size'); ?>" class="image<?php echo (($this->config->getTemParam('imageDirectionListingSummary','left')=='right') ? '':'-left'); ?>" alt="" />
</a>
/////////////////////////////////
// Website
$website = $fields->getFieldById(12);
if(!is_null($website) && $website->hasValue()) { echo '<p class="website">' . $website->getOutput(2) . '</p>'; }
// Listing's first image
if(!is_null($fields->getFieldById(2)) || $link->link_image) {
echo '<p>';
if(!is_null($fields->getFieldById(2))) {
$link_desc = $fields->getFieldById(2);
echo $link_desc->getOutput(2);
}
echo '</p>';
// Listing's category
if($this->task <> 'listcats' && $this->task <> '' ) {
echo '<div class="category"><span>' . JText::_( 'Category' ) . ':</span>';
$this->plugin( 'mtpath', $link->cat_id, '' );
echo '</div>';
//////////////////////////////
echo '</div>';
if($this->config->getTemParam('showActionLinksInSummary','0')) {
echo '<div class="actions">';
$this->plugin( 'ahrefreview', $link, array("rel"=>"nofollow") );
$this->plugin( 'ahrefrecommend', $link, array("rel"=>"nofollow") );
$this->plugin( 'ahrefprint', $link );
$this->plugin( 'ahrefcontact', $link, array("rel"=>"nofollow") );
$this->plugin( 'ahrefvisit', $link );
$this->plugin( 'ahrefreport', $link, array("rel"=>"nofollow") );
$this->plugin( 'ahrefclaim', $link, array("rel"=>"nofollow") );
$this->plugin( 'ahrefownerlisting', $link );
$this->plugin( 'ahrefmap', $link );
echo '</div>';
}
//sub_listings.tpl.php//
else {
if($this->pageNav->total > 0) {
?>
<div class="pages-links">
<span class="xlistings"><?php echo $this->pageNav->getResultsCounter(); ?></span>
<?php echo $this->pageNav->getPagesLinks(); ?>
</div>
<?php
$i = 0;
foreach ($this->links AS $link) {
$i++;
$fields = $this->fields[$link->link_id];
include $this->loadTemplate('sub_listingSummary.tpl.php');
}
if( $this->pageNav->total > $this->pageNav->limit ) { ?>
<div class="pages-links">
<span class="xlistings"><?php echo $this->pageNav->getResultsCounter(); ?></span>
<?php echo $this->pageNav->getPagesLinks(); ?>
</div>
<?php
}