Jump to content
N-Europe

Recommended Posts

Posted (edited)

This countdown is a lot more of a pain in the ass than I thought it would be :p the custom bbcode builder on vbulletin is very limited, you can basically only take two strings, both inputted by the user (nothing else is provided...) and use them, and I need something to make each one unique. It would be nice if it called back something like your post number... but no....

 

So I'm close but it's not really ready to use, you need a random string of letters after the equals sign, eg:

 

[noparse][countdown=abcdef]August 24, 2054 19:54:54[/countdown][/noparse]

 

Makes:

 

[countdown=abcdef]August 24, 2054 19:54:54[/countdown]

 

(also not styled it yet or hidden empty values eg 0 years)

 

Edit: Ah and it's not working all the time. Might disappear when you do quick saves/ edits... Might just scrap this and look for one on the vBulletin forums after all :heh:

Edited by Shorty
Posted (edited)
This countdown is a lot more of a pain in the ass than I thought it would be :p the custom bbcode builder on vbulletin is very limited, you can basically only take two strings, both inputted by the user (nothing else is provided...) and use them, and I need something to make each one unique. It would be nice if it called back something like your post number... but no....

 

So I'm close but it's not really ready to use, you need a random string of letters after the equals sign, eg:

 

[noparse][countdown=abcdef]August 24, 2054 19:54:54[/countdown][/noparse]

 

Makes:

 

[countdown=abcdef]August 24, 2054 19:54:54[/countdown]

 

(also not styled it yet or hidden empty values eg 0 years)

 

Edit: and it loads on DOM so might disappear when you do quick saves/ edits... Might just scrap this and look for one on the vBulletin forums after all :heh:

 

Had a look and found the following:

 

http://www.vbulletin.org/forum/showthread.php?t=171690 - Similar set up essentially. The option defines the date and the param is a 'default' "Countdown until" (obviously this can be changed, but its dummy text to please vB).

 

Similarly, this one needs both an option and param: http://www.vbulletin.org/forum/showthread.php?t=38179

 

Could you work into the js that if the param is a null value, return "Countdown until: ", that way you'd just have to do [noparse][countdown="[date]"][/countdown][/noparse]?

Edited by Ashley
  • 3 weeks later...
Posted

Oh, Ashley edited his post with questions and suggestions, I thought he was just going to add one of those :p I can have a look tomorrow or we could just implement one of the pre-built ones listed up there ^ @Ashley ?

  • 2 weeks later...
  • 1 month later...
Posted (edited)

Well as it was a countdown, it felt right that we kept you waiting...

 

Sorry, Shorty asked me to do this ages ago AND I DIDN'T.

 

It's a bit of a fiddly one to do. The BB Code is 'countdown' and you have to do it like this:

 

[noparse][countdown=<MM/DD/YYYY> <time AM/PM>; <Message once passed>]Count down:[/countdown][/noparse]

 

So for example:

 

[noparse][countdown=12/31/2020 5:00 AM;It is finally here]Count down:[/countdown][/noparse]

[countdown=12/31/2020 5:00 AM;It is finally here]Count down:[/countdown]

 

Or:

 

[noparse][countdown=12/31/2012 5:00 AM;It is finally here]Count down:[/countdown][/noparse]

[countdown=12/31/2012 5:00 AM;It is finally here]Count down:[/countdown]

 

 

Note: It doesn't accept 24 hour time, it could probably be changed to DD, MM, YYYY but don't want to fiddle with the js in case I miss something and break everything. You have to refresh after posting.

 

tl;dr its a bit balls but you wanted it :heh:

Edited by Ashley
Posted
Or seeing as there's no 16th month, a few millennia? :p

 

What are you smoking. It ends on the 16/11/2013 but is written in MM/DD/YYYY. Do you see the date and not the countdown?

Posted (edited)
Well as it was a countdown, it felt right that we kept you waiting...

 

Sorry, Shorty asked me to do this ages ago AND I DIDN'T.

 

It's a bit of a fiddly one to do. The BB Code is 'countdown' and you have to do it like this:

 

[noparse][countdown=<MM/DD/YYYY> <time AM/PM>; <Message once passed>]Count down:[/countdown][/noparse]

 

So for example:

 

[noparse][countdown=12/31/2020 5:00 AM;It is finally here]Count down:[/countdown]

[countdown=12/31/2020 5:00 AM;It is finally here]Count down:[/countdown]

 

Or:

 

[noparse][countdown=12/31/2012 5:00 AM;It is finally here]Count down:[/countdown][/noparse]

[countdown=12/31/2012 5:00 AM;It is finally here]Count down:[/countdown]

 

 

Note: It doesn't accept 24 hour time, it could probably be changed to DD, MM, YYYY but don't want to fiddle with the js in case I miss something and break everything. You have to refresh after posting.

 

tl;dr its a bit balls but you wanted it :heh:

 

Thanks Ashley!

 

Let's see if it works (can't seem to see one in Diageo's post)...

 

[countdown=12/31/2013 5:00 AM;It is finally here]Count down:[/countdown]

 

Can't seem to get it to work...

Edited by Sheikah
×
×
  • Create New...