Page 2 of 5

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

Posted: 26. November 2008 15:27
by ccotton
Here is a quick update. The problem was caused by using the phpBB automatic update feature on my board going from 3.0.2 to 3.0.3. As noted, I also run a very active board so I use the TexasIDPA board for testing. I thought I had identified the file that needed to be manually upgraded, but apparently it wasn't the only one. I had to restore all 3.0.2 files and I don't know which of the three mods is causing the conflict. I have installed Ajax chat, anti-bot question and the Board III Portal.

I'll try to figure it out after the holidays. Of course I could just to an automatic update to 3.0.3 and accept all of the new files, but that would mean having to reinstall all mods and I'm really trying to avoid having to do that. Plus, there's no guarantee I wouldn't still have to manually change some files. I just can't afford to risk that on the other board.

Thanks again for the help folks, I really appreciate it.

Chas.

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

Posted: 9. December 2008 04:43
by Lucian_rider
Kevin wrote: For a small side block (with Michaels weather service) the code would like like this:

Code: Select all

        <div class="portal-panel">
            <div class="inner">
                <span class="portal-corners-top"><span></span></span>
                    <h3><img src="{T_THEME_PATH}/images/portal/portal_statistic.gif" width="18px" height="18px" alt=""/>&nbsp;Weather</h3>
                    <div style="text-align: center;">
                        <!-- Weathercode Start -->
                      <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>
                        <!-- Weathercode End -->
                    </div>
                    <br />
                <span class="portal-corners-bottom"><span></span></span>
            </div>
        </div>
        <br style="clear:both" />
I tried this but the side block is the same width as the center block version and totally messes up the portal page. Is anyone running this great block as a side block because to me this is where it should be located.

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

Posted: 9. December 2008 14:36
by Lucian_rider
Well I worked out how to get a side block working for Accuweather. Accuweather provides a variety of different size plugins (widget?) called Netweather that you create at this site: http://netweather.accuweather.com/signu ... traveler=0 There are many different themes and colour schemes. I chose the 180 pixel wide by 150 high widget as it fits the standard side block perfectly. There is also a 600 pixel high version of the 180 wide but this diplays too much weather information for my area which is St. Lucia, West Indies. When I tried it I got an ugly black box with an error message due to the lack of radar information etc.
The code generated for this widget is:

Code: Select all

<div style='width: 180px; height: 150px; background-image: url( http://vortex.accuweather.com/adcbin/netweather_v2/backgrounds/blue_180x150_bg.jpg ); background-repeat: no-repeat; background-color: #346797;' ><div style='height: 138px;' ><script src='http://netweather.accuweather.com/adcbin/netweather_v2/netweatherV2.asp?partner=netweather&tStyle=whteYell&logo=0&zipcode={WEATHER_ZIP}|&lang=eng&size=8&theme=blue&metric=0&target=_self'></script></div><div style='text-align: center; font-family: arial, helvetica, verdana, sans-serif; font-size: 10px; line-height: 12px; color: #FFFFFF;' ><a style='color: #FFFFFF' href='http://www.accuweather.com/world-index-forecast.asp?partner=netweather&locCode={WEATHER_ZIP}|&metric=1' >Weather Forecast</a> | <a style='color: #FFFFFF' href='http://www.accuweather.com/maps-satellite.asp' >Weather Maps</a></div></div>
Insert that into the weather.html, position it where you want in portal_body.html and you are good to go!

If you create your own widget, just remember to delete the location code and replace it with the {WEATHER_ZIP} as I have done in the example above.

You can view mine in action here: http://www.lucianriders.com/forum

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

Posted: 17. December 2008 14:40
by Mirage
Good morning,

I tried to install this block baby, because I needed it for my site. For the time being I do not know what takes place I have an error sql, rather long. by having putting it exactly what you recommended.

For a second point I am in France, and weather.com code (FRXX0204) does not seem worked. Would have a possibility it in your knowledge so that I can also use it?

Thank you for all assistant which you can bring me.

Code: Select all

SQL

SELECT pf_zip_code FROM phpbb_profile_fields_data WHERE user_id = 2 LIMIT 1

BACKTRACE

FILE: includes/db/mysql.php
LINE: 158
CALL: dbal->sql_error()

FILE: includes/db/mysql.php
LINE: 205
CALL: dbal_mysql->sql_query()

FILE: includes/db/dbal.php
LINE: 159
CALL: dbal_mysql->_sql_query_limit()

FILE: portal/block/weather.php
LINE: 17
CALL: dbal->sql_query_limit()

FILE: portal.php
LINE: 243
CALL: include('portal/block/weather.php')

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

Posted: 8. January 2009 15:21
by rudolfpietersma
I would like to use Dutch Zipcodes and Brazilian Zipcodes, what should I do?

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

Posted: 8. January 2009 15:33
by rudolfpietersma
rudolfpietersma wrote:I would like to use Dutch Zipcodes and Brazilian Zipcodes, what should I do?
So for example I would like use this:
http://www.accuweather.com/world-index- ... L001|EMMEN or

http://www.accuweather.com/world-index- ... 0HORIZONTE

What should I do?

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

Posted: 14. January 2009 19:18
by rudolfpietersma
Anybody, please?

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

Posted: 28. January 2009 07:10
by rudolfpietersma
Is there anybody that could help me? :cry:

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

Posted: 6. February 2009 13:22
by rudolfpietersma
rudolfpietersma wrote:Is there anybody that could help me? :cry:
Please please anybody out there that can help?

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

Posted: 23. February 2009 05:48
by DragonMaster
I installed this today and had a BIG problem as this made the portal stretch WAY wide

But after spending a lot of time experimenting with it, I was able to reduce the size to a much smaller area where it fit perfectly in the center block after I centered it there

Thanx a lot Kevin for the great idea in having this:

http://www.ronnie-james-dio.com/RJDtesting/portal.php

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

Posted: 23. February 2009 06:58
by Kevin
Great, nice to hear! :)
But would you mind to show the others how you have solved your problem? Thanks!

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

Posted: 23. February 2009 08:20
by DragonMaster
Kevin wrote:Great, nice to hear! :)
But would you mind to show the others how you have solved your problem? Thanks!
The code that I used for weather.html is:

Code: Select all

<table class="tablebg" cellspacing="1" width="100%">
<tr class="row1">
    <th>Weather Forecast for Region: {WEATHER_ZIP}</th>
</tr>
<tr>
    <td class="row1">
        <table width="100%" cellspacing="0" cellpadding="0" border="0">
        <tr>
            <td>
                <div align=" center"> <div style='width="100%; height: 90px;' ><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=10&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;' ></div></div></div>
            </td>
         </tr>
         </table>
    </td>
</tr>
</table>
<br />
This removes the logo and makes the current day and future days smaller so that when centered, it fits nicely in the base size of the center blocks

I also added the extra custom profile field here:
viewtopic.php?f=21&t=1311
It is set as a default to Santa Monica U.S.A.
I have no idea how to do this for outside the U.S.A. with different codes, but this might give you a head start on a problem that might have been there before

You can view it here:

http://www.ronnie-james-dio.com/RJDtesting/portal.php

That is my testing area

Once I get it like I want I will place it on my live board:

http://www.ronnie-james-dio.com/RJD/portal.php

Currently that has the canverportal on it and I am getting all set up to transfer over to there and remove that one and replace it with this GREAT one

I hope this code helps a bit as it took me near all day to figure it out :mrgreen:

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

Posted: 23. February 2009 09:26
by Kevin
Awesome, thanks for sharing DragonMaster! :)

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

Posted: 23. February 2009 11:18
by rudolfpietersma
I think I know a way to use international `Zip codes` to use in this block.
First you have to enlarge the maximum number of your custom zip profile field. I changed it to 30. Also I changed that it will except all characters instead of only numbers.

After that I visited this link
http://netweather.accuweather.com/adcbi ... netweather
To get the `zip code`. I have choosen for Emmen, Netherlands. At the end it will give this as `zip code`

Code: Select all

EUR|NL|NL001|EMMEN
Enter this in the profile fiels Zip code and it will give the weater for this city in the block.

Image

Another example could be
SAM|BR|BR017|RIO DE JANEIRO
EUR|IT|IT009|MILANO
SAM|AR|AR007|BUENOS AIRES

What I did is I took the main code for weather.html from DragonMaster, changed it a little to this.
The only thing I´m not getting is the bottom border, maybe somebody can help me with this?

Code: Select all

<div class="forabg">
       <div class="inner">
          <span class="corners-top"><span></span></span>
          <ul class="topiclist">
             <li class="header"><dl><dt>Weersvooruitzicht</dt></dl></li>
          </ul>
          <ul class="topiclist forums">
             <li><dl>
                <dd class="posts_portal"  style="border-left:0px">

<div style='width="100%; height: 90px;' background-color: #0F243A;' >
<script src='http://netweather.accuweather.com/adcbin/netweather_v2/netweatherV2.asp?partner=netweather&tStyle=dark2&logo=1&zipcode={WEATHER_ZIP}&lang=eng&size=10&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;' ></div></div></div>
            </div>
                </dd>
             </dl></li>
          </ul>
          <span class="corners-bottom"><span></span></span>
       </div>
    </div>
    <br style="clear:both" />

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

Posted: 24. February 2009 11:14
by DragonMaster
I am suddenly having a problem with this block now

It just quit on me and blanked out all data to a 0 degrees

I was looking on the site and they said that if you change the code it might not work

This is VERY upsetting :evil:

EDITED:

OK now...odd but it is now working again

Perhaps the site went down but all is ok now.....so far