This topic is locked

PHPRunner31 template question

8/29/2006 9:28:14 AM
PHPRunner General questions
F
frocco author

Hello,
I have modified templates in PHPRunner30 that have PHP code.
How do I port this to PHPRunner31?
I see no template option.
Thanks
Frank

Admin 8/30/2006

Frank,
there is no custom templates support in PHPRunner 3.1

You can apply your changes directly to files in source folder within PHPRunner installation folder.
The recommended way to customize PHPRunner-created pages is to use Events, Visual Editor and header.php and footer.php files.

We'll add a bunch of new events in one of the next updates.

F
frocco author 8/30/2006

Say I wanted to add a condition to the "Add New" button on a list page.

Would I add php code arround the "Add New" source in the Visual Editor?
Frank

Frank,

there is no custom templates support in PHPRunner 3.1

You can apply your changes directly to files in source folder within PHPRunner installation folder.
The recommended way to customize PHPRunner-created pages is to use Events, Visual Editor and header.php and footer.php files.

We'll add a bunch of new events in one of the next updates.

F
frocco author 8/30/2006

The way I would like this t work is:
Every button or link on a page should have a if condition to determine if they should be displayed.

Then in the before event, one could add php code to set this varible to true or false;

In the list page, there should be a before row is displayed event and after row is displayed event.

then in the before row is displayed event, one could write

if (some condition)

$allow_Edit = false;

and the edit button would not be displayed.
HTH
Frank

Say I wanted to add a condition to the "Add New" button on a list page.

Would I add php code arround the "Add New" source in the Visual Editor?
Frank

Admin 8/31/2006

Frank,
we'll add a number of new events into one of the next PHPRunner updates.

They will work the same way you suggest.

A
andyjames 9/3/2006

If it is possible to edit the php source code in the source folder in version 3.1 in the same way that you edited templates in version 3.0, as a suggestion would it be possible to reintroduce the Template Editor button on the Miscellaneous page allowing users to create multiple templates. Presumably you could create a new folder for each source template?

Otherwise the workaround is to do that manually in Explorer and any php editor...

The Template Editor was a neat tool for changing the look of all files consistently without having to edit every page individually (once you get your head around the source code!). If you had several different projects it was useful to have multiple templates for different projects...

Great work, chaps!

S
Sealless 9/21/2006

Frank,

there is no custom templates support in PHPRunner 3.1

You can apply your changes directly to files in source folder within PHPRunner installation folder.
The recommended way to customize PHPRunner-created pages is to use Events, Visual Editor and header.php and footer.php files.

We'll add a bunch of new events in one of the next updates.


I have read this a few times and I still am not sure I believe it - does this mean that there is no way to use the custom templates we have developed? We are using PHPRunner 3.0 (love it) and we have done some heavy customizations - but always in the templates (well, of course in the events, too where appropriate). Right now we have three major design themes supported by different templates. Will we have to swap in different sets of "base files" in to the installation folder to simulate the template functionality of 3.0?

Admin 9/21/2006

Chet,
there is no way to use custom templates created by PHPRunner 3.0 in newer version. If you take a quick into files you can see that they do have very little in common. For the sake of WYSIWYG editing we have to split HTML and PHP code and completely change the way how PHP code works.
I recommend to extend existing projects using PHPRunner 3.0 and develop new ones in PHPRunner 3.1.
Very soon we plan to add several sets of visual templates that will work with the same set of PHP files. You will be able to add new visual themes as well. In the next several days I plan to post a roadmap for the next several versions of ASPRunnerPro/PHPRunner. Check it in Announcements forum.