Welcome to Geeklog, Anonymous Saturday, November 30 2024 @ 11:38 am EST

Geeklog Forums

What's New Block


Status: offline

cypry

Forum User
Newbie
Registered: 06/06/05
Posts: 13
Location:UK
I'd like to change the what's new block on my site to show both stories and links from the last week (instead of last 48 hours for stories and 2 weeks for links).
How do I go about this?

Cheers

Adam
cypry.com - dubs, drops and descents......
 Quote

Status: offline

knuff

Forum User
Full Member
Registered: 12/17/04
Posts: 340
Location:Sweden
Have a look at the config.php documentation.

Text Formatted Code
// Following times are in seconds
$_CONF['newstoriesinterval']  =   86400; // = 24 hours
$_CONF['newcommentsinterval'] =  172800; // = 48 hours
$_CONF['newlinksinterval']    = 1209600; // = 14 days

// Set to 1 to hide a section from the What's New block:
$_CONF['hidenewstories']  = 0;
$_CONF['hidenewcomments'] = 0;
$_CONF['hidenewlinks']    = 0;
$_CONF['hidenewplugins']  = 0;
 

Vanrillaer.com - our Family Portal
 Quote

Status: offline

cypry

Forum User
Newbie
Registered: 06/06/05
Posts: 13
Location:UK
Thanks - is there any way of changing the display to read "x stories in last 7 days" rather than "x stories in last 168 hours"...?
cypry.com - dubs, drops and descents......
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Those texts are, unfortunately, hard-coded. So you'll have to change them in the language file(s). See Where can I change the text ...?

bye, Dirk
 Quote

Status: offline

cypry

Forum User
Newbie
Registered: 06/06/05
Posts: 13
Location:UK
Hi

I found the text, it's the number that's causing me a problem.
I've changed the newstoriesinterval to 604800 (i.e. 7 days in seconds), and I've found the relevant text in english.php, however the number part of the text is obviously hard coded to calculate in hours.

I'm wondering if there's somewhere I can change the 168 to a 7 - it's the only bit that isn't in english.php so I'm guessing there must be a calculation elsewhere...

Thanks

Adam

cypry.com - dubs, drops and descents......
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by cypry: so I'm guessing there must be a calculation elsewhere...

Right, forgot about that bit ...

it's in function COM_whatsNewBlock in lib-common.php

bye, Dirk
 Quote

Status: offline

cypry

Forum User
Newbie
Registered: 06/06/05
Posts: 13
Location:UK
Fantastic - fixed it now - thanks for your help Smile
cypry.com - dubs, drops and descents......
 Quote

All times are EST. The time is now 11:38 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