Thread: plugin news
View Single Post
  #1  
Old 11th November 2013, 17:01
open open is offline
Senior Member
 
Join Date: Nov 2010
P2P
Posts: 22
Red face plugin news
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 '<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?
Attached Files
File Type: php nouvelle.php (1.2 KB, 13 views)
Reply With Quote
The Following User Says Thank You to open For This Useful Post:
MaVerick88 (18th February 2014)