Bonjour j'ai modifier le bloc content un tout petit peu.
J'ai ajouter la détection du langage utilisé afin de n'afficher que les pages correspondant à la page sélectionnée.
Ajout également d'un image "new" comme pour les articles, lors d'une nouvelle page.
Ajout d'un compteur qui indique le nombre de lecture de la page.
Je vous met le code en entier ici
<?php
/**
* This file is part of
* pragmaMx - Web Content Management System.
* Copyright by pragmaMx Developer Team - http://www.pragmamx.org
*
* pragmaMx is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* $Revision: 1.6.6.1 $
* $Author: tora60 $
* $Date: 2009/03/06 03:32:49 $
*
* this file based on:
* php-nuke Web Portal System - http://phpnuke.org/
* Thatware - http://thatware.org/
*/
// Blockcache ermoeglichen
$mxblockcache = true;
// Modulname
$module_name = 'Content';
// Anzahl der angezeigten Links, 0 um alle Links anzuzeigen
$limit = 5;
defined('mxMainFileLoaded') or die('access denied');
global $prefix;
if ($GLOBALS['multilingual']) {
if (strpos($GLOBALS['currentlang'], 'german') === 0) $thislang = 'german';
else $thislang = $GLOBALS['currentlang'];
$querylang = "AND (clanguage LIKE '" . $thislang . "%' OR clanguage='')";
} else {
$querylang = '';
}
$limit = ($limit) ? ' LIMIT ' . intval($limit) : '';
$content = '';
$qry = "SELECT pid, title,counter,date,DATE_ADD(date, INTERVAL 7 DAY) AS expire, now() AS nowi FROM " . $prefix . "_pages WHERE date <= now() $querylang ORDER BY date DESC" . $limit . "";
$result = sql_query($qry);
if (!$result) {
return;
}
while ($story = sql_fetch_assoc($result)) {
$pid = $story[pid];
$counter = $story[counter];
$title = $story[title];
$image = '';
if ($story['nowi'] < $story['expire']) {
$datetime = $story['date'];
$image = mxCreateImage("images/menu/new.gif", 'new: ' . $datetime) . ' ';
}
$content .= '<tr><td><li><a href="modules.php?name=' . $module_name . '&pid=' . $pid . '">' . $title . '</a> Lu ('. $counter .' fois) '. $image .'</td></li>';
}
if ($content) {
$content = '<ul>' . $content . '</ul>';
}
?>
Philippe