cloudy cloudy

Author Topic: Incorporate wxgraphs into Saratoga Templates  (Read 371 times)

0 Members and 1 Guest are viewing this topic.

Offline rford

  • Posts: 320
  • Raleigh, North Carolina
  • OS/Browser:
  • Win NT 10.0
  • Firefox 65.0
    • Turner Downs Weather
Incorporate wxgraphs into Saratoga Templates
« on: February 13, 2019, 05:44:59 PM »
I'm in the process of updating my old graphs here https://www.turnerdownsweather.com/wxgraphs.php...I have the new graphs working here https://www.turnerdownsweather.com/wxgraphs/wxgraphs_test.htmlbut I need assistance calling the script into the Saratoga Template.  I'm unsure of the code to use.   

Any assistance would be appreciated...
Thanks
Ronnie

Offline gateway2capecod

  • Posts: 1,944
  • West Wareham, Ma. USA
  • OS/Browser:
  • Win NT 10.0
  • Firefox 60.9
    • West Wareham,Ma Weather
Re: Incorporate wxgraphs into Saratoga Templates
« Reply #1 on: March 05, 2019, 03:34:18 AM »
hello Ronnie...


see if this works...

just make a copy of your existing wxgraphs page/file ( wxgraphs.php)

and then rename it for testing purposes to wxgraphs2.php

Now open the file/wxgraphs2.php with text editor like notepad or notepad++

Open the copied file and scroll way down to the "MAIN COPY Section...where the first part of it looks like this:

<h3>Rainfall graphs</h3>

<table width="633" border="0" cellpadding="2" cellspacing="1" style="border:solid; border-color: white;">
<tr><td align="center">
  <img src="graphs/rain_yesterday.php" alt="Yesterdays Rain" />
</td>
<td align="center">
  <img src="graphs/rain_today.php" alt="Todays Rain" /> 
</td>
<td align="center">
  <img src="graphs/rain_week.php" alt="Weeks Rain" /> 
</td>
<td align="center">
  <img src="graphs/rain_this_month.php" alt="Months Rain" />
</td>
<td align="center">

Now notice this first graph code image looks like this.....<img src="graphs/rain_yesterday.php" alt="Yesterdays Rain" />

So the name and path to that very first one is graphs/rain_yesterday.php

So now open up your new page file with the new graphs ( https://www.turnerdownsweather.com/wxgraphs/wxgraphs_test.html ) and also go to its MAIN COPY section and find this code...

<center>
<img src="rain_yesterday.php" alt="Yesterdays Rain">
&nbsp;&nbsp;&nbsp;&nbsp;
<img src="rain_today.php" alt="Todays Rain">
&nbsp;&nbsp;&nbsp;&nbsp;
<img src="rain_week.php" alt="Weeks Rain">
&nbsp;&nbsp;&nbsp;&nbsp;
<img src="rain_this_month.php" alt="Months Rain">
&nbsp;&nbsp;&nbsp;&nbsp;
<img src="rain_this_year.php" alt="Years Rain">
</center>

and Notice the very first graph code for yesterdays rain is this with the IMG SRC=  as this....

<img src="rain_yesterday.php" alt="Yesterdays Rain">

  so you want to edit this:

img src="graphs/rain_yesterday.php"

to this:

img src="rain_yesterday.php"

and then just continue editing all the img src= sections of the old php file with the new img src paths to each image for the newer graphs.


Hope this Helps....Chris