Welcome to the Cumulus Support forum.
Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)
Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki
If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080
Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)
Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki
If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080
header and footer..
Moderator: daj
- Lewis
- Posts: 24
- Joined: Wed 02 Nov 2011 2:33 pm
- Weather Station: Oregon Scientific WMR-968
- Operating System: Windows XP SP3
- Location: Thessaloniki, Greece
header and footer..
hello all,
i have a simple question. when i make some changes in header or footer of a template, i have to make the changes to all templates, manually..
the easy way is to have a header and a footer file and include them in final template file.
is this possible ?
i have a simple question. when i make some changes in header or footer of a template, i have to make the changes to all templates, manually..
the easy way is to have a header and a footer file and include them in final template file.
is this possible ?
---
Ye-Olde's Manor weather data
Kalamaria, Thessaloniki, Greece
http://ye-olde.net/manor
https://twitter.com/Thessaloniki_WS
Ye-Olde's Manor weather data
Kalamaria, Thessaloniki, Greece
http://ye-olde.net/manor
https://twitter.com/Thessaloniki_WS
- beteljuice
- Posts: 3292
- Joined: Tue 09 Dec 2008 1:37 pm
- Weather Station: None !
- Operating System: W10 - Threadripper 16core, etc
- Location: Dudley, West Midlands, UK
Re: header and footer..
On the server, if you use PHP or make the pages .shtml - yes, but if you mean is there a way for Cumulus to process / merge files on your PC - NO.
......................Imagine, what you will KNOW tomorrow !
- Lewis
- Posts: 24
- Joined: Wed 02 Nov 2011 2:33 pm
- Weather Station: Oregon Scientific WMR-968
- Operating System: Windows XP SP3
- Location: Thessaloniki, Greece
Re: header and footer..
could I make cumulus to produce .php files, and just include a header/footer file ?
this seems ok..
this seems ok..
---
Ye-Olde's Manor weather data
Kalamaria, Thessaloniki, Greece
http://ye-olde.net/manor
https://twitter.com/Thessaloniki_WS
Ye-Olde's Manor weather data
Kalamaria, Thessaloniki, Greece
http://ye-olde.net/manor
https://twitter.com/Thessaloniki_WS
- Lewis
- Posts: 24
- Joined: Wed 02 Nov 2011 2:33 pm
- Weather Station: Oregon Scientific WMR-968
- Operating System: Windows XP SP3
- Location: Thessaloniki, Greece
Re: header and footer..
i came home, searched this, but there is no option for extension of the files...Lewis wrote:could I make cumulus to produce .php files, and just include a header/footer file ?
this seems ok..
---
Ye-Olde's Manor weather data
Kalamaria, Thessaloniki, Greece
http://ye-olde.net/manor
https://twitter.com/Thessaloniki_WS
Ye-Olde's Manor weather data
Kalamaria, Thessaloniki, Greece
http://ye-olde.net/manor
https://twitter.com/Thessaloniki_WS
- beteljuice
- Posts: 3292
- Joined: Tue 09 Dec 2008 1:37 pm
- Weather Station: None !
- Operating System: W10 - Threadripper 16core, etc
- Location: Dudley, West Midlands, UK
Re: header and footer..
You would (typically) disable "Include standard files" and 'name' each file to process and upload.
That way you can create any kind of (remote) filename you want, including its extension.
If you run out of 'boxes' to put files in, you can nominate more in the .ini file.
That way you can create any kind of (remote) filename you want, including its extension.
If you run out of 'boxes' to put files in, you can nominate more in the .ini file.
......................Imagine, what you will KNOW tomorrow !
-
gemini06720
- Posts: 1700
- Joined: Mon 10 Aug 2009 10:16 pm
- Weather Station: No weather station
- Operating System: No operating system
- Location: World...
Re: header and footer..
The easiest way to do this is to convert all the Cumulus HTM templates to static PHP templates and replace the webtags found in those HTM templates with their equivalent PHP variables - then Cumulus needs to upload only two data files: 'realtime.txt' and 'cumuluswebtags.php'.Lewis wrote:could I make cumulus to produce .php files, and just include a header/footer file ?
-
serowe
- Posts: 484
- Joined: Tue 03 Aug 2010 6:23 am
- Weather Station: WM918
- Operating System: Win Server 2008 R2
- Location: Ferntree Gully, VIC, Oz
- Contact:
Re: header and footer..
Actually - not really the easiest way at all!
Create an index.php file on you web site and include something similar to this at the start of it:
Us the cumuluswebtags.php file to then include all of the necessary data you want (that populates the file with live data) but the includes and requires above are then use to start/populate the various seciotns of your index.php file - so, my header.php file (the first include above) contains the following:
Note that the header.php file also contains a call to include menu.php - this way you NEVER have to include the menu in anything more than one file - IOW a single file only has to ever be modified if you want to change the look/feel/content of your header, menu, footer (a similar call to footer.php is made at the bottom of index.php and also includes this code:
The call to dbconfig.php is also used so that you have a single place to update MySQL access, table names etc.
It may take you a bit of time to initially set up, but once done, every page you call need only contain the actual code to display DATA - these display pages all contain calls to headers, footers, advertising etc - anything you want that you want or need to be standardised across your entire web site and don't want to have to go changing in umpteen files if you decide to, for example, change your menuing system or add/delete items from it.
Personally (watch for the bites now) this is how the whole template system should have been designed in the first place....but that's a personal opion and obviously won't be shared by some!
Create an index.php file on you web site and include something similar to this at the start of it:
Code: Select all
include "header.php";
require ("dbconfig.php");
Code: Select all
<?php
require ("cumuluswebtags.php");
?>
<h1><?php echo $location ?> weather</h1>
<h2 style="text-align: center; text-transform: none;" >
Other code you want displayed on each page</h2>
</h1>
<table width="60%" border="0" cellpadding="0" cellspacing="0" align="center">
<tr>
<?php
include "menu.php";
?>
</tr>
</table>Code: Select all
include "menu.php";It may take you a bit of time to initially set up, but once done, every page you call need only contain the actual code to display DATA - these display pages all contain calls to headers, footers, advertising etc - anything you want that you want or need to be standardised across your entire web site and don't want to have to go changing in umpteen files if you decide to, for example, change your menuing system or add/delete items from it.
Personally (watch for the bites now) this is how the whole template system should have been designed in the first place....but that's a personal opion and obviously won't be shared by some!
Punctuation is the difference between 'Let's eat, grandma' and 'Let's eat grandma'
- mcrossley
- Posts: 14388
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: header and footer..
In an ideal world yes, but many people do not have access to PHP on their web servers so HTML is the lowest common denominator for a simple template to get people up and running.Personally (watch for the bites now) this is how the whole template system should have been designed in the first place....but that's a personal opion and obviously won't be shared by some!
Remember Steve's focus is Cumulus, he provides the web template as a 'bonus'.
-
serowe
- Posts: 484
- Joined: Tue 03 Aug 2010 6:23 am
- Weather Station: WM918
- Operating System: Win Server 2008 R2
- Location: Ferntree Gully, VIC, Oz
- Contact:
Re: header and footer..
If you are talking about a 'private' web server I might agree with you, but a commercial web host who doesn't provide PHP isn't going to survive long*.mcrossley wrote:In an ideal world yes, but many people do not have access to PHP on their web servers so HTML is the lowest common denominator for a simple template to get people up and running.Personally (watch for the bites now) this is how the whole template system should have been designed in the first place....but that's a personal opion and obviously won't be shared by some!
Remember Steve's focus is Cumulus, he provides the web template as a 'bonus'.
However, that point is mute because the original question was 'how do you make this happen' and two solutions were given 35 minutes after the question was posted!
As to it being a 'bonus' - not arguing or disagreeing with that - again the question was (as above) and in the long run, thebetter solution is, as any half-decent programmer would know, to modularise what they are doing so as to prevent repetition by having to modify more than one source file in order to accomplish the same change across a system.
The solution I provided does work and isn;t rocket science and doesn't require a rocket science to implement it - ther are plenty of easy to read and understand tutorials around that will help even the most basic novice accomplish 'includes'.
* If you know of a commercial host who doesn't provide PHP - it would be nice to know who they are...even if it is just so people can be aware of them and stay away from them
Punctuation is the difference between 'Let's eat, grandma' and 'Let's eat grandma'
- mcrossley
- Posts: 14388
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: header and footer..
Can't disagree with you on most of that, however the 'free' web space that many ISPs provide is functionally limited, and lots of people for whatever reason stick with that service. Not everyone wants or needs to take it further.
-
serowe
- Posts: 484
- Joined: Tue 03 Aug 2010 6:23 am
- Weather Station: WM918
- Operating System: Win Server 2008 R2
- Location: Ferntree Gully, VIC, Oz
- Contact:
Re: header and footer..
My point is that even the free services have PHP enabled - for the simple reason they don't have to pay for it to be running on their servers
.
The bottom line though is that - and again back to the original question in this thread - that yes, you can include headers and footers into the templates provided with cumulus in a number of way's without having to get anything changed on the majority of hosting services. And, to be honest, if someone is asking if this can be done I would suggest that that person is also capable of either doing or learning how to do this with PHP. Like I said - it really isn;t rocket science and there are, literally, dozens of very easy to follow tutorials that, quite honestly, make doing this a LOT easier than configuring cumulus (no - I am NOT taking a shot at anyone here).
The bottom line though is that - and again back to the original question in this thread - that yes, you can include headers and footers into the templates provided with cumulus in a number of way's without having to get anything changed on the majority of hosting services. And, to be honest, if someone is asking if this can be done I would suggest that that person is also capable of either doing or learning how to do this with PHP. Like I said - it really isn;t rocket science and there are, literally, dozens of very easy to follow tutorials that, quite honestly, make doing this a LOT easier than configuring cumulus (no - I am NOT taking a shot at anyone here).
Punctuation is the difference between 'Let's eat, grandma' and 'Let's eat grandma'
- beteljuice
- Posts: 3292
- Joined: Tue 09 Dec 2008 1:37 pm
- Weather Station: None !
- Operating System: W10 - Threadripper 16core, etc
- Location: Dudley, West Midlands, UK
Re: header and footer..
Oh dear ...
Many (to start with) do NOT know how to organize their webspace, upload, ftp, html, etc. So getting 'commercial' webspace, a domain-name, and learning even the simplest code is Quantum physics with an unknown financial implication - all they want to start with is to play with their new kit.
Serowe presents alternatives and their pre-requisites as axioms rather than optional 'whistles and bells'. Furthermore; he routinely makes negative inferences as a pre-emptive strike or as a response to all else !
... and I thought I should get out more
serowe wrote: Personally (watch for the bites now) this is how the whole template system should have been designed in the first place...
Mark wrote:... many people do not have access to PHP ... HTML is the lowest common denominator. ... the web template as a 'bonus'.
Semantics - you used an imperative in a negative manner, with malice aforethought.serowe wrote:As to it being a 'bonus' - not arguing or disagreeing ...
Misdirection once more. The statement was "many people do not have access to PHP". In this country (the home of the software and the forum) this is an undisputable fact. Most users having access to limited 'free' web space from their ISP (read cable) provider.serowe wrote: ... a commercial web host who doesn't provide PHP isn't going to survive long.
Yes - most posters are quite helpful.serowe wrote: ... two solutions were given 35 minutes after the question was posted!
Do you read the forum ?serowe wrote:The solution I provided does work and isn;t rocket science ... help even the most basic novice ....
Many (to start with) do NOT know how to organize their webspace, upload, ftp, html, etc. So getting 'commercial' webspace, a domain-name, and learning even the simplest code is Quantum physics with an unknown financial implication - all they want to start with is to play with their new kit.
"Infamy, infamy ! - they've all got it infamy"serowe wrote:... make doing this a LOT easier than configuring cumulus.
Serowe presents alternatives and their pre-requisites as axioms rather than optional 'whistles and bells'. Furthermore; he routinely makes negative inferences as a pre-emptive strike or as a response to all else !
... and I thought I should get out more
......................Imagine, what you will KNOW tomorrow !
-
serowe
- Posts: 484
- Joined: Tue 03 Aug 2010 6:23 am
- Weather Station: WM918
- Operating System: Win Server 2008 R2
- Location: Ferntree Gully, VIC, Oz
- Contact:
Re: header and footer..
Oh ffs go back and read the original post and where he comes from and stop trying to make a mountain out of a mole hill.
Punctuation is the difference between 'Let's eat, grandma' and 'Let's eat grandma'
-
serowe
- Posts: 484
- Joined: Tue 03 Aug 2010 6:23 am
- Weather Station: WM918
- Operating System: Win Server 2008 R2
- Location: Ferntree Gully, VIC, Oz
- Contact:
Re: header and footer..
Lewis - just for info - check your Records page - you have a couple of records set in 2099 (can I borrow your time machine please?Lewis wrote:hello all,
i have a simple question. when i make some changes in header or footer of a template, i have to make the changes to all templates, manually..
the easy way is to have a header and a footer file and include them in final template file.
is this possible ?
Punctuation is the difference between 'Let's eat, grandma' and 'Let's eat grandma'