Please read the posts in the Announcements section about the current status of Cumulus development now that I have retired

Please read this post before posting

Latest Cumulus release v1.9.4 (build 1099) - Nov 28 2014
Latest Cumulus MX release - v3.0.0 build 3043 Jan 20 2017. See this post for download

htm to php

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderators: daj, TNETWeather

NoDoze
Posts: 2
Joined: Mon Dec 31, 2012 7:16 am
Weather Station: Ambient
Operating System: Win 8
Location: Seattle

htm to php

Postby NoDoze » Mon Mar 12, 2018 10:12 pm

For example how would I convert the index.htm file to index.php?

Cumulus 1.9.4 Build 1099

I search the forums but couldn't find any info on how to. However, I see other templates using php, so there should be a way, no?

Is this the way I'm supposed to do it?
Configuration/Internet/Internet Settings/Files
Local File Name: C:\Cumulus\web\index.htm
Remote File Name: index.php
It creates the index.htmtmp file, but index.htm uploads only.

I'm a PHP developer and want to include other variables, etc to the files, but of course the files need to be .php in order to work.

Any insight, direction, help appreciated.

Thank you

water01
Posts: 1444
Joined: Sat Aug 13, 2011 9:33 am
Weather Station: WH1081
Operating System: Windows 7 64bit HP SP1
Location: Somewhere in the USA
Contact:

Re: htm to php

Postby water01 » Tue Mar 13, 2018 2:52 am

Use this article in the WiKi

http://wiki.sandaysoft.com/a/Php_webtags

Once you have implemented the one upload of cumuluswebtags.txt to cumuluswebtags.php you can stop the upload of the standard .htm files and alter all the code to use the php webtags as described in the Wiki.

User avatar
saratogaWX
Posts: 884
Joined: Wed May 06, 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows XP SP3
Location: Saratoga, CA, USA
Contact:

Re: htm to php

Postby saratogaWX » Tue Mar 13, 2018 3:57 pm

Something to keep in mind... a PHP page is just an HTML page with embedded PHP markup, otherwise, it's no different. You can take a HTML page and just change it's extension to .php and it will display the same without any PHP markup embedded. So just rename your index.htm to index.php and it will work the same as now, and you can add <?php ... ?> markup as you like.

User avatar
PaulMy
Posts: 1684
Joined: Sun Sep 28, 2008 11:54 pm
Weather Station: Davis Vantage Pro 2 w/Envoy USB
Operating System: Windows-8
Location: Komoka, ON Canada
Contact:

Re: htm to php

Postby PaulMy » Tue Mar 13, 2018 4:31 pm

If you don't want the index.htm page to be uploaded you need to uncheck the Internet - Files - Include Standard Files. And then add in to the Configuration - Internet - Files - all the /web/xxxxT.htm files such as todayT.htm, gaugesT.htm, etc. and add those files for Cumulus processing and upload, but do not add the indexT.htm. Then also add there your indexT.php that you are modifying, or whatever you may call it, for Cumulus processing and upload as index.php.

There may be other ways but I know this works.

Enjoy,
Paul

water01
Posts: 1444
Joined: Sat Aug 13, 2011 9:33 am
Weather Station: WH1081
Operating System: Windows 7 64bit HP SP1
Location: Somewhere in the USA
Contact:

Re: htm to php

Postby water01 » Tue Mar 13, 2018 10:05 pm

Paul, not sure where you got this information, but once all the standard pages have been converted to .php as per the Wiki the only file that requires uploading is the processed cumuluswebtags.txt renaming it cumuluswebtags.php. Each of the converted standard pages has an include for cumuluswebtags.php, and when the page loads if the pages have been altered correctly they will automatically load the value of the tag from cumuluswebtags.php to the appropriate field in the altered code.

You do not need any of the xxxxxxT.htm files uploaded as they will already be on the server as xxxxxxx.php (i.e. index.php (main Page), thismonth.php etc.) and will be processed by the php server when the code is executed. Take a look at the Wiki, it is slightly longer to implement but by far the easiest once it has been done.

User avatar
PaulMy
Posts: 1684
Joined: Sun Sep 28, 2008 11:54 pm
Weather Station: Davis Vantage Pro 2 w/Envoy USB
Operating System: Windows-8
Location: Komoka, ON Canada
Contact:

Re: htm to php

Postby PaulMy » Tue Mar 13, 2018 10:36 pm

I was not thinking of all the T files to be .php just the index. Looks like I understood, sorry.

Paul


Return to “Web site - General”

Who is online

Users browsing this forum: No registered users and 6 guests