vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   World Timezones on indexpage (https://vborg.vbsupport.ru/showthread.php?t=12210)

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

Quote:

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

Quote:

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

Quote:

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

Quote:

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

Quote:

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:

Code:

$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

Quote:

Originally posted by Christian
For example:

Code:

$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!

Code:

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

Quote:

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

Quote:

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
PHP Code:

<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
PHP Code:

<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..........


Quote:

<?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


Quote:

$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:

Quote:

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


Change it to this


Quote:

$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

Quote:

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



PHP Code:

$templatesused='forumhome_birthdaybit,error_nopermission,forumhome_pmloggedin,forumhome_welcometext,forumhome_logoutcode,forumhome_newposts,forumhome_todayposts,forumhome_logincode,forumhome_loggedinuser,forumhome_loggedinusers,forumhome_lastpostby,forumhome_moderator,forumhome_forumbit_level1_nopost,forumhome_forumbit_level1_post,forumhome_forumbit_level2_nopost,forumhome_forumbit_level2_post,forumhome,forumhome_unregmessage'

Replace it with this:
PHP Code:

$templatesused='error_nopermission,forumhome_pmloggedin,forumhome_welcometext,forumhome_logoutcode,forumhome_newposts,forumhome_todayposts,forumhome_logincode,forumhome_loggedinuser,forumhome_loggedinusers,forumhome_lastpostby,forumhome_moderator,forumhome_forumbit_level1_nopost,forumhome_forumbit_level1_post,forumhome_forumbit_level2_nopost,forumhome_forumbit_level2_post,forumhome,forumhome_unregmessage,timezonelist,timezone_city,timezone_city_col'



All times are GMT. The time now is 04:17 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01347 seconds
  • Memory Usage 1,839KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (4)bbcode_php_printable
  • (13)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete