10928 Posts in 2612 Topics by 1809 members
|Go to End|
12 January 2011 at 6:41pm
Would there be a way of scheduling events so that they dont appear on the website until after a specified date?
13 January 2011 at 2:12pm
Sorry about asking for too much up front :\
I updated the CalendarEventClass
class CalendarEvent extends Page
static $db = array (
'ActivationDate' => 'Date'
I'm having problems finding out what the syntax would be to compare this field with the current date. I've narrowed it down to modifying Calendar.ss about here
<% if Events %>
<% control Events %>
I thought of encapsulating the remainder of the control block into something like
<% if $ActivationDate < time() %>
<% end_if %>
It doesn't work. heh.
Can anyone tell me the correct syntax please?
18 January 2011 at 12:33pm
Still trying to understand this code ...
In the file Calendar.php there's protected members $start_date and $end_date that appear global to the class. There's also a function 'Events' which the template file is 'control'-ing to display the list of event on the website. The function 'Events' takes a bunch of arguments, including the variables $start_date and $end_date. Why is that ? Are these new $start_date and $end_date variables?
Shouldn't the function 'Events' naturally have access to these variables ?
18 January 2011 at 5:05pm
Well, I've given up trying to accomplish the date activation that way.
Does anyone (apart from unclechee$e) know how to add another date to the Dates and Times tab of the CMS?
|Go to Top|