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 |
#62
|
|||
|
|||
Also, has anyone figured out how to display more than one event as mine still only shows one eventhough i've amended the:
("SELECT eventid, title, dateline_from from " . TABLE_PREFIX . "event WHERE calendarid='".$event_calendarid."' $and order by dateline_from ASC LIMIT 2"); to ASC LIMIT 5 |
#63
|
|||
|
|||
Anyone having any luck with this.
|
#64
|
|||
|
|||
Dam, was hoping someone took a look and got it working for the latest versions of vb.
|
#65
|
||||
|
||||
The idea of this mod is perfect, any body can upgrade it ?
Regards,, |
#66
|
|||
|
|||
Hm. Forum block works perfectly, but the widget is just blank.
|
#67
|
|||
|
|||
ANybody using this on vb 4.2?
|
#68
|
|||
|
|||
ok, this is what I was looking for, but seems have some issue with multiple events...!!
I wish I know how to fix it... |
#69
|
|||
|
|||
Can anyone rework this mod?
|
#70
|
|||
|
|||
The code is marked reusable. So if someone wants to tell me in detail what is not working and under what circumstances, I will take a look at it when I have the time. I can't promise anything because I haven't looked at the calendar code in awhile. Some code isn't fixable and I do not have the time to rewrite the whole modification.
I will try to fix the known issues, I will not be taking on support of the mod. |
#71
|
|||
|
|||
I cannot get this to function on my VB 4.2.1
The headinclude on my template is edited - path is correct to the .js file. I've got the widget created Widget Name = Event Countdown Widget Type = PHP Direct Execution Within the Configure area I have pasted the wall of code. Forum Block Manager. Name : Event Countdown cache time - 1 minute active : yes type : php content - ( I have the wall of source in there ) The problem is that the block on the forums page has no content in it. Calendar ID is : 1 |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|