Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Countdown (Forum, Sideblock, vBa CMPS, Multiple Countdowns) Details »
Countdown (Forum, Sideblock, vBa CMPS, Multiple Countdowns)
Mod Version: 1.0.4, by Gemma (Coder/Designer) Gemma is offline
Developer Last Online: Jul 2016 I like it Show Printable Version Email this Page

vB Version: 4.x.x Rating: (19 votes - 4.89 average) Installs: 146
Released: 12 Jul 2011 Last Update: 22 Oct 2011 Downloads: 871
Not Supported Template Edits Additional Files Re-usable Code  

Someone PM'd me last week asking for the code I use for my countdown sideblock. So here is the basic countdown (doesn't include the images/blurb that screenshots/demo show)

This countdown uses the users PC clock and calendar to count down to a time and date.

What is it?
A sideblock on your forum index to countdown to a specific date/event.

1. Upload the contents on the zip archive to your server. Keeping the file structure as is.

countdown/js/jquery-1.4.1.js
countdown/js/jquery.lwtCountdown-1.0.js
countdown/js/misc.js
countdown/style/main.css

Change the settings of the countdown/js folder to CHMOD 775

2. Go to AdminCP > Forums and Moderators > Forum Block Manager > Add Block

Title - Countdown
Description - whatever you want
Content Type - HTML
Content - <div></div>
Template to use - block_countdown

3. Go to AdminCP > Styles and Templates > Style Manager > Add New Template

Title - block_countdown

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

Change this part to set the countdown target date


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

Save the block.

4. Go to AdminCP > Style and Templates > Style Manager > StyleVars > forum_sidebar_width and change the width to atleast 270px

You can change the colour of the digits/text to suit your forum by changing references to #5C7099 in the main.css file

If you are using vBOptimise go to AdminCP > vBOptimise > Flush Cache

To have more than one countdown

Create a new template called block_countdown2


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

Set the targetDate data and save

For reference if making more blocks - (jq('#countdownX').countDown({ and <div id="countdownX"> are used to call additional countdowns).

Create a new forum block in the same way as before but make the template to use: block_countdown2

To Display on vB Advanced CMPS - http://www.vbulletin.org/forum/showp...&postcount=122

To show multiple countdowns on forumhome (screenshots) - http://www.vbulletin.org/forum/showp...&postcount=158

If you want to add images/videos etc to your countdown all you need to do is add some basic code to the template. Search for </script><div> and after that you would add something like.

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

If you are upgrading from a previous version, upload the contents of the zip file and replace the template(s) you are using (ie block_countdown, block_countdown2, adv_portal_countdown etc). Set the targetDate.

History
1.0.4 - Reverted back to using jquery-1.4.1.js
1.0.3 - Now using jquery-1.6.1.min.js and added noConflict to script
1.0.2 - Cleaned up code, added instructions to zip. Also instruction within thread on how to make CMS widget or have more than one countdown.

If anyone wants to further develop any of my addons, you are free to do so.


Download Now

Only licensed members can download files, Click Here for more information.

Screenshots

Click image for larger version

Name:	sideblock.jpg
Views:	2462
Size:	68.7 KB
ID:	130953   Click image for larger version

Name:	arcade_count.jpg
Views:	1309
Size:	137.3 KB
ID:	133705   Click image for larger version

Name:	count.jpg
Views:	1025
Size:	70.8 KB
ID:	133706   Click image for larger version

Name:	countdown2.jpg
Views:	1165
Size:	43.9 KB
ID:	133714  

Click image for larger version

Name:	countdowns.jpg
Views:	1235
Size:	78.4 KB
ID:	133751  

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • If you like this modification support the author by donating.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Similar Mod
Mod Developer Type Replies Last Post
vBulletin Forum Sideblocks Show Poll In Forum Sideblock Badshah93 vBulletin 4.x Add-ons 169 03 Apr 2017 08:27
vBulletin Forum Sideblocks Tinypic Uploader Forum SideBlock desi-boy vBulletin 4.x Add-ons 22 15 Oct 2015 12:49
vBulletin CMS Widgets IMDb Search Forum SideBlock desi-boy vBulletin 4.x Add-ons 8 19 Dec 2012 10:42
vBulletin Forum Sideblocks MegaUpload FileBOx Forum Sideblock desi-boy vBulletin 4.x Add-ons 9 15 Mar 2012 02:20
vBulletin Forum Sideblocks Imageshack Uploader Forum SideBlock desi-boy vBulletin 4.x Add-ons 3 22 Feb 2010 21:45

  #151  
Old 10 Nov 2011, 14:24
Gemma's Avatar
Gemma Gemma is offline
 
Join Date: Apr 2004
Real name: Gemma
Originally Posted by psychobike View Post
Gemma you were correct there were settings for the countdown in my headinclude template. However after entering the new countdown settings I'm only getting all 0's on the countdown. Any idea where I might look for a cure?
Try going to AdminCP > vBa CMPS > Diagnostics and Rebuild the module cache.

Btw, what would the chances be of making this a plugin/product so settings can be made in acp?
Not something I'm looking at doing - however anyone else is free to take what I've done and expand on it.
__________________
Reply With Quote
  #152  
Old 08 Dec 2011, 21:26
matrixmark matrixmark is offline
 
Join Date: Dec 2010
Thanks for this, is working great
Reply With Quote
  #153  
Old 15 Dec 2011, 22:47
kylek kylek is offline
 
Join Date: Oct 2003
Real name: Kyle
Originally Posted by Gemma View Post
The CMS and vBA CMPS give me a headache lol, what couldn't you get working Countdown or layout?) and I'll try and reproduce it.



The attached image is from the CMS page (needs a modified grid) not FORUMHOME, you can have it display on the forum index by creating a table and adding the countdown code within it.

On my own site I did it this way. In the FORUMHOME template find:

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

Above that add:


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

I'm not supporting that though so you'd be best to try it out on a test site or using a test style.

Thanks Gemma!!

Been playing around with this and noticed if someone uses 1024 res it screws up the 4 countdowns in a row. And we do still get a lot of members that use 1024 x 768.

How would one break the layout so you would have 2 countdowns and then the next two countdown times below the first two? I have tried breaks, etc but still cant figure it out.

Something like this is what I am trying to achieve:

Countdown timer 1 - Countdown timer 2
Countdown timer 3 - Countdown timer 4
Reply With Quote
  #154  
Old 15 Dec 2011, 22:53
Gemma's Avatar
Gemma Gemma is offline
 
Join Date: Apr 2004
Real name: Gemma
Let me play around for a bit and I'll get back to you
__________________
Reply With Quote
  #155  
Old 15 Dec 2011, 23:20
kylek kylek is offline
 
Join Date: Oct 2003
Real name: Kyle
Thank you again Gemma,

And actually I lied, we have 6 league games that I want to display so would like to have it break after the 3rd one if possible. So it would be 3 timers, then 3 below it (1 below for now). When we set up the last couple of tournament games I will figure out how to insert two more timers.
Reply With Quote
  #156  
Old 15 Dec 2011, 23:40
Gemma's Avatar
Gemma Gemma is offline
 
Join Date: Apr 2004
Real name: Gemma
we have 6 league games
Ah ok, you can check out what I've done for 4 and see how it looks - I'll go and duplicate a couple of the countdowns now. I've attached a screen below and it is on the dark theme of my site if you want to check it out live.

Let me know if it looks ok

Edit: I can also omit the number of weeks for you if the countdowns are going to be less than 100 days - but might still need to play with the font sizes
Attached Images
File Type: jpg boxed.jpg (59.7 KB, 155 views)
File Type: jpg boxed2.jpg (44.6 KB, 110 views)
__________________

Last edited by Gemma; 16 Dec 2011 at 00:26.
Reply With Quote
  #157  
Old 16 Dec 2011, 00:51
kylek kylek is offline
 
Join Date: Oct 2003
Real name: Kyle
That looks great on your new dark theme on your site. We do not need weeks as each game will be weekly but dont worry about it as you are going way out of your way to help us!
Reply With Quote
  #158  
Old 16 Dec 2011, 00:55
Gemma's Avatar
Gemma Gemma is offline
 
Join Date: Apr 2004
Real name: Gemma
Cool

This code should help you get started, any problems just shout and I'll look in the morning


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

All you should need to do is set up the 6 timers, and replace the instances of BLOCK TITLE, LINK TO YOUR IMAGE, IMAGE TITLE, OPTIONAL URL LINK and COUNTDOWN TITLE where applicable or remove them.
__________________

Last edited by Gemma; 16 Dec 2011 at 11:54.
Reply With Quote
  #159  
Old 16 Dec 2011, 09:24
kylek kylek is offline
 
Join Date: Oct 2003
Real name: Kyle
Looks great but have been playing with a default forumhome template and when I try to add it above or below the whats going on section our left sidebar disappears. It doesn't completely disappear but gets pushed down below the forum section.
Reply With Quote
  #160  
Old 16 Dec 2011, 10:53
Gemma's Avatar
Gemma Gemma is offline
 
Join Date: Apr 2004
Real name: Gemma
Originally Posted by kylek View Post
Looks great but have been playing with a default forumhome template and when I try to add it above or below the whats going on section our left sidebar disappears. It doesn't completely disappear but gets pushed down below the forum section.
Bugger, I missed a </div> tag to the end of the code; I've updated the code above
__________________

Last edited by Gemma; 16 Dec 2011 at 11:53.
Reply With Quote
  #161  
Old 19 Dec 2011, 23:57
Gemma's Avatar
Gemma Gemma is offline
 
Join Date: Apr 2004
Real name: Gemma
Updated the demo link in first post.

I've also tested this using the latest jquery and didn't run into any problems running either a single countdown or multiple countdowns.

If you want to run it with the latest jquery replace this part of the template edit:


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

with this:

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

__________________
Reply With Quote
  #162  
Old 20 Dec 2011, 06:08
LoveStream LoveStream is offline
 
Join Date: Jan 2009
Hello. good idea.

I have a question.
Can I use this for COUNTUP not countdown? Any idea?
Reply With Quote
  #163  
Old 20 Dec 2011, 10:22
Gemma's Avatar
Gemma Gemma is offline
 
Join Date: Apr 2004
Real name: Gemma
Originally Posted by LoveStream View Post
Hello. good idea.

I have a question.
Can I use this for COUNTUP not countdown? Any idea?
No, sorry.
__________________
Reply With Quote
  #164  
Old 26 Dec 2011, 03:25
Poker Face Poker Face is offline
 
Join Date: Sep 2010
Installed 4.1.8 CMS Widget... Thanks!

Originally Posted by LoveStream View Post
Hello. good idea.

I have a question.
Can I use this for COUNTUP not countdown? Any idea?
I would be very interested in this, as well!

I’d like to run one “up” and one “down” and at the same time, in widgets, on the CMS.

Last edited by Poker Face; 27 Dec 2011 at 03:11.
Reply With Quote
  #165  
Old 30 Dec 2011, 20:51
Gemma's Avatar
Gemma Gemma is offline
 
Join Date: Apr 2004
Real name: Gemma
Originally Posted by Poker Face View Post
Installed 4.1.8 CMS Widget... Thanks!

I would be very interested in this, as well!

I’d like to run one “up” and one “down” and at the same time, in widgets, on the CMS.
What would you run a count up timer for?
__________________
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 20:58.

Layout Options | Width: Wide Color: