Search The ForumSearch   RegisterRegister  LoginLogin

AfterLogic WebMail Pro

 AfterLogic Forum : AfterLogic WebMail Pro
Subject Topic: change skin based on hostname Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
denis
Newbie
Newbie


Joined: 15 June 2015
Location: Italy
Online Status: Offline
Posts: 16
Posted: 15 June 2015 at 1:55pm | IP Logged Quote denis

I'm testing your php webmail pro

I need to change the skin based on the hostname so i.e.
webmail.domain1.com -> takes skin Default
webmail.domain2.com -> takes skin White

This choice should be done first of all so it can be already set even in the login page

What I'd like to do is a plugin with a config function hooked to an event fired after default webmail configuration to change some general settings

Is it possible? Can you give me some hints to create this plugin?

thanks
Back to Top View denis's Profile Search for other posts by denis
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 5367
Posted: 16 June 2015 at 12:20am | IP Logged Quote Igor

There's actually a way to achieve this. It assumes you create a number of domains - domain1.com, domain2.com, etc.; and in Web domain field, supply webmail.domain1.com, webmail.domain2.com etc. That way, WebMail will determine the hostname and will apply domain settings accordingly.

Hope this helps!

--
Regards,
Igor, AfterLogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 
denis
Newbie
Newbie


Joined: 15 June 2015
Location: Italy
Online Status: Offline
Posts: 16
Posted: 16 June 2015 at 1:48am | IP Logged Quote denis

Yes that's what I need...

I also found these 3 lines in the /templates/index.html template, it could be usefull to move the icon images in every skin folder and change the html ref/href based on the skin used by current domain

<link rel="icon" sizes="196x196" type="image/png" ref="skins/wm_logo_140x140.png" />
<link rel="apple-touch-icon-precomposed" type="image/png" href="skins/wm_logo_140x140.png" />
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />


and in /templates/FilesPu.html you have a static link to the Default skin
<link type="text/css" rel="stylesheet" href="skins/Default/sharing.css">


Thanks for yuur help
Back to Top View denis's Profile Search for other posts by denis
 
denis
Newbie
Newbie


Joined: 15 June 2015
Location: Italy
Online Status: Offline
Posts: 16
Posted: 16 June 2015 at 6:55am | IP Logged Quote denis

Igor, I set Web Domain preferences and the right skin is selected in the login page,

1st problem:
I log in and in the main page the skin is reset to Default, I saw a record is saved in awm_settings table, field def_skin value 'Default'

2nd problem:
- I access webmail1.domain.com and it takes skin1,
- then login (say we are able to save the correct skin in db, i updated it manually to skin1 for this test),
- logout,
- then access webmail2.domain.com with the same account it takes skin2,
- login and skin1 is taken, this is wrong, the problem is that the def_skin is not update, it seems to be written just at the first login in the webmail

I'm doing something wrong? Is it a bug? Is there a workaround?






Back to Top View denis's Profile Search for other posts by denis
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 5367
Posted: 17 June 2015 at 4:05am | IP Logged Quote Igor

Regarding the 1st one - the skin change applies only to those accounts which weren't there in the database yet. You would need to delete the account and when it's recreated on new login, the skin change will apply.

As for the 2nd, I'm afraid that's not going to work. The domains have to be separate, you can't use the same account on different URLs.

--
Regards,
Igor, AfterLogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 
denis
Newbie
Newbie


Joined: 15 June 2015
Location: Italy
Online Status: Offline
Posts: 16
Posted: 11 February 2020 at 4:12am | IP Logged Quote denis

Hi Igor

How can I set a custom theme based on the hostname in version 8.3.15 ?



thanks
Back to Top View denis's Profile Search for other posts by denis
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 5367
Posted: 11 February 2020 at 4:20am | IP Logged Quote Igor

That's not currently supported in v8.

--
Regards,
Igor, Afterlogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide