![]() |
|
Mod Options |
![]() |
|||||||||||||||||||||
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...
...the above assumes you have copied eventcountdown.js file in to a folder called scripts. Adjust the src path to wherever you have placed the .js file. Navigate to AdminCP -> CMS -> Widgets. Create a PHP Type Widget and paste the below code.
To create a forum block...
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...
...which shows as the text above in the calendar title, but displays as text and a picture in the countdown. Download Now Only licensed members can download files, Click Here for more information. Screenshots Show Your Support
No members have liked this post.
|
![]() |
||||
Mod | Developer | Type | Replies | Last Post |
[RELEASE vB 2.0.3] Countdown To Calendar Events | mister | vBulletin 2.x Full Releases | 18 | 08 Oct 2001 00:29 |
#16
|
|||
|
|||
Originally Posted by trophyrider
I can confirm this works as well.![]()
Thank you. No members have liked this post.
|
#17
|
||||
|
||||
Originally Posted by betts02
![]()
Originally Posted by trophyrider
![]()
Originally Posted by trophyrider
As i stated then ?![]()
Also looking more into this If you post and event it shows up But if you then post an event before the first event it does not display Will get it working myself anyway mate cheers
__________________
http://www.nextgenerationgamers.co.u...e.php?userid=1 No members have liked this post.
|
#18
|
|||
|
|||
Thanks for that advice about ob_start();
It's my first script you know ![]() No members have liked this post.
|
#19
|
|||
|
|||
I think it may be because it's cached the first event. I usually clear the CMS cache whenever I change anything just to be sure. If you find another cause though please let me know; thanks.
No members have liked this post.
Last edited by JohnKF; 20 Oct 2010 at 09:53. Reason: corrected spelling |
#20
|
||||
|
||||
Something is not correct here
I have an event in 2 days time, Yet its showing the event is due NOW Will look into this myself but if you manage to figure it out post up dude
__________________
http://www.nextgenerationgamers.co.u...e.php?userid=1 No members have liked this post.
|
#21
|
|||
|
|||
Is the event a full day event or a ranged event? Also, what time zone are you in as a client and what time zone is the server in?
No members have liked this post.
|
#22
|
|||
|
|||
not sure how to add the calendar id to get it to pull from forums calendar...any help appreciated.
No members have liked this post.
|
#23
|
|||
|
|||
If you look near the start of the PHP code you will see...
$event_calendarid="1"; ...just change the number to the id of the calendar you want to use. No members have liked this post.
|
#24
|
|||
|
|||
yah...it should be 1 , the default. it just shows today's date.
No members have liked this post.
|
#26
|
|||
|
|||
A way to display a picture for the event and not the title?
No members have liked this post.
|
#27
|
|||
|
|||
Installed and working just fine as far as I can tell. Thank you very much indeed.
Would it be possible to include the ability to add a picture or format the event title with a different colour? No members have liked this post.
|
#28
|
|||
|
|||
Hi,
I've tried to get this to work on the forum block without any luck .. the block shows up but no countdown of the no event text shows .. any suggestions? .. ive created forum block .. selected custom html/php .. fillout out the fields with templete block-html .. aswell as the script code for the js file is in headerinclude templete.. Thanks ![]() No members have liked this post.
|
#29
|
|||
|
|||
Is the URL in the script code for the js file pointing to the right place?
No members have liked this post.
|
#30
|
||||
|
||||
Originally Posted by DjEddie
me to not working here
![]()
No members have liked this post.
|
![]() |
«
Previous Mod
|
Next Mod
»
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Mod Options | |
|
|
New To Site? | Need Help? |
All times are GMT. The time now is 01:09.