Bonne nouvelle !
Voici la solution pour pouvoir afficher les titres au format suivant : "Sujet : Sous-sujet : Titre" (avec autant de sous-sujets que vous voulez)
L'auteur de cette modif. est Hervé :) (merci à lui)
Voici la démarche à suivre :
Je prends le module d'origine version 1.44 comme référence.
Dans le fichier www/modules/news/index.php
Ligne 134, après :
$column_count = $xoopsModuleConfig['columnmode'];
Ajouter la ligne :
$mymaintree = new XoopsTree($xoopsDB->prefix("topics"),"topic_id","topic_pid");
--------------------------------------------
Ligne 182, remplacer :
$sarray = NewsStory::getAllPublished($xoopsOption['storynum'], $start, $xoopsModuleConfig['restrictindex'], $xoopsOption['storytopic'], 0, true, 'published', $topic_frontpage);
Par :
$ids=array();
if($xoopsOption['storytopic']!=0) {
$ids=$mymaintree->getAllChildId($xoopsOption['storytopic']);
}
if(count($ids)>0) {
$ids[]=$xoopsOption['storytopic'];
} else {
unset($ids);
$ids=$xoopsOption['storytopic'];
}
$sarray = NewsStory::getAllPublished($xoopsOption['storynum'], $start, $xoopsModuleConfig['restrictindex'], $ids, 0, true, 'published', $topic_frontpage);
--------------------------------------------
Ligne 194, après :
$filesperstory = $sfiles->getCountbyStories($storieslist);
Ajouter la ligne :
static $tbltopics = Array();
--------------------------------------------
Ligne 202, remplacer :
$story['title'] = $thisstory->textlink().' : '.$story['title'];
Par :
if(is_array($tbltopics) && array_key_exists($thisstory->topicid(),$tbltopics)) {
$topicpath = $tbltopics[$thisstory->topicid()];
} else {
$topicpath = $mymaintree->getNicePathFromId($thisstory->topicid(), "topic_title", "index.php?op=1");
$tbltopics[$thisstory->topicid()] = $topicpath;
}
$story['title'] = $topicpath.$story['title'];
Sauvez, et fermez le fichier :). C'est fait !
En espérant que ça fera plaisir à certains qui avaient aimé mon idée :)
@+