Hello
I would put the news plugin on one page instead of being on the index! .....
someone could you help me because the tests I created does not work
thank you
PHP Code:
<?php
require_once 'global.php';
gzip ();
dbconn ();
loggedinorreturn ();
maxsysop ();
parked ();
define ('T_VERSION', 'v.0.7 by xam');
stdhead ('Nouvelles');
# Settings
$news = ''; //Must be empty and same as plugin and file name.
if (!defined('SKIP_CACHE_MESSAGE'))
{
define('SKIP_CACHE_MESSAGE', true);
}
require_once(INC_PATH.'/functions_cache2.php');
if (!($newscached = cache_check2('news')))
{
# Query
$news_query = sql_query('SELECT added, body, title FROM news ORDER BY added DESC LIMIT 0,'.MAX_NEWS);
if (mysql_num_rows($news_query) > 0)
{
while($news_results = mysql_fetch_assoc($news_query))
{
$news .= '<span class="subheader"><strong>'.$news_results['title'].' - '.my_datee($dateformat, $news_results['added']).' '.my_datee($timeformat, $news_results['added']).'</strong></span><hr />'.format_comment($news_results['body']).(MAX_NEWS > 1 ? '<br /><br />' : '');
}
}
cache_save2('news', $news);
}
else
{
$news .= ($is_mod ? '<span style="float: right;">[<a href="'.$BASEURL.'/admin/index.php?act=news">'.$lang->index['newspage'].'</a>]</span><br /><hr />' : '<hr />');
$news .= $newscached;
}
stdfoot ();
?>
Bump: person to help?