1
wishcraft
Multisite 1.20 & XOOPS 2.3.4

Resized Image

Download Multisite for XOOPS 2.3.x, it allows for multiple site to be run from the one xoops, many XOOPS - One Code - Many Domain Bases. Download now

xoops2.3_multisite_1.2.zip (164 Kb).

With this module you are capable of managing multiple domains for your website there are many core hacks with this module but it makes managing your site dynamically and easily for your environment.

It is modelled off the System module, so you can easily expand it and make structural changes. There is a forum for this module should you wish to look at the hacks to get it up and running Forum on Multisite Module

To implement this module requires some core hacks, this is more replacement of or ammendments to include the multisite modules class library using the xoops_getmodulehandler function. Most of the function calls even criterias are the same.

What else is there?

phppp asked for the module multisite to be installable and keyed like the profile module in the core to enable a quick install path.

This is made from the pre-release trunk of 2.3.4 of XOOPS with the multisite module included in the core.. It is also available from the SVN..

Download Now: xoops_2.3.4_multisite.zip
Resized Image
www.ohloh.net/accounts/226400

Follow, Like & Read:-

twitter.com/RegaltyFamily
github.com/Chronolabs-Cooperative
facebook.com/DrAntonyRoberts

2
Mamba
Re: Multisite 1.20 & XOOPS 2.3.4
  • 2009/5/4 4:05

  • Mamba

  • Moderator

  • Posts: 11366

  • Since: 2004/4/23


Quote:
To implement this module requires some core hacks,

Are these required hacks exactly the same as listed here, or are there any changes to it?
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

3
wishcraft
Re: Multisite 1.20 & XOOPS 2.3.4

Hi mamba,

The XOOPS 2.3.4 RC beta release is with the main hacks implemented. From the first release it was easily shown that not all the crowd at XOOPS enjoys a bit of leet programming.. So I am going to and have made a version from the SVN trunk with the hacks implemented for anyone wanting to have a system of XOOPS with multisite implemented (that is the 2nd download in the news)..

I would also like to sincerely thank all the people and well wishes for my wedding it really makes a community feel special when it reaches back and offers thanks and praise as well as condolences
Resized Image
www.ohloh.net/accounts/226400

Follow, Like & Read:-

twitter.com/RegaltyFamily
github.com/Chronolabs-Cooperative
facebook.com/DrAntonyRoberts

4
Catzwolf
Re: Multisite 1.20 & XOOPS 2.3.4
  • 2009/5/7 3:48

  • Catzwolf

  • Home away from home

  • Posts: 1392

  • Since: 2007/9/30


Personally myself I believe that we should have made this core and not as a module. The issues that come with it being a module are just to much for many non programmers to implement as a hack.

5
noo-b
Re: Multisite 1.20 & XOOPS 2.3.4
  • 2009/5/7 5:06

  • noo-b

  • Just can't stay away

  • Posts: 456

  • Since: 2007/10/23


agree..
I Love Xoops

6
wishcraft
Re: Multisite 1.20 & XOOPS 2.3.4

It has to be modular to be included with the XOOPS distro, Needs to be turned on and off with conventions. I noticed there is alot of things missing in the core distro though while I was installing it into the turning the code with the modular way phppp asked for it to be..

For example:

The calls for items in the distro classes should be like so... having to add and isactive is a pain but they all need to be refactorised for clean code


for example:

in code like this /kernel/module.php..

/**
 * A Module
 *
 * @package kernel
 * @author Kazumi Ono <onokazu@xoops.org>
 * @copyright (c) 2000-2003 The XOOPS Project - www.xoops.org
 */
class XoopsModule extends XoopsObject
{
    
/**
     *
     * @var string
     */
    
var $modinfo;
    
/**
     *
     * @var string
     */
    
var $adminmenu;
    
    
/**
     * Constructor
     */
    
function XoopsModule()
    {
        
$this->XoopsObject();
        
$this->initVar('mid'XOBJ_DTYPE_INTnullfalse);
        
$this->initVar('name'XOBJ_DTYPE_TXTBOXnulltrue150);
        
$this->initVar('version'XOBJ_DTYPE_INT100false);
        
$this->initVar('last_update'XOBJ_DTYPE_INTnullfalse);
        
$this->initVar('weight'XOBJ_DTYPE_INT0false);
        
$this->initVar('isactive'XOBJ_DTYPE_INT1false);
        
$this->initVar('dirname'XOBJ_DTYPE_OTHERnulltrue);
        
$this->initVar('hasmain'XOBJ_DTYPE_INT0false);
        
$this->initVar('hasadmin'XOBJ_DTYPE_INT0false);
        
$this->initVar('hassearch'XOBJ_DTYPE_INT0false);
        
$this->initVar('hasconfig'XOBJ_DTYPE_INT0false);
        
$this->initVar('hascomments'XOBJ_DTYPE_INT0false);
        
// RMV-NOTIFY
        
$this->initVar('hasnotification'XOBJ_DTYPE_INT0false);
    }


Should have a claused function as well for the distro classes.

ie.. these all need to be added the ->initVar(... as call able functions..

ie.. This is an example of the first couple being added to the item class of modules for the handler..

#....
    
function isActive()
    {
        if (
$this->getVar('mid')>0)
            if (
$this->getVar('isactive'))
                return 
true;
            else
                return 
false;
        else
            return 
false;
    }

    function 
hasmain() {
        return 
$this->getVar('hasmain')
    }
# and so on...


Resized Image
www.ohloh.net/accounts/226400

Follow, Like & Read:-

twitter.com/RegaltyFamily
github.com/Chronolabs-Cooperative
facebook.com/DrAntonyRoberts

7
cgunther
Re: Multisite 1.20 & XOOPS 2.3.4
  • 2009/5/19 18:08

  • cgunther

  • Just popping in

  • Posts: 59

  • Since: 2005/3/27


@ WIshcraft,

I downloaded the 2.3.4 multisite XOOPS install for evaluation. I noticed that the Protector module is not included. Is it OK to install and run the Protector module, or will it cause problems with the multisite module and XOOPS version?

BTW - I REALLY dig where this is going and doors it opens!
"Your motherboard wears Army chips"

8
Mamba
Re: Multisite 1.20 & XOOPS 2.3.4
  • 2009/5/19 18:39

  • Mamba

  • Moderator

  • Posts: 11366

  • Since: 2004/4/23


No, on our test installation there are so far no problems with the Protector.
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

9
wishcraft
Re: Multisite 1.20 & XOOPS 2.3.4

Quote:

cgunther wrote:
@ WIshcraft,

I downloaded the 2.3.4 multisite XOOPS install for evaluation. I noticed that the Protector module is not included. Is it OK to install and run the Protector module, or will it cause problems with the multisite module and XOOPS version?

BTW - I REALLY dig where this is going and doors it opens!


Yeah just install the latest copy of protector and you should be right to go.. there are a couple of bugs in the library which need to be address, please replay config.php with the standard copy from /kernel/config.php and standard xoops.
Resized Image
www.ohloh.net/accounts/226400

Follow, Like & Read:-

twitter.com/RegaltyFamily
github.com/Chronolabs-Cooperative
facebook.com/DrAntonyRoberts

10
cgunther
Re: Multisite 1.20 & XOOPS 2.3.4
  • 2009/6/10 17:38

  • cgunther

  • Just popping in

  • Posts: 59

  • Since: 2005/3/27


...I have tried several times with all of the different versions since 1.17RC and I just can't get this to work.

Here are config's and problems:

My current installation is 2.3.4 multisite version with multisite module 1.20.

I have added the mainfile changes mentioned in the beginning of the thread on hack for 1.17RC multisite. I also changed the /kernel/config.php back to the original from XOOPS 2.3.3 as suggested by wishcraft earlier in this thread.

I have 3 domains pointed at the root directory of the install.

I am able to select and set the general preferences and module preferences for each of the domains using the preferences tab in the multisite module. I have set different site titles, slogans and default themes for each. However, The theme and startup module that are listed in the "Current Domain & Sub-domain Pool" under the Domains tab, does not match those that were set under the Preferences tab. Also, The Preferences link for each domain under "Current Domain & Sub-domain Pool" throws up a 403 "Forbidden - You don't have permission to access /modules/multisite/admin.php on this server."

When browsing the front end of the sites, the default preferences from the initial installation of XOOPS (before installing and configuring Multisite v1.20) takes over theme display on all three domains (also the theme shown in "Current Domain & Sub-domain Pool"). The URLS are correct in the browser's address bar but the theme on the screen for any of the domains is the default from the from the XOOPS installation.

I have been able to get distinct custom blocks to show in each domain by creating them with the blocks manager in the multisite module. One strange behavior here is that the block for the first domain had to be assigned to another, and then re-assigned back to the first one before it would display.

I am not able to assign module access to individual domains, they are either on or off for all of them.

This whole thing sounds like a preferences/permissions problem, but I just don't know enough about it to find out.

A "Multisite Module Configuration for Dummies" would be a huge contribution to the "Button Pushing" portion of XOOPS user community.

Here is install environment details:

XOOPS Version - XOOPS 2.3.4
PHP Version - 5.2.8
MySQL Version - 5.1.30
Server API Version - cgi-fcgi
OS Version - Linux

safe_mode - Off
register_globals - Off
magic_quotes_gpc - Off
allow_url_fopen - On
fsockopen - On
allow_call_time_pass_reference - On
post_max_size - 64M
max_input_time - 60
output_buffering -
max_execution_time - 30
memory_limit - 64M
file_uploads - On
upload_max_filesize - 64M

Here is mainfile sample:
if ( !defined("XOOPS_MAINFILE_INCLUDED") ) {
    
define("XOOPS_MAINFILE_INCLUDED"1);

    
// XOOPS Physical Paths

    // Physical path to the XOOPS documents (served) directory WITHOUT trailing slash
    
define'XOOPS_ROOT_PATH''/home/myaccount/public_html/testmultisite' );

    
// For forward compatibility
    // Physical path to the XOOPS library directory WITHOUT trailing slash
    
define'XOOPS_PATH''/home/myaccount/xoops_trust_path/testmultisite/xoops_lib' );
    
// Physical path to the XOOPS datafiles (writable) directory WITHOUT trailing slash
    
define'XOOPS_VAR_PATH''/home/myaccount/xoops_trust_path/testmultisite/xoops_data' );
    
// Alias of XOOPS_PATH, for compatibility, temporary solution
    
define("XOOPS_TRUST_PATH"XOOPS_PATH);

    
// XOOPS Protocol (URL)    start of addition for multisite
    
if (!empty($_SERVER['HTTPS']))
        if (
$_SERVER['HTTPS']=='on')
           
define('XOOPS_PROT''https://');
        else
           
define('XOOPS_PROT''http://');        
    else
        
define('XOOPS_PROT''http://');         //end of addition for multisite

    // XOOPS Virtual Path (URL)
    // Virtual path to your main XOOPS directory WITHOUT trailing slash
    // Example: define( 'XOOPS_URL', 'http://www.mytestdomain1.com' );
    // define( 'XOOPS_URL', 'http://www.mytestdomain1.com' ); removed to substitute next line for multisite
    
define'XOOPS_URL'''.strtolower(XOOPS_PROT.$_SERVER['HTTP_HOST'].'').'' );   //line added for multisite

    // Shall be handled later, don't forget!
    
define("XOOPS_CHECK_PATH"0);
    
// Protect against external scripts execution if safe mode is not enabled
    
if ( XOOPS_CHECK_PATH && !@ini_get("safe_mode") ) {
        if ( 
function_exists("debug_backtrace") ) {
            
$xoopsScriptPath debug_backtrace();
            if ( !
count($xoopsScriptPath) ) {
                 die(
"XOOPS path check: this file cannot be requested directly");
            }
            
$xoopsScriptPath $xoopsScriptPath[0]["file"];
        } else {
            
$xoopsScriptPath = isset($_SERVER["PATH_TRANSLATED"]) ? $_SERVER["PATH_TRANSLATED"] :  $_SERVER["SCRIPT_FILENAME"];
        }
        if ( 
DIRECTORY_SEPARATOR != "/" ) {
            
// IIS6 may double the  chars
            
$xoopsScriptPath str_replacestrpos$xoopsScriptPath"\\") ? "\\" DIRECTORY_SEPARATOR"/"$xoopsScriptPath);
        }
        if ( 
strcasecmpsubstr($xoopsScriptPath0strlen(XOOPS_ROOT_PATH)), str_replaceDIRECTORY_SEPARATOR"/"XOOPS_ROOT_PATH)) ) {
             exit(
"XOOPS path check: Script is not inside XOOPS_ROOT_PATH and cannot run.");
        }
    }

    
// Database
    // Choose the database to be used
    
define'XOOPS_DB_TYPE''mysql' );

    
// Set the database charset if applicable
    
if (defined("XOOPS_DB_CHARSET")) die();
    
define'XOOPS_DB_CHARSET''utf8' );

    
// Table Prefix
    // This prefix will be added to all new tables created to avoid name conflict in the database. If you are unsure, just use the default "xoops".
    
define'XOOPS_DB_PREFIX''prefix' );

    
// Database Hostname
    // Hostname of the database server. If you are unsure, "localhost" works in most cases.
    
define'XOOPS_DB_HOST''localhost' );

    
// Database Username
    // Your database user account on the host
    
define'XOOPS_DB_USER''myaccount_user' );

    
// Database Password
    // Password for your database user account
    
define'XOOPS_DB_PASS''myaccount_password' );

    
// Database Name
    // The name of database on the host. The installer will attempt to create the database if not exist
    
define'XOOPS_DB_NAME''myaccount_database' );

    
// Use persistent connection? (Yes=1 No=0)
    // Default is "Yes". Choose "Yes" if you are unsure.
    
define'XOOPS_DB_PCONNECT');

    
define'XOOPS_GROUP_ADMIN''1' );
    
define'XOOPS_GROUP_USERS''2' );
    
define'XOOPS_GROUP_ANONYMOUS''3' );

    
// Temporary solution for extra protector module. To be refactored
    // Set the following value as true if you want to enable protector module
    
$ENABLE_PROTECTOR true;

    if ( !empty(
$ENABLE_PROTECTOR) ) {
        @include 
XOOPS_TRUST_PATH '/modules/protector/include/precheck.inc.php';
    }
    if (!isset(
$xoopsOption["nocommon"]) && XOOPS_ROOT_PATH != "") {
        include 
XOOPS_ROOT_PATH."/include/common.php";
        include_once 
XOOPS_ROOT_PATH."/modules/multisite/post.load.php"//line added for multisite
    
}
    if ( !empty(
$ENABLE_PROTECTOR) ) {
        @include 
XOOPS_TRUST_PATH '/modules/protector/include/postcheck.inc.php';
    }
}


...interested in any advice, opinions or otherwise.

Thanks much.
"Your motherboard wears Army chips"

Login

Who's Online

203 user(s) are online (119 user(s) are browsing Support Forums)


Members: 0


Guests: 203


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits