Gossamer Forum
Home : Products : Gossamer Links : PHP Front End :

PHP Templates?

Quote Reply
PHP Templates?
Hello,

My little brain is confused. Have installed Beta of PHP - been playing with it but the default_php set of templates has HTML extensions, not PHP extensions. Although it appears to be in PHP code, it has an .html extension so obviously won't be parsed.

Am I being a total plonker here, or should there be another template set I should use?

Apologies for the confusion - would be grateful for any response as I'm sure I can't be the only donkey here who doesn't get it!!

I've set my build extension to .php, and that build a details page in php, eg. 1.php, but doesn't change the non-detailed pages.

On another note, how do I activate links to the reviewing system? At the moment, there's no link in the built code to let a person write a review.

*-*-*-*-*-*-*-*-*-*-*
Servicepals.com is an online community for serving and retired military men and women. Visit us at http://www.servicepals.com. Development by Rawnet Limited
*-*-*-*-*-*-*-*-*-*-*
Quote Reply
Re: [servicepals] PHP Templates? In reply to
The default_php template set is used with page.php.
If you set the template set to be used to 'default', and use page.php (thus creating the pages dynamically, not statically), then it will use the default_php template set. On the other hand, if you decide to stay with the Perl CGI version, then it will use the default template set.

In Reply To:
Although it appears to be in PHP code, it has an .html extension so obviously won't be parsed.
page.php parses those files, so it doesn't matter if you have .html set to be parsed by php or not.

In Reply To:
On another note, how do I activate links to the reviewing system? At the moment, there's no link in the built code to let a person write a review.
Unfortunately, that was one of the things we haven't implemented yet for the PHP frontend. Take a look at README.php to see the differences between the PHP frontend and the Perl CGI frontend.

In Reply To:
I've set my build extension to .php, and that build a details page in php, eg. 1.php, but doesn't change the non-detailed pages.
It sounds like you're a little confused with how the addition of the PHP frontend works. Here's a little explanation:
There are two ways to display your link directory: statically, and dynamically.
Displaying your link directory statically involves building the pages, creating all the html files and any time you make any changes to the link directory involves rebuilding.
You can also display your link directory dynamically. With the addition of the PHP frontend, you can now do this in two ways:
1) Using the Perl CGI (page.cgi)
To use this you would use http://myhost.com/cgi-bin/page.cgi?d=1
2) Using the PHP frontend (page.php)
To use this you would use http://myhost.com/cgi-bin/page.php
page.php handles all (for exceptions see the README.php) functions of the frontend that the CGI version handled.

Hope this helps.


Adrian