Posted on: 02/26/04 06:46am
By: Uffe
If i only want to have my static pages on the front, how can i hide the "No News to Display"
here[*1]
Hide No News to Display
Posted on: 02/26/04 07:45am
By: geKow
You could use the search function of this forum
no news to display[*2]
Or you meet a guy in a positive mood
[Quote by Dirk]
Near the end of index.php, there's a comment stating "no stories to display". The following COM_startBlock / COM_endBlock pair (and the code in between) is responsible for the "no stories to display" message.
[/quote]
[Quote by Pantman]
Thanks for that Dirk. For anyone thats interested and wants to save the 2 minutes it takes to figure out the lines you need to comment out it's the ones below
$display .= COM_startBlock ($LANG05[1], '',
COM_getBlockTemplate ('_msg_block', 'header')) . $LANG05[2];
if (!empty($topic)) {
$topicname = DB_getItem ($_TABLES['topics'], 'topic', "tid='{$topic}'");
$display .= sprintf ($LANG05[3], $topicname);
}
$display .= COM_endBlock (COM_getBlockTemplate ('_msg_block', 'footer')); [/quote]
geKow
Hide No News to Display
Posted on: 02/26/04 08:01am
By: Uffe
Thanks,
If i dont write i will never meet some new frends
Hide No News to Display
Posted on: 05/10/04 04:05pm
By: Anonymous (Brian)
Thanks for this post.
Brian
Hide No News to Display
Posted on: 05/10/04 05:00pm
By: ScurvyDawg
You must be a member of the Search Military Gekow, LOL.
Hehehe
LOL
Hide No News to Display
Posted on: 05/10/04 06:00pm
By: geKow
hehe
it's just a matter of my actual mood
Normaly I'm an absolute peacefull and helpfull person
geKow
Re: Hide No News to Display
Posted on: 01/25/10 01:56pm
By: Anonymous (Reoccurs in 1.6.1 upgrade)
To prevent from changing the index.php code, I added the following into the db-config.php:
//To prevent the News Block from Displaying
$_CONF['hide_no_news_msg'] == 1; //0=shows 1=hides
// Following times are in seconds
$_CONF['newstoriesinterval'] = 86400; // = 24 hours
$_CONF['newcommentsinterval'] = 172800; // = 48 hours
$_CONF['newtrackbackinterval'] = 172800; // = 48 hours
// Set to 1 to hide a section from the What's New block:
$_CONF['hidenewstories'] = 1;
$_CONF['hidenewcomments'] = 1;
$_CONF['hidenewtrackbacks'] = 1;
$_CONF['hidenewplugins'] = 1;
I was, also, able to prevent the news block from displaying by changing index.php as follows:
} else { // no stories to display
if (!isset ($_CONF['hide_no_news_msg']) ||
($_CONF['hide_no_news_msg'] == 1)) { //Changed to 1 to prevent displaying News
$display .= COM_startBlock ($LANG05[1], '',
COM_getBlockTemplate ('_msg_block', 'header')) . $LANG05[2];
if (!empty ($topic)) {
$topicname = DB_getItem ($_TABLES['topics'], 'topic',
"tid = '$topic'");
$display .= sprintf ($LANG05[3], $topicname);
}
$display .= COM_endBlock (COM_getBlockTemplate ('_msg_block', 'footer'));
}
$display .= PLG_showCenterblock (3, $page, $topic); // bottom blocks
Either way, it works. But, of course, you can comment out the lines. It might be a problem on the next upgrade.
Re: Hide No News to Display
Posted on: 01/25/10 02:00pm
By: Dirk
Quote by: Reoccurs in 1.6.1 upgradeTo prevent from changing the index.php code, I added the following into the db-config.php:
Why are you doing this? There's a handy option in the Configuration:
Configuration > Geeklog > Stories and Trackback > Story > Hide "No News" Message?
Set that to "True" if you don't want that message.
bye, Dirk
Re: Hide No News to Display
Posted on: 01/25/10 03:49pm
By: beewee
That's what happens if you dig up a five year old story :doh: