Try this instead <roundcube:include file="file.php" />, you can also create a plugin to set some session variable, and then read it in a skin with <roundcube:var name="session:variablename" />
Hi there,
I'm currently trying to personalize the skins for the different domains it is running on however I can't seem to get the PHP parsed in the html located in the skins folder.
- The handlers in .htaccess have been appropriately set
- A plain html page with php inclusion will run fine
- The main.inc.php has the $rcmail_config['skin_include_php'] config setting set as true (tried both true and TRUE, shouldn't really matter I suppose)
- Both releases I run 0.2 and 0.3.1 show this behaviour
- PHP version of the server is 5.2.9
The skin html (snippet from login.html) looks as follows;
Yet for some reason the PHP doesn't get parsed. Am I missing something here?PHP Code:<img src="/images/<?php
$getTLD = array_reverse(explode(".",$_SERVER['HTTP_HOST']));
$getTLD = $getTLD[1].".".$getTLD[0];
echo $getTLD;
?>.png" border="0"
Try this instead <roundcube:include file="file.php" />, you can also create a plugin to set some session variable, and then read it in a skin with <roundcube:var name="session:variablename" />
Hi Alec,
Thanks for your quick response. I see what the config variable actually does now! (So much reading eh)
Anyways, I created a getdomain.php file for the 0.2 release box and included the tag with the template I want to use it in. However that did not seem to work. For testing purposes I've included it out and inside of a tag which didn't seem to make any difference. Am I correct in thinking that when I invoked the include file relatively it will take the actual file from the active templates folder? If so that did not work.
Next step was to try and point it to an absolute path. No difference either, unfortunately. So I'm a bit stumped at why it does not want to pick up the PHP bit.
Will be trying this on the 0.3.1 release next. Will post the results in a bit. Well just tried 0.3.1 as well and doesn't seem to want to eat that include either. Hope somebody else (or you) may be able to shed some more light onto this.
Thanks again for your input,
fork
Last edited by forkless; 02-10-2010 at 04:52 PM. Reason: Added results for 0.3.1
The include path is relative to the skin folder <RC root>/skins/<skin name> so if you wanted the templates folder it would be /templates/<file> Just should how much we need skin documentation![]()
I have one small question regarding nesting <roundcube> tags. When I add an include as shown below;
I will get the following HTML output;PHP Code:<div id="header"><roundcube:button command="mail" image="/images/<roundcube:include file="/templates/getdomain.php" />.png" alt="Roundcube Webmail" /></div>
Apparently it does do a partial parse but then it gets killed (escaping problem maybe?)PHP Code:<div id="header"><a href="./?_task=mail" onclick="return rcmail.command('mail','',this)"><img src="skins/default/images/<roundcube:include file=" id="rcmbtn104" alt="" /></a>.png" alt="Roundcube Webmail" /></div>
Now my question is are nested roundcube tags not supposed to work by design or did I stumble onto a bug?
It's not working by design.
Cool, no problem. Good to know though -)
There are currently 1 users browsing this thread. (0 members and 1 guests)