The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Countdown to Calendar Event Details »» | |||||||||||||||||||||||||||||
This widget picks up the next 2 events from a calendar of your choice.
It displays a countdown to the first event then once the first event has arrived it begins a countdown to the second event. The only reason for picking up two events is that someone may visit the page close to the end of the first event then see the no event message. By picking up two events such a visitor will see the countdown to the second event start. To install... From the ZIP file, extract eventcountdown.js and copy it to your site. Navigate to AdminCP -> Style & Templates -> Style Manager -> Edit Template Double click the headinclude template to edit it and add the following just above the first <script tag you find... HTML Code:
<script src="scripts/eventcountdown.js" type="text/javascript"></script> Navigate to AdminCP -> CMS -> Widgets. Create a PHP Type Widget and paste the below code. PHP Code:
You can set the value for $event_calendarid to the calendar that you want countdown events to come from. Change $no_events_message to the HTML you want to have appear when there are no events left in the selected calendar. This is the first widget I've written so if you spot any errors or improvements that can be made then please let me know. If you have an all day event in the calendar the countdown is to the begining of that day. Add a ranged event to the calendar for an exact time. Also, allow for any changes that may occur if a change to or from DST occurs. Added ob_start(); to beginning of script (17th Oct, 2010) To have a picture make the Title of the event in the calendar the HTML to display the picture. For example... HTML Code:
Your Event<br /><img src="images/picture.gif" width="140" height="130" alt=""> Download Now
Screenshots
Show Your Support
|
Comments |
#42
|
|||
|
|||
Thanks, bro! That took care of it!
|
#43
|
|||
|
|||
I'm having a hard time getting it to work on my site. It should be counting down to New Years, but rather it keeps counting down to the end of Day Light Savings time. I'm very sure the event is ID 1 is for new years on my calendar
|
#44
|
|||
|
|||
Quote:
When you select a calendar you will see the ID in the address bar of your browser... /calendar.php?calendarid=1 Also, try to always have another event ready for countdown after the first event has reached zero. The code picks up the first two events and counts down to the first one, then starts the second event countdown. |
#45
|
|||
|
|||
The only count down I'd like it to do is from my default calender & from my Holiday Manager. It's pointing to a revolving event (new years, 1x each year, every year).
Do you plan on release a new version to which can be easily configured via The Admin Control Panel or would I always need to edit script code? |
#46
|
|||
|
|||
It's unlikely that I'll create a version that's edited via the control panel as creating a special calendar for events, with permissions set to admin view only, provides all the control you need without the need to visit the control panel.
|
#47
|
|||
|
|||
Is there any way to have it show reoccurring events?
|
#48
|
|||
|
|||
I don't think you can stop it showing recurring events. That's wrong it seems. Must be the way recurring events are stored using the first one as a seed; once the first one has passed there are no further entries in the database.
|
#49
|
|||
|
|||
the calender only goes to 2010 ,u cant select 2011 yay we need bug killer here.
|
#50
|
|||
|
|||
works good
|
#51
|
|||
|
|||
You set the range of the calendar in AdminCP
|
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|