UBB.Dev
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
Birthdays don't counta as events?
No birthdays not required, just events.
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.
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...

Code
/* 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?
Good question, let me look at it a bit... I'd think so smile
Looks like $events is your variable... I'd start with the

$events[$currentdate]

and work from there.
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
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. smile
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.
Well, I've gone ahead and posted a mod for a custom Events Island.
© UBB.Developers