Previous Thread
Next Thread
Print Thread
Rate Thread
[7.5.3] Events Island #318032
07/24/2009 8:24 AM
07/24/2009 8:24 AM
Joined: Sep 1999
Posts: 97
Sydney, Australia
M
Myke Offline OP
Power User
Myke  Offline OP
Power User
M

Joined: Sep 1999
Posts: 97
Sydney, Australia
This custom island displays the last N number of public events from your Calendar. Clicking on the event's title takes you to forum post or calendar entry, depending on how the event was created.

The code for the custom island is attached. Configure the date format you wish to use along with the number of items to display in the header of the code.

Formatting of the island is controlled via two new CSS classes you need to create in your site's stylesheet (Styles > Extra Properties):

.event_item - applies to each event
.event_today - only applies to events occuring "today" (i.e. useful for highlighting)

The classes I've defined on my site are:

Code
.event_item {
padding-bottom: 5px;
}

.event_today {
font-weight: bold;
border-left: 4px solid red;
padding-left: 2px;
background-color: #ffd1d1;
}

and the results can be seen in the attached screenshot.

Version 2 Update
Added version 2 of the Events Island code with the following changes:
  • Only shows events from today onwards
  • List sorted in ascending order (i.e. nearest event on top)
  • Configurable display limit (set to 0 for no limit)


Version 3 Update
  • Display custom message if no future events found

Attached Files
events_island_code.txt (19 downloads)
Events island code
events_island.png (142 downloads)
events island screenshot
events_island_v2.png (89 downloads)
events island v2 screenshot
events_island_code_v3.txt (7 downloads)
Events Island code v3
Last edited by Myke; 10/26/2009 7:41 AM. Reason: added ver 3
Sponsored Links
Re: [7.5.3] Events Island [Re: Myke] #318034
07/24/2009 7:47 PM
07/24/2009 7:47 PM
Joined: Jan 2000
Posts: 5,941
Portland, OR, USA
Gizmo Online tapedshut

UBB.Dev / UBB.Wiki Owner
Time Lord
Gizmo  Online Tapedshut

UBB.Dev / UBB.Wiki Owner
Time Lord

Joined: Jan 2000
Posts: 5,941
Portland, OR, USA
I like it; thanks Myke


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, UBB.SitemapsJames Corthell
Re: [7.5.3] Events Island [Re: Gizmo] #318036
07/27/2009 2:47 PM
07/27/2009 2:47 PM
Joined: Oct 2007
Posts: 10
C
Crasher Offline
Newbie
Crasher  Offline
Newbie
C

Joined: Oct 2007
Posts: 10
Neat neat neat - fantastically simple and effective idea


I don't do a lot, but i do do this
Re: [7.5.3] Events Island [Re: Crasher] #318037
07/28/2009 3:24 PM
07/28/2009 3:24 PM
Joined: Jan 2000
Posts: 240
Lutz,FL,USA
R
Ruben Rocha Offline
Beta Tester
Ruben Rocha  Offline
Beta Tester
R

Joined: Jan 2000
Posts: 240
Lutz,FL,USA
Will this work for external islands?
Meaning formatting and guests viewing?
And last question is how to modify it to post from the current day to future dates. Past dates would be useless for me.

Last edited by Ruben Rocha; 07/28/2009 3:31 PM.
Re: [7.5.3] Events Island [Re: Ruben Rocha] #318094
08/17/2009 8:43 PM
08/17/2009 8:43 PM
Joined: Mar 2007
Posts: 94
somewhere on the coast of Main...
badfrog Offline
Power User
badfrog  Offline
Power User

Joined: Mar 2007
Posts: 94
somewhere on the coast of Main...
how do I get this to show the next event at the top of the list? reverse the order?

also..., it isn't showing any of the events for next month, first event it is listing is in october...?

Sponsored Links
Re: [7.5.3] Events Island [Re: Ruben Rocha] #318098
08/20/2009 7:32 AM
08/20/2009 7:32 AM
Joined: Sep 1999
Posts: 97
Sydney, Australia
M
Myke Offline OP
Power User
Myke  Offline OP
Power User
M

Joined: Sep 1999
Posts: 97
Sydney, Australia
Originally Posted by Ruben Rocha
Will this work for external islands?
Meaning formatting and guests viewing?

Sorry, but I'm not sure. I've never used an external island personally. Give it a try and see?

Quote
And last question is how to modify it to post from the current day to future dates. Past dates would be useless for me.

I've attached version 2 to the original post which does this.

That is, it shows the closest event to "today" at the top of the list, and all future events beneath it in chronological order.

I've also modified the code such that if you want no limit to the number of events showing, set the $eventTotal value to 0.

Re: [7.5.3] Events Island [Re: badfrog] #318099
08/20/2009 7:41 AM
08/20/2009 7:41 AM
Joined: Sep 1999
Posts: 97
Sydney, Australia
M
Myke Offline OP
Power User
Myke  Offline OP
Power User
M

Joined: Sep 1999
Posts: 97
Sydney, Australia
Originally Posted by badfrog
how do I get this to show the next event at the top of the list? reverse the order?

You may be interested in ver 2 of this mod which only shows events from "today" onwards (i.e. doesn't show any past events). I've updated the original post with new attachments.

Quote
also..., it isn't showing any of the events for next month, first event it is listing is in october...?

Are you sure you've created "public" events in the month of September? If so, then check that your $eventTotal value isn't too low.

Better yet, you might want to try ver 2 of the mod instead.

Re: [7.5.3] Events Island [Re: Myke] #318100
08/20/2009 7:22 PM
08/20/2009 7:22 PM
Joined: Mar 2007
Posts: 94
somewhere on the coast of Main...
badfrog Offline
Power User
badfrog  Offline
Power User

Joined: Mar 2007
Posts: 94
somewhere on the coast of Main...
sweet! V2 is showing events in the correct order and is showing everything in my calendar.

nice work and ty for the effort!

Re: [7.5.3] Events Island [Re: badfrog] #318107
08/22/2009 10:13 AM
08/22/2009 10:13 AM
Joined: Mar 2007
Posts: 94
somewhere on the coast of Main...
badfrog Offline
Power User
badfrog  Offline
Power User

Joined: Mar 2007
Posts: 94
somewhere on the coast of Main...
ok... i just noticed that when I click on some of the events, it takes me to a random thread.. totally unrelated to the event posting.. am rebuilding posts and topics, etc, will see if that fixes it.

Re: [7.5.3] Events Island [Re: badfrog] #318108
08/22/2009 10:41 AM
08/22/2009 10:41 AM
Joined: Mar 2007
Posts: 94
somewhere on the coast of Main...
badfrog Offline
Power User
badfrog  Offline
Power User

Joined: Mar 2007
Posts: 94
somewhere on the coast of Main...
rebuilding didn't fix it... if I click on the event from teh event island, it takes me to some random post, if I go to the calendar and click on the event, it takes me to the correct listing.

Sponsored Links
Re: [7.5.3] Events Island [Re: badfrog] #318140
08/23/2009 8:35 AM
08/23/2009 8:35 AM
Joined: Sep 1999
Posts: 97
Sydney, Australia
M
Myke Offline OP
Power User
Myke  Offline OP
Power User
M

Joined: Sep 1999
Posts: 97
Sydney, Australia
Really sorry, but there was an error in the v2 code I attached.

It's now been fixed, so try again.

Re: [7.5.3] Events Island [Re: Myke] #318141
08/23/2009 9:25 AM
08/23/2009 9:25 AM
Joined: Mar 2007
Posts: 94
somewhere on the coast of Main...
badfrog Offline
Power User
badfrog  Offline
Power User

Joined: Mar 2007
Posts: 94
somewhere on the coast of Main...
no need to be sorry!

ok, linking seems correct now..
BUT...
I have output set to 5, and it is showing me 16....

Re: [7.5.3] Events Island [Re: badfrog] #318161
08/23/2009 8:32 PM
08/23/2009 8:32 PM
Joined: Sep 1999
Posts: 97
Sydney, Australia
M
Myke Offline OP
Power User
Myke  Offline OP
Power User
M

Joined: Sep 1999
Posts: 97
Sydney, Australia
badfrog, ok try v2 again! I had mistakingly left off the limit handling in the query.

Note to self: Developing and posting from different computers without proper version control is always a bad idea smile

Re: [7.5.3] Events Island [Re: Myke] #318163
08/23/2009 11:43 PM
08/23/2009 11:43 PM
Joined: Mar 2007
Posts: 94
somewhere on the coast of Main...
badfrog Offline
Power User
badfrog  Offline
Power User

Joined: Mar 2007
Posts: 94
somewhere on the coast of Main...
ding ding ding ding!
we have a winner!

thanx Myke!

Re: [7.5.3] Events Island [Re: badfrog] #318267
10/26/2009 7:43 AM
10/26/2009 7:43 AM
Joined: Sep 1999
Posts: 97
Sydney, Australia
M
Myke Offline OP
Power User
Myke  Offline OP
Power User
M

Joined: Sep 1999
Posts: 97
Sydney, Australia
Updated to version 3 which will display a custom message when no events are found. Edit the $noEventsMsg variable in the code header as required.


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
· Blue Host
· Interserver.net
Visit us on Facebook
Member Spotlight
Bill B
Bill B
Issaquah, WA
Posts: 84
Joined: December 2001
Show All Member Profiles 
Forum Statistics
Forums64
Topics37,456
Posts293,497
Members13,800
Most Online1,498
Mar 17th, 2017
Top Posters(All Time)
AllenAyres 25,587
JoshPet 11,330
Rick 8,373
LK 7,396
Lord Dexter 6,503
Gizmo 5,941
Greg Hard 5,533
Top Posters(30 Days)
isaac 8
Gizmo 3
driv 1
Today's Statistics
Currently Online 747
Topics Created 2
Posts Made 6
Users Online 3
Birthdays 23
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2018 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 7.6.3
(Snapshot build 20180923.dev)
PHP: 5.4.45 DB: MySQLi Page Time: 0.072s Queries: 16 (0.019s) Memory: 3.3548 MB (Peak: 3.5827 MB) Zlib enabled. Server Time: 2018-09-23 21:55:09 UTC