Welcome to Geeklog, Anonymous Wednesday, December 07 2022 @ 10:21 pm EST

Geeklog Forums

Upcoming Events block - change to number of events, rather than date range?


Status: offline

CavemanJoe

Forum User
Chatty
Registered: 09/20/06
Posts: 41
Location:Cheshire, England
Hey. I've been trying to wrestle Geeklog into this theme that a designer provided, and it's gone well - apart from extra events displaying below the bottom of the Events block.
I know that the block can be configured to display only results from the next x days - but is there a way to make it only display y results from the next x days? If we could limit it to four events, that'd be great.
Any ideas?
Silly browser RPG: improbableisland.com!
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
In plugins/calendar/functions.inc in function phpblock_calendar there are two partial SQL statements:
Text Formatted Code
'ORDER BY datestart,timestart';
Changing those to
Text Formatted Code
'ORDER BY datestart,timestart LIMIT 4';
should do the trick.

bye, Dirk
 Quote

Status: offline

CavemanJoe

Forum User
Chatty
Registered: 09/20/06
Posts: 41
Location:Cheshire, England
Worked perfectly. Thanks! Smile
Silly browser RPG: improbableisland.com!
 Quote

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