Author Topic: Assistance with scripts on my website  (Read 1355 times)

0 Members and 1 Guest are viewing this topic.

Offline swgaweather

  • Member
  • *
  • Posts: 14
    • SWGA Weather Inc
Assistance with scripts on my website
« on: April 07, 2018, 04:58:02 PM »
I am using the saratoga weather template. Can someone advise me as to how to setup the scripts and add them as a page? For example, I want to be able to add the NWS SPC Reports, also add NWS Forecast area discussions. I am new to php and html and would like to learn. I would like to make my website informative and interactive for my community. Also, how would you set up a page to link to your podcast site that people can see on the home page?

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Assistance with scripts on my website
« Reply #1 on: April 08, 2018, 03:55:43 PM »
Adding a script to a template site is fairly easy.

First make a copy of wxnewpage.php to a new wx....php name.
Use the docs for the script you want to add and insert the PHP code between the <div id="main-copy"> ... </div> on that page.

For example, to add a forecast discussion from https://saratoga-weather.org/scripts-NWSmisc.php#NWSAFD
Download the script from that page, customize it per the docs on that page, upload the forecast-discussion.php to your site.
In your wx....php page created above (using the docs again) just put
Code: [Select]
<?php
$doIncludeFD 
true;
include(
"forecast-discussion.php"); ?>
in the area cited, and upload the wx....php page.

Follow a similar process for every page you want to add.  Don't forget to include the new page in your flyout-menu.xml so it will be linked on your site via the flyout menu.
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

Offline swgaweather

  • Member
  • *
  • Posts: 14
    • SWGA Weather Inc
Re: Assistance with scripts on my website
« Reply #2 on: April 11, 2018, 01:00:53 PM »
Thank you so much. I am starting to get a hang of some of these things.

 

anything