Page 1 of 1

htm to php

Posted: Mon 12 Mar 2018 10:12 pm
by NoDoze
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

Re: htm to php

Posted: Tue 13 Mar 2018 2:52 am
by water01
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.

Re: htm to php

Posted: Tue 13 Mar 2018 3:57 pm
by saratogaWX
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.

Re: htm to php

Posted: Tue 13 Mar 2018 4:31 pm
by PaulMy
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

Re: htm to php

Posted: Tue 13 Mar 2018 10:05 pm
by water01
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.

Re: htm to php

Posted: Tue 13 Mar 2018 10:36 pm
by PaulMy
I was not thinking of all the T files to be .php just the index. Looks like I understood, sorry.

Paul