Forum Support

Shape 5
March 29, 2024, 09:34:20 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Shape 5 Forum
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: cant get my location working  (Read 962 times)
claude55
Jr. Member
**
Offline Offline

Posts: 2



« on: March 05, 2009, 07:29:02 AM »

Hy, i tried to try this

For those of you living outside the US, please complete the following steps :

1. Drill down to your location on Yahoo Maps http://weather.yahoo.com/
2. Look at the address bar (If you live in Melbourne, Australia it looks like this: http://ther.yahoo.com/Melbourne-Australia/ASXX0075/forecast.html?unit=c)
3. Copy the region/area code found in the above URL (ASXX0075)
4. Next open up the weather.class.php file (../modules/mod_s5_weather) and search for the the word: 'location' (there are two instances) and replace with the code that you have just copied from Yahoo, save and close.
5. In the Admin area of the weather module simply paste the Yahoo region code into the zip code box (in this scenario: ASXX0075)


but, in the file, theres to many instance of location, could it be possible to see a full string example, also, my mod5weather is in extension, not module Huh i use  joomla 1.5.9

thak you
Logged
jonahh
Administrator
*****
Offline Offline

Posts: 23789



WWW
« Reply #1 on: March 10, 2009, 10:14:10 PM »

There are only 2 instances of this you just need to replace them with your region code
Logged

Jonah Hall
------------
Shape 5 Team

- Need a great host for your website? We highly recommend siteground.com!


- Put your trust in the hands of our extremely qualified staff to get your job done right!


- Firebug is the most powerful web development and debugging tool, and it will save you a lot of time, frustration and forum questions:
Install Firebug
claude55
Jr. Member
**
Offline Offline

Posts: 2



« Reply #2 on: March 13, 2009, 03:21:16 PM »

yea, where and paste me the lines, cause i find much more then two ....

thank you
Logged
jonahh
Administrator
*****
Offline Offline

Posts: 23789



WWW
« Reply #3 on: March 16, 2009, 06:32:01 PM »

It should only be those 2 that you have found.
Logged

Jonah Hall
------------
Shape 5 Team

- Need a great host for your website? We highly recommend siteground.com!


- Put your trust in the hands of our extremely qualified staff to get your job done right!


- Firebug is the most powerful web development and debugging tool, and it will save you a lot of time, frustration and forum questions:
Install Firebug
theflyingdutchman
Jr. Member
**
Offline Offline

Posts: 1



« Reply #4 on: March 27, 2009, 03:42:12 PM »

Hy, i tried to try this

For those of you living outside the US, please complete the following steps :

1. Drill down to your location on Yahoo Maps http://weather.yahoo.com/
2. Look at the address bar (If you live in Melbourne, Australia it looks like this: http://ther.yahoo.com/Melbourne-Australia/ASXX0075/forecast.html?unit=c)
3. Copy the region/area code found in the above URL (ASXX0075)
4. Next open up the weather.class.php file (../modules/mod_s5_weather) and search for the the word: 'location' (there are two instances) and replace with the code that you have just copied from Yahoo, save and close.
5. In the Admin area of the weather module simply paste the Yahoo region code into the zip code box (in this scenario: ASXX0075)


but, in the file, theres to many instance of location, could it be possible to see a full string example, also, my mod5weather is in extension, not module Huh i use  joomla 1.5.9

thak you

hi

first of all i got 3 entries and after replacing the area code found on the website my site turns white Sad
what is going wrong?

cheers
Logged
jonahh
Administrator
*****
Offline Offline

Posts: 23789



WWW
« Reply #5 on: April 01, 2009, 12:37:40 PM »

Be sure you replaced only what you need to, if you removed a "/" or ";" it can throw the code out of whack.  I would start with a fresh copy and be very careful updating it.
Logged

Jonah Hall
------------
Shape 5 Team

- Need a great host for your website? We highly recommend siteground.com!


- Put your trust in the hands of our extremely qualified staff to get your job done right!


- Firebug is the most powerful web development and debugging tool, and it will save you a lot of time, frustration and forum questions:
Install Firebug
blechler
Jr. Member
**
Offline Offline

Posts: 2



« Reply #6 on: April 15, 2009, 02:21:25 PM »

I am experiencing exactly the same thing...

//$pos = strpos($data, 'yweather:location');
$pos = strpos($data, 'yweather:CAXX0664');
$attr = explode('"', substr($data, $pos, strpos($data, '/>', $pos)-$pos));
//$ret[0]['location'] = $attr[1].', '.$attr[3].', '.$attr[5];
$ret[0]['CAXX0664'] = $attr[1].', '.$attr[3].', '.$attr[5];

In the admin interface I enter "CAXX0664" (without quotes) where I would have otherwise entered the zip code.  I have left the temperature scale at Farenheit, and I have changed it to Celcius with the same results; those being a blank page with the following source code:

<script type="text/javascript">//<![CDATA[
    document.write('<link href="http://joomsnap.localhost//modules/mod_s5_weather/s5_weather/style.css" rel="stylesheet" type="text/css" media="screen" />');
//]]></script>   

So I conclude that this has repercussions into mod_s5_weather.php.  The domain printed above is a site I have set up on my machine for testing purposes.  I went ahead and removed the extra slash that was getting into the href attribute in mod_s5_weather.php.  I didn't really think that would solve the problem, but I hoped...

My pessimistic side once again proved to be correct.

So now I'm here typing this message to implore anyone for any insight they might offer to the rest of the world.  Like those savage Canadians to the north.
Logged
blechler
Jr. Member
**
Offline Offline

Posts: 2



« Reply #7 on: April 16, 2009, 10:22:17 AM »

OK Peepz, after a night of sleep followed by a cup of Timmy-Ho's coffee I discovered that I had inserted the weather widget twice.  I removed the extra entry, and changed the mod_s5_weather.php file so that the line that read:
   include('weather.class.php');
to:
   require_once('weather.class.php');

Should I want to display the weather several times I can now do so.

At the same time I made sure that the web server was able to write to the mod_s5_weather folder.  While not being able to write to the folder should not cause any problems, it helps if you can.

There is one line in the file:

$ret = weather($zipcode,  ($_GET['u'] = 'c'));

$_GET['u'] = 'c' is an assignment, not a comparison.  The lines:

-----------------------------------
if ($s5_tempscale == "f") {

$ret = weather($zipcode,  ($_GET['u'] == 'f'));
}

if ($s5_tempscale == "c") {

$ret = weather($zipcode,  ($_GET['u'] = 'c'));
}

-----------------------------------
can be replaced with:

$ismetric = ($s5_tempscale == "c") ? true:false;
$ret = weather($zipcode,  $ismetric);

it just seems more succinct to me.

All-in-all it's working for me now.  Thanks for a great Module!
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF | SMF © 2013, Simple Machines
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!
Looking for the largest variety in template designs? Look no more. Never buy 1 theme again. Signups start at just $89 for access to all of our themes.
Send Us An Email
Please send us your questions and we will email you back as soon as we can. Product support questions should be posted in our support forums under the Help menu. Our staff will assist you from there.