PLEASE READ BEFORE POSTING:

If you are willing to offer some compensation for a new feature or bug fix, you can use the Help Wanted forum. Start a new topic for each new feature idea, and when someone someone decides to do it, please edit the Roadmap Wiki which lists active work.
LinuxMCE Forums
May 25, 2013, 06:39:24 am GMT-1 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Rule #1 - Be Patient - Rule #2 - Don't ask when, if you don't contribute - Rule #3 - You have coding skills - LinuxMCE's small brother is available: http://www.agocontrol.com
 
   Home   Help Search Chat Login Register  
Pages: 1 2 3 [4]
  Print  
Author Topic: Status / overview page?  (Read 5001 times)
brononius
Guru
****
Posts: 360


Trying to keep it simple and centralized...


View Profile WWW
« Reply #45 on: February 18, 2013, 07:55:43 am »

These are the blocks that i'm using for the weather:


Quote
$_LOCALTIMEZONE = file_get_contents('/etc/timezone', NULL, NULL, 0, 1000);
$_LOCALWEATHER = $_LOCALTIMEZONE;
$_FORECAST = str_replace("/","_",$_LOCALWEATHER);

echo "<script src=\"http://www.weatherforecastmap.com/weather21.php?zona=$_FORECAST\"></script>";
Logged

Version: linuxMCE 1004 (v 2012-07-01)
Extra's: Cacti, webmin, phpmyadmin, joomla

Server: MSI MS-7519 / E7400 2,8GB / 4GB / SSD 60GB / Radeon HD4350 / RTL8111 - 3C905C-TX
Orbiters: HTC Desire Z, HP PocketPC, Samsung Galaxy S, iPAD, ASUS eeePAD
Automation: EIB technology, KNX IP ROUTER 750
Phones: Cisco 7940, Cisco 7960
Camera's: IPCAM02
iberium
Veteran
***
Posts: 64


View Profile WWW
« Reply #46 on: March 04, 2013, 03:05:37 am »

Isn't going by timezone a little vague for weather?  I live in Florida, so when I ran that script, it gave me totally wrong results.  I might as well have been in Canada.
Logged
brononius
Guru
****
Posts: 360


Trying to keep it simple and centralized...


View Profile WWW
« Reply #47 on: March 05, 2013, 01:51:38 pm »

If i'm not wrong, it doesn't really check your TIMEzone. But it looks more at your timeZONE.  Lips sealed
Have a check what you see when you do 'more /etc/timezone'. If all is well, you should see your city. Or at the least a city nearby.

more /etc/timezone
Code:
Europe/Brussels
Logged

Version: linuxMCE 1004 (v 2012-07-01)
Extra's: Cacti, webmin, phpmyadmin, joomla

Server: MSI MS-7519 / E7400 2,8GB / 4GB / SSD 60GB / Radeon HD4350 / RTL8111 - 3C905C-TX
Orbiters: HTC Desire Z, HP PocketPC, Samsung Galaxy S, iPAD, ASUS eeePAD
Automation: EIB technology, KNX IP ROUTER 750
Phones: Cisco 7940, Cisco 7960
Camera's: IPCAM02
iberium
Veteran
***
Posts: 64


View Profile WWW
« Reply #48 on: March 05, 2013, 09:33:00 pm »

i see the idea behind it.  I'm not sure if its like this in other parts of the states, but my central time shows up as chicago, which would be the closest major city as far as time goes as it is directly north, but it is about 900 miles north of us.  im pretty sure chicago is the standard setting for our location as all devices that i have ever run across give us that option as the closest.  i would think the best way to do it would be somehow by lat/long, but i dont really know anything about weather systems and api's outside of america.
Logged
phenigma
wants to work for LinuxMCE
**
Posts: 779


View Profile
« Reply #49 on: March 07, 2013, 05:51:25 am »

City/Town information is stored in lmce and can be pulled from the database for use in scripts.

J.
Logged

Pages: 1 2 3 [4]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!