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.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:$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' => '', ), ), );
Mobile site:$base_url = 'http://www.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.$base_url = 'http://mobile.d7.lan';
File sites.php --------------$cookie_domain = '.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.$sites['www.d7.lan'] = 'default'; $sites['mobile.d7.lan'] = 'mobile.d7.lan';
File
HELP.txtView source
- 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.
-
- @code
- $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' => '',
- ),
- ),
- );
- @endcode
-
- 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:
- @code
- $base_url = 'http://www.d7.lan';
- @endcode
-
- Mobile site:
- @code
- $base_url = 'http://mobile.d7.lan';
- @endcode
-
- 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.
-
- @code
- $cookie_domain = '.d7.lan';
- @endcode
-
- File sites.php
- --------------
-
- @code
- $sites['www.d7.lan'] = 'default';
- $sites['mobile.d7.lan'] = 'mobile.d7.lan';
- @endcode
-
- 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.