Roundcube Community Forum

Release Support => Release Discussion => Topic started by: Eiffel on November 26, 2011, 11:15:47 AM

Title: Static domain for skin files
Post by: Eiffel on November 26, 2011, 11:15:47 AM
Hello,

I would like to know how can I configure or edit some code to move all images, js and css files of my skin to a static domain (or subdomain), say static.mydomain.com. I tried it before but in some places I got icons with broken image links, the problem is that roundcube adds "skins/{my_skin}" to the modified path of all icons of my skin like this: Did you get it? what I need is to edit somewhere so roundcube don't add anything to the path of icons.

Cheers.
Title: Static domain for skin files
Post by: rosali on November 26, 2011, 05:37:44 PM
Rouncube has its own Skin template markup language (Doc_SkinML (http://trac.roundcube.net/wiki/Doc_SkinML)). The skin parser class sets URLs relative to Roundcube root folder. You can't avoid it. I code a lot of plugins and am quite familiar with Roundcube, but I never coded a skin. So, maybe I'm wrong with my conclusion: IMO, the only chance you have is to use the plugin API 'send_page' hook (Plugin_Hooks (http://trac.roundcube.net/wiki/Plugin_Hooks#send_page)) to replace "skins/default" by a regular expression before the page is passed to the browser.
Title: Static domain for skin files
Post by: Eiffel on November 26, 2011, 06:01:28 PM
I'm sure I can, in fact, it works in some places because roundcube only adds this relative URL when the image or css or js file starts with /. I just got some icons brokens where it seems to not follow this rule. I'll find the code where it happens and I will edit it properly to follow this rule in every file.

I'll tell you back.