Hello,

many thanks for this module
i would like to use it on a site where users set their location (postal code or city) in their user profiles (module profile from core)

instead of defining a block for the entire site i would like to get their locations in their profiles and display specific information. fallback to London if no info from profile.

can you please point some directions to make it happen?
i'll share the code so that anybody could have this new feature as well

thanks

Comments

miaoulafrite’s picture

well, seems that i did find a "solution"
i use google_weather_show() function with argument $account->profile_city

if you have a better solution, please provide it, otherwise, mark the topic as fixed

thanks

easyRider’s picture

miaoulafrite Wich file did you edit? i want to do the same but with a cck field from a node.
thanks in advance

miaoulafrite’s picture

@easyRider: i used it in template.php from my theme but you could use it directly in your page.tpl.php
i also copied & modified the .tpl.php file provided by the module to display only tomorrow forecast
you should also be able to call this function from a block

miaoulafrite’s picture

Status: Active » Fixed

i close the issue until someone comes with a better proposal

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

liminu’s picture

To work with location module, it take the location of the current node (place in node.tpl.php or in contemplate module)
<?php echo google_weather_show($node->locations[0]['city'],"5"); ?>
where 5 is the forecast day (5 is the max value)