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)

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 06:10 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.01461 seconds
  • Memory Usage 1,749KB
  • 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_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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