Welcome to Geeklog, Anonymous Saturday, December 21 2024 @ 12:55 pm EST
Geeklog Forums
Hide No News to Display
You could use the search function of this forum
no news to display
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
no news to display
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
14
15
Quote
Brian
Anonymous
Thanks for this post.
Brian
Brian
14
14
Quote
Status: offline
ScurvyDawg
Forum User
Full Member
Registered: 11/06/02
Posts: 523
You must be a member of the Search Military Gekow, LOL.
Hehehe
LOL
Hehehe
LOL
8
13
Quote
Reoccurs in 1.6.1 upgrade
Anonymous
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.
10
15
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by: Reoccurs in 1.6.1 upgrade
To 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
12
16
Quote
Status: offline
beewee
Forum User
Full Member
Registered: 08/05/03
Posts: 969
Location:The Netherlands, where else?
That's what happens if you dig up a five year old story :doh:
Dutch Geeklog sites about camping/hiking:
www.kampeerzaken.nl | www.campersite.nl | www.caravans.nl | www.caravans.net
Dutch Geeklog sites about camping/hiking:
www.kampeerzaken.nl | www.campersite.nl | www.caravans.nl | www.caravans.net
12
7
Quote
All times are EST. The time is now 12:55 pm.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content