php forum
php mysql forum
php mysql smarty
 
Topic Options
#318032 - 07/24/09 08:24 AM [7.5.3] Events Island
Myke Offline
Power User

Registered: 09/06/99
Posts: 97
Loc: 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


Attachments
events_island_code.txt (17 downloads)
Description: Events island code

events_island.png

Description: events island screenshot

events_island_v2.png

Description: events island v2 screenshot

events_island_code_v3.txt (1 downloads)
Description: Events Island code v3




Edited by Myke (10/26/09 07:41 AM)
Edit Reason: added ver 3

Top
#318034 - 07/24/09 07:47 PM Re: [7.5.3] Events Island [Re: Myke]
Gizmo Online   shocked

Wizard

Registered: 01/10/00
Posts: 5287
Loc: Portland, OR, USA
I like it; thanks Myke
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#318036 - 07/27/09 02:47 PM Re: [7.5.3] Events Island [Re: Gizmo]
Crasher Offline
Lurker

Registered: 10/18/07
Posts: 9
Neat neat neat - fantastically simple and effective idea
<thumbs_up>
_________________________
I don't do a lot, but i do do this

Top
#318037 - 07/28/09 03:24 PM Re: [7.5.3] Events Island [Re: Crasher]
Ruben Rocha Offline
Member

Registered: 01/19/00
Posts: 169
Loc: 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.


Edited by Ruben Rocha (07/28/09 03:31 PM)

Top
#318094 - 08/17/09 08:43 PM Re: [7.5.3] Events Island [Re: Ruben Rocha]
badfrog Offline
Power User

Registered: 03/05/07
Posts: 83
Loc: 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...?

Top
#318098 - 08/20/09 07:32 AM Re: [7.5.3] Events Island [Re: Ruben Rocha]
Myke Offline
Power User

Registered: 09/06/99
Posts: 97
Loc: 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.

Top
#318099 - 08/20/09 07:41 AM Re: [7.5.3] Events Island [Re: badfrog]
Myke Offline
Power User

Registered: 09/06/99
Posts: 97
Loc: 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.

Top
#318100 - 08/20/09 07:22 PM Re: [7.5.3] Events Island [Re: Myke]
badfrog Offline
Power User

Registered: 03/05/07
Posts: 83
Loc: 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!

Top
#318107 - 08/22/09 10:13 AM Re: [7.5.3] Events Island [Re: badfrog]
badfrog Offline
Power User

Registered: 03/05/07
Posts: 83
Loc: 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.

Top
#318108 - 08/22/09 10:41 AM Re: [7.5.3] Events Island [Re: badfrog]
badfrog Offline
Power User

Registered: 03/05/07
Posts: 83
Loc: 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.

Top
#318140 - 08/23/09 08:35 AM Re: [7.5.3] Events Island [Re: badfrog]
Myke Offline
Power User

Registered: 09/06/99
Posts: 97
Loc: Sydney, Australia
Really sorry, but there was an error in the v2 code I attached.

It's now been fixed, so try again.

Top
#318141 - 08/23/09 09:25 AM Re: [7.5.3] Events Island [Re: Myke]
badfrog Offline
Power User

Registered: 03/05/07
Posts: 83
Loc: 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....

Top
#318161 - 08/23/09 08:32 PM Re: [7.5.3] Events Island [Re: badfrog]
Myke Offline
Power User

Registered: 09/06/99
Posts: 97
Loc: 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

Top
#318163 - 08/23/09 11:43 PM Re: [7.5.3] Events Island [Re: Myke]
badfrog Offline
Power User

Registered: 03/05/07
Posts: 83
Loc: somewhere on the coast of Main...
ding ding ding ding!
we have a winner!

thanx Myke!

Top
#318267 - 10/26/09 07:43 AM Re: [7.5.3] Events Island [Re: badfrog]
Myke Offline
Power User

Registered: 09/06/99
Posts: 97
Loc: 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.

Top


Moderator:  sirdude 
Who's Online
1 registered (Gizmo), 56 Guests and 25 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Ubb - Buy It!
best forum software
Latest Posts
I want to create a Self Search mod [Question]
by lightningrod
03/10/10 09:04 PM
If I create a new script, can I just upload it?
by lightningrod
03/10/10 05:35 PM
Notepad Creates Errors when working with PHP
by lightningrod
03/10/10 05:01 PM
Question on Adding a New Script ?
by lightningrod
03/10/10 06:39 AM
Disable Watch List option
by Mike_Tabat
03/09/10 01:27 PM
[7.x] [Pre-7.3] [Final] pJIRC Addon v0.5
by Gizmo
02/27/10 05:07 PM
How to Be a Great Host
by pinku
02/19/10 02:47 AM
New Mods
Disable Watch List option
by Mike_Tabat
02/18/10 09:14 AM
[7.x] Generic Page Outside of forum directory
by
01/14/07 10:58 PM
[7.x] [Pre-7.3] [Final] pJIRC Addon v0.5
by
07/30/06 10:42 PM
Newest Members
joshuasm02, Chosen, Vick, Bartman, Infinity Master
13496 Registered Users
Top Posters
AllenAyres 25554
JoshPet 11330
Rick 8373
LK 7396
Lord Dexter 6503
Greg Hard 5533
Charles Capps 5438
(Views)Popular Topics
Known public proxy servers 1028046
Finished-[6.5.2] Games Arcade Deluxe v1.9 327222
Integrated Index Page (IIP) 5.3.1 279924
Integrated Index Page (IIP) 5.1.1 279403
TLD Bv2.1 Released - Threads Links Directory 270427
[6.0x] Who's Online 4.0.0 [Finished] 230365
Finished-[6.5.1] Integrated Index Page (IIP) 6.5 217518
[6.3.x] [beta] Hit Hack 2.0 179339
FlashChat & UBB.threads 161010
[7.x] Gizmo's Embedding BBCode (Pre UBB.T7.3) 154650
Forum Stats
13496 Members
59 Forums
37114 Topics
290378 Posts

Max Online: 686 @ 06/28/07 07:04 AM
Featured Member
Registered: 05/01/01
Posts: 686

 

 

 
fusionbb message board php hacks