OX6:Using Brands/Whitelabeling with Open-Xchange Hosting Edition

From Open-Xchange
Revision as of 13:29, 26 October 2011 by Choeger (talk | contribs)

Task

You want to host the contexts of different brands in a single installation. These brands vary in some of their branding settings. You can define all these different brands via simple configuration files. A brand consists of a definition of properties like product name, logout url, session timeout url and also different Upsell properties to use.

Requirements

Please make sure you have the <config cascade hostname package_name> installed. Else the generated URLs for publications and notification mails won´t contain the branded domain/host name.

Solution

Let's consider three brands we want to configure. We'll call them "Groupware4You", "CollaborationPro" and "OneStopShop".

Branding in OX is governed by various ui properties. With these you can:

  • Change the help path (ui/global/help/help_path)
  • Change the FAQ path (ui/global/help/faq_path)
  • Change where the ui redirects to, on logout (ui/global/logout_path)
  • Change where the ui redirects to on session expiration (ui/global/sessionExpired_path)
  • Change the ui direct link path (ui/global/directLink_path)
  • Change the url of the page that suggests UWA widgets (ui/global/uwa/link)
  • Change the product name in the about dialog (ui/product/name)
  • Change the product description in the about dialog (ui/product/description)
  • Change the vendor address in the about dialog (ui/product/vendor/address)
  • Change the path where the themes can be found (ui/global/theme/path)
  • Change the hostname for notification mails / publication URLs etc (com.openexchange.hostname)

Firstly we'll tag the contexts. This will assign the contexts to a certain brand.

Groupware4You Contexts

  changecontext -c1 ... --taxonomy/types=gw4u
  changecontext -c2 ... --taxonomy/types=gw4u

CollaborationPro Contexts

  changecontext -c3 ... --taxonomy/types=cpro
  changecontext -c4 ... --taxonomy/types=cpro

OneStopShop Contexts

  changecontext -c5 ... --taxonomy/types=oss
  changecontext -c6 ... --taxonomy/types=oss

Next, we create the default branding settings in the file /opt/open-xchange/etc/groupware/settings/branding.properties

   ui/global/help/help_path=[protocol]://groupware4you.com[path]/help/[language]
   ui/global/help/faq_path=[protocol]://groupware4you.com[path]/faq
   ui/global/logout_path=[protocol]://groupware4you.com[path]/logout
   ui/global/sessionExpired_path=[protocol]://groupware4you.com[path]/sessionExpired
   ui/global/directLink_path=[protocol]://groupware4you.com[path]#m=[module]&f=[folder]&i=[object_id]
   ui/global/uwa/link=http://groupware4you.com/uwa/widgets.html
   ui/product/name=Groupware 4 You
   ui/product/description=Groupware 4 You - The groupware for everyone
   ui/product/vendor/address=Some Address
   ui/global/theme/path=themes/


In /opt/open-xchange/etc/groupware/system.properties add the line: com.openexchange.hostname=groupware4you.com


Next, let's define the two other brands. If a context belongs to a certain brand, the branding options will be overridden by the config cascade.

Create a file /opt/open-xchange/etc/groupware/contextSets/branding.yml.

   cpro:
       withTags: cpro
       ui/global/help/help_path: "[protocol]://collabpro.com[path]/help/[language]"
       ui/global/help/faq_path: "[protocol]://collabpro.com[path]/faq"
       ui/global/logout_path: "[protocol]://collabpro.com[path]/logout"
       ui/global/sessionExpired_path: "[protocol]://collabpro.com[path]/sessionExpired"
       ui/global/directLink_path: "[protocol]://collabpro.com[path]#m=[module]&f=[folder]&i=[object_id]"
       ui/global/uwa/link: "http://collabpro.com/uwa/widgets.html"
       ui/product/name: "CollaborationPro"
       ui/product/description: "Don't just be a team, be a unit"
       ui/product/vendor/address: "Some Address"
       ui/global/theme/path: "themes/cpro"
       com.openexchange.hostname: "collabpro.com"
       
   oss:
       withTags: oss
       ui/global/help/help_path: "[protocol]://OneStopShop.com[path]/help/[language]"
       ui/global/help/faq_path: "[protocol]://OneStopShop.com[path]/faq"
       ui/global/logout_path: "[protocol]://OneStopShop.com[path]/logout"
       ui/global/sessionExpired_path: "[protocol]://OneStopShop.com[path]/sessionExpired"
       ui/global/directLink_path: "[protocol]://OneStopShop.com[path]#m=[module]&f=[folder]&i=[object_id]"
       ui/global/uwa/link: "http://OneStopShop.com/uwa/widgets.html"
       ui/product/name: "One Stop Shop"
       ui/product/description: "One Stop Shop - Be informed"
       ui/product/vendor/address: "Some Address"
       ui/global/theme/path: "themes/oss"
       com.openexchange.hostname: "OneStopShop.com"

Programming examples

perl

The file http://software.open-xchange.com/OX6/doc/SOAP/admin/branding-example.pl is an example on how to implement it in perl.

C#

Check Provision using C# on how to do the same in C#.