Roundcube Community Forum

 

Static domain for skin files

Started by Eiffel, November 26, 2011, 11:15:47 AM

Previous topic - Next topic

Eiffel

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: defaulthttp://static.mydomain.com/mail/images/pic1.png" /> Did you get it? what I need is to edit somewhere so roundcube don't add anything to the path of icons.

Cheers.

rosali

Rouncube has its own Skin template markup language (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) to replace "skins/default" by a regular expression before the page is passed to the browser.
Regards,
Rosali

Eiffel

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.