UBB.Dev
Posted By: Myke [7.5.3] Events Island - 07/24/2009 3:24 PM
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



Description: Events island code
Attached File
events_island_code.txt  (21 downloads)

Description: events island screenshot
Attached picture events_island.png

Description: events island v2 screenshot
Attached picture events_island_v2.png

Description: Events Island code v3
Attached File
events_island_code_v3.txt  (10 downloads)
Posted By: Gizmo Re: [7.5.3] Events Island - 07/25/2009 2:47 AM
I like it; thanks Myke
Posted By: Crasher Re: [7.5.3] Events Island - 07/27/2009 9:47 PM
Neat neat neat - fantastically simple and effective idea
Posted By: Ruben Rocha Re: [7.5.3] Events Island - 07/28/2009 10:24 PM
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.
Posted By: badfrog Re: [7.5.3] Events Island - 08/18/2009 3:43 AM
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...?
Posted By: Myke Re: [7.5.3] Events Island - 08/20/2009 2:32 PM
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.
Posted By: Myke Re: [7.5.3] Events Island - 08/20/2009 2:41 PM
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.
Posted By: badfrog Re: [7.5.3] Events Island - 08/21/2009 2:22 AM
sweet! V2 is showing events in the correct order and is showing everything in my calendar.

nice work and ty for the effort!
Posted By: badfrog Re: [7.5.3] Events Island - 08/22/2009 5:13 PM
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.
Posted By: badfrog Re: [7.5.3] Events Island - 08/22/2009 5:41 PM
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.
Posted By: Myke Re: [7.5.3] Events Island - 08/23/2009 3:35 PM
Really sorry, but there was an error in the v2 code I attached.

It's now been fixed, so try again.
Posted By: badfrog Re: [7.5.3] Events Island - 08/23/2009 4:25 PM
no need to be sorry!

ok, linking seems correct now..
BUT...
I have output set to 5, and it is showing me 16....
Posted By: Myke Re: [7.5.3] Events Island - 08/24/2009 3:32 AM
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
Posted By: badfrog Re: [7.5.3] Events Island - 08/24/2009 6:43 AM
ding ding ding ding!
we have a winner!

thanx Myke!
Posted By: Myke Re: [7.5.3] Events Island - 10/26/2009 2:43 PM
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.
© UBB.Developers