Author Topic: WX...php in subfolders  (Read 1163 times)

0 Members and 1 Guest are viewing this topic.

Offline thoko

  • Member
  • *
  • Posts: 48
WX...php in subfolders
« on: March 04, 2011, 03:35:24 PM »
Is it possible to place WX...php files in a subfolder to the main Saratoga folder? and what am I to modify in the files concerned/elsewhere?

thoko
wx3660.dk

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9279
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: WX...php in subfolders
« Reply #1 on: March 04, 2011, 03:56:37 PM »
Is it possible to place WX...php files in a subfolder to the main Saratoga folder? and what am I to modify in the files concerned/elsewhere?

thoko
wx3660.dk
Yes, it's possible.  Each wx.....php page needs to include() stuff (Settings.php, Settings-weather.php, weather tags/-defs, common.php, top.php, header.php, menubar.php, flyout-menu.php (and flyout-menu.xml processed), and footer.php).  As in the distribution, all those files are expected to be in the same directory as the wx.....php page.

If you create a subdirectory below the current template directory, then the wx.....php page in the subdirectory would need to have ../ prepended to the include() statements, and you may have to do some Linux symlinks like:

ln -s ../flyout-menu.xml flyout-menu.xml

(amongst others) in order for the scripts to find stuff you need to display.

In short, it's simplest to leave all the wx......php pages in the same directory :)

Best regards,
Ken
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP