![]() |
|
Mod Options |
![]() |
|||||||||||||||||||||||||||
Countdown (Forum, Sideblock, vBa CMPS, Multiple Countdowns)
![]() Developer Last Online: Jul 2016 ![]() ![]() ![]()
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
Change this part to set the countdown target date
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
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.
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 Show Your Support
|
![]() |
||||
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 |
Comments |
#2
|
||||
|
||||
Thanks for the mod, it looks great. However, I cannot seem to set it to display anything other and 0's. I tried eliminating the cache time, I tried entering the year in both 2011 and just 11 format. Can you please post an example of a functioning time?
No members have liked this post.
|
#3
|
||||
|
||||
__________________
No members have liked this post.
|
#4
|
||||
|
||||
Thanks for the quick reply, unfortunately I still am not getting the countdown, just 0's
No members have liked this post.
|
#5
|
||||
|
||||
Again, I appreciate your support.
I downloaded the zip, upload and overwrote. I verified the directory structure. I deleted the forum block and created a new with a direct cut and paste of your's. Then pasted the sample date and time. I still get nothing but 00's Is it just me? Or is anyone else having this issue? No members have liked this post.
|
#6
|
|||
|
|||
Uninstalled, would not display anything but 0's.
No members have liked this post.
|
#7
|
|||
|
|||
No members have liked this post.
|
#8
|
||||
|
||||
I don't know, it works fine on every site I've installed it on and I've used the same code on them all.
Replace the target date data with your own. If no-one can confirm it working then I'll get one of the mods to delete this. Sorry ![]() edit: Confirmed as working
__________________
No members have liked this post.
Last edited by Gemma; 13 Jul 2011 at 10:15. |
#9
|
||||
|
||||
Works and looks awesome. Thank you so much!
__________________
For custom designed Windows 7 Visual Styles/Themes, please visit CreativX! The following members like this post: Gemma
|
#10
|
||||
|
||||
If you are looking to add an image above the countdown, add something like this below </script>
If you want to link the image to something, ie when clicking on the image it would go to a forum post or external site use this format instead, replace the <img src="LINK TO YOUR IMAGE"> with something like this - <a href="http://www.yourlink.com"><img src="http://www.yourimagelink.com/image.jpg" alt="hover over title" width="x" height="x" /></a> The following members like this post: Taurus1
Last edited by Gemma; 13 Jul 2011 at 10:56. |
#11
|
||||
|
||||
OH cool! Thank you Gemma. Is there a way for me to use a longer title? When the title is too long it overlaps the box, it is not broken into 2 sentences or so.
And did you release this as widget somewhere?
__________________
For custom designed Windows 7 Visual Styles/Themes, please visit CreativX! No members have liked this post.
|
#12
|
||||
|
||||
Originally Posted by Taurus1
I'll look at the title part and see what's up.![]()
You should be able to use the same code to make a cms widget but you would need to be using a sidebar of 270px or more for it to display properly
__________________
No members have liked this post.
|
#13
|
||||
|
||||
Originally Posted by Gemma
Actually, I take that back ![]()
![]() You'd need to use something like this for a CMS Widget
__________________
No members have liked this post.
|
#14
|
||||
|
||||
FIXED:
1.- Add before..
2.- Check folder permission #0775 3.- Clear Cache sideblock. No members have liked this post.
|
#15
|
||||
|
||||
Thanks. I removed the jquery-1.4.1.js lines from the code because it wasn't needed for all the installs I'd made (but I left the script in the zip file). Any time you make a new widget/sideblock it is always recommended to clear or purge the cache.
__________________
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 05:29.