Created
October 9, 2015 09:44
-
-
Save lianglee/4aaef29752111e17ed2c to your computer and use it in GitHub Desktop.
Multiple Ossn websites on one domain
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Open Source Social Network | |
| * | |
| * @packageOpen Source Social Network | |
| * @author Informatikon Core Team <info@informatikon.com> | |
| * @copyright 2014 iNFORMATIKON TECHNOLOGIES | |
| * @license General Public Licence http://www.opensource-socialnetwork.org/licence | |
| * @link http://www.informatikon.com/ | |
| */ | |
| //replace website1 with websitex , or website2, website3, website4 | |
| session_name("Website1"); | |
| session_start(); | |
| global $Ossn; | |
| if (!isset($Ossn)) { | |
| $Ossn = new stdClass; | |
| } | |
| include_once(dirname(dirname(__FILE__)) . '/libraries/ossn.lib.route.php'); | |
| if (!is_file(ossn_route()->configs . 'ossn.config.site.php') && !is_file(ossn_route()->configs . 'ossn.config.db.php')) { | |
| header("Location: installation"); | |
| exit; | |
| } | |
| include_once(ossn_route()->configs . 'libraries.php'); | |
| include_once(ossn_route()->configs . 'classes.php'); | |
| include_once(ossn_route()->configs . 'ossn.config.site.php'); | |
| include_once(ossn_route()->configs . 'ossn.config.db.php'); | |
| foreach ($Ossn->classes as $class) { | |
| if (!include_once(ossn_route()->classes . "Ossn{$class}.php")) { | |
| throw new exception('Cannot include all classes'); | |
| } | |
| } | |
| foreach ($Ossn->libraries as $lib) { | |
| if (!include_once(ossn_route()->libs . "ossn.lib.{$lib}.php")) { | |
| throw new exception('Cannot include all libraries'); | |
| } | |
| } | |
| ossn_trigger_callback('ossn', 'init'); | |
| //need to update user last_action | |
| // @note why its here? | |
| update_last_activity(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment