PDA

View Full Version : BB Code Enhancements - Countdown BB Code


MoT3rror
02-28-2008, 10:00 PM
Description

This is a countdown hack that allows users to put a custom countdown using BB Code.

Example:
Count down:The countdown will count down till it reaches the date then it will show the text in the option after the date. The param is the text before the countdown.

The date is in the format of m/d/yyyy h:mm AM.
m is for month.
d is for day.
y is for Year with 4 digits like 2008 not 08.
h is for the hour.
The last m is for minute and needs to be 2 digits.
The AM can be AM or PM.

Features


* Processing is done by Javascript.
* There can be multiple countdowns on a page without effecting the other countdowns on the page.

Installation With Product


1. Upload everything in the upload folder.
2. Login to your Admin Control Panel
3. Go to Plugins & Products -> Manage products
4. Click on Add/Import product
5. Browse for product-countdown37.xml and click import.
6. Edit your headinclude template and put this code at the bottom.<!-- Begin Countdown Javascript code -->

<script type="text/javascript" src="clientscript/countdown.js"></script>

<!-- End Countdown Javascript code -->

Installation without Product


Upload everything in the upload folder.
Login to your Admin Control Panel
Edit your headinclude template and put this code at the bottom.<!-- Begin Countdown Javascript code -->

<script type="text/javascript" src="clientscript/countdown.js"></script>

<!-- End Countdown Javascript code -->
Create new BB Code with these settings.
Title: Countdown (You can make this whatever you want)
Tag: countdown
Replacement: <span id="cntdwn"></span>
<script type="text/javascript">
init_countdown("{param}", "{option}");
</script>
Example: Count down:
Use {option}: Yes


Version Changes

1.1 Fix countdown only showing when using quick reply.

ChurchMedia
02-29-2008, 01:17 AM
It's installed and working. :) I put the countdown code in my signature. It shows up fine with "preview signature" but doesn't show up in my posts. Any ideas?

Thanks for the neat little mod!

lovelypk
02-29-2008, 01:49 AM
I was looking for something like this.
thanks for this great mod

MoT3rror
02-29-2008, 03:48 AM
It's installed and working. :) I put the countdown code in my signature. It shows up fine with "preview signature" but doesn't show up in my posts. Any ideas?

Thanks for the neat little mod!

Sorry, put the wrong template in the instructions. Did you add the code to your headinclude template?

ChurchMedia
02-29-2008, 03:58 AM
I figured out the problem. I have another countdown mod in a CMPS module. I'll sort out the code and make it all work together. Thanks again!

projectego
02-29-2008, 01:03 PM
/me clicks install. Thanks!

glenvw
02-29-2008, 02:58 PM
Where do you upload the files you say to upload? Do we upload the entire folder called "clientscript" or just the java file?

MoT3rror
02-29-2008, 07:09 PM
Where do you upload the files you say to upload? Do we upload the entire folder called "clientscript" or just the java file?

There is a folder called upload that you upload to your main forum directory.

glenvw
02-29-2008, 09:25 PM
Thanks, does this work in people's signatures?

MoT3rror
02-29-2008, 10:29 PM
Thanks, does this work in people's signatures?

Yes, this will work anywhere bb code is allowed.

John3971
03-01-2008, 08:14 AM
thanks for this modification..

OrionsMom
03-10-2008, 02:11 AM
This is very kewl I have been looking for something like this! I just have one question. I placed this in my signature box and it works fine when I am posting a thread or reply using the New Thread or Post Reply buttons. However if I use the quick reply box it does not show and bottom of browswer window says "done but with errors on page." If I refresh the page the timer then shows in my signature area and no error is noted in the browser window. Do you know why this happens or have a way to fix that minor issue?

MoT3rror
03-10-2008, 04:25 AM
This is very kewl I have been looking for something like this! I just have one question. I placed this in my signature box and it works fine when I am posting a thread or reply using the New Thread or Post Reply buttons. However if I use the quick reply box it does not show and bottom of browswer window says "done but with errors on page." If I refresh the page the timer then shows in my signature area and no error is noted in the browser window. Do you know why this happens or have a way to fix that minor issue?

Yeah I know about the issue but currently going through some crazy times at my website. When it starts to cool down again, I will fix it.

OrionsMom
03-10-2008, 10:07 AM
kewl I look forward to the fix...hope things settle with your site soon ;) Let me note however that even with this minor error I am THRILLED to have this countdown and love how we can have more than one at a time. Many of my members are mothers of more than one child and now they can countdown to each ones birthday instead of just the next birthday! Thanks again!

MoT3rror
03-12-2008, 09:59 PM
Version 1.1 has been released and includes the fix. Make sure to reupload all the files including the mod in the Admin CP.

OrionsMom
03-13-2008, 01:24 PM
Do I need to uninstall the other one first? I uploaded the clientscript to the clientscript file, uploaded the xml file and copied and pasted that same text into head includes area. Now it shows the countdown but no text telling what I am counting down to and still does not show on quick reply. What did I do wrong or is something missing from the zip file?

OrionsMom
03-13-2008, 01:31 PM
reverting back to 1.0 for now just so we know what we are counting down to.

OrionsMom
03-13-2008, 01:32 PM
BTW I did uninstall and then re-install it still did not fix the issue so not sure what happened.

MoT3rror
03-13-2008, 09:09 PM
BTW I did uninstall and then re-install it still did not fix the issue so not sure what happened.

Compare your BB code setup to the instructions that was just added.

Xanlamin
03-14-2008, 12:23 AM
Tagged for reference....been looking for something like this, will come in handy for alot of aspects on two sites I run for gaming.

Zebra
03-21-2008, 07:34 AM
Great it works, but what must i do with "Use {option}: Yes" ?

Jikdor
03-21-2008, 04:03 PM
Cool, thanks. Installed.

MoT3rror
03-22-2008, 06:21 PM
Great it works, but what must i do with "Use {option}: Yes" ?

That is a option when you add BB Code. You must set this to yes.

imported_martyjp
03-23-2008, 11:20 PM
Great idea and installed with out any issues. Unfortunately didnt really work on my site as have members from all over the world so the countdowns didnt really work as it is done from the users pc time :(

maidos
04-10-2008, 12:35 PM
how does it really work, i mean theres different timezones

Bounce
04-10-2008, 06:15 PM
Is it possibly to add the username of the user and what he/she is counting down too?

{user} is counting down: to his birthday 7 days 4 hours 7 secs :erm:

MoT3rror
04-12-2008, 04:14 AM
Is it possibly to add the username of the user and what he/she is counting down too?

{user} is counting down: to his birthday 7 days 4 hours 7 secs :erm:

The user can put whatever text in from of the countdown and when the countdown is over.

Does that answer your question?

Mum
05-05-2008, 01:09 AM
Who's timezone does this use? The member currently viewing? Or the timezone of the board?

MoT3rror
05-11-2008, 02:55 AM
Who's timezone does this use? The member currently viewing? Or the timezone of the board?

The timezone of the current user's machine.

sdavis2702
05-24-2008, 09:56 AM
I really like this hack. I have installed it and I am using it... only thing is... I'm concerned with my member. How will they know what format to put the information in? I can ofcourse make a thread or something but they won't all be able to see that. Any suggestions? Or am I missing something?

Mum
05-25-2008, 06:55 AM
I have uninstalled this. It doesn't matter what you write on THIS SPACE - it doesn't show :(

LisaJH
05-27-2008, 02:14 PM
I have to click uninstall aswell.. because it shows in preview siggy but it wont show up in posts???

RickyG
06-26-2008, 10:34 PM
How can this be used in the header and not in sig? I am looking to have the timers on the frontpage to advertise an event.

RickyG

MoT3rror
06-28-2008, 01:29 AM
How can this be used in the header and not in sig? I am looking to have the timers on the frontpage to advertise an event.

RickyG

This mod was based off of this (http://www.hashemian.com/tools/javascript-countdown.htm). You can use that on any page through the template system or on another page. The mod was made to be used as bb code not as something to add on to a template or page.

RedTrinity
06-29-2008, 01:46 AM
Works great here, thanks :)

Daisyboo
08-28-2008, 07:40 AM
Doesn't show for me either :(

bananalive
08-28-2008, 01:09 PM
Does this take into account time zones?

For instance if I'm in America and another user is in New Zealand will they count down to same time despite the time differences?

Cheers

Cigarcritic
08-29-2008, 04:31 AM
This is incomplete, text does not work and there is no child.

lenzo
02-06-2009, 06:33 PM
Can you write better instructions about what the following and what the parameters do?

<span id="cntdwn"></span>
<script type="text/javascript">
init_countdown("{param}", "{option}");
</script>

Your description is vague and it seems a lot of people are confused by this. I understand that {option} is set to "Yes", but what do we put in the {param} part? Or do we even need this?

An actual example code with the fields put in there would be great...

xyzmary2001
07-17-2009, 01:11 PM
Anyone knows if it still works on vBulletin 3.8.2?

The_Rayman
08-15-2009, 02:17 PM
Doesn't work here... running 3.8.3.
Installed all according to specs, doesn't show a bit.

xyzmary2001
08-26-2009, 06:37 AM
Works fine in 3.8.2 - I have it on my forums.

NTMID8
09-01-2009, 12:54 AM
Not working for me on 3.8.2.

EDIT:

I had installed it manually, but when I went back and used the product, it is sort of working now. When you post it (I used Quick Reply) it did not show up, but after I refreshed the page I could see the countdown. However, the {param} text is not showing up? Ideas?

trotskid
02-27-2012, 09:56 AM
Works fine on 3.8.4 PL2 :)

Installed!

edit: with fieldset (https://vborg.vbsupport.ru/showthread.php?t=117936&highlight=fieldset) BBcode :up: