Posted on: 07/19/06 06:37pm
By: christopher
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
Removing "No News To Display"
Posted on: 07/19/06 07:36pm
By: ajohnson
I'm guessing the easiest way would be to write a static page and display it then link to the GL stuff from there. I did that on one site and it worked out nice.
Removing "No News To Display"
Posted on: 07/19/06 10:22pm
By: christopher
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
}
Removing "No News To Display"
Posted on: 07/20/06 11:31am
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)
Removing "No News To Display"
Posted on: 07/20/06 12:06pm
By: dewdoo
You can do the same thing w/out modding the code. In edit staticpage there is an option in the center block option to display whole page. That is what I have done. Once I did this the "No news to display" is gone.
Removing "No News To Display"
Posted on: 07/20/06 12:09pm
By: Chrispcritters
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.
Removing "No News To Display"
Posted on: 07/20/06 02:08pm
By: Dirk
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
Removing "No News To Display"
Posted on: 07/20/06 05:22pm
By: christopher
[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)[/QUOTE]
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......