46
monster
Re: TRUE Multisites hack.... at last!
  • 2005/11/29 13:01

  • monster

  • Just popping in

  • Posts: 58

  • Since: 2004/12/28



45
izzzy
Re: TRUE Multisites hack.... at last!
  • 2005/6/17 15:39

  • izzzy

  • Just popping in

  • Posts: 43

  • Since: 2004/5/27


Hi aharon!

We are carrying through tests with multisite to integrate some sectors of the XOOPS Brasil Community in the addresshttp://multisite.xoops.net.br

I am using hack of the Mithrandir.

Thanks,
Izzy

44
aharon
Re: TRUE Multisites hack.... at last!
  • 2005/6/15 19:48

  • aharon

  • Not too shy to talk

  • Posts: 172

  • Since: 2004/9/17


Yes.. I have seen this one - but it seems f a r more complicated than the solution in this thread...

Hummm... Maybe I should get on with it and see how to change things with version 2.2...

Best wishes!

Aharon

43
Mikhail
Re: TRUE Multisites hack.... at last!
  • 2005/6/15 19:02

  • Mikhail

  • Just can't stay away

  • Posts: 412

  • Since: 2003/1/19


yes, 'IS JUST AN EXPERIMENTAL HACK, NOT THE BEST WAY TO DO A XOOPS MULTISITE'. Look for another solutions from real developers, like Mithrandir.


And thanks for your comment about

42
m0nty
Re: TRUE Multisites hack.... at last!
  • 2005/6/15 18:56

  • m0nty

  • XOOPS is my life!

  • Posts: 3337

  • Since: 2003/10/24


if you do a search for multisites i'm pretty certain you'll find a 2.0.9.3 and a 2.0.10 version done by mithrandir..

41
aharon
Re: TRUE Multisites hack.... at last!
  • 2005/6/15 17:50

  • aharon

  • Not too shy to talk

  • Posts: 172

  • Since: 2004/9/17


Quote:

Mikhail Miguel wrote:
OBS:
IS JUST AN EXPERIMENTAL HACK,
IT IS NOT THE IDEAL WAY TO DO A "XOOPS MULTISITE".


database.php
function prefix($tablename='') {
if ( 
$tablename == '' ) {
return 
$this->prefix;
}
elseif ( 
$tablename == 'users' ) {
return 
'same_users';
}
elseif ( 
$tablename == 'groups_users_link' ) {
return 
'same_groups_users_link';
}
elseif ( 
$tablename == 'priv_msgs' ) {
return 
'same_priv_msgs';
}
elseif ( 
$tablename == 'session' ) {
return 
'same_session';
}
else {
return 
$this->prefix .'_'$tablename;
}
}




to use the same files with diferent sites/subdomains, just replace the mainfile.php for:
<?php
if (!(isset($subdominio))) {
$subdominio $HTTP_HOST;
$subdominio str_replace("www.","",$subdominio); 
$subdominio str_replace(".com","",$subdominio); 
$subdominio str_replace(".net","",$subdominio); 
$subdominio str_replace(".org","",$subdominio);


if (!(empty(
$subdominio))) {
include(
$subdominio."mainfile.php");
}
?>




This looks great and easy enough, but a meddling non-programmer like me, might have questions such as:

* Should
$subdominio str_replace("www.","",$subdominio);
be written as :
$subdominio str_replace("www.","",$THE_SUB_DOMAIN_NAME);

Otherwise, where do I tell XOOPS the name of the subdomain? (e.g. sub1.site.com, sub2.site.com, etc..)

* Where is database.php ?


Thanks!

Best wishes!

Aharon

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.

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?

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 www.site1.net to share users with 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!

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

Login

Who's Online

118 user(s) are online (87 user(s) are browsing Support Forums)


Members: 0


Guests: 118


more...

Donat-O-Meter

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

Latest GitHub Commits