want to add php code in your templates? here's how open the folder roundcube/skins/default/includes open each html file in your favorite text editor and add
<?PHP ?>
as the very first line. save them as php files. for example header.html is saved as header.php next open the folder roundcube/skins/default/templates open each html file in your favorite text editor and add
<?PHP ?>
as the very first line. find all instances of <roundcube:include file= and change html to php for example: <roundcube:include file="/includes/links.html" /> becomes <roundcube:include file="/includes/links.php" /> in the file addressbook.html around line 32 find the line that reads: <roundcube:object name="addressframe" id="contact-frame" width="100%" height="100%" frameborder="0" src="/watermark.html" /> change watermark.html to read watermark.php save them as php files. for example addcontact.html is saved as addcontact.php open the file roundcube/skins/default/watermark.html add
<?PHP ?>
as the very first line. save watermark.html as watermark.php next open the file roundcube/program/include/main.inc around line 769 find the line that reads: return is_file("$skin_path/templates/$name.html"); change $name.html to $name.php around line 782 find the line that reads: $path = "$skin_path/templates/$name.html"; change $name.html to $name.php save and you're done!! open and run roundcube. everything looks the same and acts the same but now you have the ability to use php in your templates.
Sigh. Yes, you could follow these steps, but before you do, please consider learning a little about the all of the advantages of using a templating engine and the principles of separating presentation logic with application logic.
Here's a short article introducing the concept:
http://en.wikipedia.org/wiki/Template_engine
-Charles
mainefoo wrote:
want to add php code in your templates? here's how open the folder roundcube/skins/default/includes open each html file in your favorite text editor and add
<?PHP ?>
as the very first line. save them as php files. for example header.html is saved as header.php next open the folder roundcube/skins/default/templates open each html file in your favorite text editor and add
<?PHP ?>
as the very first line. find all instances of <roundcube:include file= and change html to php for example: <roundcube:include file="/includes/links.html" /> becomes <roundcube:include file="/includes/links.php" /> in the file addressbook.html around line 32 find the line that reads: <roundcube:object name="addressframe" id="contact-frame" width="100%" height="100%" frameborder="0" src="/watermark.html" /> change watermark.html to read watermark.php save them as php files. for example addcontact.html is saved as addcontact.php open the file roundcube/skins/default/watermark.html add
<?PHP ?>
as the very first line. save watermark.html as watermark.php next open the file roundcube/program/include/main.inc around line 769 find the line that reads: return is_file("$skin_path/templates/$name.html"); change $name.html to $name.php around line 782 find the line that reads: $path = "$skin_path/templates/$name.html"; change $name.html to $name.php save and you're done!! open and run roundcube. everything looks the same and acts the same but now you have the ability to use php in your templates.