Sandaysoft

Support forum for Cumulus weather station software
It is currently Sat May 25, 2013 4:48 am
Please click here before posting. Help me to help you!
Useful Links: Cumulus FAQ • Enhancement requests • Wiki (documentation)
Please put your approximate location into your profile
Add your web site to the Cumulus user map
Vantage Pro2 users with firmware 3.00 should upgrade to fw 3.12 and Cumulus 1.9.4

All times are UTC




Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Creating PHP Pages
PostPosted: Mon Jul 02, 2012 7:03 am 
Offline

Joined: Sun Jul 01, 2012 2:56 pm
Posts: 27
Location: Plymouth
Weather Station: Oregon Scientific WMR 180
Operating System: Windows Vista (SP2)
I wonder if anyone knows how to get Cumulus to generate php pages instead of html when it uploads to my site? Has this already been done soemwhere and I've missed it in the forums? Any help appreciated - thanks!

_________________
Rob
-------------------------------------
http://www.plymouthweather.org
http://www.stillflick.com
http://www.thisengland.org
I though I saw a light at the end of the tunnel, but it was just some bastard with a torch bringing me more work...


Top
 Profile  
 
 Post subject: Re: Creating PHP Pages
PostPosted: Mon Jul 02, 2012 7:25 am 
Offline

Joined: Mon Aug 10, 2009 10:16 pm
Posts: 1770
Location: World...
Weather Station: No weather station
Operating System: No operating system
Indeed, many of us have been using PHP to produce our web pages - rather than the 'standard' HTM (or HTML) pages that need to be processed by Cumulus before being uploaded.

With that said/written, you do not need to upload the pages/templates to the web site anymore. Let me explain... ;)

First, you have to make sure that your hosting server allows the use of PHP for web pages.

Second, the 'standard' 'HTM' templates have to be converted to PHP. Then the Cumulus Web Tags within those templates have to be converted to PHP webtags (or variables) that the PHP interpreter (on your hosting server) will convert to values just before sending the web page to the user's browser (such as the Cumulus Web Tag '<#time>' will need to be converted to '$time').

Have a look at the Php webtags Wiki page to get an idea of the PHP webtags and how they are used.

Then, once you have converted all the HML templates to the PHP format (and all the Cumulus Web Tags to their PHP webtags equivalent), only two data files (other than the graphic files) have to be uploaded to your hosting web server, the 'realtime.txt' and the 'cumuluswebtags.php' files.

Note: When I write about converting the HML templates to the PHP format, I do not mean that the templates have to be completely rewritten - just that their extensions have to be changed from '.htm' to '.php' and the Cumulus Web Tags replaced by their PHP webtags equivalent.

It is not that complicated and many of us, PHP converts will be happy to help you. :)

Oh, let me know if you undertake the conversion process and I will supply you with an up-to-date (all Web Tags) 'cumuluswebtags.txt' template.


Top
 Profile  
 
 Post subject: Re: Creating PHP Pages
PostPosted: Mon Jul 02, 2012 7:39 am 
Offline

Joined: Sun Jul 01, 2012 2:56 pm
Posts: 27
Location: Plymouth
Weather Station: Oregon Scientific WMR 180
Operating System: Windows Vista (SP2)
Hey Gemini,

Thanks for that detail, concise and informative. It produced a bit of a "slap the forehead and say duh" moment for me! I'll play around with it over the coming week when I get an hour or two just to see what I can come up with and I would very much appreciate an up to date 'cumuluswebtags.txt' template. Do you know if there is a "share your website" thread on these forums anywhere? It would be very useful to see what others have done with Cumulus...

Cheers!

_________________
Rob
-------------------------------------
http://www.plymouthweather.org
http://www.stillflick.com
http://www.thisengland.org
I though I saw a light at the end of the tunnel, but it was just some bastard with a torch bringing me more work...


Top
 Profile  
 
 Post subject: Re: Creating PHP Pages
PostPosted: Mon Jul 02, 2012 7:46 am 
Offline
Site Admin
User avatar

Joined: Mon Jun 02, 2008 6:49 pm
Posts: 17612
Location: Sanday, Orkney
Weather Station: Davis VP2
Operating System: Windows Home Server 2011
magusperde wrote:
Do you know if there is a "share your website" thread on these forums anywhere? It would be very useful to see what others have done with Cumulus...

There's the user map, currently with 873 stations on it, and many people have links to their sites in every post they make. If anyone has anything specific they want to "show off" they would normally post about in this part of the forum. The 'third party tools' part of the forum has various offerings that people have created, as does the downloads page.

_________________
Steve
Sanday Weather
----------------------------------------------------------------------------------------------------------------------------------
Like Cumulus and want to support it? Please donate! Image


Top
 Profile  
 
 Post subject: Re: Creating PHP Pages
PostPosted: Mon Jul 02, 2012 7:57 am 
Offline

Joined: Sun Jul 01, 2012 2:56 pm
Posts: 27
Location: Plymouth
Weather Station: Oregon Scientific WMR 180
Operating System: Windows Vista (SP2)
Thanks Steve. I've added my site to the map and made a donation to you for my use of Cumulus. I wonder how many people actually donate? ;)

_________________
Rob
-------------------------------------
http://www.plymouthweather.org
http://www.stillflick.com
http://www.thisengland.org
I though I saw a light at the end of the tunnel, but it was just some bastard with a torch bringing me more work...


Top
 Profile  
 
 Post subject: Re: Creating PHP Pages
PostPosted: Mon Jul 02, 2012 8:20 am 
Offline

Joined: Wed Feb 09, 2011 10:21 am
Posts: 18
Location: Brentwood, Essex
Weather Station: Maplin N96GY
Operating System: Windows XP
'Duh moment' is right, but you're not alone. I had put off doing this too, thinking that I'd have to add all the new pages to the ftp and other messing about.

But of course it isn't necessary, that's the whole idea. Duh! So I'll be getting down to it this week too.

Thanks for waking me up guys.

Colin

_________________
ColinJS - Hutton, Brentwood, Essex
Image


Top
 Profile  
 
 Post subject: Re: Creating PHP Pages
PostPosted: Mon Jul 02, 2012 3:26 pm 
Offline
User avatar

Joined: Sun Jul 03, 2011 6:23 pm
Posts: 324
Location: Eastleigh, Hampshire, UK
Weather Station: Davis VP2 - 24hr FARS
Operating System: Windows 7 - 64 bit
Here's a thread I stared a while ago when I was "diving in" :)

_________________
Duke

Nightingale Weather PHP
Eastleigh, Hampshire, UK


Top
 Profile  
 
 Post subject: Re: Creating PHP Pages
PostPosted: Mon Jul 02, 2012 4:23 pm 
Offline

Joined: Sun Jul 01, 2012 2:56 pm
Posts: 27
Location: Plymouth
Weather Station: Oregon Scientific WMR 180
Operating System: Windows Vista (SP2)
Useful indeed - thanks Duke!

_________________
Rob
-------------------------------------
http://www.plymouthweather.org
http://www.stillflick.com
http://www.thisengland.org
I though I saw a light at the end of the tunnel, but it was just some bastard with a torch bringing me more work...


Top
 Profile  
 
 Post subject: Re: Creating PHP Pages
PostPosted: Tue Jul 03, 2012 9:00 pm 
Offline

Joined: Mon Aug 10, 2009 10:16 pm
Posts: 1770
Location: World...
Weather Station: No weather station
Operating System: No operating system
Over the past days, I have been 'playing' around with the 'standard' templates and I came up with some 'interesting' all-PHP templates matching (as closely as I could) the 'standard' Cumulus templates - the one I now have online at Tzouhalem-Maple Bay Weather have been adapted (read, slightly modified) to properly access all the required files within my directory tree structure.

I had to make some modification to the display of the page menus as, with the number of items (links) now available, the display varied greatly between browsers - thus the present look of the menus that displays properly in all browsers.

Four static templates are required to produce each pages ... with PHP, the integration of the 4 templates is almost seamless as all the code is compiled together on the hosting server (to create one full complete file) before the resulting page is downloaded into the user's browser's cache and displayed on the user's browser's screen.

For the Tzouhalem-Maple Bay Weather pages, other than the 4 static templates, three Cumulus-processed templates are used - two 'near real time produced' templates, the 'cumuluswebtags.php' and the 'realtime.txt' templates and one 'regularly produced', the 'cumulusXwebtags.php' used for the monthly records page.

If there is enough 'serious' interest, I might let myself getting involved in a tutorial... ;)

Would also be nice if the PHP template could eventually be included into the Cumulus package ... one can only hope... :mrgreen:


Top
 Profile  
 
 Post subject: Re: Creating PHP Pages
PostPosted: Tue Jul 03, 2012 9:05 pm 
Offline
Site Admin
User avatar

Joined: Mon Jun 02, 2008 6:49 pm
Posts: 17612
Location: Sanday, Orkney
Weather Station: Davis VP2
Operating System: Windows Home Server 2011
gemini06720 wrote:
Would also be nice if the PHP template could eventually be included into the Cumulus package ... one can only hope... :mrgreen:

I would be very happy to include a PHP version of the standard web site with Cumulus, or at least include it on the downloads page, if someone were to offer such a package and commit to maintaining it ;)

_________________
Steve
Sanday Weather
----------------------------------------------------------------------------------------------------------------------------------
Like Cumulus and want to support it? Please donate! Image


Top
 Profile  
 
 Post subject: Re: Creating PHP Pages
PostPosted: Tue Jul 03, 2012 9:17 pm 
Offline

Joined: Mon Mar 19, 2012 11:47 am
Posts: 52
Location: Belgium
Weather Station: WMR 200 by Oregon Scientific
Operating System: WinXP SP3
I'm using cumuluswebtags.php to make my own php pages but with phpBB3 templating script.
At this time, i try two ways to make these pages :
- Importing datas from cumuluswebtags.php into my SQL database and persorming SQL request from phpbb3 pages
- Using cumuluswebtags.php with ph recquire() function fro php strict pages.

My knowledge on php is not very important.. but if someone want help to make the package, i can provide mine. I better know phpBB3 script and templates.

_________________
Image
http://www.7331.be/meteo website based on the phpBB3 forum and template. WMR200 + UVN 800 - Cumulus 1.9.4 1062 / Windows XP Service Pack 3 build 2600 FR


Top
 Profile  
 
 Post subject: Re: Creating PHP Pages
PostPosted: Tue Jul 03, 2012 9:33 pm 
Offline

Joined: Mon Aug 10, 2009 10:16 pm
Posts: 1770
Location: World...
Weather Station: No weather station
Operating System: No operating system
Steve, it would be certainly nice if both file formats (HTM and PHP) were available within one package... :mrgreen:

As for maintaining the PHP templates ... it is no more difficult to maintain the PHP templates as it is to maintain the HTM templates ... as I indicated, the PHP templates are completely static - once extracted from the package, the PHP templates just need to be uploaded to the hosting server without further processing - only two data templates need to be processed by Cumulus.

The PHP templates have been designed so that similar (repeating) information, such as the W3C header, the menus (links) and the W3C footer have their own templates - the code for the data appearing on the screen has its own template, very similar to the 'standard' HTM templates.


Top
 Profile  
 
 Post subject: Re: Creating PHP Pages
PostPosted: Tue Jul 03, 2012 9:43 pm 
Offline

Joined: Mon Aug 10, 2009 10:16 pm
Posts: 1770
Location: World...
Weather Station: No weather station
Operating System: No operating system
OliII wrote:
...with phpBB3 templating script.
Are you writing about the phpBB3styles templates? Are those not for the phpBB open source bulletin board system? :shock:

Please correct me if I am wrong. ;)


Top
 Profile  
 
 Post subject: Re: Creating PHP Pages
PostPosted: Tue Jul 03, 2012 9:50 pm 
Offline

Joined: Mon Mar 19, 2012 11:47 am
Posts: 52
Location: Belgium
Weather Station: WMR 200 by Oregon Scientific
Operating System: WinXP SP3
Yes, phpBB is free and Open Source forum software.
phpbb-fr boards in france help to make personnal pages and never getting problems with it. All they need is the copyright into the pages and the source.

_________________
Image
http://www.7331.be/meteo website based on the phpBB3 forum and template. WMR200 + UVN 800 - Cumulus 1.9.4 1062 / Windows XP Service Pack 3 build 2600 FR


Top
 Profile  
 
 Post subject: Re: Creating PHP Pages
PostPosted: Tue Jul 03, 2012 10:08 pm 
Offline

Joined: Mon Aug 10, 2009 10:16 pm
Posts: 1770
Location: World...
Weather Station: No weather station
Operating System: No operating system
But, but... installing, modifying and up-keeping an open source bulletin board system modified to display weather information is not something I would recommend for any user (certainly not the majority of the Cumulus users)! :roll:

I have many of those blog, bulletin board, content management software installed on my home server (such as CMS Made Simple, DokuWiki, Drupal, FUDforum, Joomla!, MediaWiki, MyBB, phpBB3, Simple PHP Blog, SMF2, Tiki Wiki CMS, WordPress and YaBB) but would certainly not start a tutorial on their installation, setting up and maintenance... :twisted:

The concept proposed in this thread is/was to adopt/convert the 'standard' templates provided (installed) by Cumulus to the PHP format thus reducing the number of templates processed by Cumulus.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group