• User

    Mambo 4.5.1 Module latestads

    Ciao a tutti, dovrei usare il modulo latest ads di Classfield, che è un componente per Mambo che gestisce gli annunci.
    Latest ads ovviamente mostra gli ultimi annunci in una pagina che vuoi, il problema è che li mette in colonna e io vorrei che li mettesse in riga (credo che nel codice abbia qualche comando per andare a capo).
    Qualcuno guardando questo estratto di codice saprebbe dirmi come intervenire per fare quello che voglio?

    // Output

    echo '<table class="'.$moduleclass_sfx.'" width="100%">';

    $ord=explode(",",$order);

    foreach ( $rows as $row ) {

    // get Itemid
    
    //$Itemid = $mainframe->getItemid( $row->id, 0, 0, $bs, $bc, $gbs );
    
    // Blank itemid checker for SEF
    
    if ($Itemid == NULL) {
    
    	$Itemid = '';
    
    } else {
    
    	$Itemid = '&amp;Itemid='. $Itemid;
    
    }
    
    $lnk='index.php?option=com_classifieds&task=view&id='.$row->id;
    
    $alt=_OGL_TYPE." : ".$row->typename." ";
    
    $alt.="\n"._OGL_CATEGORY." : ".get_cat_path_titles($row->catid, " > ");
    
    
    
    echo '<tr><td><table class="'.$moduleclass_sfx.'-adblock">';
    

    for ($i=0; $i<count($ord); $i++) {

    if ($ord*=="T") echo '<tr><td class="'.$moduleclass_sfx.'-type">'.$row->typename. '</td></tr>';
    
    if ($ord*=="C")  echo '<tr><td class="'.$moduleclass_sfx.'-category">'.$row->categoryname.'</td></tr>';
    
    if ($ord*=="D") echo '<tr><td class="'.$moduleclass_sfx.'-date">'.date($date_format, strtotime($row->date )).'</td></tr>';
    
    if ($ord*=="A") echo '<tr><td class="'.$moduleclass_sfx.'-title">[url="'.$lnk.'"]'. $row->title ."</td></tr>";
    
    if (($ord*=="I") && $row->adimage ) {
    
    					 $img=$row->adimage;
    
    					 $imgthumb="thumbs/".$row->adimage;
    
    					 if (substr_count($img,"/")>0) {
    
    						$imgname=substr($img,strrpos($img,'/'));
    
    						$imgpath=substr($img,0,strrpos($img,'/'));
    
    						$imgthumb=$imgpath."/thumbs".$imgname;
    
    					}
    
    					echo '<tr><td class="'.$moduleclass_sfx.'-image"><a href="'.$lnk.'" title="'.$alt.'">
    
    					![image]('.$mosConfig_live_site.'/components/com_classifieds/adimages/'.$imgthumb.')</a></td></tr>';
    
    				} 
    
    if (($ord*=="X") && $desc_count_chars) {
    
    	echo '<tr><td class="'.$moduleclass_sfx.'-description">'.substr($row->description,0,$desc_count_chars);
    
    	if ($desc_count_chars<strlen($row->description)) echo '...';
    
    	echo '</td></tr>';
    
    }
    
    if (($ord*=="P") && $row->telephone) echo '<tr><td class="'.$moduleclass_sfx.'-phone">'._OGL_PHONE.' : '.$row->telephone.'</td></tr>';
    

    }

    echo '</table></td></tr>';
    

    }

    echo '</table>';

    Mi fareste un regalo!


  • Super User

    // Output

    echo '<table class="'.$moduleclass_sfx.'" width="100%">';

    $ord=explode(",",$order);

    foreach ( $rows as $row ) {

    // get Itemid
    
    //$Itemid = $mainframe->getItemid( $row->id, 0, 0, $bs, $bc, $gbs );
    
    // Blank itemid checker for SEF
    
    if ($Itemid == NULL) {
    
    	$Itemid = '';
    
    } else {
    
    	$Itemid = '&amp;Itemid='. $Itemid;
    
    }
    
    $lnk='index.php?option=com_classifieds&task=view&id='.$row->id;
    
    $alt=_OGL_TYPE." : ".$row->typename." ";
    
    $alt.="\n"._OGL_CATEGORY." : ".get_cat_path_titles($row->catid, " > ");
    
    
    
    echo '<tr><td><table class="'.$moduleclass_sfx.'-adblock">';
    

    for ($i=0; $i<count($ord); $i++) {

    if ($ord*=="T") echo '<tr><td class="'.$moduleclass_sfx.'-type">'.$row->typename. '</td>';
    
    if ($ord*=="C")  echo '<td class="'.$moduleclass_sfx.'-category">'.$row->categoryname.'</td>';
    
    if ($ord*=="D") echo '<td class="'.$moduleclass_sfx.'-date">'.date($date_format, strtotime($row->date )).'</td>';
    
    if ($ord*=="A") echo '<td class="'.$moduleclass_sfx.'-title">[url="'.$lnk.'"]'. $row->title ."</td>";
    
    if (($ord*=="I") && $row->adimage ) {
    
    					 $img=$row->adimage;
    
    					 $imgthumb="thumbs/".$row->adimage;
    
    					 if (substr_count($img,"/")>0) {
    
    						$imgname=substr($img,strrpos($img,'/'));
    
    						$imgpath=substr($img,0,strrpos($img,'/'));
    
    						$imgthumb=$imgpath."/thumbs".$imgname;
    
    					}
    
    					echo '<td class="'.$moduleclass_sfx.'-image"><a href="'.$lnk.'" title="'.$alt.'">
    
    					![image]('.$mosConfig_live_site.'/components/com_classifieds/adimages/'.$imgthumb.')</a></td>';
    
    				} 
    
    if (($ord*=="X") && $desc_count_chars) {
    
    	echo '<td class="'.$moduleclass_sfx.'-description">'.substr($row->description,0,$desc_count_chars);
    
    	if ($desc_count_chars<strlen($row->description)) echo '...';
    
    	echo '</td>';
    
    }
    
    if (($ord*=="P") && $row->telephone) echo '<td class="'.$moduleclass_sfx.'-phone">'._OGL_PHONE.' : '.$row->telephone.'</td>';
    

    }

    echo '</tr></table></td></tr>';
    

    }

    echo '</table>';