Previous Thread
Next Thread
Print Thread
Hop To
Joined: Oct 2005
Posts: 50
F
journeyman
journeyman
F Offline
Joined: Oct 2005
Posts: 50
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: Oct 2005
Posts: 50
F
journeyman
journeyman
F Offline
Joined: Oct 2005
Posts: 50
OK, I've got this far but am stuck:

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?

Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
The best thing would probably be to look at scripts/showday.inc.php. Around line 114 is where the code starts to figure out events for the day (you'd just probably want to remove the private section since it should only display public events.

Joined: Oct 2005
Posts: 50
F
journeyman
journeyman
F Offline
Joined: Oct 2005
Posts: 50
Sorry Rick, that code is beyond me. Think I would need someone more knowledgeable than myself to walk me through it.

All I need is a function that checks whether today has >0 events and returns a result, did not realise how complicated it would be frown

Joined: Jan 2004
Posts: 2,474
Likes: 3
D
Pooh-Bah
Pooh-Bah
D Offline
Joined: Jan 2004
Posts: 2,474
Likes: 3
Perhaps you could try asking over at UBBdev ? smile

Joined: Oct 2005
Posts: 50
F
journeyman
journeyman
F Offline
Joined: Oct 2005
Posts: 50
Hi again.

Still no joy implementing this, noone at UBBDev seems to have a solution as yet frown

Can I make a plea for this feature to be part of UBB v8? Please?!? The fact that you can have external birthday islands but not event islands seems like it needs to be an essential (and pretty straightforward) addition IMHO.

Phil


Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
spam issues
by ECNet - 03/19/2024 11:45 PM
Looking for a forum
by azr - 03/15/2024 11:26 PM
Editing Links in Post
by Outdoorking - 03/15/2024 9:31 AM
Question on barkrowler and the like
by Mors - 02/29/2024 6:51 PM
Member Permissions Help
by domspeak - 02/27/2024 6:31 PM
Who's Online Now
1 members (Ruben), 476 guests, and 111 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)