Author Topic: Static domain for skin files  (Read 3425 times)

Offline Eiffel

  • Newbie
  • *
  • Posts: 2
Static domain for skin files
« 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.

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Static domain for skin files
« Reply #1 on: November 26, 2011, 05:37:44 PM »
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
__________________
MyRoundcube Project (commercial)

Offline Eiffel

  • Newbie
  • *
  • Posts: 2
Static domain for skin files
« Reply #2 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.