[EN] Weatherforecast with User ZIP code (weather.com)

Forum rules
This forum is not for support requests.

Only post Modifications for Board3 Portal 1.0.x in this forum.

Xmes
Active Member
Posts: 2
Joined: 6. May 2010 15:21
phpBB.com User: Xmes

Re: [EN] Weatherforecast with User ZIP code (weather.com)

Post by Xmes »

Thank you! :)

Zip codes do not work in the Hungarian ...
For example, I typing in Kecskemet, which is 6000, does not require data from any weather.

Can someone help me?
User avatar

cLinch3r
Active Member
Posts: 10
Joined: 24. April 2010 15:52
Location: New York , USA

Re: [EN] Weatherforecast with User ZIP code (weather.com)

Post by cLinch3r »

I like this mod a lot, but cannot get it to work correctly on my site. I've read through the forum and tried many different ways to fix it including using the updated codes that Goldstar dad and mikey12561 had posted. But still had no luck. I created a custom zip code field in the UCP, edited the portal.php, created a weather.html, and have edited center block of portal - /public_html/portal/styles/prosilver/template/portal/portal_center.html as was suggested in the forum as well. And purged cache along the way.
Not sure if I'm having issues because I am running the forum using a sub-domain? http://www.forum.thebomsquad.com
Below are 2 screenshots of the forum portal. The first one has no edits to the portal.php file. The second screen shot shows error when inserting the code in portal.php

Code: Select all

// Weather START
    include($phpbb_root_path . 'portal/block/weather.'.$phpEx);
// Weather END                                       
or

Code: Select all

// Weather START
    include($phpbb_root_path . 'weather.'.$phpEx);
// Weather END                                       
Without edit to portal.php

Image

With edit to portal.php

Image

HSVWRX
Active Member
Posts: 1
Joined: 19. December 2010 15:04
phpBB.com User: HSVWRX

Re: [EN] Weatherforecast with User ZIP code (weather.com)

Post by HSVWRX »

This looks awesome!!!

I'm from Australia and I would like to add this to my portal page ... will this work using "postcodes" from OZ rather than Zip Codes?

Eagerly awaiting your reply!

novanilla
Active Member
Posts: 40
Joined: 11. October 2008 17:40

Re: [EN] Weatherforecast with User ZIP code (weather.com)

Post by novanilla »

stitch wrote:Hello all,

Just dropped in and seen this mod. OMG!!! I have been wanting amod like this ever since phpbb3 came about. There has been a weather mod in development for over 2 years now and I can't wait any longer.

I see that this mod is for a portal. I do not use a portal on my board but would like to integrate this into my index page. I have tried using the code that is provided here but when I use

Code: Select all

// Weather START
include($phpbb_root_path . 'includes/weather.' . $phpEx);
// Wether END 

But all I get is a blank page unless I comment it out. How hard would this be to do? Any help would be greatly appreciated. Like I said I have been searching for mod like this for over 2 years now.

Thanks
I just had the same issue with this yesterday, and I'm not sure how to fix it. I'd really like a weather widget in my index, rather than the portal, and am curious how to make the change. Where would I put the above code in index.php?

Thanks

novanilla
Active Member
Posts: 40
Joined: 11. October 2008 17:40

Re: [EN] Weatherforecast with User ZIP code (weather.com)

Post by novanilla »

Anybody interested in making this work on the Index page as well as the portal needs only to delete this part out of weather.php:

Code: Select all

    if (!defined('IN_PORTAL'))
    {
       exit;
    }
As far as I can tell that's all that's needed. It worked for me. Keeping the templates in the same locations works fine as well.

novanilla
Active Member
Posts: 40
Joined: 11. October 2008 17:40

Re: [EN] Weatherforecast with User ZIP code (weather.com)

Post by novanilla »

After a brief detour trying a different style that didn't accommodate B3P, I've seen the light and switched back, and use a center weather block.

I'm using proFormell - which looks GREAT with B3P with fluid screen sizing, but I can't seem to make my accuweather div piece line up in the middle of the block.

Here's the code:

Code: Select all

<div align="center" style='width: 708px; height: 90px; background-image: url( http://vortex.accuweather.com/adcbin/netweather_v2/backgrounds/lightning_708x90_bg.jpg ); background-repeat: no-repeat; background-color: #000000;' ><div id='NetweatherContainer' style='height: 74px;' ><script src='http://netweather.accuweather.com/adcbin/netweather_v2/netweatherV2ex.asp?partner=netweather&tStyle=dark2&logo=1&zipcode={WEATHER_ZIP}&lang=eng&size=11&theme=lightning&metric=0&target=_self'></script></div><div style='text-align: center; font-family: arial, helvetica, verdana, sans-serif; font-size: 11px; line-height: 16px; color: #FDEA11;' ><div style='float: left; padding-left: 10px;'><a style='color: #FDEA11' href='http://www.accuweather.com/us/CO/DENVER/80201/city-weather-forecast.asp?partner=accuweather&traveler=0' TARGET="_blank" >Weather Forecast</a> | <a style='color: #FDEA11' href='http://www.accuweather.com/maps-satellite.asp' TARGET="_blank" >Weather Maps</a> | <a style='color: #FDEA11' href='http://www.accuweather.com/index-radar.asp?partner=accuweather&traveler=0&zipcode={WEATHER_ZIP}' TARGET="_blank" >Weather Radar</a> | <a style='color: #FDEA11' href='http://hurricane.accuweather.com/hurricane/index.asp' TARGET="_blank" >Hurricane Center</a></div><img style='float: right; padding-right: 5px;' src='http://vortex.accuweather.com/adc2004/common/images/misc/netweather_v2/adcwhite.png' /></div></div>
Even though I have <div align="center in there, the weather sits on the left side. What am I missing?
User avatar

cLinch3r
Active Member
Posts: 10
Joined: 24. April 2010 15:52
Location: New York , USA

Re: [EN] Weatherforecast with User ZIP code (weather.com)

Post by cLinch3r »

Hi novanilla,
I would try going back to using the weather.html along with your own weather.php files rather than using the center block. I have had the same problem with centering when I had it on my board. I was able to center mine in the block by changing the number for the size of the border to the left.
What it did was give me a wider border on the left side until it looked like it was centered inside the block. My code looked like this for the Prosilver
weather.html

Code: Select all

<div class="forabg">
       <div class="inner">
          <span class="corners-top"><span></span></span>
          <ul class="topiclist">
             <li class="header"><dl><dt>Weather Forecast for Region: {WEATHER_ZIP}</dt></dl></li>
          </ul>
          <ul class="topiclist forums">
             <li><dl>
                <dd class="posts_portal"  style="border-left:45px">
<div style='width: 728px; height: 90px; background-image: url( http://vortex.accuweather.com/adcbin/netweather_v2/backgrounds/hurricane_728x90_bg.jpg ); background-repeat: no-repeat; background-color: #0F243A;' ><div style='height: 74px;' ><script src='http://netweather.accuweather.com/adcbin/netweather_v2/netweatherV2.asp?partner=netweather&tStyle=dark2&logo=1&zipcode={WEATHER_ZIP}&lang=eng&size=11&theme=hurricane&metric=0&target=_self'></script></div><div style='text-align: center; font-family: arial, helvetica, verdana, sans-serif; font-size: 11px; line-height: 16px; color: #FDEA11;' ><img style='float: right; padding-right: 5px;' src='http://vortex.accuweather.com/adc2004/common/images/misc/netweather_v2/adcwhite.png' /></div></div>
                </div>
                </dd>
             </dl></li>
          </ul>
          <span class="corners-bottom"><span></span></span>
       </div>
    </div>
    <br style="clear:both" />
See the line that says <dd class="posts_portal" style="border-left:45px"> change whatever the default number is to 45 or whatever looks best.. You may have to either refresh the web page or clear the cache from within admin screen to see if changes made a difference in the alignment.
Hope it works for you.

Crocodile
Active Member
Posts: 21
Joined: 8. April 2009 08:53
phpBB.com User: Crocodile442
Contact:

Re: [EN] Weatherforecast with User ZIP code (weather.com)

Post by Crocodile »

deleted
Last edited by Crocodile on 18. April 2011 16:44, edited 1 time in total.

Crocodile
Active Member
Posts: 21
Joined: 8. April 2009 08:53
phpBB.com User: Crocodile442
Contact:

Re: [EN] Weatherforecast with User ZIP code (weather.com)

Post by Crocodile »

cLinch3r wrote:I like this mod a lot, but cannot get it to work correctly on my site. I've read through the forum and tried many different ways to fix it including using the updated codes that Goldstar dad and mikey12561 had posted. But still had no luck. I created a custom zip code field in the UCP, edited the portal.php, created a weather.html, and have edited center block of portal - /public_html/portal/styles/prosilver/template/portal/portal_center.html as was suggested in the forum as well. And purged cache along the way.
Not sure if I'm having issues because I am running the forum using a sub-domain? http://www.forum.thebomsquad.com
Below are 2 screenshots of the forum portal. The first one has no edits to the portal.php file. The second screen shot shows error when inserting the code in portal.php

Code: Select all

// Weather START
    include($phpbb_root_path . 'portal/block/weather.'.$phpEx);
// Weather END                                       
or

Code: Select all

// Weather START
    include($phpbb_root_path . 'weather.'.$phpEx);
// Weather END                                       
Without edit to portal.php

Image

With edit to portal.php

Image
Go to your file, portal/block/weather.php and make sure that there are no spaces before <?php

Terr0r
Active Member
Posts: 6
Joined: 29. June 2011 15:32
phpBB.com User: Terr0r

Re: [EN] Weatherforecast with User ZIP code (weather.com)

Post by Terr0r »

is it possible to translate the weather things that state in english to dutch?

Crocodile
Active Member
Posts: 21
Joined: 8. April 2009 08:53
phpBB.com User: Crocodile442
Contact:

Re: [EN] Weatherforecast with User ZIP code (weather.com)

Post by Crocodile »

Perhaps you could use a Dutch on line service? It wouldn't be too hard to substitute weather.com for the Dutch service.

Terr0r
Active Member
Posts: 6
Joined: 29. June 2011 15:32
phpBB.com User: Terr0r

Re: [EN] Weatherforecast with User ZIP code (weather.com)

Post by Terr0r »

i'm looking forwardx to another MOD or snippet for the weather this one from weather.com is not okay you have to call white your phone to get a account on weather.com and that is not right
Locked

Return to “board3 Portal v1.0.x - Modifications”