Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Feb 2006
Posts: 4
Lurker
Lurker
Offline
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

Sponsored Links
Joined: Feb 2007
Posts: 329
Yarp™
Yarp™
Offline
Joined: Feb 2007
Posts: 329
Birthdays don't counta as events?

Joined: Feb 2006
Posts: 4
Lurker
Lurker
Offline
Joined: Feb 2006
Posts: 4
No birthdays not required, just events.

Joined: Feb 2007
Posts: 329
Yarp™
Yarp™
Offline
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
Offline
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...

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?

Sponsored Links
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 smile


- Allen wavey
- What Drives You?
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.


- Allen wavey
- What Drives You?
Joined: Feb 2006
Posts: 4
Lurker
Lurker
Offline
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. smile


- Allen wavey
- What Drives You?
Joined: Sep 1999
Posts: 76
Power User
Power User
Offline
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.

Sponsored Links
Joined: Sep 1999
Posts: 76
Power User
Power User
Offline
Joined: Sep 1999
Posts: 76
Well, I've gone ahead and posted a mod for a custom Events Island.


Link Copied to Clipboard
Donate Today!
Donate via PayPal

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.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)