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: May 2013 I like it Show Printable Version Email this Page

vB Version: 4.x.x Rating: (28 votes - 4.79 average) Installs: 136
Released: 12 Jul 2011 Last Update: 22 Oct 2011 Downloads: 705
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:	1948
Size:	68.7 KB
ID:	130953Click image for larger version

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

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

Name:	countdown2.jpg
Views:	857
Size:	43.9 KB
ID:	133714Click image for larger version

Name:	countdowns.jpg
Views:	910
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
Show Poll In Forum Sideblock Badshah93 vBulletin 4.x Add-ons 150 15 Apr 2013 06:37
IMDb Search Forum SideBlock desi-boy vBulletin 4.x Add-ons 8 19 Dec 2012 09:42
Tinypic Uploader Forum SideBlock desi-boy vBulletin 4.x Add-ons 18 22 Aug 2012 07:57
MegaUpload FileBOx Forum Sideblock desi-boy vBulletin 4.x Add-ons 9 15 Mar 2012 01:20
Imageshack Uploader Forum SideBlock desi-boy vBulletin 4.x Add-ons 3 22 Feb 2010 20:45

  #196  
Old 29 Jun 2012, 13:31
mgurain's Avatar
mgurain mgurain is online now
 
Join Date: Apr 2005
Real name: Mohammed Al-Gurain
Hi,
Could this good mod be phrased please ?
Reply With Quote
  #197  
Old 03 Jul 2012, 08:20
espkaruna espkaruna is offline
 
Join Date: Oct 2010
This works great in Firefox (13.0.1) but in Google Chrome and Explorer the countdown just displays a bunch of 00's I really could care less if it works right in Explorer, but finding a way to make this work in Chrome would be cool
Reply With Quote
  #198  
Old 03 Jul 2012, 08:52
JabirA JabirA is offline
 
Join Date: Feb 2009
It works great in Google chrome (last version)
Reply With Quote
  #199  
Old 03 Jul 2012, 11:44
Gemma's Avatar
Gemma Gemma is offline
 
Join Date: Apr 2004
Location: Scotland
Real name: Gemma
Originally Posted by espkaruna View Post
This works great in Firefox (13.0.1) but in Google Chrome and Explorer the countdown just displays a bunch of 00's I really could care less if it works right in Explorer, but finding a way to make this work in Chrome would be cool
Originally Posted by JabirA View Post
It works great in Google chrome (last version)
Works fine in Firefox right up to 14.0. It should also work fine in Google Chrome (tested up to version 20.0.1132.47), the latest version of Opera, IE9 and Safari 5.1.7
__________________
No longer using vBulletin, running websites or involved with coding
Reply With Quote
  #200  
Old 03 Jul 2012, 13:58
espkaruna espkaruna is offline
 
Join Date: Oct 2010
Originally Posted by Gemma View Post
Works fine in Firefox right up to 14.0. It should also work fine in Google Chrome (tested up to version 20.0.1132.47), the latest version of Opera, IE9 and Safari 5.1.7

Ok, well I should rephrase that to say that on my site it is working on Firefox but not on Google Chrome (20.0.1132.47) or IE 9. I've tested it out with the above listed versions, and I have had other users tell me the same thing. This is on vbulletin 4.2.0 suite, so I don't know if another script that I am running is interfering with the countdown on chrome and IE or what. I do have a pretty heavily customized forum.

**edit**

Although I just tried adding this to my default style, and the same thing, works great in Firefox, not in the other two.

Last edited by espkaruna : 03 Jul 2012 at 14:21.
Reply With Quote
  #201  
Old 03 Jul 2012, 15:04
Gemma's Avatar
Gemma Gemma is offline
 
Join Date: Apr 2004
Location: Scotland
Real name: Gemma
Does it work on my site for you when viewing in either Chrome or IE9?

If you want to PM me a link to your site I'll have a look for you (might be a bit later on today as I'm quite busy away from computer stuff just now)
__________________
No longer using vBulletin, running websites or involved with coding

Last edited by Gemma : 03 Jul 2012 at 18:21.
Reply With Quote
  #202  
Old 03 Jul 2012, 15:30
espkaruna espkaruna is offline
 
Join Date: Oct 2010
Yeah, when I go to your site it works fine in any browser. I'll play around with it a bit more and I sent you a pm so you can check it out if you want when you get a spare moment. Your prompt replies and assistance are much appreciated.

**Edit**

Actually, I just figured out what my issue was. I should have payed attention and realized that there was a reason why you had 23 hours, 59 min, and 59 sec entered for the target date. I tried to set it as 24 hours, 0 min, 0 sec. Firefox understood what I meant but I guess IE and Chrome didn't.

Works great for me now, and thanks Gemma for your support.

Last edited by espkaruna : 03 Jul 2012 at 15:52.
Reply With Quote
  #203  
Old 03 Jul 2012, 21:17
Gemma's Avatar
Gemma Gemma is offline
 
Join Date: Apr 2004
Location: Scotland
Real name: Gemma
Originally Posted by espkaruna View Post
I tried to set it as 24 hours, 0 min, 0 sec. Firefox understood what I meant but I guess IE and Chrome didn't.
For midnight it should be set to 00 hour, 00 min, 00 secs

Glad you got it working
__________________
No longer using vBulletin, running websites or involved with coding
Reply With Quote
  #204  
Old 04 Jul 2012, 18:56
JabirA JabirA is offline
 
Join Date: Feb 2009
Originally Posted by JabirA View Post
Hi Gemma,

Is it possible to let it repeat the countdown? For exmple: Let it count down to every weekend automatically..?

Kind regards

Gemma,

How about this?
Reply With Quote
  #205  
Old 04 Jul 2012, 19:34
Gemma's Avatar
Gemma Gemma is offline
 
Join Date: Apr 2004
Location: Scotland
Real name: Gemma
Originally Posted by JabirA View Post
Hi Gemma,

Is it possible to let it repeat the countdown? For exmple: Let it count down to every weekend automatically..?

Kind regards
Oops, I didn't that post

No, not that I can think of. Sorry.
__________________
No longer using vBulletin, running websites or involved with coding
Reply With Quote
  #206  
Old 04 Jul 2012, 22:58
JabirA JabirA is offline
 
Join Date: Feb 2009
No problem.

Thank you for your answer.
Reply With Quote
  #207  
Old 09 Jul 2012, 10:41
bzcomputers's Avatar
bzcomputers bzcomputers is online now
 
Join Date: Apr 2012
I'd had some visual issues with the timer since installing this a couple months ago. If you sat on a page with the timer for an extended amount of time it would not keep time very accurately and the animation would be off and at times cover up the labels (mins, secs).

After seeing you mention upgrading jquery to someone in a previous post I went and grabbed the latest version (1.7.2), installed it and updated the code to use it. This mod for me looks a lot better now visually with the new jquery version.

Figured I'd mention it for anyone else experiencing what I was. By the way I have the code installed in a sidebar block.
Reply With Quote
  #208  
Old 10 Jul 2012, 04:21
wilford brimley wilford brimley is offline
 
Join Date: Apr 2012
if you are trying to do the display on forum home and getting 00's... he has the code wrong on the example.

you need to find the first line and change it from 1.4.4 to this

<script language="Javascript" type="text/javascript" src="countdown/js/jquery-1.4.1.js"></script>

cut and past that exactly^^

EDIT: i upgraded to 1.7.2 and the numbers seem to flip smoother.
http://blog.jquery.com/2012/03/21/jq...-7-2-released/

Last edited by wilford brimley : 10 Jul 2012 at 04:59.
Reply With Quote
  #209  
Old 10 Jul 2012, 04:51
wilford brimley wilford brimley is offline
 
Join Date: Apr 2012
ok, i noticed when you use a sideblock it keeps the style of the other blocks with the graidents ect.

when you make it fresh on forum display it does not keep gradients and it makes a line on top of the counters.



do you know how to remove that line? it looks worse on certain skins.
Reply With Quote
  #210  
Old 10 Jul 2012, 16:44
wilford brimley wilford brimley is offline
 
Join Date: Apr 2012
im putting the times in as eastern time. is there anyway for it to auto correct via javascript for the users actual timezone? like -1central and -3pacific? as you can see, I'm counting down live events, so it is usually like 10e/9c/7p
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
Forum Jump


New To Site? Need Help?

All times are GMT. The time now is 22:31.

Layout Options | Width: Wide Color: