The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Show times on Time Zone selection Details »» | |||||||||||||||||||||||||
This is a pretty simple requested by yuma and JohnWarwick right here:
https://vborg.vbsupport.ru/showthrea...threadid=26385 I already coded it like 3 months ago, but never got around to release it. That thread reminded me so here it is. Basically, instead of showing the places, it shows you what the time is in that particular timezone. Check out posts #3 and #4 if you are confused. Here's the vbHacker version of the hack, text version will follow, and screen shots in the 3rd and 4th posts. Have fun. Show Your Support
|
Comments |
#12
|
|||
|
|||
I'm used vb 2.2.5. And don't found
Code:
eval("\$avatarbit = \"".gettemplate("register_avatar")."\";"); } } else { $avatarbit = ''; } Code:
eval("\$avatarbits .= \"".gettemplate("register_avatarbit")."\";"); } eval("\$avatarbit = \"".gettemplate("register_avatar")."\";"); } } if ($who=="adult") { if ($litereg) { |
#13
|
||||
|
||||
Installed and working perfectly
|
#14
|
||||
|
||||
tried to install this hack but when it comes to the bit in register.php at to replace this:
eval("\$avatarbit = \"".gettemplate("register_avatar")."\";"); } } else { $avatarbit = ''; } with this: eval("\$avatarbit = \"".gettemplate("register_avatar")."\";"); } } else { $avatarbit = ''; } // ******************************************** \\ // *** Show times in timezone selection box *** \\ $times = array(); for ($i = -12; $i <= 12; $i += 0.5) { $time = $i * 10; if ($time < 0) { $time = 'n' . substr($time, 1); } $times["$time"] = date($timeformat, time() + ($i - $timeoffset) * 3600); // 137 edit } // *** Show times in timezone selection box *** \\ // ******************************************** \\ I get a parse error? and I have also noticed that in my original register.php file I dont have these lines: } else { $avatarbit = ''; } Any ideas? |
#15
|
|||
|
|||
I actually like to see the zone names, so here is what I did:
my modifyoptions: Code:
<tr> <td bgcolor="#F1F1F1"><normalfont><b>Time offset:</b><br> <smallfont>$timezone Please select your timezone from the list:</smallfont></normalfont></td> <td bgcolor="#F1F1F1"><smallfont><select name="timezoneoffset"> <option value="-12" $timezonesel[n120]>(GMT -12:00 hours) Eniwetok, Kwajalein ($times[n120])</option> <option value="-11" $timezonesel[n110]>(GMT -11:00 hours) Midway Island, Samoa ($times[n110])</option> <option value="-10" $timezonesel[n100]>(GMT -10:00 hours) Hawaii ($times[n100])</option> <option value="-9" $timezonesel[n90]>(GMT -9:00 hours) Alaska ($times[n90])</option> <option value="-8" $timezonesel[n80]>(GMT -8:00 hours) Pacific Time (US & Canada) ($times[n80])</option> <option value="-7" $timezonesel[n70]>(GMT -7:00 hours) Mountain Time (US & Canada) ($times[n70])</option> <option value="-6" $timezonesel[n60]>(GMT -6:00 hours) Central Time (US & Canada), Mexico City ($times[n60])</option> <option value="-5" $timezonesel[n50]>(GMT -5:00 hours) Eastern Time (US & Canada), Bogota ($times[n50])</option> <option value="-4" $timezonesel[n40]>(GMT -4:00 hours) Atlantic Time (Canada), Caracas ($times[n40])</option> <option value="-3.5" $timezonesel[n35]>(GMT -3:30 hours) Newfoundland ($times[n35])</option> <option value="-3" $timezonesel[n30]>(GMT -3:00 hours) Brazil, Buenos Aires, Georgetown ($times[n30])</option> <option value="-2" $timezonesel[n20]>(GMT -2:00 hours) Mid-Atlantic ($times[n20])</option> <option value="-1" $timezonesel[n10]>(GMT -1:00 hours) Azores, Cape Verde Islands ($times[n10])</option> <option value="0" $timezonesel[0]>(GMT) Western Europe Time, London, Lisbon ($times[0])</option> <option value="+1" $timezonesel[10]>(GMT +1:00 hours) CET(Central Europe Time), Brussels, Paris ($times[10])</option> <option value="+2" $timezonesel[20]>(GMT +2:00 hours) EET(Eastern Europe Time), South Africa ($times[20])</option> <option value="+3" $timezonesel[30]>(GMT +3:00 hours) Baghdad, Riyadh, Moscow, St. Petersburg ($times[30])</option> <option value="+3.5" $timezonesel[35]>(GMT +3:30 hours) Tehran ($times[35])</option> <option value="+4" $timezonesel[40]>(GMT +4:00 hours) Abu Dhabi, Muscat, Baku, Tbilisi ($times[40])</option> <option value="+4.5" $timezonesel[45]>(GMT +4:30 hours) Kabul ($times[45])</option> <option value="+5" $timezonesel[50]>(GMT +5:00 hours) Ekaterinburg, Islamabad, Karachi, Tashkent ($times[50])</option> <option value="+5.5" $timezonesel[55]>(GMT +5:30 hours) Bombay, Calcutta, Madras, New Delhi ($times[55])</option> <option value="+6" $timezonesel[60]>(GMT +6:00 hours) Almaty, Dhaka, Colombo ($times[60])</option> <option value="+7" $timezonesel[70]>(GMT +7:00 hours) Bangkok, Hanoi, Jakarta ($times[70])</option> <option value="+8" $timezonesel[80]>(GMT +8:00 hours) Beijing, Perth, Singapore, Hong Kong ($times[80])</option> <option value="+9" $timezonesel[90]>(GMT +9:00 hours) Tokyo, Seoul, Osaka, Sapporo, Yakutsk ($times[90])</option> <option value="+9.5" $timezonesel[95]>(GMT +9:30 hours) Adelaide, Darwin ($times[95])</option> <option value="+10" $timezonesel[100]>(GMT +10:00 hours) EAST(East Australian Standard), Guam ($times[100])</option> <option value="+11" $timezonesel[110]>(GMT +11:00 hours) Magadan, Solomon Islands, New Caledonia ($times[110])</option> <option value="+12" $timezonesel[120]>(GMT +12:00 hours) Auckland, Wellington, Fiji, Kamchatka ($times[120])</option> </select></smallfont></td> </tr> Code:
<tr> <td bgcolor="#F1F1F1"><normalfont><b>Time offset:</b><br> <smallfont>$timezone Please select your timezone from the list:</smallfont></normalfont></td> <td bgcolor="#F1F1F1"><smallfont><select name="timezoneoffset"> <option value="-12">(GMT -12:00 hours) Eniwetok, Kwajalein ($times[n120])</option> <option value="-11">(GMT -11:00 hours) Midway Island, Samoa ($times[n110])</option> <option value="-10">(GMT -10:00 hours) Hawaii ($times[n100])</option> <option value="-9">(GMT -9:00 hours) Alaska ($times[n90])</option> <option value="-8">(GMT -8:00 hours) Pacific Time (US & Canada) ($times[n80])</option> <option value="-7">(GMT -7:00 hours) Mountain Time (US & Canada) ($times[n70])</option> <option value="-6">(GMT -6:00 hours) Central Time (US & Canada), Mexico City ($times[n60])</option> <option value="-5">(GMT -5:00 hours) Eastern Time (US & Canada), Bogota ($times[n50])</option> <option value="-4">(GMT -4:00 hours) Atlantic Time (Canada), Caracas ($times[n40])</option> <option value="-3.5">(GMT -3:30 hours) Newfoundland ($times[n35])</option> <option value="-3">(GMT -3:00 hours) Brazil, Buenos Aires, Georgetown ($times[n30])</option> <option value="-2">(GMT -2:00 hours) Mid-Atlantic ($times[n20])</option> <option value="-1">(GMT -1:00 hours) Azores, Cape Verde Islands ($times[n10])</option> <option value="0" selected>(GMT) Western Europe Time, London, Lisbon ($times[0])</option> <option value="+1">(GMT +1:00 hours) CET(Central Europe Time), Brussels, Paris ($times[10])</option> <option value="+2">(GMT +2:00 hours) EET(Eastern Europe Time), South Africa ($times[20])</option> <option value="+3">(GMT +3:00 hours) Baghdad, Riyadh, Moscow, St. Petersburg ($times[30])</option> <option value="+3.5">(GMT +3:30 hours) Tehran ($times[35])</option> <option value="+4">(GMT +4:00 hours) Abu Dhabi, Muscat, Baku, Tbilisi ($times[40])</option> <option value="+4.5">(GMT +4:30 hours) Kabul ($times[45])</option> <option value="+5">(GMT +5:00 hours) Ekaterinburg, Islamabad, Karachi, Tashkent ($times[50])</option> <option value="+5.5">(GMT +5:30 hours) Bombay, Calcutta, Madras, New Delhi ($times[55])</option> <option value="+6">(GMT +6:00 hours) Almaty, Dhaka, Colombo ($times[60])</option> <option value="+7">(GMT +7:00 hours) Bangkok, Hanoi, Jakarta ($times[70])</option> <option value="+8">(GMT +8:00 hours) Beijing, Perth, Singapore, Hong Kong ($times[80])</option> <option value="+9">(GMT +9:00 hours) Tokyo, Seoul, Osaka, Sapporo, Yakutsk ($times[90])</option> <option value="+9.5">(GMT +9:30 hours) Adelaide, Darwin ($times[95])</option> <option value="+10">(GMT +10:00 hours) EAST(East Australian Standard), Guam ($times[100])</option> <option value="+11">(GMT +11:00 hours) Magadan, Solomon Islands, New Caledonia ($times[110])</option> <option value="+12">(GMT +12:00 hours) Auckland, Wellington, Fiji, Kamchatka ($times[120])</option> </select></smallfont></td> </tr> |
#16
|
||||
|
||||
Isn't that the same code for all 3 templates?
|
#17
|
||||
|
||||
Slightly off-topic, but does anyone know how to include those timezones that have daylight savings?
For example, I'm in Adelaide, Australia and there's the regular +9:30 timezone, but how can we set it to recognize our +10:30 timezone when we're in daylight saving? And any way to have the system automatically update the various timezones when daylight savings comes into effect and when it ends? |
#18
|
||||
|
||||
The server your site is on should handle that, shouldn't it? At least, I think it would.
|
#19
|
||||
|
||||
I'm using the World Times hack:
http://x-mencomics.com/xfan/forums/worldtimes.php?s= And I've got $timezones[10.5] = "Adelaide DST"; added to the php file but it doesn't come up right. |
#20
|
||||
|
||||
I'm having a problem with this one. When a user changes their time zone in ther CP, the select box does not "remember" the change.
The box shows -12:00 hours GMT by default. If I change it to -5:00GMT and go back to look at my options, it is back to showing -12:00 GMT. Is there a quick fix for this? |
#21
|
|||
|
|||
umm this doesnt work i cant find the second code edit in members.php can someone please help
|
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|