1
Tuscany
Display period in TinyEvents
  • 2006/2/16 6:45

  • Tuscany

  • Just popping in

  • Posts: 56

  • Since: 2005/4/19


Hi!
I am using TinyEvents to show some events in the block.
Now I only want to show events within the next week (7 days)

Who can help me with a hack?

Thank You very much !!!

Tus

2
zyspec
Re: Display period in TinyEvents
  • 2006/2/24 23:07

  • zyspec

  • Module Developer

  • Posts: 1095

  • Since: 2004/9/21


If all you want is the Next Events block to show events for the next week you can do the following;

Just after line 40 in /blocks/te_nextevents.php from:

$start = mktime (0,0,0,date("m") ,date("d") ,date("Y"));

add:

$end = strtotime("+1 week");

Then comment out line 42 by placing 2 '/' at the beginning of the line like this:

// $result = $xoopsDB->queryF("SELECT id, date, date2, event FROM ".$xoopsDB->prefix()."_tinyevent WHERE pub='1' AND (date >= '$start') ORDER BY date limit 0, $numEvents");

and add this on the next line:

$result = $xoopsDB->queryF("SELECT id, date, date2, event FROM ".$xoopsDB->prefix()."_tinyevent WHERE pub='1' AND (date >= '$start') AND (date <= '$end') ORDER BY date limit 0, $numEvents");


This will give you all the events for the next week up to the maximum you have selected in the Admin Panel.

Login

Who's Online

246 user(s) are online (53 user(s) are browsing Support Forums)


Members: 0


Guests: 246


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits