PDA

View Full Version : World Timezones on indexpage


Mas*Mind
24 Mar 2001, 18:49
This hack puts a list of the worldtimezones on your index page, instructions and needed files are in the attached zipfile..

Currently there's no demo so if someone has installed it, plz add a link to it...

I've not tested it thoroughly but it seems to be working well..

enjoy :)

24 Mar 2001, 18:52
I've coded all timezones very quickly, but if you wanna change it, just edit:

$timezones[-12] = "Eniwetok, Kwajalein";
$timezones[-11] = "Midway Island, Samoa";
$timezones[-10] = "Hawaii";
$timezones[-9] = "Alaska";
$timezones[-8] = "Pacific Time (US & Canada)";
$timezones[-7] = "Mountain Time (US & Canada)";
$timezones[-6] = "Central Time (US & Canada), Mexico City";
$timezones[-5] = "Eastern Time (US & Canada)";
$timezones[-4] = "Atlantic Time (Canada)";
$timezones[-3] = "Brazil, Buenos Aires, Georgetown";
$timezones[-2] = "Mid-Atlantic";
$timezones[-1] = "Azores, Cape Verde Islands";
$timezones[0] = "London, UK";
$timezones[1] = "Amsterdam, Netherlands";
$timezones[2] = "Kaliningrad, South Africa";
$timezones[3] = "Baghdad, Kuwait";
$timezones[4] = "Tehran";
$timezones[5] = "Ekaterinburg, Islamabad";
$timezones[6] = "Almaty, Dhaka";
$timezones[7] = "Bangkok, Hanoi";
$timezones[8] = "Beijing, Perth, Singapore, Hongkong";
$timezones[9] = "Tokyo, Seoul, Osaka";
$timezones[10] = "Guam, Papua New Guinea";
$timezones[11] = "Magadan, Solomon Islands";
$timezones[12] = "Auckland, Wellington, Fiji";

To reflect the correct zones...You can move some array-elements if you don't wanna display them...

24 Mar 2001, 18:54
Example shot:

24 Mar 2001, 18:59
Now that's what I call quick service. :)

Thanks!

24 Mar 2001, 19:01
wow that was quick ... *** runs off to install it ***

24 Mar 2001, 19:09
Originally posted by Mas*Mind
Example shot:

Very nice!!
Will install it monday !

24 Mar 2001, 19:19
came out strange for some reason ?

http://animeboards.com/tzindex.php

24 Mar 2001, 19:21
Don't see anything from my hack on that page :confused:

It looks a bit funny though..

24 Mar 2001, 19:24
yeah i know i have no idea of what included that :confused:

24 Mar 2001, 19:28
You really mean the installation of my hack included that funny timezone utility? Mabye you have to rename timezone.php to something else (don't forget to change the reference to include("timezone.php"); in index.php also..)

24 Mar 2001, 19:33
Great hack:D:D
Thanx m8....

24 Mar 2001, 19:34
The only reason that *might* explain it is that you maybe have an existing timezone.php in your php include-dir?

24 Mar 2001, 19:42
Originally posted by Mas*Mind
The only reason that *might* explain it is that you maybe have an existing timezone.php in your php include-dir? LOL i forgot i had another timezone script i uploaded a while back -

seems to work now

http://animeboards.com/timezindex.php :D

24 Mar 2001, 19:48
Hehehe

You just saved me from a headeache ;)

Glad it works now :)

24 Mar 2001, 19:50
>>> Eastern Australian Standard Time (AEST), Guam, Papua New Guinea Sunday 05:48

Isn't this your timezone eva2000? If so, what are you doing up at this ungodly hour? GO TO BED!

24 Mar 2001, 19:53
Originally posted by fastforward
>>> Eastern Australian Standard Time (AEST), Guam, Papua New Guinea Sunday 05:48

Isn't this your timezone eva2000? If so, what are you doing up at this ungodly hour? GO TO BED! hehe it's the only time i get to correspond with everyone else in the USA :D

that and did i tell you I'm a vB addict :D

24 Mar 2001, 20:11
well it's done - http://animeboards.com/index.php?s= :D

24 Mar 2001, 20:17
Looks good, only the image is broken...

You can change the number of columns if you want btw...($percol in timezone.php)

24 Mar 2001, 20:20
Originally posted by Mas*Mind
Looks good, only the image is broken...

You can change the number of columns if you want btw...($percol in timezone.php) strange you mean the folder icon ? seems fine for me

is that number of rows or columns ?

24 Mar 2001, 20:29
The image is linked to images/.gif ... no image name, comes up with a red X.

24 Mar 2001, 20:35
Originally posted by Joe
The image is linked to images/.gif ... no image name, comes up with a red X. strange i am seeing a folder images/on.gif on mine

anyway i removed the image as it servers no purpose :)

24 Mar 2001, 20:36
my bad; I referrenced to $onoff.gif in the timezonelist-template...

It probably doesn't work for use because we had no cookie set...

24 Mar 2001, 20:50
Excellent hack. :) I didn't have time to get started on it and already you released it! :D

24 Mar 2001, 21:08
How do u change the default time is now?

I tried changing the $i= variable but no dice.

24 Mar 2001, 21:12
What do you mean? You shouldn't touch the $i variable, it's used for other purposes...

The script makes use of you configurations timezone offset (the one in your cp-general settings), so if you set that right all times should be displayed correctly

24 Mar 2001, 21:14
Originally posted by eva2000
is that number of rows or columns ?

Number of columns btw...

24 Mar 2001, 23:50
eva2000, can you please post your timezones for me? as i am from Australia as well, Sydney to be exact

24 Mar 2001, 23:59
Originally posted by surfichris
eva2000, can you please post your timezones for me? as i am from Australia as well, Sydney to be exact what do you mean post my timezones ?

i just loaded timezone.php that came with the hack :)

it all depends on where your server/webhost is located as well

25 Mar 2001, 00:15
wow! thats one speedy response! :D
can you tell me the line you modified for EAST (Eastern Australia Time)

thanks

btw - where can i get a copy of your getinfo template, its kool

25 Mar 2001, 00:18
wow. great hack man

25 Mar 2001, 09:50
Originally posted by surfichris
wow! thats one speedy response! :D
can you tell me the line you modified for EAST (Eastern Australia Time)

thanks

btw - where can i get a copy of your getinfo template, its kool

You don't have to modify anything as long if you configured the timezoneoffset in your controlpanel (general settings) right...

26 Mar 2001, 12:04
Originally posted by Mas*Mind


You don't have to modify anything as long if you configured the timezoneoffset in your controlpanel (general settings) right...

and how we know that is right???

26 Mar 2001, 17:12
If you're threadtimes are corresponding your timezone...

bokhalifa
13 Apr 2001, 11:25
help my
http://bokhalifa.org/daar/bo/timezone.php

Mas*Mind
13 Apr 2001, 12:15
You didn't follow the instructions properly...

timezone.php isn't a standalone script, but needs to be included in the index.php

re-read the instructions plz

bokhalifa
13 Apr 2001, 13:38
thanks
Mas*Mind;)

now wirking
good
http://bokhalifa.org/daar/bo/index.php


:D

Mas*Mind
13 Apr 2001, 15:52
Looks good..only the image is broken...

you have to change the $onoff.gif to another one....

Translated:

...nekorb si egami eht ylno..doog skooL

...eno rehtona ot fig.ffono$ eht egnahc ot evah uoy

:D

bokhalifa
13 Apr 2001, 19:39
thanks
Mas*Mind
looool:D


thanks
Translated:
:D

almighty one
25 Apr 2001, 02:56
i followed the instructions as far as i can tell but i dont show this on ym board grrrr where exactly is it you add
$timezonelist
i tried it in a few places but as i say my thing isnt showing up =[

almighty one
25 Apr 2001, 02:58
can someone make an install for idiots :) i seem to not be bale to get this to work at all please help a dummy

almighty one
25 Apr 2001, 03:45
ok ok i got the hack to work but can anyone tell me how to edit the colors make like the times one color and the cities another and maybe how to get a bigger space inbetween the infos it is kinda crammed

eva2000
25 Apr 2001, 08:38
Originally posted by almighty one
i followed the instructions as far as i can tell but i dont show this on ym board grrrr where exactly is it you add
$timezonelist
i tried it in a few places but as i say my thing isnt showing up =[ if you haven't changed the location of $pminfo in your forumhome template, then put $timezonelist under the variable $pminfo

Mas*Mind
25 Apr 2001, 10:50
Originally posted by almighty one
ok ok i got the hack to work but can anyone tell me how to edit the colors make like the times one color and the cities another and maybe how to get a bigger space inbetween the infos it is kinda crammed

Just edit the template timezone_city

almighty one
25 Apr 2001, 18:38
Originally posted by Mas*Mind


Just edit the template timezone_city
i tried that but then the whole thing disappears :confused:

almighty one
25 Apr 2001, 18:38
Originally posted by almighty one

i tried that but then the whole thing disappears :confused:
i tried that then the whole thing just disappears :confused:

Mas*Mind
25 Apr 2001, 19:04
how does it look like now then? (the template)

almighty one
25 Apr 2001, 19:31
Originally posted by Mas*Mind
how does it look like now then? (the template) <smallfont><b>$cities</b> $datetime</smallfont><br>
well to split it and make the time post under the cities looks as if ya put another <br> inbetween but how can i make the time post in a color or the cities post in another color also is it possable to make them post in a table type border where as the cities match the 1st alt color and the time posts ina table color to the 2nd alt color

Mas*Mind
25 Apr 2001, 21:14
You could do something like this:

<table>
<tr>
<td><smallfont><b>$cities</b></smallfont></td>
<td><smallfont color="{ timecolor }">$datetime</smallfont></td>
</tr>
</table>

(remove the spaces between { timecolor })

almighty one
25 Apr 2001, 21:24
thanx will try that didnt divide it into table oh well no biggie ill live with it as it is

Mas*Mind
25 Apr 2001, 21:39
what do you want exactly then? Anything is possible with the templates...as long as you know howto code html...

almighty one
25 Apr 2001, 23:18
well like in the actaul vbb ya have 2 alt colors and it is tabled across the screen like you have the little box with the vb_bullet.gif that has 1st alt color then ya got the forum name 2nd alt color then ya got #posts 1st alt color then ya got #views 2nd alt color etc etc i would like mt cities to be in 1st alt color and the times to be in 2nd alt color to kinda match the forums

Mas*Mind
26 Apr 2001, 16:30
try this (untested, don't use the hack myself actually)

timezone_city_col:

<td valign="top"><table>$citycol</table></td>

timezone_city:

<tr>
<td bgcolor="{ firstaltcolor }"><smallfont><b>$cities</b></smallfont></td>
<td bgcolor="{ secondaltcolor }"><smallfont color="{ timecolor }">$datetime</smallfont></td>
</tr>

Remove the spaces out of the { blabla } variables

almighty one
28 Apr 2001, 21:34
yes yes it worked thanx alot :)

Christian
03 May 2001, 23:13
One question:

Is it possible to have/make more than one entry for a certain timezone?

Mas*Mind
03 May 2001, 23:28
what do you mean exactly?

Christian
03 May 2001, 23:34
For example:


$timezones[-3] = "Brasilia";
$timezones[-3] = "Buenos Aires, Georgetown";
$timezones[-2] = "Mid-Atlantic";
$timezones[-1] = "Azores, Cape Verde Islands";
$timezones[0] = "Casablanca, Monrovia";
$timezones[0] = "Greenwich Mean Time: Dublin, Edinburgh, Lisbon, London";
$timezones[1] = "Amsterdam, Berlin, Bern, Rome. Stockholm, Vienna";
$timezones[1] = "Belgrade, Bratislava, Budapest, Ljubljana, Prague";
$timezones[1] = "Brussels, Copenhagen, Madrid, Paris, Vilnius";
$timezones[1] = "Sarajevo, Skopje, Sofija, Warsaw, Zagreb";
$timezones[1] = "West-Central Africa";
$timezones[2] = "Athens, Istanbul, Minsk";
$timezones[2] = "Bucharest";
$timezones[2] = "Cairo";



It only reads out one entry!

I'm not 100% familiar with PHP yet!
Does the [x] mean that $timezones is an array?

orca
04 May 2001, 15:44
Great hack, worked like a charm.

Wolverine
09 May 2001, 21:20
Now all you have to do is link the timezones to the "who's online" feature.

:)

JJR512
09 May 2001, 22:11
The time zone 0, the one with London, should not say Greenwich Mean Time. Even though London is in the same time zone as GMT, they are not always the same time. That's because London, in fact all of England, go on Daylight Savings Time, but Greenwich does not. GMT is the same all year round, but the actual time in that time zone may actually be GMT+1 when on DST. (Yes, oddly enough, that means that during part of the year, even Greenwich itself is GMT+1!)

I think this whole thing about GMT not going on DST while the time zone does is very confusing to many people, and actually leads to some errors in vBulletin. For example, right now on my board, my time zone offset is -5, and the board tells "all times are GMT -5 hours". But that's not true. Right now, my time is GMT -4 hours. My time zone, Eastern Time, is on DST. On standard time, ET is GMT -5, but when ET is on DST, it's GMT -4. Now compared to the actual time in England, I am -5 hours. But not compared to GMT.

Is this making sense?

Mas*Mind
10 May 2001, 07:21
Originally posted by Christian
For example:


$timezones[-3] = "Brasilia";
$timezones[-3] = "Buenos Aires, Georgetown";
$timezones[-2] = "Mid-Atlantic";
$timezones[-1] = "Azores, Cape Verde Islands";
$timezones[0] = "Casablanca, Monrovia";
$timezones[0] = "Greenwich Mean Time: Dublin, Edinburgh, Lisbon, London";
$timezones[1] = "Amsterdam, Berlin, Bern, Rome. Stockholm, Vienna";
$timezones[1] = "Belgrade, Bratislava, Budapest, Ljubljana, Prague";
$timezones[1] = "Brussels, Copenhagen, Madrid, Paris, Vilnius";
$timezones[1] = "Sarajevo, Skopje, Sofija, Warsaw, Zagreb";
$timezones[1] = "West-Central Africa";
$timezones[2] = "Athens, Istanbul, Minsk";
$timezones[2] = "Bucharest";
$timezones[2] = "Cairo";



It only reads out one entry!

I'm not 100% familiar with PHP yet!
Does the [x] mean that $timezones is an array?

Yep, it's an array; So you can't do that I'm affraid... Maybe I'll work on it...

Christian
10 May 2001, 13:07
Perhaps a for loop in a for loop would do it!

In JAVA it would be no prob for me!


for (i=... ; i<=timezones[].length; i++)
{
for (j=0; j<=timeszones[i].length, j++)
{
.
.
.



is that possible with PHP also?

eva2000
22 May 2001, 07:54
still works with VB 2 final :D

Kengan
19 Jul 2001, 05:53
Very useful !! Thanks man !:D

ldydvr
01 Aug 2001, 15:34
Is there any problems within this hack if installed on the security updated 2.0.3 ?

eva2000
01 Aug 2001, 16:12
Originally posted by ldydvr
Is there any problems within this hack if installed on the security updated 2.0.3 ? works with 2.0.3 since i use it :)

ldydvr
01 Aug 2001, 17:09
Thanks eva2k!

=-)

centris
04 Aug 2001, 12:59
Originally posted by ldydvr
Is there any problems within this hack if installed on the security updated 2.0.3 ?

Yes I upgraded to 2.03 and then installed the hack - works well, though a tip: change the col var from 13 to 5 looks neat.

j_lorence
05 Aug 2001, 15:42
Is there anyway I can edit it to where i can show countries in the same timezone, but on seperate lines? Like say for instance i live in Missouri which is Central Time, and Mexico City is also Central Time. But the only way i can show them both is if i put them on the same line like this ...

$timezones[-6] = "Missouri, Mexico City";

I tried putting...

$timezones[-6] = "Missouri";
$timezones[-6] = "Mexico City";

but it would only show one of them. Any ideas?

Chen
06 Aug 2001, 11:19
I installed it, works great. Good job! :)

But how can I modify this to have it pop up when I click on something?
Kinda like the 'Who Posted?' stuff.

Chen
07 Aug 2001, 11:43
Anyone came up with a way?

Chen
08 Aug 2001, 07:02
There's a little bug I just found out.

The template timezonelist contains
<img src="{images}/$lightbulb.gif" alt="">
The problem is when you are not logged in, the image is broken ($lightbulb is not defined).

So what I did is just changed it to
<img src="{images}/clock.gif" alt="">
(When clock.gif is a little image I did with a world and a clock)

I'm using v2.0.3, so I'm not sure if this is also a problem on earlier versions. :rolleyes:

EDIT: Just saw that this is mentioned before. :p Sorry. :(

centris
08 Aug 2001, 16:17
Ah the Lightbulb bug, this one had me stumped for a while he he

<img src="{imagesfolder}/on.gif" alt=""></td>

This is what I did, )always on (as the calculation of the time is)

handheld234
13 Aug 2001, 15:11
This hack looks great [saw it on another site]. I think though it doesn't account for daylight savings time [like the US Pacific Time] May need to manually adjust for that???. Also, has anyone been able to put it somewhere else on a page outside of the forum tables???

I would just like to add a tiny table with 6 or so timezones in it at another spot on my page.

Thanks.

handheld234
16 Aug 2001, 01:02
I'm going to try this but instead of putting the times in the main table I am going to try to stick it in the footer instead by sticking $timezonelist down there. Will see what happens...

handheld234
16 Aug 2001, 02:49
Doesn't work in the footer. Nothing came up.

TheComputerGuy
21 Aug 2001, 03:25
Fatal error: Call to undefined function: gettemplate() in /home/moneytec/public_html/forums/timezone.php on line 39



I get that...anyone know why?

chacho
22 Aug 2001, 06:57
I still have this question..........



<?php

$dateformat = "l H:i";
$percol = 13;

$timezones[-12] = "Eniwetok, Kwajalein";
$timezones[-11] = "Midway Island, Samoa";
$timezones[-10] = "Hawaii";
$timezones[-9] = "Alaska";
$timezones[-8] = "Pacific Time (US & Canada)";
$timezones[-7] = "Mountain Time (US & Canada)";
$timezones[-6] = "Central Time (US & Canada), Mexico City";
$timezones[-5] = "Eastern Time (US & Canada)";
$timezones[-4] = "Atlantic Time (Canada)";
$timezones[-3] = "Brazil, Buenos Aires, Georgetown";
$timezones[-2] = "Mid-Atlantic";
$timezones[-1] = "Azores, Cape Verde Islands";
$timezones[0] = "London, UK";
$timezones[1] = "Amsterdam, Netherlands";
$timezones[2] = "Kaliningrad, South Africa";
$timezones[3] = "Baghdad, Kuwait";
$timezones[4] = "Tehran";
$timezones[5] = "Ekaterinburg, Islamabad";
$timezones[6] = "Almaty, Dhaka";
$timezones[7] = "Bangkok, Hanoi";
$timezones[8] = "Beijing, Perth, Singapore, Hongkong";
$timezones[9] = "Tokyo, Seoul, Osaka";
$timezones[10] = "Guam, Papua New Guinea";
$timezones[11] = "Magadan, Solomon Islands";
$timezones[12] = "Auckland, Wellington, Fiji";

$i=0;

while(list($timediff, $cities)=each($timezones))
{ $i++;
$servertime = $timeoffset - $timediff;
$timestamp = mktime (date("H")-$servertime, date("i"), date("s"), date("m"), date("d"), date("Y"));
$datetime = date($dateformat, $timestamp);
eval("\$citycol .= \"".gettemplate('timezone_city')."\";");
if($i % $percol == 0)
{ eval("\$cityzones .= \"".gettemplate('timezone_city_col')."\";");
unset($citycol);
}
}

if($i % $percol != 0)
eval("\$cityzones .= \"".gettemplate('timezone_city_col')."\";");

eval("\$timezonelist .= \"".gettemplate('timezonelist')."\";");

?>



That is the code in the part



$dateformat = "l H:i";
$percol = 13;



Can I change the Colums to 3 Colums instead of only 2 of them. Thansk if you can help me with that one.

chacho
22 Aug 2001, 07:22
TO change those 2 Colums to 3 Colums I just have to do some Math. LOL your colums are 13 in each, so there were 2 colums that ADD to 26, my aproximation was 26/3 give me a uneven number. I just put 9 It looks just the way I want it and now I have 3 Colums. Again Awesome hack. If you want to have 3 colums intead of 2 just change this


in timezone.php


Find:


$dateformat = "l H:i";
$percol = 13;




Change it to this



$dateformat = "l H:i";
$percol = 9;





Thanks very much For this Hack, now it looks just the way I wanted. You the Man!!!!!!!!!!

cyrus
22 Aug 2001, 10:36
Nope doesnt work with me :(

I cant even find the first thing to replace in the index.php.

:( :(

I am running vb 2.0 final

Can anyone help as I would love to add this hack !

weezle
22 Aug 2001, 12:30
Originally posted by Cyrus
Nope doesnt work with me :(

I cant even find the first thing to replace in the index.php.

:( :(

I am running vb 2.0 final

Can anyone help as I would love to add this hack !

In vbb2final Look for this



$templatesused='forumhome_birthdaybit,error_nopermission,forumhome_pmloggedin,fo rumhome_welcometext,forumhome_logoutcode,forumhome_newposts,forumhome_todayposts ,forumhome_logincode,forumhome_loggedinuser,forumhome_loggedinusers,forumhome_la stpostby,forumhome_moderator,forumhome_forumbit_level1_nopost,forumhome_forumbit _level1_post,forumhome_forumbit_level2_nopost,forumhome_forumbit_level2_post,for umhome,forumhome_unregmessage';

Replace it with this:
$templatesused='error_nopermission,forumhome_pmloggedin,forumhome_welcometext,fo rumhome_logoutcode,forumhome_newposts,forumhome_todayposts,forumhome_logincode,f orumhome_loggedinuser,forumhome_loggedinusers,forumhome_lastpostby,forumhome_mod erator,forumhome_forumbit_level1_nopost,forumhome_forumbit_level1_post,forumhome _forumbit_level2_nopost,forumhome_forumbit_level2_post,forumhome,forumhome_unreg message,timezonelist,timezone_city,timezone_city_col';

Bald Bouncer
26 Aug 2001, 23:18
I was informed that the times for Tokyo, Seoul, Osaka are out by a hour, I not sure if this is right but I have adjusted and added Melbourne and Sydney time that are correct at the moment.
Just change this in the timezone.php

$timezones[-12] = "Eniwetok, Kwajalein";
$timezones[-11] = "Midway Island, Samoa";
$timezones[-10] = "Hawaii";
$timezones[-9] = "Alaska";
$timezones[-8] = "Pacific Time (US & Canada)";
$timezones[-7] = "Mountain Time (US & Canada)";
$timezones[-6] = "Central Time (US & Canada), Mexico City";
$timezones[-5] = "Eastern Time (US & Canada)";
$timezones[-4] = "Atlantic Time (Canada)";
$timezones[-3] = "Brazil, Buenos Aires, Georgetown";
$timezones[-2] = "Mid-Atlantic";
$timezones[-1] = "Azores, Cape Verde Islands";
$timezones[0] = "UK GMT";
$timezones[1] = "Amsterdam, Netherlands";
$timezones[2] = "Kaliningrad, South Africa";
$timezones[3] = "Baghdad, Kuwait";
$timezones[4] = "Tehran";
$timezones[5] = "Ekaterinburg, Islamabad";
$timezones[6] = "Almaty, Dhaka";
$timezones[7] = "Bangkok, Hanoi";
$timezones[8] = "Tokyo, Seoul, Osaka";
$timezones[9] = "Melbourne, Sydney";
$timezones[10] = "Guam, Papua New Guinea";
$timezones[11] = "Magadan, Solomon Islands";
$timezones[12] = "Auckland, Wellington, Fiji";

If Iím wrong please tell me because it wouldnít be the first time and Iím sure it wonít be the last :)
BB

eva2000
26 Aug 2001, 23:22
mines out by an hour since Brisbane doesn't have daylight savings anymore :)

web
03 Sep 2001, 09:29
Just installed this one. My second hack installation :D
Installation was a breeze and it works as 'advertised.'

Thanks much.

web

DixonsNL
22 Oct 2001, 18:01
this is a really cool hack man, thnx !!

cyrus
23 Oct 2001, 10:06
could this some how be integrated onto vbportal ?

Tim Wheatley
25 Dec 2001, 11:02
Works great, thanks.

Spino
29 Dec 2001, 13:47
Work on 2.2.1 version?
Thx

Duke Of Lion
30 Dec 2001, 23:33
Nice hack! Just installed it on vBulletin 2.2.1!

Click here to see it in action (http://www.somesite.com/community/)

The first step in index.php just is not quite the same as previous versions but if you just add: timezonelist,timezone_city,timezone_city_col';

to that line and follow the other steps, it works fine...

Thanxxx

Bedhead
31 Dec 2001, 06:04
Great job!

Lucky
22 Jan 2002, 09:11
Originally posted by FireFly
I installed it, works great. Good job! :)

But how can I modify this to have it pop up when I click on something?
Kinda like the 'Who Posted?' stuff.

This is a great idea!

Snake~eyes
24 Jan 2002, 22:08
Popping up in a new window would be cool!

Anyone have a clue?

Lucky
25 Jan 2002, 21:54
That would be awesome!

Snake~eyes
25 Jan 2002, 23:47
yeah.. anyone know how to do it thouhg?

slideboxer
30 Jan 2002, 07:05
Is there a pop-up window coming? Please... :D

freehtml
31 Jan 2002, 06:34
Well it works for me

centris
08 Feb 2002, 19:49
This works with 2.2.2 no problem, I changed two of the templates to get the effect below. I also sorted the error with the .gif image but you will need to check your own path and choice of image.

Changes to index.php 2.2.2 make the top of the script like this;

<?php
error_reporting(7);

$templatesused='forumhome_birthdaybit,error_nopermission,forumhome_pmloggedin,fo rumhome_welcometext,forumhome_logoutcode,forumhome_newposts,forumhome_todayposts ,forumhome_logincode,forumhome_loggedinuser,forumhome_loggedinusers,forumhome_la stpostby,forumhome_moderator,forumhome_forumbit_level1_nopost,forumhome_forumbit _level1_post,forumhome_forumbit_level2_nopost,forumhome_forumbit_level2_post,for umhome,forumhome_unregmessage,timezonelist,timezone_city,timezone_city_col';
$loadbirthdays=1;
$loadmaxusers=1;

Change Timezone.php to this;

<?php

$dateformat = "l h:i A";
$percol = 5;

Templates;

timezone_city
<smallfont><b>$cities</b> <font color={timecolor}>$datetime</smallfont><br>

timezonelist
<tr bgcolor="{categorybackcolor}">
<td colspan="6"><normalfont color="{categoryfontcolor}"><b>Current World Time:</b></smallfont></td>
</tr>
<tr>
<td bgcolor="{secondaltcolor}" align="center" valign="top"><img src="images/time.gif" alt="">
<td bgcolor="{firstaltcolor}" colspan="5" valign="top">
<table>
<tr>
$cityzones
</tr>
</table>
</td>
</tr>

X-Fan
17 Feb 2002, 09:43
Works great on my v2.2.2 forums, thanks Mas!

Castel
17 Feb 2002, 10:04
Originally posted by dhogan444
yeah.. anyone know how to do it thouhg?

Not quite a pop-up, but some time back I modified this as a stand-alone page with a link on the main page.

World Times Page (http://www.tekkenzaibatsu.com/forums/worldtimes.php)

If you were actually logged in the colored globe indicates your time zone and I also added this page to Who's Online tracking. If that will do instead of the requested pop-up I can document it properly.

X-Fan
17 Feb 2002, 10:47
Originally posted by Castel
If you were actually logged in the colored globe indicates your time zone and I also added this page to Who's Online tracking. If that will do instead of the requested pop-up I can document it properly.

Wow, that's very cool, Castel!

Would it be too much trouble to document how to do that hack, please?

Snake~eyes
17 Feb 2002, 22:21
Yes! that'll work :D
i like that.

Could you explain how?

Diva
18 Feb 2002, 02:43
Castel, I'd love to have this too! When will you be able to show us the script? Great site, by the way!

Castel
19 Feb 2002, 00:40
Released under new topic http://www.vbulletin.org/forum/showthread.php?s=&threadid=35209

mashby
06 May 2002, 06:26
Great hack! Installed nice and easy.

There's only one thing I can't figure out is a small format thing. The hack works perfectly, but I'd like to figure out a way to alternate colors between country/timezone. In other words, "Eniwetok, Kwajalein = color 1" and "Midway Island, Samoa = color 2."

Anyone figure out a way to do this?

grace819
25 Oct 2002, 09:02
I've tried installing this hack and the world time in all countries are about 2-3 hours off! Is there any reason to this and how can I fix it?

Thank you and looking forward to some answers.

vortech
21 Dec 2002, 22:03
I installed this Hack and it seems to only show one city. :(

London, UK Saturday 21:57
Sunday 09:57

http://matrixwebhosting.net/forum/index.php

Its there at the bottom for some reason its not showing them all. Kind of off.. I went back over the read me to make sure I did not miss any thing..

eva2000
12 Jan 2004, 03:41
This hack puts a list of the worldtimezones on your index page, instructions and needed files are in the attached zipfile..

Currently there's no demo so if someone has installed it, plz add a link to it...

I've not tested it thoroughly but it seems to be working well..

enjoy :)
would be nice to see in vB 3 too :)

grandma
31 Mar 2004, 00:48
One of my users like this option, so I tinkered with it a bit. And have it working with VB3 Gold. There was a couple of things I haven't had time to play with, but it's still very functional.



Good Luck
Grandma

Diva
31 Mar 2004, 20:10
Hi grandma. First off I want to thank you for taking the time to do this. Thank you!!!

When I tried it I got an error. Most likely something I did wrong, but I am hoping you could guide me in the right direction. :)

Fatal error: Call to undefined function: gettemplate() in /home/divaorg/public_html/forum/worldtimes.php on line 49

grandma
31 Mar 2004, 21:29
Did you use the worldtime.txt.php I posted? Just rename it to worldtime.php and use it.

VB3 doesn't support the gettemplate function in your error. That was the original worldtimes file.

Hope that helps

Grandma

Diva
24 Apr 2004, 22:10
Hi. I have the page up and running... but the time zones are wrong. Unfortunately I dont know how to correct this. Could someone give me a hand? Thanks bunches!

grandma2
30 Apr 2004, 18:49
Edit the php file to fit your needs.

For example:

$timezones[-10] = "Honolulu, Chatham Island, Papeete, Tahiti, Cook Islands";
$timezones[-9] = "Anchorage,Juneau";
$timezones[-8] = "Los Angeles, Seattle, San Fransisco, Vancouver";
$timezones[-7] = "Denver, Phoenix, Edmonton, Aklavik";

all times in the brackets are relative to GMT. You can also change anything within the quotes.

Grandma

Diva
01 May 2004, 06:51
Edit the php file to fit your needs.

For example:

$timezones[-10] = "Honolulu, Chatham Island, Papeete, Tahiti, Cook Islands";
$timezones[-9] = "Anchorage,Juneau";
$timezones[-8] = "Los Angeles, Seattle, San Fransisco, Vancouver";
$timezones[-7] = "Denver, Phoenix, Edmonton, Aklavik";

all times in the brackets are relative to GMT. You can also change anything within the quotes.

Grandma

I'm sorry to be a pest, but do you mean to change the [-8] to [6] to get the correct time? Here is my World Times Page (http://www.nochicktrix.org/forums/worldtimes.php). As you can see, the time is off by 2 hours. My forum time is correct.

Boofo
01 May 2004, 07:37
I'm sorry to be a pest, but do you mean to change the [-8] to [6] to get the correct time? Here is my World Times Page (http://www.nochicktrix.org/forums/worldtimes.php). As you can see, the time is off by 2 hours. My forum time is correct.

Change this line (in worldtimes.php):

$servertime = ($timeoffset - ($timediff+5));

to this:

$servertime = ($timeoffset - ($timediff+7));

cLord
18 Jul 2004, 08:47
Do I really need to create 5 new remplates?
Can't this be done another way?

cLord ;)