Bonjour, j'espere être au bon endroit pour poster mon pb. Voilà, j'ai quelques difficultés à modifier le mode d'affichage actuel du module sobi2 lastest entries. dans le code j'ai tout de même répéré la zone qui gère cet affichage (aperçu du code que voici:
seulement j'ai beau transformer des "DESC" en "RAND()", mais je parviens pas à mes fins. svp un coup de pouce m'aiderai grandement.. Merci!
Code PHP:
//Get the parameters
$class = $params->get('moduleclass_sfx');
$limit = $params->get('count',5);
$table = $params->get('moduletable', 0); //only J1.0
$entryicon = $params->get('entryicon',0);
$entryimage = $params->get('entryimage',0);
$showTitle = $params->get('title',1);
$maxlength = $params->get('item_length', 50);
$direction = $params->get('direction', 1);
$categorydepend = $params->get('categorydepend', 0);
if(!$limit || $limit < 1)
$limit = 5;
$config =& sobi2Config::getInstance();
$database =& $config->getDb();
$S_Itemid = $config->sobi2Itemid;
$catId = sobi2Config::request( $_REQUEST,'catid',0 );
$now = $config->getTimeAndDate();
if (($catId > 1) && ($categorydepend == 1)) {
$query = "SELECT `title`, `itemid`, `icon`, `image` FROM `#__sobi2_item` WHERE (itemid IN (SELECT itemid FROM #__sobi2_cat_items_relations WHERE catid = {$catId})) AND `published` = 1 AND (`publish_down` > '{$now}' OR `publish_down` = '{$config->nullDate}') ORDER BY `publish_up` DESC LIMIT {$lim***";
}
else {
$query = "SELECT `title`, `itemid`, `icon`, `image` FROM `#__sobi2_item` WHERE `published` = 1 AND (`publish_down` > '{$now}' OR `publish_down` = '{$config->nullDate}') ORDER BY `publish_up` DESC LIMIT {$lim***";
}
$database->setQuery( $query );
$s_results = $database->loadObjectList();
$iso = explode( '=', _ISO );
Commentaire