Back to vBulletin 4.x Add-ons

Time Zone Times
Mod Version: 1.00, by Vowgaming

vB Version: 4.0.x Rating: (1 vote - 5.00 average) Installs: 9
Released: 22 Jan 2011 Last Update: Never Downloads: 0
Not Supported Re-usable Code Translations  

I have seen this requested a few times and required this for my own site so I thought it would be nice to share my solution.

This bbcode will take a date and time submitted in gmt time and display it in the time of the readers time zone

I have tried this on my site with just a 4 users and seems to work fine im using 4.1 but see no reason why this should not work on earlier versions

I would also like to state, I do not know javascript and im sure others could improve this code and please do so, but in it's current form it does what it needs

Go to you admincp, custom bb code, add new bbcode

Title: timezone

BB Code Tag Name : timezone

Replacement:
Code:
<script type="text/javascript">
text1a = "{param}";
var myarray = text1a.split(','); 
var d = new Date();
d.setUTCDate(myarray[0]);
d.setUTCMonth(myarray[1]-1);
d.setUTCHours(myarray[3]);
d.setUTCMinutes(myarray[4]);
d.setUTCSeconds(0);
document.write(d + "<br />");
</script>
Example : [timezone]10,3,2011,02,30[/timezone]

Description : Inset gmt time to show time in users local area format must be [timezone]day,month,year,hr,minutes[/timezone] must be put in as gmt time and each item seperated by a ,

Use {option} : no

Button Image : here I used a link to a picture of a clock

Remove Tag If Empty: Yes

Disable BB Code Within This BB Code: Yes

Disable Smilies Within This BB Code: Yes

Disable Word Wrapping Within This BB Code: Yes

Disable Automatic Link Parsing Within This BB Code: Yes

That it now save

Usage is [timezone]day,month,year,hr,min[/timezone]
This info must be entered as gmt data

Now if anyone can improve or give and advice feel free.

Download

No files for download.

Similar Mods

Show times on Time Zone selection vBulletin 2.x Full Releases

vblts.ru supports vBulletin®, 2022-2024