5450 Posts in 1672 Topics by 1197 members
|Go to End|
29 January 2009 at 12:35pm
I am looking for model that will let me announce on the next comming event in the community, how can i achive that?
I'm searching for that for months already, so any help is v.v.v. much appreciated!
29 January 2009 at 2:32pm Last edited: 29 January 2009 2:55pm
Have you looked at the calender modules, one created by Navakia and the other by Uncle Cheese? They might be what you are looking for, or if you wanted something simpler you could jsut create some Event objects and filter them by date.
I have done something similar on this site.
so my DataObject call looks like this:
return DataObject::get("EventPage", "EventDate >= CURDATE() ", "EventDate ASC");
So that will return events that are after today with the next event listed first. If you wanted only the next months events Im sure you could add some logic to figure our what the date will be in a month and just use that as a second filter like this:
"EventDate >= CURDATE() AND EventDate <= $MonthLaterDate"
hope that helps
EDIT: Ok just read your other posts, I'm guessing this wont mean much to you ;) I would recommend going through the tutorials to get an idea of how Silverstripe works and before that, if you havn't already, learn some HTML and CSS, as well as getting a basic understanding of PHP and Object Oriented programming. That probably sounds very daunting but is not as bad as it sounds and is quite essential to creating sites with Silverstripe. I would start here: http://www.w3schools.com/
|Go to Top|