51
draj
Re: Multisite HACK for 2.2.3 Final
  • 2006/4/12 4:55

  • draj

  • Quite a regular

  • Posts: 271

  • Since: 2005/6/23


@ Giba!

I am aware of this module. It is practically the same as the one by Jan.

One of the main difference is in the include/common.php and I used Jan's module as I could not decide what an impact it may have overall. It could be that those changes are explicit ones for the earlier version of xoops. If that was the case, it would not help the newer versions. There are very minor changes in one or two files but the rest of the files are the same.

After having several nightmares, I refrained from further investment of my time. So I do not know if it works for the 2.2.3 even though if it says it is for 2.0.13.2+!

52
scottlai
Re: Multisite HACK for 2.2.3 Final
  • 2006/4/12 5:31

  • scottlai

  • Just popping in

  • Posts: 9

  • Since: 2005/12/5


Hello, everyone!

First, I want to thank the author of Multisite HACK. Multisite is great and userful hack/module. And I use it to build a series sites.

In these days, I added "Duplicate" function into Site Administration module. You can duplicate a sub site easily through it. If you are interest in it, you can download it from http://liis.loton.cn/site.zip

NOTE: the zip package ONLY include Site Administrator module. You must have install Multisite Hack before using it. And the module verion is 1.12(just for distinguish original verion)

CAUTION: it is experimental! DO backup your data before you using it!

53
draj
Re: Multisite HACK for 2.2.3 Final
  • 2006/4/12 5:40

  • draj

  • Quite a regular

  • Posts: 271

  • Since: 2005/6/23


Hi!
Quote:

scottlai wrote:
In these days, I added "Duplicate" function into Site Administration module. You can duplicate a sub site easily through it.


Oh man! Why did you hide behind the bushes until now! I could have saved many hours of work. Hav'nt downloaded yet, but I am sure it would be useful. Great. Keep it up!!!

54
scottlai
Re: Multisite HACK for 2.2.3 Final
  • 2006/4/12 15:26

  • scottlai

  • Just popping in

  • Posts: 9

  • Since: 2005/12/5


I am a newbie of XOOPS. I have used XOOPS just for few months. I am not sure have enough ability to release something.
The hack just finished today and begin yesterday. When I hack the site administration module, I make a serious mistake so that all tables were delete by SA module. It is a bug: When you leave DB prefix blank, you can also add sub site successfully, but when you delete the sub site, you will find all tables are deleted! Becareful!

55
cgunther
Re: Multisite HACK for 2.2.3 Final
  • 2006/4/22 18:47

  • cgunther

  • Just popping in

  • Posts: 59

  • Since: 2005/3/27


Hi Folks,

My experiment with wildcard DNS did not work for the site module. It would work great for something like emmbedding a name or word into a url and still getting to a root site.

So now I am trying a different approach.

My goal is to setup subdomains for a marketing business that sets up subsite for its affiliates.

So the main site would look like:
http://www.mainsite.com/

and the subdomains or subsites would look like:
http://myname.mainsite.com/
http://yourname.mainsite.com/
http://hisname.mainsite.com/
http://hername.mainsite.com/

I want to share everthing on the main site (modules and content) except the users, they would like the subsites to have their own user table so any leads generated are not shared between affiliates.

1. Setting up the subdomain
When I add a subdomain in cpanel it creates a subdirectory in public_html with same name as the subdomain prefix. So the location for http://myname.mainsite.com/ is in a folder called myname or at http://www.mainsite.com/myname/

2. Setting up the redirect or alias
My hosting co. dose not allow access to the httpd.conf file so I am using the .htaccess file to redirect subdomains to the main domain. in each subdomain fold I have place a .htaccess file with the following redirect:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^myname.mainsite.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.myname.mainsite.com$
RewriteRule ^(.*)$ http://www.mainsite.com/$1 [R=301,L]

This is redirecting any requests for the subdomains to the maindomain and seems to work fine.

3. New installation of XOOPS 2.2.3 upgaded to 2.2.4, added tinyd module, smartpartner module and myalbum-p module.

4. mainfile modification
I changed the line in mainfile.php from

define('XOOPS_URL', 'http://www.mainsite.com');

to

define('XOOPS_RESCUE_URL', 'http://www.mainsite.com');

5. Setting up the site module
I installed the site module into the mainsite and added a second site with the add site link under the site management tab and entered the info like this:

Site name: myname.mainsite.com
Site URL: http://myname.mainsite.com/
Theme Path: themes
Templates Path: templates_c
Upload Path: uploads
URI Pattern: http://myname.mainsite.com

Shared tables: everything except
profile_category
profile_fieldcategory
user_profile
user_profile_field
users

HHHMMMM??

I guess I am missing something or missconfiguring, I still only get the http://www.mainsite.com installation even when I enter a subdomain for a url in the browser.

Any thoughts, directions or concepts I am missing?

If I can get it working I would be happy to provide a step by step documentation for this type of installation to this thread or to a site module FAQ.

Curt
"Your motherboard wears Army chips"

56
draj
Re: Multisite HACK for 2.2.3 Final
  • 2006/4/23 14:05

  • draj

  • Quite a regular

  • Posts: 271

  • Since: 2005/6/23


Hi!

Yes, you are missing something very important.

WHAT IS THE TITLE OF THIS THREAD?

You made a mistake in upgrading the XOOPS version to 2.2.4!

See above and compare the file common.php and you will find the difference.

Either port the changes of the multisite to a new version i.e. make a new one or downgrade the XOOPS to 2.2.3!

Hops this helps!!!

57
maddog_chris
Re: Multisite HACK for 2.2.3 Final

Hi

I have a XOOPS site installed at a site for example http://www.site1.co.uk, which works fine, I have installed another site at for example http://www.site2.co.uk, and have installed the multi site hack, so that site2 can use site1 login details.

I done the following:

1) Apply hacked files
2) Edited mainfile.php so XOOPS_URL is now called XOOPS_RESCUE_URL
3) Install "Site Administration" module
4) updated the site admin module to the following:


Sitename: site1
SiteAlias: http://www.site1.co.uk
URI Pattern: http://site1.co.uk
DB Prefix: abc1

I put the prefix of the other site that I want to share the user tables with.

And everything seemed to go okay, except it does not work.

Tables show up in the sql database with the prefix abc1. but they only contain data that is on site2.co.uk.

Is there anything else that I need to do in my control panel of my server.

Hope someone can help.

Regards

Chris

58
draj
Re: Multisite HACK for 2.2.3 Final
  • 2006/5/4 2:33

  • draj

  • Quite a regular

  • Posts: 271

  • Since: 2005/6/23


Hallo Chris!

I assume that you can see abc1 and abc2 tables in the DB.

What version of XOOPS and the multisite module you are using? There are two modules, for 2.0.13.2 and 2.2.3 xoops. With other versions of xoops, the multisite does not work. It can work if someone transport and modify codes to 2.2.4, for which I do not have any time.

You need to make sure, if the basics are correctly configured and that seems to be the case, that you DO NOT SHARE the tables which are responsible for the site2.

However, make sure to delete and re-install the site2 again and again whenever you want to change the configuration of shared or non-shared tables.

The tables you cannot share is anathor tricky point. They are related to blocks, modules, config, sessions, etc. The moment you achieve this, it SHALL work.

There is nothing you need to make in your cPanel, if the site2 resolves into a different domain "theoritically".

Some more tips:
1.
You need to have the following correctly written:
themes templates_c uploads cache

2.
The NON-SHARED tables I have are NOT clicked (looks white). They are as following:

block_instance
block_module_link
config
configcategory
configoption
modules
newblocks
sessions
sites

I also have other modules which I am not listing here as it may be irrelevant.

3.
After duplication / cloning / creating a new site, you IMMEDIATELY need to

A) Logout from the master site (in your case site1)

B) Login to the new site by typing the new URL (in your case site2)

C) Change the system preferences all info related to the sessions like Name für User-Cookies, Session-Name, etc related to the site.

4.
I am not sure but it may be helpful to delete the files in cache and template_c.

5.
Make sure that all the alphabets in the "Site URL" of the multisite "Site Management" written in SMALL letters during the creation of the new site or tables.

If you like nightmares, I strongly advise you NOT to follow step 3.C) & 5.!

After you have done the above, you will see that you can login into the site1 but the moment you type in the browser location site2, you will NOT be logged in. And that means celebration.

Your next step should be getting the XOOPS tables because the URI seems to be OK.

Let me know if this worked!!! Goodluck!

59
maddog_chris
Re: Multisite HACK for 2.2.3 Final

Hi, thanks for your quick reply, can I clarify a couple of points:


1) I have installed XOOPS 2.2.3, and the multi site hack is the one for 2.2.3

2) I want site2 to use site1's user tables, so site2 can login using site1's details. Do I need to have the multi site hack installed on site1 or site2, it is currently installed on site2 only.


Regards

Chris

60
draj
Re: Multisite HACK for 2.2.3 Final
  • 2006/5/5 0:23

  • draj

  • Quite a regular

  • Posts: 271

  • Since: 2005/6/23


Hi Chris!

It would be better to define and discuss with a better terminology as follows:

Mastersite:
Is the site where define('XOOPS_RESCUE_URL', 'http://mastersite.com') is made AND the multisite is installed

Subsite:
- Is a site which is parked on the master.com
- URI / URL is correctly configured in the multisite module
- Only some or many tables are available independently and are NOT shared.

Quote:

maddog_chris wrote:
1) I have installed XOOPS 2.2.3, and the multi site hack is the one for 2.2.3


I had a funny problem that made me furious. I downloaded a 2.2.3 from somewhere else and later did not know the difference which iinstallation was correct. One gave a nightmare problems. The other does a similar behaviour after de-installation of modules!

Quote:

2) I want site2 to use site1's user tables, so site2 can login using site1's details. Do I need to have the multi site hack installed on site1 or site2, it is currently installed on site2 only.


You have a conflict between the mainfile.php and mastersite, in your case site2! Install it on the first master site, in your case site1 ONLY!

Please read the first four steps mentioned in the first message by the programmer Jan Pederson of THIS thread and follow this EXACTLY how it is done.

The multisite will work IF AND ONLY IF the rescue URL matches with the XOOPS installation where all the configuration details and the site details are available in FULL or TOTAL!

See the following is happening:

mainfile.php
define('XOOPS_RESCUE_URL', 'http://site1.co.uk');
>>> XOOPS looks for config, config options, modules
>>> no module found of multisite on site1.
>>> Hence there is only one site and that is one and only site1
>>> Type site2 in the browser URL
>>> It will resolve into site1, because that is a command out of cPanel you configured!

For this, you need to have all user and profiles tables shared, like I did. It will however, not recognise the logged in users of site1, when visiting site2 though. This happens due to cookies and browser behaviour so you cannot do anything about it. All the user details will be shared and there would be no need to register again.

The site module (multisites) installed on the first and the master installation, in your case site1, will tell XOOPS about the differenciating URI patterns and connect to the database extracting or retrieving all the necessary details of shared or non-shared tables that are needed for site2.

This follows the logic that you need one and one module installed on the master website, in your case site1, to be installed and working properly.

However, logically speaking, by installing it on other subsites, it may also generate further subsites! In this case you need to install subsites generating out or the module over a subsite and make all the necessary configuration changes in that subsite-module. Howewer, I strongly recommend NOT to install multisite module on subsites.

Login

Who's Online

412 user(s) are online (346 user(s) are browsing Support Forums)


Members: 0


Guests: 412


more...

Donat-O-Meter

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

Latest GitHub Commits