Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Countdown to Calendar Event Details »
Countdown to Calendar Event
Mod Version: 1.01, by JohnKF (Member) JohnKF is offline
Developer Last Online: Oct 2013 I like it Show Printable Version Email this Page

vB Version: 4.0.6 Rating: (5 votes - 4.20 average) Installs: 57
Released: 15 Oct 2010 Last Update: Never Downloads: 343
Not Supported Template Edits Additional Files Re-usable Code Translations  

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...

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

...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.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

To create a forum block...
  1. Navigate to AdminCP -> Forums & Moderators -> Forum Blocks Manager
  2. Click the Add Block button
  3. From the drop down list select Custom HTML/PHP
  4. Click the Continue button
  5. Give the block a title (e.g. Event Countdown) and a short description
  6. Set the cache time to 1 minute
  7. In Content Type select PHP
  8. In Content paste the PHP code above in to the text box
  9. Click the Save button

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...

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

...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

Click image for larger version

Name:	eventcountdown.jpg
Views:	2483
Size:	8.2 KB
ID:	122828  

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Similar Mod
Mod Developer Type Replies Last Post
[RELEASE vB 2.0.3] Countdown To Calendar Events mister vBulletin 2.x Full Releases 18 07 Oct 2001 23:29

  #46  
Old 05 Nov 2010, 15:23
Dreadan Dreadan is offline
 
Join Date: Oct 2010
Is there any way to have it show reoccurring events?
Reply With Quote
  #47  
Old 05 Nov 2010, 20:07
JohnKF JohnKF is offline
 
Join Date: Oct 2010
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.

Last edited by JohnKF; 06 Nov 2010 at 19:36. Reason: Corrected information given
Reply With Quote
  #48  
Old 05 Nov 2010, 22:19
denman75 denman75 is offline
 
Join Date: Aug 2006
Real name: Dennis
the calender only goes to 2010 ,u cant select 2011 yay we need bug killer here.
Reply With Quote
  #49  
Old 06 Nov 2010, 05:21
psypher psypher is offline
 
Join Date: Dec 2009
works good
Reply With Quote
  #50  
Old 06 Nov 2010, 09:31
JohnKF JohnKF is offline
 
Join Date: Oct 2010
Originally Posted by denman75 View Post
the calender only goes to 2010 ,u cant select 2011 yay we need bug killer here.
You set the range of the calendar in AdminCP
Reply With Quote
  #51  
Old 06 Nov 2010, 22:41
OldSchoolDSL OldSchoolDSL is offline
 
Join Date: Oct 2010
Real name: Adam H.
Uninstalled

You currently have this modification tagged.

(I'll keep an eye on this and see if either the developer or another user developed this further. I like the idea, but not the requirements of having to make a "private calendar", always having to edit code, & it also does not fit my current simple needs)

Last edited by OldSchoolDSL; 06 Nov 2010 at 22:49.
Reply With Quote
  #52  
Old 15 Nov 2010, 17:14
dcuellar dcuellar is offline
 
Join Date: Nov 2007
I am not seeing anything in the forumblock. Do I have to put anything in the template to use?

It's just giving me a blank block. Any help would be appreciated!
Reply With Quote
  #53  
Old 15 Nov 2010, 17:19
dcuellar dcuellar is offline
 
Join Date: Nov 2007
Could it be that I'm using vBulletin 4.0.2?
Reply With Quote
  #54  
Old 17 Nov 2010, 08:46
eddl eddl is offline
 
Join Date: Oct 2010
Originally Posted by betts02 View Post
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
How did you fix this? Ant time you post an event dew befour the one already counting done the cownt down id just blank.
Reply With Quote
  #55  
Old 23 Dec 2010, 14:56
wampforum wampforum is offline
 
Join Date: Oct 2009
cant get this this to work either - the widget box is showing but nothing within it. checked all the codes,templates and everything several times now no joy.
Shame would have been a useful mod
Reply With Quote
  #56  
Old 27 Dec 2010, 02:02
Kyojii Kyojii is offline
 
Join Date: Jun 2008
I think vB has just raped the code that this modification uses sadly.
Reply With Quote
  #57  
Old 28 Dec 2010, 02:01
OldSchoolDSL OldSchoolDSL is offline
 
Join Date: Oct 2010
Real name: Adam H.
Originally Posted by wampforum View Post
cant get this this to work either - the widget box is showing but nothing within it. checked all the codes,templates and everything several times now no joy.
Shame would have been a useful mod
Same issue

It was working, but no longer.

4.1 PL2
Reply With Quote
  #58  
Old 15 Apr 2011, 08:57
Merlok Merlok is offline
 
Join Date: Mar 2011
Works great for me. How can I change the showed time in a format like this:
dd:hh:mm:ss (dd:hh:mm:ss)

Example:
18:8:24:35 (dd:hh:mm:ss)

Thanks in advance.
Reply With Quote
  #59  
Old 08 May 2011, 02:27
maineGuy72's Avatar
maineGuy72 maineGuy72 is offline
 
Join Date: Dec 2007
Real name: Mike
anyone figure out why it showing just a blank box?
i am running 4.1.3
thanks
Reply With Quote
  #60  
Old 08 May 2011, 11:10
TheChief TheChief is offline
 
Join Date: Nov 2010
Have you changed the file path, when you amend the code:

<script src="scripts/eventcountdown.js" type="text/javascript"></script>

i had to change "scripts/eventcountdown.js" to

"clientscript/eventcountdown.js" as that was where i placed the .js
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 01:37.

Layout Options | Width: Wide Color: