PDA

View Full Version : World Timezones on indexpage


Mas*Mind
03-23-2001, 10:00 PM
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 :)

03-24-2001, 04:52 PM
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...

03-24-2001, 04:54 PM
Example shot:

03-24-2001, 04:59 PM
Now that's what I call quick service. :)

Thanks!

03-24-2001, 05:01 PM
wow that was quick ... *** runs off to install it ***

03-24-2001, 05:09 PM
Originally posted by Mas*Mind
Example shot:

Very nice!!
Will install it monday !

03-24-2001, 05:19 PM
came out strange for some reason ?

http://animeboards.com/tzindex.php

03-24-2001, 05:21 PM
Don't see anything from my hack on that page :confused:

It looks a bit funny though..

03-24-2001, 05:24 PM
yeah i know i have no idea of what included that :confused:

03-24-2001, 05:28 PM
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..)

03-24-2001, 05:33 PM
Great hack:D:D
Thanx m8....

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

03-24-2001, 05:42 PM
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

03-24-2001, 05:48 PM
Hehehe

You just saved me from a headeache ;)

Glad it works now :)

03-24-2001, 05:50 PM
>>> 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!

03-24-2001, 05:53 PM
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

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

03-24-2001, 06:17 PM
Looks good, only the image is broken...

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

03-24-2001, 06:20 PM
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 ?

03-24-2001, 06:29 PM
The image is linked to images/.gif ... no image name, comes up with a red X.

03-24-2001, 06:35 PM
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 :)

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

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

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

03-24-2001, 07:08 PM
How do u change the default time is now?

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

03-24-2001, 07:12 PM
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

03-24-2001, 07:14 PM
Originally posted by eva2000
is that number of rows or columns ?

Number of columns btw...

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

03-24-2001, 09:59 PM
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

03-24-2001, 10:15 PM
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

03-24-2001, 10:18 PM
wow. great hack man

03-25-2001, 07:50 AM
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...

03-26-2001, 10:04 AM
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???

03-26-2001, 03:12 PM
If you're threadtimes are corresponding your timezone...

bokhalifa
04-13-2001, 09:25 AM
help my
http://bokhalifa.org/daar/bo/timezone.php

Mas*Mind
04-13-2001, 10:15 AM
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
04-13-2001, 11:38 AM
thanks
Mas*Mind;)

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


:D

Mas*Mind
04-13-2001, 01:52 PM
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
04-13-2001, 05:39 PM
thanks
Mas*Mind
looool:D


thanks
Translated:
:D

almighty one
04-25-2001, 12:56 AM
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
04-25-2001, 12:58 AM
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
04-25-2001, 01:45 AM
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
04-25-2001, 06:38 AM
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
04-25-2001, 08:50 AM
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
04-25-2001, 04:38 PM
Originally posted by Mas*Mind


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

almighty one
04-25-2001, 04:38 PM
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
04-25-2001, 05:04 PM
how does it look like now then? (the template)

almighty one
04-25-2001, 05:31 PM
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
04-25-2001, 07:14 PM
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
04-25-2001, 07:24 PM
thanx will try that didnt divide it into table oh well no biggie ill live with it as it is

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

almighty one
04-25-2001, 09:18 PM
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
04-26-2001, 02:30 PM
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
04-28-2001, 07:34 PM
yes yes it worked thanx alot :)

Christian
05-03-2001, 09:13 PM
One question:

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

Mas*Mind
05-03-2001, 09:28 PM
what do you mean exactly?

Christian
05-03-2001, 09:34 PM
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
05-04-2001, 01:44 PM
Great hack, worked like a charm.

Wolverine
05-09-2001, 07:20 PM
Now all you have to do is link the timezones to the "who's online" feature.

:)

JJR512
05-09-2001, 08:11 PM
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
05-10-2001, 05:21 AM
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
05-10-2001, 11:07 AM
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
05-22-2001, 05:54 AM
still works with VB 2 final :D

Kengan
07-19-2001, 03:53 AM
Very useful !! Thanks man !:D

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

eva2000
08-01-2001, 02:12 PM
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
08-01-2001, 03:09 PM
Thanks eva2k!

=-)

centris
08-04-2001, 10:59 AM
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
08-05-2001, 01:42 PM
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?

Admin
08-06-2001, 09:19 AM
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.

Admin
08-07-2001, 09:43 AM
Anyone came up with a way?

Admin
08-08-2001, 05:02 AM
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-08-2001, 02:17 PM
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
08-13-2001, 01:11 PM
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
08-15-2001, 11:02 PM
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
08-16-2001, 12:49 AM
Doesn't work in the footer. Nothing came up.

TheComputerGuy
08-21-2001, 01:25 AM
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
08-22-2001, 04:57 AM
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
08-22-2001, 05:22 AM
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
08-22-2001, 08:36 AM
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
08-22-2001, 10:30 AM
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_noperm ission,forumhome_pmloggedin,forumhome_welcometext, forumhome_logoutcode,forumhome_newposts,forumhome_ todayposts,forumhome_logincode,forumhome_loggedinu ser,forumhome_loggedinusers,forumhome_lastpostby,f orumhome_moderator,forumhome_forumbit_level1_nopos t,forumhome_forumbit_level1_post,forumhome_forumbi t_level2_nopost,forumhome_forumbit_level2_post,for umhome,forumhome_unregmessage';

Replace it with this:
$templatesused='error_nopermission,forumhome_pmlog gedin,forumhome_welcometext,forumhome_logoutcode,f orumhome_newposts,forumhome_todayposts,forumhome_l ogincode,forumhome_loggedinuser,forumhome_loggedin users,forumhome_lastpostby,forumhome_moderator,for umhome_forumbit_level1_nopost,forumhome_forumbit_l evel1_post,forumhome_forumbit_level2_nopost,forumh ome_forumbit_level2_post,forumhome,forumhome_unreg message,timezonelist,timezone_city,timezone_city_c ol';

Bald Bouncer
08-26-2001, 09:18 PM
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
08-26-2001, 09:22 PM
mines out by an hour since Brisbane doesn't have daylight savings anymore :)

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

Thanks much.

web

DixonsNL
10-22-2001, 04:01 PM
this is a really cool hack man, thnx !!

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

Tim Wheatley
12-25-2001, 09:02 AM
Works great, thanks.

Spino
12-29-2001, 11:47 AM
Work on 2.2.1 version?
Thx

Duke Of Lion
12-30-2001, 09:33 PM
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
12-31-2001, 04:04 AM
Great job!

Lucky
01-22-2002, 07:11 AM
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
01-24-2002, 08:08 PM
Popping up in a new window would be cool!

Anyone have a clue?

Lucky
01-25-2002, 07:54 PM
That would be awesome!

Snake~eyes
01-25-2002, 09:47 PM
yeah.. anyone know how to do it thouhg?

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

freehtml
01-31-2002, 04:34 AM
Well it works for me

centris
02-08-2002, 05:49 PM
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_noperm ission,forumhome_pmloggedin,fo rumhome_welcometext,forumhome_logoutcode,forumhome _newposts,forumhome_todayposts ,forumhome_logincode,forumhome_loggedinuser,forumh ome_loggedinusers,forumhome_la stpostby,forumhome_moderator,forumhome_forumbit_le vel1_nopost,forumhome_forumbit _level1_post,forumhome_forumbit_level2_nopost,foru mhome_forumbit_level2_post,for umhome,forumhome_unregmessage,timezonelist,timezon e_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
02-17-2002, 07:43 AM
Works great on my v2.2.2 forums, thanks Mas!

Castel
02-17-2002, 08:04 AM
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
02-17-2002, 08:47 AM
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
02-17-2002, 08:21 PM
Yes! that'll work :D
i like that.

Could you explain how?

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

Castel
02-18-2002, 10:40 PM
Released under new topic https://vborg.vbsupport.ru/showthread.php?s=&threadid=35209

mashby
05-06-2002, 04:26 AM
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
10-25-2002, 07:02 AM
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
12-21-2002, 08:03 PM
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
01-12-2004, 01:41 AM
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
03-30-2004, 10:48 PM
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
03-31-2004, 06:10 PM
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
03-31-2004, 07:29 PM
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
04-24-2004, 08:10 PM
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
04-30-2004, 04:49 PM
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
05-01-2004, 04:51 AM
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
05-01-2004, 05:37 AM
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
07-18-2004, 06:47 AM
Do I really need to create 5 new remplates?
Can't this be done another way?

cLord ;)