Salut

d'une façon générale, voici la procédure:
dans le thème actuelle , chercher la fonction suivante: "
function themeindex($x, $x, $x, $x, $x, $x, $x, $x, $x, $x, $x, $x, $story = array())"
elle doit être dans l'un des deux fichiers (
theme.php ou
functions.php), c'est la que tu doit faire les modifications.
deux exemples concret:
theme MX_DEFAULT ouvrer le fichier functions.php
remplacer la fonction originelle par celle-ci:
<?php
/**
* News Modul Artikelliste (index.php)
* $x bedeutet: nicht verwendet, nur zur nuke-Modulkompatibilitaet
*/
function themeindex($x, $x, $x, $x, $x, $x, $x, $x, $x, $x, $x, $x, $story = array())
{
global $theme_template;
static $viewcounter;
if (!isset($viewcounter) || ($viewcounter == 2)) $viewcounter = 0;
$viewcounter++;
pmxHeader::add_style('themes/' . basename(dirname(__FILE__)) . '/style/news.css');
$story['buttons'] = implode('</li><li>', getThemeIndexButtons($story));
$bmore = ($story['allmorelink']['bodycount']) ? '(' . $story['allmorelink']['bodycount'] . ' ' . _BYTESMORE . ')' : '';
$story['readmore'] = (empty($bmore)) ? '' : '<span title="' . $bmore . '">' . $story['allmorelink']['more'] . '</span>';
if ($GLOBALS['storyhome_cols'] == 1) {
$topicimage_class = ($viewcounter == 1) ? 'story-topicimage-left' : 'story-topicimage-right';
$topicimage = mxCreateImage($GLOBALS['tipath'] . $story['topicimage'], _TOPIC . ': ' . $story['topictext'], 0, 'class="' . $topicimage_class . '"');
$story['topicimage'] = '<a href="modules.php?name=News&new_topic=' . $story['topic'] . '">' . $topicimage . '</a>';
} else {
$story['topicimage'] = '';
}
$cattitle = (empty($story['cattitle'])) ? '' : ' <span class="story-cattitle">(' . $story['allmorelink']['categorie'] . ')</span>';
$authorinfo = (empty($story['informant']) || $story['informant'] == $GLOBALS['anonymous']) ? theme_adminname($story) : $story['allmorelink']['informantlink'] . $story['informant'] . ((mxModuleAllowed('Userinfo') || MX_IS_ADMIN) ? '</a>' : '');
$story['content'] = $story['hometext']. ((empty($story['notes'])) ? '' : '<div style="font-style: italic;">' . $story['notes'] . '</div>');
$story['infoline'] = ($GLOBALS['storyhome_cols'] == 1) ? _NEWSSUBMITED . ' ' . $authorinfo . ' ' . $story['allmorelink']['datetime'] : $story['datetime'];
$story['title'] = strip_tags($story['title']) . $cattitle;
// die oben definierten Variablen in dem passenden templateteil ersetzen
$artvars = theme_define_content();
echo theme_replace_vars($theme_template[$artvars['themeindex']], $story);
return;
}
theme mx_outline: ouvrir le fichier theme.php
remplacer la fonction originelle par celle-ci:
<?php
function themeindex($x, $x, $x, $x, $x, $x, $x, $x, $x, $x, $x, $x, $story = array())
{
// $x bedeutet: nicht verwendet, nur zur nuke-Modulkompatibilitaet
global $theme_template;
static $viewcounter;
// nur eine Spalte zulassen :-)
$GLOBALS['storyhome_cols'] = 1;
if (!isset($viewcounter) || ($viewcounter == 2)) $viewcounter = 0;
$viewcounter++;
// mxDebugFuncVars($story);
$buttons = getThemeIndexButtons($story);
$story['buttons'] = "<table width='20' border='0' cellspacing='0' cellpadding='0'><tr><td width='1%' valign='top'>" . implode("</td>\n<td width='1%' valign='top'>", $buttons) . "</tr></table>";
$bmore = ($story['allmorelink']['bodycount']) ? "(" . $story['allmorelink']['bodycount'] . " " . _BYTESMORE . ")" : "";
$story['readmore'] = (empty($bmore)) ? "" : "<span title='" . $bmore . "'>" . $story['allmorelink']['more'] . "</span>";
$topicimage_pos = ($viewcounter == 1) ? 'left' : 'right';
$topicimage = ($GLOBALS['storyhome_cols'] == 1) ? mxCreateImage($GLOBALS['tipath'] . $story['topicimage'], _TOPIC . ": " . $story['topictext'], 0, "align=\"" . $topicimage_pos . "\" class='topicimage_" . $topicimage_pos . "'") : "";
$cattitle = (empty($story['cattitle'])) ? "" : " <span style='font-weight: normal;'>(" . $story['allmorelink']['categorie'] . ")</span>";
$authorinfo = (empty($story['informant']) || $story['informant'] == $GLOBALS['anonymous']) ? getThemeAdminname($story) : " " . $story['allmorelink']['informantlink'] . $story['informant'] . "</a>";
$story['content'] = "<a href='modules.php?name=News&new_topic=" . $story['topic'] . "'>" . $topicimage . "</a>\n" . $story['hometext'] . "\n" .((empty($story['notes'])) ? '' : '<div style="font-style: italic;">' . $story['notes'] . '</div>');
//$story['content'] = $story['hometext']. ((empty($story['notes'])) ? '' : '<div style="font-style: italic;">' . $story['notes'] . '</div>');
$story['infoline'] = ($GLOBALS['storyhome_cols'] == 1) ? _NEWSSUBMITED . " " . $authorinfo . " " . $story['allmorelink']['datetime'] : $story['datetime'];
$story['title'] = strip_tags($story['title']) . $cattitle;
// die oben definierten Variablen in dem passenden templateteil ersetzen
$artvars = theme_define_content();
echo theme_replace_vars($theme_template[$artvars['themeindex'][$viewcounter]], $story);
return;
}
c'est tout.
si tu as remarqué le module NEWS n'a rien avoir, maintenant il y a une fonction très intéressante déclaré dans /includes/mx_api.php qu'on peut utilisé dans la fonction précédante(
themeindex ) pour voir toutes les données éxtraite depuis la BD dans des tableaux (array) ou des variables, et c'est avec ces variables qu'on peut affiché ou ne pas affiché telle ou telle information.
exemple avec le tableau ($story['allmorelink']['formated']) on peut afficher en dessous des information telle que posté par, date, score, lu X fois etc...
une dernière chose,
Notes apparaissent également sur la première page (comme c'est le cas avec PHPNuke)
sachez que le module News est développé a partir du module News de PHP-nuke, et que php-nuke n'es plus développé contrairement a PMX depuis des années.