Websocket Map


Branding

 

The logos & websocket host server can be changed depending on the URL used to access the site.  This includes the logo at the top of the app, the login dialogue box, and about box.

mytrackingcompanyURL.png

 

myCompanyMenuBar.png

 

Two logo files are required. 

<mycompany>Logo35.png (155 x 35px)
<mycompany>LogoLarge.png  (around 250 x 56px)

 

The branding settings are changed in the following file:

./branding/branding.php

  1. <?php
  2. function readAlertFile($brandingpath) {
  3. $alertFile = $brandingpath."/about.html";
  4. $fh = fopen($alertFile, 'r');
  5. $alertText = fread($fh, filesize($alertFile));
  6. fclose($fh);
  7. return $alertText;
  8. }
  9. function readLoginFile($brandingpath) {
  10. $loginFile = $brandingpath."/login.html";
  11. $fh = fopen($loginFile, 'r');
  12. $loginText = fread($fh, filesize($loginFile));
  13. fclose($fh);
  14. return $loginText;
  15. }
  16.  
  17. switch ($_SERVER["HTTP_HOST"])
  18. {
  19. case "map.mytrackingcompany.com":
  20. default:
  21. $websocketURL = "ws://myserver.net:1400/websocket";
  22. $brandingpath = "branding/mytrackingcompany/";
  23. $prefix = "MyTrackingCo";
  24. $brandingLogoURL = "http://www.mytrackingcompany.com";
  25. $brandingDefaultTheme = "";
  26. break;
  27. }
  28.  
  29. $brandingLogoImg = $brandingpath.$prefix."Logo35.png";
  30. $brandingDialogImg = $brandingpath.$prefix."LogoLarge.png";
  31. $brandingAboutDialog = readAlertFile($brandingpath);
  32. $brandingLoginDialog = readLoginFile($brandingpath);
  33. ?>