61
draj
Re: Multisite HACK for 2.2.3 Final
  • 2006/5/15 6:42

  • draj

  • Quite a regular

  • Posts: 271

  • Since: 2005/6/23


Hello Chris and everyone!

Quote:

Mamba wrote:
Quote:

maddog_chris wrote:
Managed to get my problem sorted out, but ran into further problems with groups and permission.

Would you care to update Deepey's posting with detailed steps on how to make it work? This would be very useful.


@Chris
I am glad that you sorted out. This module becomes a nightmare when it does not work.

@Everyone
The combination of tables, which Chris mentions to change, should be decided to install individually. One has to decide and understand fully and correctly WHICH EXACTLY are the Set of tables to be shared.

For instance, in my earlier messages, I used module table to share. This did also work as I wanted to offer all the subsite the same set of modules without having to install again and again.

I had 70 subsites to generate, of which I did generate or duplicate or clone about 21 subsites with their related environment. Each subsite had about 20 groups, all having the same nature in all.

What a nightmare would it be to install and configure 20 groups 70 times? Many groups like SUbAdmin, Editor, etc has similar properties.

However, in my suggestion of configuraion for Chris, there is also a mistake. I am not sure if Chris did actually realise. This "could be" also a nightmare at a later date! Here is what has NOT been detected:

1.
I first did share table xoops_module. De-installation + other things was problematic and therefore I did not share later on. Then everything worked.

I did share xoops_block_instance, xoops_groups_users_link, xoops_groups_permission

2.
Groups shared but modules not. So the group permissions would be applied to the same modules numer/ID, even if the module functions are different!

In the xoops_groups_permission table, there are references to the following:

gperm_groupid (1)
gperm_modid (27)

Hence, if there is a module (27) given free with Admin Access (1), then it will be the same for all the subsites. Now, I DID NOT share the modules table. So if the modid (27) in subsite1 is Forum and subsite2 modid (27) is News, they all will have module Admin access!!!

Hence, one has to be very carefull and see which combination is correct!!!



62
draj
Re: Multisite HACK for 2.2.3 Final
  • 2006/5/12 8:02

  • draj

  • Quite a regular

  • Posts: 271

  • Since: 2005/6/23


Hallo Chris and everyone!

I have successfully installed multisite module and have configured two sites for Chris (maddog_chris), one mastersite and one subsite!

Following were problems and mistakes:

In my earlier post, I refered to the URI and see now, that I myself made a wrong reference, absent minded. It happened due to copy cut and paste URL. Here is the correct version:

URI should NOT have http:// in the field!

This is the way how I solved and successfully installed:

1.
define('XOOPS_RESCUE_URL', 'http://mastersite.com')
>>> refers to the apache conf as the main site.

2.
Enter in the preferences, custom cookies >> mastersite.com_session for all cookies references

Preferences > System > General Settings
Site name: mastersite.com
Use custom session: Yes
Name for user cookies: mastersite.com_user
Session name: mastersite.com_session
SSL Post variable name: mastersite.com_ssl (If ssl is yes!)

Install PM, User Profiles and site module.

3.
Logout fromhttp://mastersite.com and then loginhttp://mastersite.com again to capture correct cookies on your local computer.

4.
User Site Management from the modules.

Enter following in the Add site form:

Site Name: subsite1.com
Site URL:http://subsite1.com
Theme Path: themes
Templates Path: templates_c
Upload Path: uploads
Cache Path: cache
URI Pattern: subsite1.com
DB Prefix * subsite1
Shared Tables
>>>>>>>>>>>>>>>> block_instance
>>>>>>>>>>>>>>>> block_module_link
>>>>>>>>>>>>>>>> group_permissions
>>>>>>>>>>>>>>>> groups
>>>>>>>>>>>>>>>> groups_users_link
>>>>>>>>>>>>>>>> newblocks
>>>>>>>>>>>>>>>> priv_msgs
>>>>>>>>>>>>>>>> profile_category
>>>>>>>>>>>>>>>> profile_fieldcategory
>>>>>>>>>>>>>>>> tpl_file
>>>>>>>>>>>>>>>> tplset
>>>>>>>>>>>>>>>> tplsource
>>>>>>>>>>>>>>>> user_profile
>>>>>>>>>>>>>>>> user_profile_field
>>>>>>>>>>>>>>>> users
>>>>>>>>>>>>>>>> xoops_notifications

The above tables are marked blue during creation of subsites. Then click SUBMIT.

Thereafter click on the newly created subsite and make sure to have all the fields filled with the above parameters including all the marked tables same. Then do the following:

>> Click on the box
URI Pattern: subsite1.com to be set yes.

Write in the empty field of as
URI Pattern: www.subsite1.com

Then click SUBMIT. Then in the URI pattern both the URI pattern will appear as

subsite1.com
www.subsite1.com

By doing so, the multisite module FORCES to redirect the URL/URI to point to both the location.

4.
Logout and then login tohttp://subsite1.com get correct cookies on your local computer.

Change the following:
Preferences > System > General Settings the following:

Site name: subsite1.com
Use custom session: Yes
Name for user cookies: subsite1.com_user
Session name: subsite1.com_session
SSL Post variable name: subsite1.com.com_ssl (If ssl is yes!)

5.
Logout and then login tohttp://subsite1.com get correct cookies on your local computer.

6.
Begin installing modules on mastersite.com and subsite1.com.

Now you are done with the basic configuration of mastersite.com and subsite1.com.
------------------------------------------------
Notice during the process that the moment you start changing the title of the subsite, cookies, etc the XOOPS multisite module will show in the title tags those changes. You will be logged into mastersite while notlogged into the subsite1!
------------------------------------------------
If you want to install more sites, substitute subsite1.com to any other subsiteXXX.com and repeat the subsite creation process.
------------------------------------------------
Please note: I have shared the following:
>>>>>>>>>>>>>>>> tpl_file
>>>>>>>>>>>>>>>> tplset
>>>>>>>>>>>>>>>> tplsource

I do not know the impact of the above tables to be shared. Did not have time to play with it. However, I can imaging that during installation or de-installation process, the templates would be stored or removed from those tables. So what will happen with the modules that are shared or not shared and their respective templates.

Further, I have also shared blocks. I do not know what will happen if one does not share.

This question one must try and see... Well.
------------------------------------------------

If anyone has problems to install the module, let me know here. After having many nightmares and mistakes by myself, I have learned to detect mistakes. Hence it goes quickly for me to install those things.

Hope it helps to all others who wanna use this module.



63
draj
Re: Multisite HACK for 2.2.3 Final
  • 2006/5/9 15:36

  • draj

  • Quite a regular

  • Posts: 271

  • Since: 2005/6/23


Hallo Friends!

I am having problems with Chris. I am not able to convince him to read my messages or this thread, or even the title of this thread. After a series of messages as PM, he has asked me the following message. I am speechless!

Can someone answer the following question by Chris (maddog_chris):
Quote:

My mainsite has XOOPS version 2.2.4 and not 2.2.3 does that matter, if it does, let me know I will re-install 2.2.3



64
draj
Re: Multisite HACK for 2.2.3 Final
  • 2006/5/6 19:17

  • draj

  • Quite a regular

  • Posts: 271

  • Since: 2005/6/23


Hi!
Quote:

maddog_chris wrote:
I cannot login to Site2 using Site1 login details.
Can you explain how this mod works, as I cannot see where we have told site2 to use site1 login details, as all the work we have done has been on site1.

If you share User tables, you will have ONLY ONE SET of User tables that works and applies to both the sites. If you do not share, then you will have two set of them and each site will have different details of users.

If you share , then:

- If a user registers in site1, then he will be login from site2
- If he registered from site1, he will be able to call all the details of the account from the site2.

Try to understand this of sharing thing. Both the installation will use the same info from the DB.

Quote:

I would of expected to have to have altered something in site2.
At a later stage, if I install extra mods to either the mainsite or the subsite, will that make any difference.


No changes for site2.

All the modules will become specific to each site, mainsite or subsite, as the XOOPS will have each individual table for the mods THAT ARE NOT SHARED.

The biggest problem you may have in the de-installation of modules that are shared! Then you have a big trouble. DO NOT DE-INSTALL SHARED MODULES from subsite.

Quote:

Also just one last thing if when it's all working, if a new users signs up to site2, will they be able to login to site1, or do I need all users to signup to site1?


THEY WLL BE ABLE TO LOGIN TO SITE, because the table is the same, regardless of site1 or site2. Both the site have one and only one user table.

Signing up a users from any of the hundred of subsites, the user details will land only in one user table, as it is a shared one. If you side by side see in the MySQL DB after each creation of subsite, then you will notice that the shared tables have the prefix of the master site whereas the subsite have the prefix of shared sites. (I hope this observation is correct?)

Waiting for your PM.



65
draj
Re: Multisite HACK for 2.2.3 Final
  • 2006/5/6 9:10

  • draj

  • Quite a regular

  • Posts: 271

  • Since: 2005/6/23


Hi Chris!
Quote:

maddog_chris wrote:
And I could only login as normal using site2 login details.


Looks good. Now it should actually work and therefore I am confused!

Can you login into site2 with the same user details? Then it has worked, or? I did not seem to understand.

Is it possible to have an admin login of XOOPS access that I can have a look? Send me a PM the details of your website and I shall take it from there.

For this I need:

a. Installation of site1
b. site2 parked or pointing to site1
c. all modules uploaded in the XOOPS directory.
d. A copy of mainfile.php.txt
e. Admin Password for site1

More rights I have, earlier I may be able to get your work going. Actually it is a matter of minutes to get it going. You may also create extra subdomains and let me show you what and how to do it. May be it could be a good idea to install a demo somewhere and show everyone how to do it.

This discussions is for both of us taking more time and you do not come further.



66
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.



67
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!



68
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!!!



69
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!!!



70
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+!




TopTop
« 1 ... 4 5 6 (7) 8 9 10 ... 20 »



Login

Who's Online

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


Members: 0


Guests: 175


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