Previous Thread
Next Thread
Print Thread
Hop To
Joined: Oct 2005
Posts: 50
F
journeyman
OP Offline
journeyman
F
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
OP Offline
journeyman
F
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
R
Former Developer
Offline
Former Developer
R
Joined: Jun 2006
Posts: 9,242
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
OP Offline
journeyman
F
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
Offline
Pooh-Bah
D
Joined: Jan 2004
Posts: 2,474
Likes: 3
Perhaps you could try asking over at UBBdev ? smile

Joined: Oct 2005
Posts: 50
F
journeyman
OP Offline
journeyman
F
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
Scroll Up Button
by JAISP - 04/28/2021 7:39 AM
[Cannot Replicate] Unapprove Post Bug
by Larry Miller - 04/26/2021 10:07 AM
Just popping in
by Harold - 04/25/2021 9:05 PM
Moving Forum/Category location
by ECNet - 04/25/2021 12:11 PM
7.7.5 become member issue
by Ruben - 04/15/2021 10:06 AM
Who's Online Now
1 members (Ruben), 83 guests, and 56 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
gallery test
gallery test
by Mors, September 23
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Powered by UBB.threads™ PHP Forum Software 7.7.5