|
Joined: Feb 2006
Posts: 4
Lurker
|
Lurker
Joined: Feb 2006
Posts: 4 |
Hi there, I want to have a really simple external custom island that checks whether there is a calendar event on the current day, and if so displays the message "Events Today" (I will then link that to the main calendar in the forum). Can anyone help me out, sure it can be done somehow? Thanks, Phil
|
|
|
|
Joined: Feb 2007
Posts: 329
Yarp™
|
Yarp™
Joined: Feb 2007
Posts: 329 |
Birthdays don't counta as events?
|
|
|
|
Joined: Feb 2006
Posts: 4
Lurker
|
Lurker
Joined: Feb 2006
Posts: 4 |
No birthdays not required, just events.
|
|
|
|
Joined: Feb 2007
Posts: 329
Yarp™
|
Yarp™
Joined: Feb 2007
Posts: 329 |
If you want a stab at doing it yourself, my suggestion would be to take the current calender island code, and rebuild it to your own island.
|
|
|
|
Joined: Feb 2006
Posts: 4
Lurker
|
Lurker
Joined: Feb 2006
Posts: 4 |
Using the birthday island code as a basis, I can get this to work as a custom island and print a message if there are, or are not, birthdays on the current day, so hopefully it is quite simple to do the same but for events... /* PHP CODE HERE, IF NECESSARY */ if ($bday != 0) { $eventstoday = 'Birthdays Today'; } else { $eventstoday = 'No Birthdays Today'; }
/* DO NOT CHANGE THE LINE BELOW */ $body = <<<EOF $eventstoday EOF; /* DO NOT CHANGE THE LINE ABOVE */ So I need someone to let me know if there is a variable like $bday that works in a similar fashion but for events not birthdays, as I'm rubbish a php I can't work it out myself. Anyone know?
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
Good question, let me look at it a bit... I'd think so 
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
Looks like $events is your variable... I'd start with the
$events[$currentdate]
and work from there.
|
|
|
|
Joined: Feb 2006
Posts: 4
Lurker
|
Lurker
Joined: Feb 2006
Posts: 4 |
Hello Allen, thanks for the response, So I could use...
if (isset($events[$currentdate]) {...blah blah blah...}
..for this? It seems I also need to pull in the original variables somehow from the calendar scripting, can you let me know how I can do that?
Cheers, Phil
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
hmmm... I haven't had time to look at it yet, but this really should be in the base code, it's one of the obvious "why not?" featurettes. 
|
|
|
|
Joined: Sep 1999
Posts: 76
Power User
|
Power User
Joined: Sep 1999
Posts: 76 |
Phil, any luck in getting this mod done?
If not, then I might have a crack at it tonight since I want something similar. That is, I want an Events island that simply lists the top 5, 10 (whatever) public events from the calendar. The list will simply be the Event title (clickable link) and the date of the event.
I personally think this is more useful to convey event information to your community, than the current Calendar island. The Calendar island requires that you hover over a highlighted date to find out what's happening, and it's limited to only showing the current month.
In terms of your request, what I'm planning on doing could be easily modified to only show events that occur "today", or else a "no events today" style message. Let me know if you already have a solution, or if you're still interested in one.
|
|
|
|
Joined: Sep 1999
Posts: 76
Power User
|
Power User
Joined: Sep 1999
Posts: 76 |
Well, I've gone ahead and posted a mod for a custom Events Island.
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 1,157
Joined: July 2001
|
|
Forums63
Topics37,575
Posts293,931
Members13,823
|
Most Online6,139 Sep 21st, 2024
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|