Welcome to Geeklog, Anonymous Friday, December 27 2024 @ 09:06 pm EST
Geeklog Forums
Removing "No News To Display"
Status: offline
christopher
Forum User
Newbie
Registered: 07/16/06
Posts: 4
I will not be placing any "stories" on my front page and would like to remove the "no news to display" table that appears. I've searched through past responses to this issue and edited the language file as suggested, but unfortunately this effects all the topics -- I only want to change the front page. Most notable: it doesn't seem to remove the table itself, only the text.
I figured there must be something in the code (perhaps index.html) that calls for it to print the table (along with the text appearing in english.php) if it finds no matching database entries/stories to print. So far I've had no luck spotting it.
Was hoping someone could point me in the right direction
Chris
I figured there must be something in the code (perhaps index.html) that calls for it to print the table (along with the text appearing in english.php) if it finds no matching database entries/stories to print. So far I've had no luck spotting it.
Was hoping someone could point me in the right direction
Chris
14
18
Quote
Status: offline
christopher
Forum User
Newbie
Registered: 07/16/06
Posts: 4
I believe I found a way to remove the "no news to display" stuff, but not yet sure if there will be any negative side-effects. I backed up the original and will run with this for a while to see how it goes. Hope this helps others.
At the bottom of index.php (public_html dir) I removed the following code:
else { // no stories to display
$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
}
At the bottom of index.php (public_html dir) I removed the following code:
else { // no stories to display
$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
}
16
20
Quote
Status: offline
Chrispcritters
Forum User
Chatty
Registered: 05/11/05
Posts: 49
Location:Tustin, CA
Please let me know the result as I would like to do the same thing on my site. (Just never got around to looking through the code)
15
12
Quote
Status: offline
Chrispcritters
Forum User
Chatty
Registered: 05/11/05
Posts: 49
Location:Tustin, CA
My situation is a bit different. I do occasionally have stories on the homepage, but just don't want the 'no news' thing when there are currently no news stories.
16
20
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Removing that message doesn't do any harm. In fact, if you search the forums, you'll find earlier posts where I showed how to do just that ...
Geeklog 1.4.1 will have a config option to hide that message - no more code changes necessary.
bye, Dirk
Geeklog 1.4.1 will have a config option to hide that message - no more code changes necessary.
bye, Dirk
12
14
Quote
Status: offline
christopher
Forum User
Newbie
Registered: 07/16/06
Posts: 4
Quote by Chrispcritters: Please let me know the result as I would like to do the same thing on my site. (Just never got around to looking through the code)
Turns out I cut out one to many lines of the code... if there's no news stories but you happen to have a static page at the bottom of the page, it will not appear with my edits.
Turns out that Dirk is right... this was addressed earlier -- I missed it when I searched. forum=3&showtopic=31110 is one of them. It's working for me -- good luck to you
Now to figure out how to remove the big blob at the bottom of the forum (plugin) pages that defines all the various icons, time, and timezone......
15
14
Quote
All times are EST. The time is now 09:06 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