Welcome to Geeklog, Anonymous Thursday, March 28 2024 @ 04:37 pm EDT

Geeklog Forums

HOWTO activate Older Stories Block


Status: offline

rocteur

Forum User
Newbie
Registered: 02/10/02
Posts: 6
First set this line in config.php $_CONF['olderstuff'] = 1; Then create a new block: Block Title: Older Stories Block Name: older_stories Block Type: Normal Block Content 'type anything in here' Save block. Edit any story. That is it. Someone please put this in FAQ and/or Docs. Regards, // Jerry
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany

I've got an even better idea: We are going to fix this in the next release of Geeklog ;-)

Two additional notes:

  • You need a certain amount of stories before the older stories block will work. This amount is specified by the variable $_CONF['limitnews‘] in your config.php. You need at least one more story than that amount.
  • The older stories block in 1.3.5 is displayed incorrectly. To fix that, go to line 1745 in your lib-common.php and move that line and the next (starting with $day2 = ... and $string .= ...) down just above the (current) line 1752, which reads $oldnews = array ();

bye, Dirk

 Quote

Status: offline

rocteur

Forum User
Newbie
Registered: 02/10/02
Posts: 6
Thanks Dirk.. This is what it looks like now: if ($day != $daycheck) { if ($day != 'noday') { $daylist = COM_makeList ($oldnews); $daylist = preg_replace ("/(\015\012)|(\015)|(\012)/", "", $daylist); $string .= $daylist; } $day2 = strftime("%m/%d",$A['day']); $string .= '<br><b>' . $daycheck . '</b> <small>' . $day2 . '</small><br>' . LB; $oldnews = array (); $day = $daycheck; } Sorry this looks odd but you don't support the <pre> tag!
 Quote

Anonymous

Anonymous
is there a way to only have stories that are between the last 10-20? That way, stories already on the front page do no get listed there as well.
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany

As I tried to explain in my comment above, it all depends on the variable $_CONF['limitnews'] in your config.php.

Let's say, this variable has a value of 10. Then Geeklog would show 10 stories on the front page and the Older Stories block would show the next (i.e. older) 10 stories.

Now, of course, since every user can set the amount of stories to be displayed on the front page in his/her user preferences, this will not always work out. If you have limitnews set to 8 (as it is currently here on www.geeklog.net), but you have 10 stories displayed on the front page, then you will have two 'overlapping' stories which are displayed both on the front page and in the Older Stories block.

The problem here is that the Older Stories are actually stored in the database and not displayed individually for every user. So other than setting your defaults accordingly, there currently is no really satisfying solution to this.

bye, Dirk

 Quote

All times are EDT. The time is now 04:37 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