You are here

HELP.txt in Mobile Switch 7.2

Mobile Switch module help

Redirect mode - multisite installation
---------------------------------------

  The important difference to the other operating modes is the declaration of
  the two default themes in the settings.php files.

Start with redirect mode
------------------------

  As first, is must exist an working multisite installation.

Quick HowTo, example setup for a shared content multisite
---------------------------------------------------------

  Example sites: www.d7.lan and mobile.d7.lan

  Directory structure
  -------------------

  drupal_site_root
    /sites
      sites.php
      /all
        /libraries
          /Mobile_detect
        /modules
          ... all contrib modules
        /themes
          /the_desktop_theme
          /the_mobile_theme
      /default
        /files
        settings.php
      /mobile.d7.lan
        /files
        settings.php

  Database setup
  --------------

  Configure the database in both setting.php files identical.

  
$databases = array(
  'default' => array(
    'default' => array(
      'database' => 'the-main-database-name',
      'username' => 'the-db-user',
      'password' => 'secret-password',
      'host' => 'the-main-database-host',
      'port' => '',
      'driver' => 'mysql',
      'prefix' => '',
    ),
  ),
);
Using a prefix, it is necessary to use it in the database configuration of both setting.php files. Base URL -------- Configure in the setting.php files the Base URL. Default site:
$base_url = 'http://www.d7.lan';
Mobile site:
$base_url = 'http://mobile.d7.lan';
Important things ---------------- - Both themes, desktop and mobile, must exist in /sites/all/themes. - Use the file /sites/sites.php to define the multisite structure in context of the directories and the two URL's. - The directory /sites/mobile.d7.lan/files must exist with same permissions as /sites/default/files. - Define the variable $cookie_domain in both setting.php files.
$cookie_domain = '.d7.lan';
File sites.php --------------
$sites['www.d7.lan'] = 'default';
$sites['mobile.d7.lan'] = 'mobile.d7.lan';
Shared images ------------- To use shared content with shared images it is necessary to configure in the mobile site the 'File system' settings under mobile.d7.lan/admin/config/media/file-system For the 'Public file system path' or 'Private file system path' use the same setting as of the desktop (default) site, configured under www.d7.lan/admin/config/media/file-system Drupal multisite documentation ------------------------------ http://drupal.org/documentation/install/multi-site Module development ------------------ The module is only tested in a Apache web server environment. Untested -------- Subdirectory multi-site Feedback are welcome.

File

HELP.txt
View source
  1. Mobile Switch module help
  2. Redirect mode - multisite installation
  3. ---------------------------------------
  4. The important difference to the other operating modes is the declaration of
  5. the two default themes in the settings.php files.
  6. Start with redirect mode
  7. ------------------------
  8. As first, is must exist an working multisite installation.
  9. Quick HowTo, example setup for a shared content multisite
  10. ---------------------------------------------------------
  11. Example sites: www.d7.lan and mobile.d7.lan
  12. Directory structure
  13. -------------------
  14. drupal_site_root
  15. /sites
  16. sites.php
  17. /all
  18. /libraries
  19. /Mobile_detect
  20. /modules
  21. ... all contrib modules
  22. /themes
  23. /the_desktop_theme
  24. /the_mobile_theme
  25. /default
  26. /files
  27. settings.php
  28. /mobile.d7.lan
  29. /files
  30. settings.php
  31. Database setup
  32. --------------
  33. Configure the database in both setting.php files identical.
  34. @code
  35. $databases = array (
  36. 'default' =>
  37. array (
  38. 'default' =>
  39. array (
  40. 'database' => 'the-main-database-name',
  41. 'username' => 'the-db-user',
  42. 'password' => 'secret-password',
  43. 'host' => 'the-main-database-host',
  44. 'port' => '',
  45. 'driver' => 'mysql',
  46. 'prefix' => '',
  47. ),
  48. ),
  49. );
  50. @endcode
  51. Using a prefix, it is necessary to use it in the database configuration
  52. of both setting.php files.
  53. Base URL
  54. --------
  55. Configure in the setting.php files the Base URL.
  56. Default site:
  57. @code
  58. $base_url = 'http://www.d7.lan';
  59. @endcode
  60. Mobile site:
  61. @code
  62. $base_url = 'http://mobile.d7.lan';
  63. @endcode
  64. Important things
  65. ----------------
  66. - Both themes, desktop and mobile, must exist in /sites/all/themes.
  67. - Use the file /sites/sites.php to define the multisite structure in context
  68. of the directories and the two URL's.
  69. - The directory /sites/mobile.d7.lan/files must exist with same permissions
  70. as /sites/default/files.
  71. - Define the variable $cookie_domain in both setting.php files.
  72. @code
  73. $cookie_domain = '.d7.lan';
  74. @endcode
  75. File sites.php
  76. --------------
  77. @code
  78. $sites['www.d7.lan'] = 'default';
  79. $sites['mobile.d7.lan'] = 'mobile.d7.lan';
  80. @endcode
  81. Shared images
  82. -------------
  83. To use shared content with shared images it is necessary to configure in
  84. the mobile site the 'File system' settings under
  85. mobile.d7.lan/admin/config/media/file-system
  86. For the 'Public file system path' or 'Private file system path' use the
  87. same setting as of the desktop (default) site, configured under
  88. www.d7.lan/admin/config/media/file-system
  89. Drupal multisite documentation
  90. ------------------------------
  91. http://drupal.org/documentation/install/multi-site
  92. Module development
  93. ------------------
  94. The module is only tested in a Apache web server environment.
  95. Untested
  96. --------
  97. Subdirectory multi-site
  98. Feedback are welcome.