Welcome to Geeklog, Anonymous Wednesday, November 27 2024 @ 11:28 am 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 Smile

Chris
 Quote

Status: offline

ajohnson

Forum User
Junior
Registered: 06/16/06
Posts: 26
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.
 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
}
 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)
 Quote

Status: offline

dewdoo

Forum User
Chatty
Registered: 01/03/04
Posts: 65
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. Big Celebration Mr. Green
 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.
 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
 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 Smile

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......
 Quote

All times are EST. The time is now 11:28 am.

  • 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