[BETA] - Custom User Weather

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
User avatar
LaZeR
Registered User
Posts: 671
Joined: Sat Jun 29, 2002 8:38 pm
Contact:

Post by LaZeR »

I found a little (well rather huge) problem if your host is running php 4.3.2 and this script is not working, you will need to do the following in the /includes/weather.php file:

FIND:

Code: Select all

    $OpenFile = fopen($AquireURL, "r"); //- Read The File
    $RetrieveFile = fread($OpenFile, 200000);  //- Might Be Able To Reduce This To Save Memory
    $AquireData = eregi("$AquireStart(.*)$AquireEnd", $RetrieveFile, $DataPrint); // Acquire The Data
REPLACE WITH:

Code: Select all

    $OpenFile = file_get_contents($AquireURL, "r"); //- Read The File
    //$RetrieveFile = fread($OpenFile, 200000);  //- Might Be Able To Reduce This To Save Memory
    $AquireData = eregi("$AquireStart(.*)$AquireEnd", $OpenFile, $DataPrint); // Acquire The Data
Actually the 2nd line with the // is simply commented out and can be removed now entirely. I found this out the hard way after my host upgraded php and doing some extensive searching to find the fread function was altered from php 4.3.x to 4.3.2

Maybe this will help some of you not able to get it working before :?:
User avatar
dask
Registered User
Posts: 76
Joined: Wed Apr 09, 2003 2:55 am

SQL Error : 1064 You have an error in your SQL syntax

Post by dask »

i get this error

Code: Select all

DEBUG MODE

SQL Error : 1064 You have an error in your SQL syntax near ' user_timezone = 1, user_dateformat = 'D M d, Y g:i a', user_lang = 'english', u' at line 2

any ideas

and

Code: Select all

Line : 460
File : e:\1548\phpbb2\includes\usercp_register.php 
  
any ideas
ddhblt
Registered User
Posts: 57
Joined: Sun Feb 09, 2003 10:09 pm

suppose this would be asking a lot

Post by ddhblt »

suppose this would be asking a lot

would it be possible to incorporate the results from this NOAA forecast into a forum per each user with the zip OR city, state submitted from the user's profile?
Godlike242
Registered User
Posts: 279
Joined: Mon Dec 16, 2002 9:29 pm
Contact:

Post by Godlike242 »

i don't want to be a doom sayer, but how long before cnn.com gets sick of requests coming in from a bunch of phpbb boards?
i think this is a very very cool mod, but it would suck if they decided to be (ahem) uncooperative, and blocked the info.
I will help if possible, but i will not do things for you.
User avatar
scanman20
Registered User
Posts: 157
Joined: Tue Oct 01, 2002 8:23 pm
Contact:

Post by scanman20 »

Good news. I've just completed the modification to this mod so it works with 2.0.6 and PHP 4.3.3. I should have something downloadable within the next day for anyone that wants it.

And for deef, CNN shows celcius temperatures in parenthesis. :D

I'll have to clean up the install code to pass the phpbb mod test so wish me luck.
User avatar
scanman20
Registered User
Posts: 157
Joined: Tue Oct 01, 2002 8:23 pm
Contact:

Post by scanman20 »

Ok the new Custom Weather (Beta) Mod for phpbb 2.0.6 is now available for those of you that would like to try it. Remember, this is still a beta version and has not been given the official OK.

If you're interested, send me a PM and I'll send you the link.

I've just installed two fresh phpbb 2.0.6 boards over the past few days and the Custom Weather mod works like a charm. :D
User avatar
dask
Registered User
Posts: 76
Joined: Wed Apr 09, 2003 2:55 am

Post by dask »

thx a lot scanman,
yes indeed its working as a charm on v2.0.6
User avatar
scanman20
Registered User
Posts: 157
Joined: Tue Oct 01, 2002 8:23 pm
Contact:

Post by scanman20 »

For those curious about what exactly this mod does, here's a snapshot:

Image
Last edited by scanman20 on Sat Oct 04, 2003 7:08 pm, edited 1 time in total.
User avatar
scanman20
Registered User
Posts: 157
Joined: Tue Oct 01, 2002 8:23 pm
Contact:

Post by scanman20 »

Here's the 2.0.6 version awaiting validation for those interested:

http://www.notonebit.com/projects/phpbb/
Bradman
Registered User
Posts: 84
Joined: Mon Nov 11, 2002 6:39 am
Location: Ledyard, CT
Contact:

Post by Bradman »

Excellent, will try it out real soon.
madnessmotors
Registered User
Posts: 269
Joined: Sun Aug 17, 2003 7:33 pm
Contact:

Post by madnessmotors »

I get this error when I try to submit profile changes.

Code: Select all

Could not update users table

DEBUG MODE

SQL Error : 1064 You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' WHERE user_id = 2' at line 2

UPDATE phpbb_users SET user_email = 'bob@madnessmotors.com', user_icq = '', user_website = 'http://www.madnessmotors.com', user_occ = 'Student', user_from = 'Pittsburgh, PA', user_interests = 'Web Design, Derbies, Video Games.', user_birthday = '5332', user_next_birthday_greeting = '2004', user_sig = '\"5 and a quarter hits ''em about as hard as you can hit someone!\" [b:3deae2a104]Sandbaggers should be shot.[/b:3deae2a104]', user_sig_bbcode_uid = '3deae2a104', user_viewemail = 1, user_aim = 'trunkx666', user_yim = '', user_msnm = '', user_attachsig = 1, user_allowsmile = 1, user_allowhtml = 1, user_allowbbcode = 1, user_allow_viewonline = 1, user_notify = 0, user_notify_pm = 0, user_popup_pm = 1, user_timezone = -5, user_dateformat = 'd M Y h:i a', user_lang = 'english', user_translations_lang = 'korean', user_style = 3, user_active = 1, user_actkey = '', user_zipcode = ' WHERE user_id = 2

Line : 572
File : /home/madnessmotors/public_html/forum/includes/usercp_register.php
Also after editing the city and pressing submit for the first time the city info is now gone from all profliles. It just says : has an empty text box and that's it.
User avatar
scanman20
Registered User
Posts: 157
Joined: Tue Oct 01, 2002 8:23 pm
Contact:

Post by scanman20 »

Do you have any other mods installed?

Judging from the error you posted, it appears as if you may have entered the update wrong. The line with user_zipcode = ' seems to be missing the matching '. I've installed this mod on a few forums with no problem. You may want to try again.
madnessmotors
Registered User
Posts: 269
Joined: Sun Aug 17, 2003 7:33 pm
Contact:

Post by madnessmotors »

yes, i have other mods, the birthdays and translations mods effect that file from what I can tell.

here is what my file looks like now

Code: Select all

			$sql = "UPDATE " . USERS_TABLE . "
				SET " . $username_sql . $passwd_sql . "user_email = '" . str_replace("\'", "''", $email) ."', user_icq = '" . str_replace("\'", "''", $icq) . "', user_website = '" . str_replace("\'", "''", $website) . "', user_occ = '" . str_replace("\'", "''", $occupation) . "', user_from = '" . str_replace("\'", "''", $location) . "', user_interests = '" . str_replace("\'", "''", $interests) . "', user_birthday = '$birthday', user_next_birthday_greeting = '$next_birthday_greeting', user_sig = '" . str_replace("\'", "''", $signature) . "', user_sig_bbcode_uid = '$signature_bbcode_uid', user_viewemail = $viewemail, user_aim = '" . str_replace("\'", "''", str_replace(' ', '+', $aim)) . "', user_yim = '" . str_replace("\'", "''", $yim) . "', user_msnm = '" . str_replace("\'", "''", $msn) . "', user_attachsig = $attachsig, user_allowsmile = $allowsmilies, user_allowhtml = $allowhtml, user_allowbbcode = $allowbbcode, user_allow_viewonline = $allowviewonline, user_notify = $notifyreply, user_notify_pm = $notifypm, user_popup_pm = $popup_pm, user_timezone = $user_timezone, user_dateformat = '" . str_replace("\'", "''", $user_dateformat) . "', user_lang = '" . str_replace("\'", "''", $user_lang) . "', user_translations_lang = '" . str_replace("\'", "''", $user_translations_language) . "', user_style = $user_style, user_active = $user_active, user_actkey = '" . str_replace("\'", "''", $user_actkey) . "'" . $avatar_sql . ", user_zipcode = '" . str_replace("\'", "''", $zipcode) . "WHERE user_id = $user_id";
i thought it looked like a ' was missing somewhere but i wasnt sure where to put it.
danb00
Registered User
Posts: 1025
Joined: Sun Dec 15, 2002 9:41 pm
Location: Inside Mod:Extreme PHPBB
Contact:

Post by danb00 »

can someone make this work with the PCP mod please :)
Profial control pannel
madnessmotors
Registered User
Posts: 269
Joined: Sun Aug 17, 2003 7:33 pm
Contact:

Post by madnessmotors »

I just got it working finnaly on my fully modded forum. Thanks for the great mod. :)
Post Reply

Return to “[2.0.x] MODs in Development”