I send this message again, because it was sorted into a wrong thread. ----- Original Message ----- From: Roland Liebl To: dev@lists.roundcube.net Sent: Sunday, May 17, 2009 6:16 AM Subject: Load skins templates from plugin directory
Hello Devs,
the attached patch is very usefull, IMO. It loads plugin templates from the plugin folder. It is similar to what you are already doing by the localization.
E.g.: $rcmail->output->send("settings.account") ... will parse the template from ./[conf:plugins_dir]/settings/skins/[conf:skin]/templates/account.html.
So we could use a "Domain Prefix" for plugin templates. It would make it easier to install a plugin, because the user does not have to copy things into the main skin folder.
Please let me know, if you will incorporate the patch. I'm in process to update MyRoundCube to use the new Plugin API and have to know if I can rely on this method.
Regards, Roland
List info: http://lists.roundcube.net/dev/
Roland Liebl wrote:
the attached patch is very usefull, IMO. It loads plugin templates from the plugin folder. It is similar to what you are already doing by the localization.
E.g.: $rcmail->output->send("settings.account") ... will parse the template from ./[conf:plugins_dir]/settings/skins/[conf:skin]/templates/account.html.
So we could use a "Domain Prefix" for plugin templates. It would make it easier to install a plugin, because the user does not have to copy things into the main skin folder.
We definitely need this feature. We need also:
<roundcube:button imageSel="/images/buttons/filter_add_sel.png" ...
How to set image location in plugins skins/ directory?
Then we should use template for 'default' skin instead of displaying error.
Thomas, can you look into this?
A.L.E.C wrote:
Roland Liebl wrote:
the attached patch is very usefull, IMO. It loads plugin templates from the plugin folder. It is similar to what you are already doing by the localization.
E.g.: $rcmail->output->send("settings.account") ... will parse the template from ./[conf:plugins_dir]/settings/skins/[conf:skin]/templates/account.html. So we could use a "Domain Prefix" for plugin templates. It would make it easier to install a plugin, because the user does not have to copy things into the main skin folder.
We definitely need this feature. We need also:
- Handling of image locations:
<roundcube:button imageSel="/images/buttons/filter_add_sel.png" ...
I kind of solved this in r2515 by defining /this/ to be the path to the plugins skin folder. Also links to plugins/... will be converted to whatever the plugins_dir property is set to.
How to set image location in plugins skins/ directory?
- Handling of situations when plugin not contain templates for non-default skin.
Then we should use template for 'default' skin instead of displaying error.
Fallback to skins/default/ was added in r2514
~Thomas
List info: http://lists.roundcube.net/dev/
Hi,
Fallback to skins/default/ was added in r2514
Very cool! Thanks, been wondering about that feature for a while. Makes it a lot easier to create a derivative skin from default.
Also, very nice about the new load_config api call.
Cor _______________________________________________ List info: http://lists.roundcube.net/dev/
Fallback to skins/default/ was added in r2514
Very cool! Thanks, been wondering about that feature for a while. Makes it a lot easier to create a derivative skin from default.
Hmm, i guess I misunderstood this. Looking at the code it's only a fallback for plugins. What would be cool is if any skin had fallbacks to default. So lets say i make a new skin that is marginally different from default skin, then i could just copy say 1 template to the new skin, and the rest would be taken from the default skin.
That way, if new functionality is added that requires a new template (or css) existing skins wont necessarily break, but fall back to the default skin for that specific functionality.
Cor _______________________________________________ List info: http://lists.roundcube.net/dev/
Cor Bosman wrote:
Fallback to skins/default/ was added in r2514
Very cool! Thanks, been wondering about that feature for a while. Makes it a lot easier to create a derivative skin from default.
Hmm, i guess I misunderstood this. Looking at the code it's only a fallback for plugins. What would be cool is if any skin had fallbacks to default. So lets say i make a new skin that is marginally different from default skin, then i could just copy say 1 template to the new skin, and the rest would be taken from the default skin.
I have this requirement as well. My current solution is to create symlinks for most of the files.
That way, if new functionality is added that requires a new template (or css) existing skins wont necessarily break, but fall back to the default skin for that specific functionality.
Falling back to a template from the default skin folder isn't hard to implement. But the question now is where do all the links (to images and stylesheets) point to? To the active skin directory or to the directory the template was taken from? Does one of these possibilities really fit all needs?
~Thomas _______________________________________________ List info: http://lists.roundcube.net/dev/