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.

Mum
02-29-2008, 01:12 AM
Installing it now!

Mum
02-29-2008, 01:16 AM
Sorry, problem with this instruction 6. Edit your headerinclude template and put this code at the bottom.I can't find that template? I've done a search and manually looked and can't find it.

Mum
02-29-2008, 01:16 AM
I can however find headinclude. Is it that one?

Mum
02-29-2008, 01:25 AM
Woohoo! It's perfect!!! Thank you so much :)

Mum
02-29-2008, 01:36 AM
Is there a way to remove the '.' after the seconds please? I'd rather it wasn't there for my particular usage.

Mum
02-29-2008, 01:56 AM
Ok, have to uninstall for now. If i have it in my signature, and use Quick Post, every time you enter a message and hit post/ok (to submit the message) the next page it shows is the ticker countdown (blank page, with just the ticker code on it).

Can't wait for an update though to fix this!

G0F0RBR0KE
02-29-2008, 02:40 AM
Very interesting. Can we see a screenshot of this?

MoT3rror
02-29-2008, 03:52 AM
Ok, have to uninstall for now. If i have it in my signature, and use Quick Post, every time you enter a message and hit post/ok (to submit the message) the next page it shows is the ticker countdown (blank page, with just the ticker code on it).

Can't wait for an update though to fix this!


I notice soon after I release this. I will try to get a fix out for it soon but you should just be able to refresh your page and it should work.

Very interesting. Can we see a screenshot of this?

I added a screenshot.

G0F0RBR0KE
02-29-2008, 04:31 AM
Actually, there is another one. I have it somewhere on my test forum running.

Mum
03-02-2008, 04:22 AM
Thanks :) I look forward to the update :)

Mum
03-04-2008, 10:56 PM
I notice soon after I release this. I will try to get a fix out for it soon but you should just be able to refresh your page and it should work.
Hi there, any fix yet? I'm hanging out to use this, but don't want to tell every member they hvae to refresh LOL so just waiting for the fix!

MoT3rror
03-05-2008, 01:31 AM
Hi there, any fix yet? I'm hanging out to use this, but don't want to tell every member they hvae to refresh LOL so just waiting for the fix!

Yeah sorry, it started to get crazy again on my website I work on.

Mum
03-07-2008, 12:40 AM
No worries :) Happy to wait, thanks so much for dealing with this one! Been wanting it so long!

Sandra_T
03-12-2008, 02:43 PM
Hi,

sorry but i dont find this template!

Installation


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

These three lines where must entry???

Please help me... :confused:

THX

Cu
Sandra_T

Mum
03-12-2008, 05:41 PM
It's actually called 'headinclude' - however as per my messages above, if you install it you have to refresh every time you send a message. I am waiting for a fix, i advise you to do the same until it's fixed!

MoT3rror
03-12-2008, 09:55 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.

Sandra_T
03-13-2008, 03:18 PM
Hello friends,

Iam so sorry but the programm don`t work. :(

Here ist a picture, please tell me if this settings are right or wrong. :confused:

http://my-pic.ath.cx/bilder/datei_1205424951.png


Thank you

Cu
Sandra_T

MoT3rror
03-13-2008, 07:11 PM
Hello friends,

Iam so sorry but the programm don`t work. :(

Here ist a picture, please tell me if this settings are right or wrong. :confused:

http://my-pic.ath.cx/bilder/datei_1205424951.png


Thank you

Cu
Sandra_T

You are supposed to upload the xml file by
Plugins & Products -> Manage Products -> [Add/Import Product] -> Then browse for the xml file and press upload.

Mum
03-14-2008, 05:02 PM
What could i remove so that it just says days?

Mum
03-14-2008, 05:12 PM
Also i noticed it says '01 Days, 16 Hours, 48 Minutes, 55 Seconds.' It should really say 1 Day (no s), can this be fixed, if possible?

MoT3rror
03-14-2008, 08:34 PM
Also i noticed it says '01 Days, 16 Hours, 48 Minutes, 55 Seconds.' It should really say 1 Day (no s), can this be fixed, if possible?


Try this code. Find this in your countdown.js file

CountActive = true;
LeadingZero = true;
DisplayFormat = "%%D%% Days, %%H%% Hours, %%M%% Minutes, %%S%% Seconds.";
And change it to this

CountActive = true;
LeadingZero = false;
DisplayFormat = "%%D%% Days, %%H%% Hours, %%M%% Minutes, %%S%% Seconds.";

Mum
03-15-2008, 06:47 AM
That will still say '1 Days' - won't it? Which is gramatically incorrect.

DragonBlade
03-15-2008, 09:15 AM
This would be perfect if it was not dependent on the user's time so they can exploit it.

Conner85
03-17-2008, 06:36 AM
When I go to save it in my sig, the page goes blank.

MoT3rror
03-17-2008, 09:22 PM
When I go to save it in my sig, the page goes blank.

Did this start happening when you added this BB code?

Mum
03-18-2008, 07:06 AM
What could i remove so that it just says days?Just wondering if this is possible? I only want it to say 45 days... not hours, mins, seconds... etc.

Sandra_T
03-18-2008, 07:56 AM
Hi... Iam to stupid because this countdown woun`t be play on my Board.

I load the file in this folder

"/board/includes/xml/product-countdown368.xml"

and the *.js file in this folder

"/board/clientscript/countdown.js"

Is this correct?

Hier are some screenshots:

http://www.pic-share.eu/image/1cd116becd

http://www.pic-share.eu/image/21aed92655

http://www.pic-share.eu/image/e3a2e9b85b

Are these settings also correct?


Thank you all people :) :cool: ;) :up:


Sandra_T

Mum
03-18-2008, 06:32 PM
Sandra_T - you need to follow the instructions in the top post :)

MoT3rror
03-19-2008, 03:29 AM
Just wondering if this is possible? I only want it to say 45 days... not hours, mins, seconds... etc.

Yes you can change the the display of the countdown by the countdown.js file.


CountActive = true;
LeadingZero = true;
DisplayFormat = "%%D%% Days, %%H%% Hours, %%M%% Minutes, %%S%% Seconds.";

You just change the DisplayFormat to what you want it to be. Like if you only wanted days you can do something like this

CountActive = true;
LeadingZero = true;
DisplayFormat = "%%D%% Day(s)";

%%D%% = Days
%%H%% = Hours
%%M%% = Minutes
%%S%% = Seconds

MoT3rror
03-19-2008, 03:32 AM
Hi... Iam to stupid because this countdown woun`t be play on my Board.

I load the file in this folder

"/board/includes/xml/product-countdown368.xml"

and the *.js file in this folder

"/board/clientscript/countdown.js"

Is this correct?

Hier are some screenshots:

http://www.pic-share.eu/image/1cd116becd

http://www.pic-share.eu/image/21aed92655

http://www.pic-share.eu/image/e3a2e9b85b

Are these settings also correct?


Thank you all people :) :cool: ;) :up:


Sandra_T

Also I would like to suggest the website PhotoBucket (http://photobucket.com/). You don't have to deal with ads as much as the www.pic-share.eu.

Mum
03-20-2008, 03:39 AM
This would be perfect if it was not dependent on the user's time so they can exploit it.How could they expliot it?

MoT3rror
03-22-2008, 06:24 PM
How could they expliot it?

Sorry about the slow response. The time for the countdown is based on the user time because it uses Javascript. One user could be in Europe and another in the US, the Europe and US users would each see different times.

LilSniper
03-22-2008, 07:06 PM
does NOT work for 3.6.7: database error

Mum
03-23-2008, 01:40 AM
So how would you make it the same for everyone then? I'd love something that really works. I've uninstalled this one at present.

MoT3rror
03-23-2008, 04:34 AM
does NOT work for 3.6.7: database error

Install the with out uploading the plugin. The instructions are in the first post.

MoT3rror
03-23-2008, 04:37 AM
So how would you make it the same for everyone then? I'd love something that really works. I've uninstalled this one at present.

There is really no way without sending requests to the server. This would lead to using up a lot of bandwidth and causing the load to go up on the server.

gibigbig
03-23-2008, 10:19 AM
Database SQL error when importing product in vb 3.6.8 level patch 2

MoT3rror
03-24-2008, 12:14 AM
Database SQL error when importing product in vb 3.6.8 level patch 2

Can you copy and paste the error here?

gibigbig
03-24-2008, 12:45 AM
sorry im not going to expose my forum to a database error again, its too important. thankfully nothing was harmed.
it may be because i have vbseo installed?

Elenna
03-24-2008, 01:21 AM
Database error doesn't mean that it will harm your database, it just means that the commands you're trying to run on it aren't working. It's hard to troubleshoot without an error message.

Elenna
03-26-2008, 07:25 PM
Does anyone know how to have this take time zones into consideration?

For example, I have this code set to countdown until 8pm tonight. Members of other time zones are seeing it count down until 8pm their time, but I want it to countdown until my time, as this is an event.

Elenna
03-26-2008, 07:47 PM
Update to above. The javascript author's web site mentions using an additional UTC or time zone entry in it:
http://www.hashemian.com/tools/javascript-countdown-faq.htm#q3


Q3- How does the UTC time work?
A- If your target date signifies an event at a certain location, you should append your UTC (Coordinated Universal Time) to your date. UTC is also referred to as GMT (Greenwich Mean Time). See Wikipedia article on UTC (http://en.wikipedia.org/wiki/Coordinated_Universal_Time).
The UTC time is never adjusted so if you are in a Daylight savings zone, time changes could complicate matters. For example The US northeast is 5 hours behind UTC in standard time and 4 hours behind UTC in daylight savings time.
So if you are hosting an event in northeastern United States on July 11, 2015 at 4 PM, you would specify "07/11/2015 4:00 PM UTC-0400", as that region is generally under daylight savings during that time. Alternatively you could specify "07/11/2015 4:00 PM EDT". In this case EDT is used to indicate Eastern Daylight Time, rather than EST (Eastern Standard Time).

Daisyboo
08-28-2008, 07:16 AM
Never mind found an updated one *doh*

ricardoNJ
10-02-2009, 07:17 AM
Hi, I want to translate it to other language [spanish]. How can I do that?
Thanks!

ricardoNJ
10-02-2009, 07:35 AM
Yes you can change the the display of the countdown by the countdown.js file.


CountActive = true;
LeadingZero = true;
DisplayFormat = "%%D%% Days, %%H%% Hours, %%M%% Minutes, %%S%% Seconds.";

You just change the DisplayFormat to what you want it to be. Like if you only wanted days you can do something like this

CountActive = true;
LeadingZero = true;
DisplayFormat = "%%D%% Day(s)";

%%D%% = Days
%%H%% = Hours
%%M%% = Minutes
%%S%% = Seconds
Thank you, I need that too to change the language.

A question: this Mod is only for post?