Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Show times on Time Zone selection Details »»
Show times on Time Zone selection
Version: 1.00, by Admin (Coder) Admin is offline
Developer Last Online: Nov 2024 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 05-24-2002 Last Update: Never Installs: 18
 
No support by the author.

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

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 05-25-2002, 07:38 PM
inetd inetd is offline
 
Join Date: Nov 2001
Posts: 332
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm used vb 2.2.5. And don't found
Code:
      eval("\$avatarbit = \"".gettemplate("register_avatar")."\";");
    }
  } else {
    $avatarbit = '';
  }
I'm only found:
Code:
        eval("\$avatarbits .= \"".gettemplate("register_avatarbit")."\";");
      }
      eval("\$avatarbit = \"".gettemplate("register_avatar")."\";");
    }
  }

  if ($who=="adult") {
    if ($litereg) {
Reply With Quote
  #13  
Old 05-25-2002, 09:37 PM
Unknown553's Avatar
Unknown553 Unknown553 is offline
 
Join Date: Oct 2001
Location: Las Vegas, NV, USA
Posts: 144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed and working perfectly
Reply With Quote
  #14  
Old 06-05-2002, 07:01 PM
The Realist's Avatar
The Realist The Realist is offline
 
Join Date: Oct 2001
Location: UK
Posts: 842
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #15  
Old 06-17-2002, 10:10 PM
cteselle cteselle is offline
 
Join Date: Jan 2002
Location: SoCal
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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>
my registeradult and registercoppa:
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>
Hope this is helpful to others!
Reply With Quote
  #16  
Old 06-17-2002, 11:57 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Isn't that the same code for all 3 templates?
Reply With Quote
  #17  
Old 06-18-2002, 06:15 AM
X-Fan's Avatar
X-Fan X-Fan is offline
 
Join Date: Jan 2002
Location: Adelaide, Australia
Posts: 496
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #18  
Old 06-18-2002, 07:08 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The server your site is on should handle that, shouldn't it? At least, I think it would.
Reply With Quote
  #19  
Old 06-18-2002, 07:32 AM
X-Fan's Avatar
X-Fan X-Fan is offline
 
Join Date: Jan 2002
Location: Adelaide, Australia
Posts: 496
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #20  
Old 01-26-2003, 12:36 AM
VAN's Avatar
VAN VAN is offline
 
Join Date: Oct 2001
Posts: 97
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #21  
Old 09-14-2003, 01:59 PM
poetic poetic is offline
 
Join Date: Apr 2003
Posts: 125
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

umm this doesnt work i cant find the second code edit in members.php can someone please help
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:26 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04791 seconds
  • Memory Usage 2,321KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete