31
blackout
Re: TRUE Multisites hack.... at last!
  • 2005/1/31 20:38

  • blackout

  • Just popping in

  • Posts: 1

  • Since: 2005/1/31


Quote:

reynaldo wrote:

function prefix($tablename='')
{
    
$myCommonTables = array('avatar''avatar_user_link''online''priv_msgs''stories''topics''users');
    
$myPrefix '';
    
    if (
in_array($tablename,$myCommonTables))
    {
        
$myPrefix 'xoops';
    }
    else 
$myPrefix $this->prefix;


    if ( 
$tablename != '' 
    {
        return 
$myPrefix .'_'$tablename;
    } 
    else 
    {
        return 
$myPrefix;
    }
}



hi, do *all* the tables pass through this function? i mean also third part modules functions etc..
it could be great if i can unshare forum, downloads, galleries too

32
jorgebarrero
Re: TRUE Multisites hack.... at last!

It woul be nice to develop a way so that it was possible to install the same module several times in the same site and each one could have a separate set of tables.

Even better,

develop the ability to set a different theme to a particular module. So you could change info on the fly and may be it is not needed to make many copies of the same site.

33
fooups
Re: TRUE Multisites hack.... at last!
  • 2005/1/31 21:18

  • fooups

  • Just popping in

  • Posts: 82

  • Since: 2004/1/12


Hi,

Quote:

jorgebarrero wrote:
It woul be nice to develop a way so that it was possible to install the same module several times in the same site and each one could have a separate set of tables.


That's what we mean by "cloning" modules: changing names and module's prefix tables in order to install a module several times.

Quote:
develop the ability to set a different theme to a particular module. So you could change info on the fly and may be it is not needed to make many copies of the same site.


Take a look at this site for a demo. I don't know if the webmaster made a tutorial to explain how he did this (shame on me )

Happy Xoopsing

34
adrock
Re: TRUE Multisites hack.... at last!
  • 2005/2/28 23:39

  • adrock

  • Quite a regular

  • Posts: 291

  • Since: 2004/12/7


Does anyone that has the Multisite 'hack' working;
specifically seperate sites with seperate content sharing user tables, willing to post some instructions for those of us that are not very familiar with PHP?

I've tried all of the suggestions and only get errors and blank pages, and think that I am incorrectly editing the database.php file.

help! please....

Thanks!

35
adrock
Re: TRUE Multisites hack.... at last!
  • 2005/3/1 0:39

  • adrock

  • Quite a regular

  • Posts: 291

  • Since: 2004/12/7


Quote:

I've tried all of the suggestions and only get errors and blank pages, and think that I am incorrectly editing the database.php file.


reynaldos edits return this (for me):
Quote:

Parse error: parse error, unexpected T_CLASS, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/user/public_html/test1/class/database/database.php on line 134


Mikhails edits return this (for me):
Quote:

error.


...think my foreheads getting a bruise from bangin it.

36
adrock
Multisites hack help....
  • 2005/3/1 16:56

  • adrock

  • Quite a regular

  • Posts: 291

  • Since: 2004/12/7


Does anyone that has the Multisite 'hack' working;
specifically seperate sites with seperate content sharing user tables, willing to post some instructions for those of us that are not very familiar with PHP?

I've tried all of the suggestions and only get errors and blank pages, and think that I am incorrectly editing the database.php file.

help! please....

Thanks!

**bump**

37
mpowell
Re: Multisites hack help....
  • 2005/3/1 22:22

  • mpowell

  • Friend of XOOPS

  • Posts: 119

  • Since: 2004/2/10


I have been looking over this information and have some questions. But first let me explain my situation.

I have two sites on different domains. I am really wanting to share the database tables for certain modules. Does this hack work across different domains or just subdomains?

Thanks,
mpowell

38
adrock
Re: Multisites hack help....
  • 2005/3/4 4:05

  • adrock

  • Quite a regular

  • Posts: 291

  • Since: 2004/12/7


domain or host? I have been able to get XOOPS to share a database across domains, with seperate hosts, you'll just need to change the 'localhost' portion of the main file to point to the location of the database being used. It will make your site slow down a bit...and I've had some odd results...nothing horrible, but frustrating if you are a user of the site.

I'm trying to get http://www.site1.net to share users with http://www.site2.net
essentially different domains....
However, they are hosted on the same server, and are technically subdomains of the hosting account, with multiple domains parked on each subdomain folder.

If your not too opposed to starting over, or doing some database editing, this thread from Mith, lazybadger and Carnuke (Thank you gentlemen!) may be the way to go. It also addresses the issue of crossing domains/hosts when using two databases.
I have not tried it yet, but plan to over the next couple of days.

https://xoops.org/modules/newbb/viewtopic.php?topic_id=32570&forum=14&post_id=141954

FYI: up until this point, I have had to leave a small disclaimer added to the registration page informing my members that it will be another 24 hours before their user id's will work on the other domains. Once I set that in place, my life turned into database puzzle master...I come home everyday, suck the user tables I need to share out of the database, edit the prefix, and the insert them into the other sites tables. Needless to say, an alternative to this will make my day!

39
animas
Re: Multisites hack help....
  • 2005/5/1 13:28

  • animas

  • Quite a regular

  • Posts: 206

  • Since: 2005/1/30


Will the posted hacks work for Latest XOOPS 2.0.10?

Where is the code for mainfile.php of Reynaldo's Hack?

40
adrock
Re: Multisites hack help....
  • 2005/5/1 20:51

  • adrock

  • Quite a regular

  • Posts: 291

  • Since: 2004/12/7


Quote:


This thread from Mith, lazybadger and Carnuke (Thank you gentlemen!) is be the way to go.

https://xoops.org/modules/newbb/viewtopic.php?topic_id=32570&forum=14&post_id=141954



I never got reynaldos to work, or was able to get any support with it.

The above thread is what I am using, but the sites are hosted at the same location, and the sub-site is a sub-directory of the main site. Not exactly what I wanted, but working in the meantime.

Login

Who's Online

177 user(s) are online (127 user(s) are browsing Support Forums)


Members: 0


Guests: 177


more...

Donat-O-Meter

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

Latest GitHub Commits