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)
-   -   vB Weather Mk. 2 (https://vborg.vbsupport.ru/showthread.php?t=41842)

PHiXTiT 09-24-2002 09:13 PM

Working here

Still wondering about the provinces in Canada for subdivisions as the are not showing up.

Help would be appreciated.

ThanX

sklwer 10-10-2002 01:02 AM

Hi there,
I am new to this PHP stuff and i am trying how to impliment the above hack.. I figured everything but I am unable to
"Create new tables in your database using the file create_tables.txt. You can copy the entire contents of the file and
paste into the query window in phpMyAdmin, or you could run each query individually through telnet. Please ask in at
vbulletin.org if you need help in this regard."

Help! Help! Help

lemarsu 10-10-2002 09:45 AM

copy and paste the query window in phpMyAdmin should be enough.

sklwer 10-10-2002 09:10 PM

I dont have a phpmyadmin

lemarsu 10-11-2002 08:48 AM

How do you access your database ? :surprised:

I am new to this, I only had phpmyadmin, or Linux to use to access the mysql databases.

(not to sound to dumb I am working on a data warehouse project at work with Oracle and DB2 and Unix.... So I know what I am going) just this is the first time I user vbulletin

sklwer 10-13-2002 03:55 AM

Finaly figured it out Got it installed sucessfully.
Two Minor problems
I modified the default city and when unregistared user is online the Default city is NY when registered user is online its the New Weather city any help????
How can i link the weather to a non php home site ( thats shtml)??
Thanks

K_2 10-14-2002 07:11 AM

Anyone try this hack on 2.2.8 yet?? Would love to add it to my forums :)

Thanks In advance!

lemarsu 10-14-2002 07:40 AM

I have it up and running with 2.2.8 with no problem.

K_2 10-14-2002 08:55 PM

Thank You!

wolfe 10-18-2002 12:28 AM

WOW awesome m8 niceone must have took you ages to do all that sql code :D

but 1 question how can i add it to the Who's Online in online.php i get this

Code:

Unknown Location: /forums/weather.php?&action=modifysettings&s=
also there is a error on it when i click on this link

Code:

<a href="weather.php?s=$session[sessionhash]&forceupdate=yes">Force Update</a>
i get a blank screen :( any ideas :D

Ian 10-26-2002 09:40 PM

Just an update, I've removed this hack because I found it to be slowing down, the loading of my frontpage, a lot.

scottct1 10-26-2002 10:31 PM

Same here Ian, I just removed it from my site this morning. Seems like stuff went to hell when MSNBC changed from AccuWeather for The Weather Channel.

I still have the hack on my site, I just no longer have it on my index.php page.

Good hack though.

NuclioN 10-26-2002 11:04 PM

Correct, it's slowing down and so i removed it.

Tigga 10-26-2002 11:17 PM

I've noticed it slows my page down too, but it only seems to be something like 0.3 seconds or so. Occasionally when the weather isn't available it seems to slow it down a little more, but that isn't very often. Was it slowing your sites down more than that?

Erwin 10-27-2002 02:21 AM

Mine's still working quite quickly - no discernable changes really.

scottct1 10-27-2002 03:44 PM

It works correctly WHEN the local weather is available froom MSNBC / Weather.COM however if its not available my users are seeing a 25 to 75 second wait before the page comes up.

Erwin 10-27-2002 05:40 PM

I have to say that this is happening to me now - there is a bit of delay before the page loads, about 60 seconds on average...

Tigga 10-27-2002 06:30 PM

Yea, I've noticed that it slows down even more now when the weather isn't available from MSNBC. At least I have mine set where I can easilly turn it off in my admin CP, so if I happen to notice it delaying things I can switch it off for a few minutes. :)

wolfe 10-28-2002 12:51 PM

getting a problem i click the Force Update button and it goes to blank page whats up :(

Erwin 10-28-2002 05:15 PM

@ wolfe - missing template? Make sure all your templates are inserted.

DraX 10-28-2002 05:23 PM

Changing the city/etc. doesn't work on your test board.

Tigga 11-04-2002 06:05 AM

Quote:

Originally posted by lemarsu
Hi,

Most of the time under the Temperature box there is no temperature, showing. (as you can see in the pic)

but under Detailed Forecast all comes up !
is it possible to fix that ?

LeMarsu

I've noticed the same problem... The temperature works fine on one of my sites, but not on another. It's the exact same code on both, so I'm not sure what could cause this. Anyone happen to know why it does this?

Julio 11-09-2002 03:58 AM

Has anyone been able to sucesfully change the default NY settings to your own? I have replaced the NY code with mine, (under weather.php) but it doesn't work.

Any help?

lemarsu 11-09-2002 09:05 AM

yes there are 2 places you need to change it in weather.php line 20 and line 201 aprox.

I think that all the changes I did.
if it doesn't work have a look in the database, that is a place a looked in when I 1st installed the weather hack.

all the best
LeMarsu

Julio 11-13-2002 05:06 AM

OK, thanks. Had to edit the database.

PlurPlanet - Can you please shoe me how to set it up that I can turn it on/off from the CP?

I have translated the text of this hack to another language, but notice that text under the 1st pic (below Current Weather..) still shows in English. I have modified functions.php already... anyone knows where exactly in the database I can change this (haven't found it) I know it is the "context" or it just comes from The Weather Channel?

lemarsu 11-13-2002 09:08 AM

are you talking about text like "Mostly Cloudy" or "sunny" ?
I think this is pulled out from msnbc.com

Tigga 11-13-2002 11:07 AM

Quote:

Originally posted by Julio
PlurPlanet - Can you please shoe me how to set it up that I can turn it on/off from the CP?
Sure, it's not very hard to do. :)

Just open the file the weather is displayed on (I'd assume it would be your forums/index.php, but of course you can display it in any file) and add this code right before the code for the weather:
PHP Code:

  if ($showweather) { 

Then right after the code for the weather add a } to close out that if statement.

Then using phpMyAdmin run this query:
PHP Code:

INSERT INTO setting VALUES (NULL,1,'Show Weather?','showweather','0','Show the weather forcast on your homepage.','yesno','3'); 

That will display the option right below the "Reason for turning board off" option in your Admin CP. If you know anything about the "setting" table you can change those values in the query to display it somewhere else. If you don't know how to change the setting and want it displayed somewhere else just PM me and let me know where you want it and I'll give you the code. :)

Julio 11-13-2002 11:56 AM

PlurPlanet:

I followed your instructions. It whows under "Reason for turning board off". If I leave it on, the board will show up fine, but if I turn it off, the board will not show at all. Just a blank screen.

GoTTi 11-14-2002 09:25 PM

wow this hack is real tight...this 1 gets my vote for HOM

Tony DiMera 11-14-2002 11:40 PM

Can we canadians use it for canadian cities?

Julio 11-15-2002 11:26 AM

PlurPlanet: Any help?

Lemarsu:
Quote:

are you talking about text like "Mostly Cloudy" or "sunny" ?
I think this is pulled out from msnbc.com
Any news on this. I tried browsing the database and found no clue of it. (It just points to $context)

Tigga 11-15-2002 12:16 PM

Julio - That's strange... I just tried it on my test server and it worked fine. You could try logging in with phpMyAdmin and go to your "setting" table. Then find that setting (it should be the last one unless you've added anything since) and check that the values for it are:

(could be any number) | 1 | Show Weather? | showweather | (0 if turned off, 1 if on) | Show the weather forcast on your homepage. | yesno | 3

Julio 11-16-2002 12:40 PM

Verified the database and is OK. The problem may be where Im inserting the IF code at index.php?

I have tried inserting the IF expression in a line before the "// *** GET WEATHER *** or after it. And finalize with the } before the ?> or after it.

Depending where I put these, I get a blank screen , or a parse error.

Forest Sage 11-16-2002 02:05 PM

I couldn't find this anywhere else on this thread

When I try to up weather_city1.sql and weather_city5.sql

I get

Error

SQL-query :

INSERT INTO weather_city
VALUES (

'AYXX0007', 'Base Arturo Prat', 263
)

MySQL said:

Duplicate entry 'AYXX0007' for key 1

Or something of the like
...I've never used a hack like this before so I have no clue why there would be a problem like this

Tigga 11-16-2002 02:32 PM

Julio - I didn't think about that... I was thinking more of the board was being closed when the weather was turned off. It definitely sounds like you are putting the ending } in the wrong place. Sorry I misunderstood your first post.
The if statement can be either before or after "// *** GET WEATHER ***" (doesn't really matter since that's a comment line). The ending } should be right after this line:
PHP Code:

eval("\$currentweather = \"".gettemplate("forumhome_weather")."\";"); 


Julio 11-26-2002 07:37 PM

OK thanks. It works now...

Now... my other problem... I changed all the values in the tables to show another state besides Nw York as defalut, but still not work.

Anyone could help?

Erwin 11-27-2002 04:55 AM

I've had to remove this hack. It's a great hack, but the weather server is just too bad - most of the time there is no information available, and it slows down my forumhome by many seconds...

Julio 11-27-2002 01:46 PM

Erwin: Too bad it doesn't work for you the way you expected. However, I do notice I slight increase in the time the page takes to load, but there's always information regarding my area.

The only "problem" i have is that even though I have edited the files and the database, I still can manage to make my area as default... All my users keep telling me they don't like to change te preferences... (New Users)

Tony DiMera 11-28-2002 12:15 AM

I did this and for afew other tables to create. but for what was in this txt file:

PHP Code:

CREATE TABLE weather_country (
  
countryid smallint(6NOT NULL auto_increment,
  
regionid smallint(6NOT NULL default '0',
  
country_title varchar(50NOT NULL default '',
  
PRIMARY KEY  (countryid)
TYPE=MyISAM

I got this error:

PHP Code:

Error 
SQL
-query :  [Edit

CREATE TABLE `weather_country` (`countryidSMALLINT(6NOT NULL AUTO_INCREMENT, `regionidSMALLINT(6) DEFAULT '0' NOT NULL, `country_titleVARCHAR(50NOT NULL TYPE MYISAM comment 'PRIMARY KEY  (countryid)'

MySQL said


Incorrect table definitionThere can only be one auto column and it must be defined as a key

Back 


350Chevy 12-03-2002 03:02 AM

Quote:

Originally posted by PlurPlanet

I've noticed the same problem... The temperature works fine on one of my sites, but not on another. It's the exact same code on both, so I'm not sure what could cause this. Anyone happen to know why it does this?

Same here.. everything shows but no temperature...?? Any suggestions?


All times are GMT. The time now is 03:37 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.01516 seconds
  • Memory Usage 1,828KB
  • 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
  • (2)bbcode_code_printable
  • (5)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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