Customised templates: Difference between revisions

m
Line 364: Line 364:
#Then you create a new PHP script that does not get processed by Cumulus. For example "thismonth.php" would start with the same HTML5 as shown above, but the table is output by the PHP script:
#Then you create a new PHP script that does not get processed by Cumulus. For example "thismonth.php" would start with the same HTML5 as shown above, but the table is output by the PHP script:
<code><!DOCTYPE HTML>
<code><!DOCTYPE HTML>
<html>
<html>
<head>
<head>
<meta charset="UTF-8">
<meta charset="UTF-8">
<meta name="description" content="<#location> weather data" />
<meta name="description" content="<#location> weather data" />
<meta name="keywords" content="Cumulus, <#location> weather data, weather, data, weather station" />
<meta name="keywords" content="Cumulus, <#location> weather data, weather, data, weather station" />
   <title>&lt;?php
   <title>&lt;?php
   include 'cumuluswebtags.php';
   include 'cumuluswebtags.php';
   echo "$location";  
   echo "$location";  
   ?>weather</title>
   ?>weather</title>
   <link href="weatherstyle.css" rel="stylesheet" type="text/css" />
   <link href="weatherstyle.css" rel="stylesheet" type="text/css" />
</head>
</head>


&lt;body>
&lt;body>
&lt;div id="content">
&lt;div id="content">
&lt;h1>&lt;?php
&lt;h1>&lt;?php
   echo "$location";  
   echo "$location";  
   ?> weather</h1>
   ?> weather</h1>
....
....
&lt;table style="width:100%;border-collapse: collapse; border-spacing: 0;" >
&lt;table style="width:100%;border-collapse: collapse; border-spacing: 0;" >
   &lt;caption>This month's highs and lows</caption>
   &lt;caption>This month's highs and lows</caption>
   &lt;tr>
   &lt;tr>
     &lt;td colspan="3" class="tableseparator_temp">Temperature and Humidity </td>
     &lt;td colspan="3" class="tableseparator_temp">Temperature and Humidity </td>
   </tr>
   </tr>
   &lt;tr class="td_temperature_data">
   &lt;tr class="td_temperature_data">
&lt;?php
&lt;?php
echo "&lt;th>Highest</th>";
echo "&lt;th>Highest</th>";
echo "&lt;td>$MonthTempH $tempunit</td>";
echo "&lt;td>$MonthTempH $tempunit</td>";
echo "&lt;td>$MonthTempHT on $MonthTempHD</td>";
echo "&lt;td>$MonthTempHT on $MonthTempHD</td>";
echo "&lt;th>Lowest</th>";
echo "&lt;th>Lowest</th>";
echo "&lt;td>$MonthTempL $tempunit</td>";
echo "&lt;td>$MonthTempL $tempunit</td>";
echo "&lt;td>$MonthTempLT on $MonthTempLD</td>";
echo "&lt;td>$MonthTempLT on $MonthTempLD</td>";
?>
?>
   &lt;/tr>
   &lt;/tr>


Line 402: Line 432:


echo &lt;&lt;&lt; END_OF_QUOTE
echo &lt;&lt;&lt; END_OF_QUOTE
&lt;tr>
&lt;tr>
&lt;td colspan="2" class="spacer">Pressure (sea level)</td>
&lt;td colspan="2" class="spacer">Pressure (sea level)</td>
</tr>
</tr>
&lt;tr>
&lt;tr>
&lt;th class="labels">Lowest</th>
&lt;th class="labels">Lowest</th>
&lt;td class="site_data">$MonthPressL {$pressunit}</td>
&lt;td class="site_data">$MonthPressL {$pressunit}</td>
&lt;td class="time_stamp">at $MonthPressLT on $MonthPressLD</td>
&lt;td class="time_stamp">at $MonthPressLT on $MonthPressLD</td>
</tr>
</tr>
&lt;tr>
&lt;tr>
&lt;th class="labels">Highest</th>
&lt;th class="labels">Highest</th>
&lt;td class="site_data">$MonthPressH  {$pressunit}</td>
&lt;td class="site_data">$MonthPressH  {$pressunit}</td>
&lt;td class="time_stamp">at $MonthPressHT on $MonthPressHD</td>
&lt;td class="time_stamp">at $MonthPressHT on $MonthPressHD</td>
</tr>
</tr>
</table>
</table>
END_OF_QUOTE;
END_OF_QUOTE;


5,838

edits