+ Rispondi alla Discussione
Risultati da 1 a 2 di 2

Mambo 4.5.1 Module latestads

Ultimo Messaggio di PaTeR il:
  1. #1
    User
    Data Registrazione
    May 2005
    Messaggi
    10

    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&i d='.$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[$i]=="T") echo '<tr><td class="'.$moduleclass_sfx.'-type">'.$row->typename. '</td></tr>';

    if ($ord[$i]=="C") echo '<tr><td class="'.$moduleclass_sfx.'-category">'.$row->categoryname.'</td></tr>';

    if ($ord[$i]=="D") echo '<tr><td class="'.$moduleclass_sfx.'-date">'.date($date_format, strtotime($row->date )).'</td></tr>';

    if ($ord[$i]=="A") echo '<tr><td class="'.$moduleclass_sfx.'-title">'. $row->title ."</td></tr>";

    if (($ord[$i]=="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.'">

    [img]'.$mosConfig_live_site.'/components/com_classifieds/adimages/'.$imgthumb.'[/img]</a></td></tr>';

    }

    if (($ord[$i]=="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[$i]=="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!
    MetalZena - Il portale genovese sulla musica rock hard rock e metal.

  2. #2
    User Attivo
    Data Registrazione
    Nov 2004
    Località
    Catania
    Messaggi
    1,142

    Re: Mambo 4.5.1 Module latestads

    // 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&i d='.$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[$i]=="T") echo '<tr><td class="'.$moduleclass_sfx.'-type">'.$row->typename. '</td>';

    if ($ord[$i]=="C") echo '<td class="'.$moduleclass_sfx.'-category">'.$row->categoryname.'</td>';

    if ($ord[$i]=="D") echo '<td class="'.$moduleclass_sfx.'-date">'.date($date_format, strtotime($row->date )).'</td>';

    if ($ord[$i]=="A") echo '<td class="'.$moduleclass_sfx.'-title">'. $row->title ."</td>";

    if (($ord[$i]=="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.'">

    [img]'.$mosConfig_live_site.'/components/com_classifieds/adimages/'.$imgthumb.'[/img]</a></td>';

    }

    if (($ord[$i]=="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[$i]=="P") && $row->telephone) echo '<td class="'.$moduleclass_sfx.'-phone">'._OGL_PHONE.' : '.$row->telephone.'</td>';

    }

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



    }

    echo '</table>';

+ Rispondi alla Discussione

Tag per Questa Discussione

^ Permessi di Scrittura

  • Tu non puoi inviare nuove discussioni
  • Tu non puoi inviare risposte
  • Tu non puoi inviare allegati
  • Tu non puoi modificare i tuoi messaggi
  •  
  • Il codice BB è Attivato
  • Le faccine sono Attivato
  • Il codice [IMG] è Attivato
  • Il codice [VIDEO] è Attivato
  • Il codice HTML è Disattivato
  • Trackbacks Attivato
  • Pingback Attivato
  • Refback Attivato

SEO by vBSEO 3.6.0 PL2 ©2011, Crawlability, Inc.