Jump to: navigation, search
MithiWiki Home > ConnectXf Home > ConnectXf Administration > Configuration > Customizing Landing or Home page of Baya (ConnectXf Version Upto 3.10)


Customizing the home or landing page of Baya

  • This topic refers to Connect Xf 3.10 and below.
  • If you wish to customize the login page, then follow the steps given below
  • Create folder /mithi/mcs/modules/mithi-mailclient/user/pl/webapp/webroot/Templates/<domain>/
  • If you want the change settings link on custom homepage then,

Copy custom home page template from /mithi/mcs/modules/mithi-mailclient/user/pl/webapp/webroot/Templates/Login/custom-setting-link-homepage.html to /mithi/mcs/modules/mithi-mailclient/user/pl/webapp/webroot/Templates/<domain>/<domain>.html

Otherwise,

Copy custom home page template from /mithi/mcs/modules/mithi-mailclient/user/pl/webapp/webroot/Templates/Login/custom-homepage.html to /mithi/mcs/modules/mithi-mailclient/user/pl/webapp/webroot/Templates/<domain>/<domain>.html

  • Skip this step for ConnectXF version 3.4.0.7 onwards
  • Copy /mithi/mcs/modules/mithi-mailclient/user/pl/webapp/webroot/index.html to /mithi/mcs/modules/mithi-mailclient/user/pl/webapp/webroot/<domain>-index.html
  • Edit /mithi/mcs/modules/mithi-mailclient/user/pl/webapp/webroot/<domain>-index.html and change

window.location.replace("/baya/servlet/Login?code=0.791117731136&rand="+Math.random()+"&Login=true"); to window.location.replace("/baya/servlet/Login?code=0.791117731136&rand="+Math.random()+"&Login=true&domain=<domain>"); Here replace <domain> with your domain name.

  • Save the file.
  • Change virtualhost for the domain. Change DirectoryIndex to <domain>-index.html.
  • Restart http and tomcat services.
  • Test that login through custom home page is working.
  • Modify the user interface of /mithi/mcs/modules/mithi-mailclient/user/pl/webapp/webroot/Templates/<domain>/<domain>.html as required. You can change the position of elements like text box etc, but do not delete/rename code or any html element like text box.
  • After modifying the custom page, test again whether login is working.
  • The custom home page have the following elements
  • Login form must be present just like it is in original Login.html.
  • Function Login_validateBeforeSubmit() must be present. It should be called in the onsubmit event of Login form.
  • Following js files must be included
<SCRIPT language=JavaScript src="/dev/js/utils.js"></SCRIPT>
<script  src="/dhtmlxWindows/codebase/dhtmlxcommon.js"></script>
<script src="/dhtmlxAjax/codebase/dhtmlxcommon.js"></script>
<SCRIPT language=JavaScript src="/dev/js/Login.js"></SCRIPT>
  • Following hidden fields must be present
- j_username, name, password and domainname
- The name of password field must be j_password.

Migrating XD Custom home page to Xf

Make a new Xf custom home page using process above.

Test it.

In Xf, each domain has a separate folder, so all resources required for custom page of a domain must be kept in that folder.

Eg. Templates/mithi.com

So make folders like Templates/mithi.com/images, Templates/mithi.com/js etc to keep resources.

Copy resource files from XD to respective folders in Xf.

Copy html data from XD home page to Xf home page without disturbing the code in the Xf home page. Do not copy the entire XD home page.

In the Xf home page, change the paths of the resources to /Templates/<domainname>/<foldername>/<filename>.

Eg. /Templates/mithi.com/images/logo2.gif /Templates/mithi.com/js/jquery.js

In the Xf, the path should start with /Templates.

Redirection of the web mail requests to an alternate server (such as MCS XD version)

  • To configure a server to allow redirection of the web mail requests to an alternate server (such as MCS XD version), the following server configuration has to be done on the Connect XF server
  • In servers.ini, add 3 attributes to the XD server's entry, viz.
type=XD
webmailhost=<serverurl or ip>
webmailprotocol=<http or https>
  • Examples are:
[XDFEServer]
address=192.168.0.10
name=XDFEServer
type=XD
webmailhost=mail.mithi.com
webmailprotocol=https


[XDFEServer]
address=192.168.0.10
name=XDFEServer
type=XD
webmailhost=192.168.0.10
webmailprotocol=http
  • webmailhost - If the end users access the web mail from the Internet, the value of this property must be a server URL or ip which is accessible from the Internet(public IP or DNS). If all the end users always access the site from LAN, then set the local IP or URL.
  • webmailprotocol - This specifies the protocol of the Webmail on XD server. If https is forced on XD server, then the protocol must be given as https.
  • Restart tomcat service on XF server on which servers.ini is modified.
  • In addition to configuring the server, the user's redirection property (webmaillocation) must be set as given below.