Welcome to Geeklog, Anonymous Saturday, December 21 2024 @ 12:55 pm EST

Geeklog Forums

Hide No News to Display


Status: offline

Uffe

Forum User
Junior
Registered: 02/01/04
Posts: 30
If i only want to have my static pages on the front, how can i hide the "No News to Display"
here
 Quote

Status: offline

geKow

Forum User
Full Member
Registered: 01/12/03
Posts: 445
okay
You could use the search function of this forum Wink

no news to display

Or you meet a guy in a positive mood Smile

[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

 Quote

Status: offline

Uffe

Forum User
Junior
Registered: 02/01/04
Posts: 30
Thanks,

If i dont write i will never meet some new frends Rolling Eyes
 Quote

Brian

Anonymous
caffeinated
Thanks for this post.

Brian
 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

 Quote

Status: offline

geKow

Forum User
Full Member
Registered: 01/12/03
Posts: 445
hehe

it's just a matter of my actual mood

Normaly I'm an absolute peacefull and helpfull person

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