Users Sharing or Synchronisation between multiple sites

This forum is for general questions about extensions for Joomla! version 1.5.x.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
tboheeren
Joomla! Apprentice
Joomla! Apprentice
Posts: 42
Joined: Fri Aug 07, 2009 10:27 am
Location: Belgium

Users Sharing or Synchronisation between multiple sites

Postby tboheeren » Wed Dec 30, 2009 10:56 am

Hey all,

For a year now I'm searching for a component that ables multiple joomla sites to share or sync their users and user info. I also want to use Community Builder on all joomla installations.
A few months ago N Gavini started on creating such a feature but so far it has not yet been ported to 1.5 (from 1.6) and I think the project is rather dead or having a big break.

Has anyone got another way of doing this?
The example situation is as follows: 3 joomla sites, all using Community builder. When a user gets added to 1 site, it also gets added to the 2 other sites. When a user updates the profile, it automatically gets updated to the 2 other sites. Single sign on is not required. Its just the user sharing/sync feature that is the most important.

Hope someone has a suggestion.

Kind regards,

Thibaut

User avatar
imanickam
Joomla! Master
Joomla! Master
Posts: 25938
Joined: Wed Aug 13, 2008 2:57 am
Location: Chennai, India

Re: Users Sharing or Synchronisation between multiple sites

Postby imanickam » Wed Dec 30, 2009 10:38 pm

Probably you should check extensions such as Jms Multisite - http://extensions.joomla.org/extensions/core-enhancements/multiple-sites/5550. Be informed that this is a commercial extension.
- Ilagnayeru (MIG) Manickam | இளஞாயிறு மாணிக்கம்
http://www.eegan.org - helping the poor and underprivileged
educate. empower. enrich.
Support the poor and underprivileged

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 23254
Joined: Mon Oct 27, 2008 9:27 pm
Location: Akershus, Norway

Re: Users Sharing or Synchronisation between multiple sites

Postby Per Yngve Berg » Thu Dec 31, 2009 12:33 pm

Review Jfusion.

tboheeren
Joomla! Apprentice
Joomla! Apprentice
Posts: 42
Joined: Fri Aug 07, 2009 10:27 am
Location: Belgium

Re: Users Sharing or Synchronisation between multiple sites

Postby tboheeren » Tue Jan 12, 2010 6:59 pm

Hey all,

I checked Jfusion but such a feature will be included in their next version and they dont have a release date yet. Anybody else has experience with JMS or has another solution?

Kind regards

User avatar
beanluc
Joomla! Guru
Joomla! Guru
Posts: 922
Joined: Wed Mar 04, 2009 9:50 am
Location: Silicon Valley, CA, USA

Re: Users Sharing or Synchronisation between multiple sites

Postby beanluc » Tue Jan 12, 2010 8:20 pm

tboheeren wrote:such a feature will be included in their next version and they dont have a release date yet


"Such feature", meaning, the feature which JFusion calls "dual login"?

Where, logging in at one J! site yields active session on other J! site(s)?

As described here?
http://www.jfusion.org/index.php/forums ... 650#p27566

If that's what you are talking about, then, the situation appears to be this:
Only one of the J! sites can provide the dual login. The other J! sites can be logged-in-to, FROM that one, but none of the other sites can provide login TO any other.

("Dual" login seems to be a mis-nomer, in cases where your sites number more than 2. The feature clearly is intended for an arbitrarily great number of sites.)

The JFusion 2 release apparently will permit all sites to provide dual-login into the other J! sites. But, as you noted, the current 1.2 version only lets you configure one J! site which provides dual-login into other J! sites.

So, as long as persons on any of the sites use the login on the site which does provide dual login, instead of logging-in directly at one of the non-dual-login sites, then you will achieve "single sign on" at all sites.

However, there do appear to be a few options for making this use-case work today.

I intend to experiment with both of the following:
(A) simply configuring the login links on each site so that they each point to the proper dual-enabled site's login form. Hopefully using an existing "login redirector" extension should complete the round-trip so logged-in users wind up back on the site where they started. If this all succeeds, then the users should be able to move among all the sites without logging in again, because they logged in on the dual-enabled one in the first place. I believe this can be set up in a way which is transparent to the user.
(B) using an "include" type of extension (specifically: "Include Component" or "Component As Content"), to include the dual-enabled site's login form right on the other sites' pages. If this works, then the users will get the dual-enabled login session without actually leaving the site they're on, and again, because they would have logged in at the dual-enabled site, they should be able to move among all the sites without logging in again.

...and I'll be glad to report back here about my experiences.
If successful, it will be a model for how to achieve multi-site single-sign-on using today's JFusion 1.2, without waiting for the JFusion 2 enhancement.

tboheeren
Joomla! Apprentice
Joomla! Apprentice
Posts: 42
Joined: Fri Aug 07, 2009 10:27 am
Location: Belgium

Re: Users Sharing or Synchronisation between multiple sites

Postby tboheeren » Tue Jan 12, 2010 8:42 pm

Dual login is nice but the actual feature that I was looking for is the user info & profile synchronisation between different j! sites with community builder.
Thank you for you reply and I'm looking forward to your experiment.

mariusvr
Joomla! Guru
Joomla! Guru
Posts: 554
Joined: Wed May 31, 2006 11:34 am

Re: Users Sharing or Synchronisation between multiple sites

Postby mariusvr » Wed Jan 13, 2010 12:05 pm

Its pretty easy to do this actually using the same multisite trick from naveen's GSoC project. You need to have mysql 5+ installed, delete the jos_user***** and jos_cb*** tables and create "views" to the central jos and cb tables. That way all joomla install use the same user table and cb tables. You just need to be careful with any existing joomla articles, as different sites could have different usernames associated with the userid.

Thanks, Marius
JFusion is a revolutionary new universal user integration tool for Joomla. Visit http://www.jfusion.org for more details.

tboheeren
Joomla! Apprentice
Joomla! Apprentice
Posts: 42
Joined: Fri Aug 07, 2009 10:27 am
Location: Belgium

Re: Users Sharing or Synchronisation between multiple sites

Postby tboheeren » Wed Jan 13, 2010 12:26 pm

Is the 'views' solution possible with J! 1.5? Because Naveen's project was going to get ported from 1.6 to 1.5 but I think they encountered too many problems.
Nonetheless and unfortunately, my mysql knowledge is far from advanced enough to do this I'm afraid.
Thank you for your answer though!

Kind regards,

mariusvr
Joomla! Guru
Joomla! Guru
Posts: 554
Joined: Wed May 31, 2006 11:34 am

Re: Users Sharing or Synchronisation between multiple sites

Postby mariusvr » Wed Jan 13, 2010 1:41 pm

Creating views is pretty easy (does not matter that its joomla 1.5)

CREATE VIEW jos_users AS SELECT * FROM database_name.jos_users

Views mean that all different joomla databases share the same tables (you will need to do this for all tables you need to share and for all the different databases). If you can't do this yourself you can hire a programmer.

Thanks, Marius
JFusion is a revolutionary new universal user integration tool for Joomla. Visit http://www.jfusion.org for more details.

birnik
Joomla! Intern
Joomla! Intern
Posts: 50
Joined: Sun Jul 12, 2009 4:59 pm

Re: Users Sharing or Synchronisation between multiple sites

Postby birnik » Mon Jan 25, 2010 6:21 pm

The views solution works for anything except for one - the sessions appear to not be synchronized.
Birnik

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 23254
Joined: Mon Oct 27, 2008 9:27 pm
Location: Akershus, Norway

Re: Users Sharing or Synchronisation between multiple sites

Postby Per Yngve Berg » Mon Jan 25, 2010 8:51 pm

Have you set $secret in configuration.php to the same value for all instances of Joomla?

birnik
Joomla! Intern
Joomla! Intern
Posts: 50
Joined: Sun Jul 12, 2009 4:59 pm

Re: Users Sharing or Synchronisation between multiple sites

Postby birnik » Mon Jan 25, 2010 8:56 pm

Per Yngve Berg wrote:Have you set $secret in configuration.php to the same value for all instances of Joomla?

Nope. But after I did, it worked like a charm - thank you very much :)
Birnik

birnik
Joomla! Intern
Joomla! Intern
Posts: 50
Joined: Sun Jul 12, 2009 4:59 pm

Re: Users Sharing or Synchronisation between multiple sites

Postby birnik » Tue Jan 26, 2010 6:15 pm

tboheeren asked me, how I done it. I can't send personal messages yet, therefore I reply here. Hope he will read it.

As I managed to make two sites work with common user base, I decided to share how it should be done step by step.

What is the solution?
  • Allows two or more Joomla! sites to have one and the same user base and sessions.
  • It could be used for other stuff (i.e. banners, sections etc.) however this is not subject of this guide. We will review only users and sessions.

What the solution is not?
  • It is not a bridge, a component, module, plugin or something like this. This is a solution on database level.
  • If you want to share components, articles etc. it is much more complicated, however not impossible. But this is not something we will review here.
  • It is not recommended to use this solution for two already existing sites, as at least one of them will either crash, or you will at least lose its user base.
  • The users in the two (or more) sites will have one and the same access rights (i.e. super admin in one will be super admin in the others as well and so on, you cannot set different rights for the different sites).

Requirements:
  • MySQL 5
  • PHP 5
  • Joomla! 1.5
  • The sites should share one and the same database server and the database user should have access rights to all databases in use.

BEFORE DOING ANYTHING TO YOUR EXISTING WEB SITES, MAKE A BACKUP, AS YOU MAY LOSE DATA.

Step by step:
  • Install Joomla! on localhost/site1 (or domain.com - doesn't matter) with database name site1.
  • Install second Joomla! on localhost/site2 (or any domain) with database name site2 - it is important that the database user for both sites is one and the same.
  • Open the configuration.php files of both installations and copy the secret value ($secret = 'somesymbolshere';) from the configuration of site1 to the configuration to site2. So both installations should have one and the same secret key in their configuration. If you want to add even more sites, the other sites should also have the same key for secret.
  • Open phpMyAdmin of the database of site2 and execute one by one (each row is one execution) the following:

Code: Select all

DROP TABLE `jos_users`     
DROP TABLE `jos_session`
DROP TABLE `jos_stats_agents`
DROP TABLE `jos_core_acl_aro`
DROP TABLE `jos_core_acl_aro_groups`
DROP TABLE `jos_core_acl_aro_map`
DROP TABLE `jos_core_acl_sections`
DROP TABLE `jos_core_acl_groups_aro_map`


Now run the following SQL queries in the same database (if necessary replace site1 with the corresponding database name used by site1)

Code: Select all

CREATE VIEW jos_users AS SELECT * FROM site1.jos_users
CREATE VIEW jos_session AS SELECT * FROM site1.jos_session
CREATE VIEW jos_stats_agents AS SELECT * FROM site1.jos_stats_agents
CREATE VIEW jos_core_acl_aro AS SELECT * FROM site1.jos_core_acl_aro
CREATE VIEW jos_core_acl_aro_groups AS SELECT * FROM site1.jos_core_acl_aro_groups
CREATE VIEW jos_core_acl_aro_map AS SELECT * FROM site1.jos_core_acl_aro_map
CREATE VIEW jos_core_acl_aro_sections AS SELECT * FROM site1.jos_core_acl_aro_sections
CREATE VIEW jos_core_acl_groups_aro_map AS SELECT * FROM site1.jos_core_acl_groups_aro_map


And that is all. Both sites will now have one and the same users and sessions. Adding more sites is easy, just follow the instructions here for site2 database and configuration file.
If you have existing site and you want the new one you are setting up to have all of the users of the old one, you can do it, by just imaging that your old site is site1 in this example and follow the instructions post installation.

If you have two existing sites - THIS IS NOT THE RIGHT SOLUTION FOR YOU.

Updating Joomla?
As for versions 1.5 - there is no problem. Upgrade both of your installations without any worries.
As for version 1.6 - it is hard to say yet, as it is not stable enough.

Hope you find it useful. If you have any questions, ask in that thread.
Birnik

tboheeren
Joomla! Apprentice
Joomla! Apprentice
Posts: 42
Joined: Fri Aug 07, 2009 10:27 am
Location: Belgium

Re: Users Sharing or Synchronisation between multiple sites

Postby tboheeren » Wed Jan 27, 2010 8:59 am

Very correct and clear guide Birnik,

A job well done!
I can't wait to try it out myself.

one question: I read some time ago that the users are not only saved in the jos_users table and that other information from other tables is also vital, could this be true?

two question: If I would use CommunityBuilder, should I just add the CB tables to your existing list?

Kind regards,

Thibaut

birnik
Joomla! Intern
Joomla! Intern
Posts: 50
Joined: Sun Jul 12, 2009 4:59 pm

Re: Users Sharing or Synchronisation between multiple sites

Postby birnik » Wed Jan 27, 2010 2:23 pm

Thibaut,
Very probably yes - however keep in mind that synchronization of galleries, pictures etc., which are used in CB, may require you to create sym directories (something like the shortcuts in windows - but not exactly).
Birnik

tboheeren
Joomla! Apprentice
Joomla! Apprentice
Posts: 42
Joined: Fri Aug 07, 2009 10:27 am
Location: Belgium

Re: Users Sharing or Synchronisation between multiple sites

Postby tboheeren » Wed Jan 27, 2010 2:58 pm

The picture or avatar sharing from CB is not important for me.
Just the metadata from the user itself.
Thanks again! (this should be stickied to avoid php/mysql noobs like myself ;-))

birnik
Joomla! Intern
Joomla! Intern
Posts: 50
Joined: Sun Jul 12, 2009 4:59 pm

Re: Users Sharing or Synchronisation between multiple sites

Postby birnik » Thu Jan 28, 2010 9:22 am

Maybe someone could publish it in his/her blog?!?

Anyone interested?
Birnik

tboheeren
Joomla! Apprentice
Joomla! Apprentice
Posts: 42
Joined: Fri Aug 07, 2009 10:27 am
Location: Belgium

Re: Users Sharing or Synchronisation between multiple sites

Postby tboheeren » Thu Jan 28, 2010 10:27 am

I'm planning to create a blog but it is still far from ready. However, this would be a great first post...
Ill stay in touch if something is online.

grts

tboheeren
Joomla! Apprentice
Joomla! Apprentice
Posts: 42
Joined: Fri Aug 07, 2009 10:27 am
Location: Belgium

Re: Users Sharing or Synchronisation between multiple sites

Postby tboheeren » Tue Feb 02, 2010 4:26 pm

Hey birnik,

I'm trying out your solution today!
If both sites uses the same database, can i just remove "site1." before every table?
so i.e. :
CREATE VIEW jos2_users AS SELECT * FROM jos_users

mariusvr
Joomla! Guru
Joomla! Guru
Posts: 554
Joined: Wed May 31, 2006 11:34 am

Re: Users Sharing or Synchronisation between multiple sites

Postby mariusvr » Wed Feb 03, 2010 12:42 am

tboheeren wrote:Hey birnik,

I'm trying out your solution today!
If both sites uses the same database, can i just remove "site1." before every table?
so i.e. :
CREATE VIEW jos2_users AS SELECT * FROM jos_users

yes :)
JFusion is a revolutionary new universal user integration tool for Joomla. Visit http://www.jfusion.org for more details.

zombla
Joomla! Apprentice
Joomla! Apprentice
Posts: 31
Joined: Sat Dec 22, 2007 10:09 am

Re: Users Sharing or Synchronisation between multiple sites

Postby zombla » Thu Feb 04, 2010 1:27 pm

birnik wrote:tboheeren asked me, how I done it. I can't send personal messages yet, therefore I reply here. Hope he will read it.

As I managed to make two sites work with common user base, I decided to share how it should be done step by step.

What is the solution?
  • Allows two or more Joomla! sites to have one and the same user base and sessions.
  • It could be used for other stuff (i.e. banners, sections etc.) however this is not subject of this guide. We will review only users and sessions.

What the solution is not?
  • It is not a bridge, a component, module, plugin or something like this. This is a solution on database level.
  • If you want to share components, articles etc. it is much more complicated, however not impossible. But this is not something we will review here.
  • It is not recommended to use this solution for two already existing sites, as at least one of them will either crash, or you will at least lose its user base.
  • The users in the two (or more) sites will have one and the same access rights (i.e. super admin in one will be super admin in the others as well and so on, you cannot set different rights for the different sites).

Requirements:
  • MySQL 5
  • PHP 5
  • Joomla! 1.5
  • The sites should share one and the same database server and the database user should have access rights to all databases in use.

BEFORE DOING ANYTHING TO YOUR EXISTING WEB SITES, MAKE A BACKUP, AS YOU MAY LOSE DATA.

Step by step:
  • Install Joomla! on localhost/site1 (or domain.com - doesn't matter) with database name site1.
  • Install second Joomla! on localhost/site2 (or any domain) with database name site2 - it is important that the database user for both sites is one and the same.
  • Open the configuration.php files of both installations and copy the secret value ($secret = 'somesymbolshere';) from the configuration of site1 to the configuration to site2. So both installations should have one and the same secret key in their configuration. If you want to add even more sites, the other sites should also have the same key for secret.
  • Open phpMyAdmin of the database of site2 and execute one by one (each row is one execution) the following:

Code: Select all

DROP TABLE `jos_users`     
DROP TABLE `jos_session`
DROP TABLE `jos_stats_agents`
DROP TABLE `jos_core_acl_aro`
DROP TABLE `jos_core_acl_aro_groups`
DROP TABLE `jos_core_acl_aro_map`
DROP TABLE `jos_core_acl_sections`
DROP TABLE `jos_core_acl_groups_aro_map`


Now run the following SQL queries in the same database (if necessary replace site1 with the corresponding database name used by site1)

Code: Select all

CREATE VIEW jos_users AS SELECT * FROM site1.jos_users
CREATE VIEW jos_session AS SELECT * FROM site1.jos_session
CREATE VIEW jos_stats_agents AS SELECT * FROM site1.jos_stats_agents
CREATE VIEW jos_core_acl_aro AS SELECT * FROM site1.jos_core_acl_aro
CREATE VIEW jos_core_acl_aro_groups AS SELECT * FROM site1.jos_core_acl_aro_groups
CREATE VIEW jos_core_acl_aro_map AS SELECT * FROM site1.jos_core_acl_aro_map
CREATE VIEW jos_core_acl_aro_sections AS SELECT * FROM site1.jos_core_acl_aro_sections
CREATE VIEW jos_core_acl_groups_aro_map AS SELECT * FROM site1.jos_core_acl_groups_aro_map


And that is all. Both sites will now have one and the same users and sessions. Adding more sites is easy, just follow the instructions here for site2 database and configuration file.
If you have existing site and you want the new one you are setting up to have all of the users of the old one, you can do it, by just imaging that your old site is site1 in this example and follow the instructions post installation.

If you have two existing sites - THIS IS NOT THE RIGHT SOLUTION FOR YOU.

Updating Joomla?
As for versions 1.5 - there is no problem. Upgrade both of your installations without any worries.
As for version 1.6 - it is hard to say yet, as it is not stable enough.

Hope you find it useful. If you have any questions, ask in that thread.

Thank you very much

tboheeren
Joomla! Apprentice
Joomla! Apprentice
Posts: 42
Joined: Fri Aug 07, 2009 10:27 am
Location: Belgium

Re: Users Sharing or Synchronisation between multiple sites

Postby tboheeren » Thu Feb 04, 2010 8:24 pm

Hey birnik (and the all the rest ;))

So I did the following today:

Code: Select all

DROP TABLE `lvn_users`
DROP TABLE `lvn_session`
DROP TABLE `lvn_stats_agents`
DROP TABLE `lvn_core_acl_aro`
DROP TABLE `lvn_core_acl_aro_groups`
DROP TABLE `lvn_core_acl_aro_map`
DROP TABLE `lvn_core_acl_aro_sections`
DROP TABLE `lvn_core_acl_groups_aro_map`
DROP TABLE `lvn_comprofiler`
DROP TABLE `lvn_comprofiler_fields`
DROP TABLE `lvn_comprofiler_field_values`
DROP TABLE `lvn_comprofiler_members`
DROP TABLE `lvn_comprofiler_sessions`
DROP TABLE `lvn_comprofiler_userreports`


CREATE VIEW lvn_users AS SELECT * FROM dbk_users
CREATE VIEW lvn_session AS SELECT * FROM dbk_session
CREATE VIEW lvn_stats_agents AS SELECT * FROM dbk_stats_agents
CREATE VIEW lvn_core_acl_aro AS SELECT * FROM dbk_core_acl_aro
CREATE VIEW lvn_core_acl_aro_groups AS SELECT * FROM dbk_core_acl_aro_groups
CREATE VIEW lvn_core_acl_aro_map AS SELECT * FROM dbk_core_acl_aro_map
CREATE VIEW lvn_core_acl_aro_sections AS SELECT * FROM dbk_core_acl_aro_sections
CREATE VIEW lvn_core_acl_groups_aro_map AS SELECT * FROM dbk_core_acl_groups_aro_map
CREATE VIEW lvn_comprofiler AS SELECT * FROM dbk_comprofiler
CREATE VIEW lvn_comprofiler_fields  AS SELECT * FROM dbk_comprofiler_fields
CREATE VIEW lvn_comprofiler_field_values AS SELECT * FROM dbk_comprofiler_field_values
CREATE VIEW lvn_comprofiler_members AS SELECT * FROM dbk_comprofiler_members
CREATE VIEW lvn_comprofiler_sessions AS SELECT * FROM dbk_comprofiler_sessions
CREATE VIEW lvn_comprofiler_userreports AS SELECT * FROM dbk_comprofiler_userreports


Everything seems to work fine...except the avatar.
What I expected was that the avatar was just unique per site and was not shared. (now I think about it ofc this was not gonna happen because avatar is a field in com_profiler wich was also relinked)
But now If I try to replace the avatar on some site...the avatar does not work.
Do any of you have a suggestions of some sorts? I don't need to share the avatar over the sites but just showing it , is enough. So any workaround will do fine.
Hope anybody has an idea!
(An idea but don't know if that is possible: enable the 'view' for the whole comprofiler table but not for the 'avatar' field...)

Kind regards,

Tbo

birnik
Joomla! Intern
Joomla! Intern
Posts: 50
Joined: Sun Jul 12, 2009 4:59 pm

Re: Users Sharing or Synchronisation between multiple sites

Postby birnik » Fri Feb 05, 2010 7:24 am

No, view replicates whole tables only.
Birnik

tboheeren
Joomla! Apprentice
Joomla! Apprentice
Posts: 42
Joined: Fri Aug 07, 2009 10:27 am
Location: Belgium

Re: Users Sharing or Synchronisation between multiple sites

Postby tboheeren » Fri Feb 05, 2010 9:00 am

I don't know if there are a lot of CB experts here but I tested the following:
When a user uploads an avatar it is saved at /sitename/components/images/comprofiler/ in the filesystem. In the database it is just the name of the file that consist out of an ID_hash. (ie 62_455fr345tyh.jpg)
So my theory is that if you would upload the same file on the 2 websites it would work (because the file is then at /site1/components/images/comprofiler and at /site2/components/images/comprofiler)
This is not the case however. Im afraid that it has something to do with the hashname that changes everytime the file is uploaded.
Is there somebody who can give me some insights and/or a possible solution for this problem?

Thanks in advance.

birnik
Joomla! Intern
Joomla! Intern
Posts: 50
Joined: Sun Jul 12, 2009 4:59 pm

Re: Users Sharing or Synchronisation between multiple sites

Postby birnik » Fri Feb 05, 2010 11:05 am

You may create symbolic link in Linux (basically creating it in site2/components/images/comprofiler/ and telling that the files are physically in /site1/components/images/comprofiler/) - this should work.
Birnik

Zappu
Joomla! Apprentice
Joomla! Apprentice
Posts: 22
Joined: Fri Sep 22, 2006 7:58 am
Contact:

Re: Users Sharing or Synchronisation between multiple sites

Postby Zappu » Wed Feb 10, 2010 11:23 am

This was just to easy to get it into my mind by myself :D
Great tutorial how to share users within different Joomla Installations.
Zappu
http://www.mtw-office.de - Joomla Media Design with Photo and Video

tboheeren
Joomla! Apprentice
Joomla! Apprentice
Posts: 42
Joined: Fri Aug 07, 2009 10:27 am
Location: Belgium

Re: Users Sharing or Synchronisation between multiple sites

Postby tboheeren » Wed Feb 10, 2010 12:56 pm

This week I looked in to the avatar problem.
If you go to your comprofiler folder and open comprofiler.php, locate uniqid
Delete this function.
So

Code: Select all

uniqid($row->id."_")
becomes

Code: Select all

$row->id."_"


Now the filename of the avatar is ID.jpg and not ID_somecrazyhash.jpg. (54.jpg instead of 54_445fttg2gfg9.jpg)

This way a user can upload a different avatar for each site and still share all other profile information.

However:

IT WORKS: when a user uses the 'change image' function in his/hers profile.
IT DOES NOT WORK: when a user uploads the image with the 'change profile' function.

I will continue to look for a complete solution. If there are php guru's around, feel free to help me out ;-)

EDIT: did some more tests and on all of my websites I adapted the code. However when I try to upload an image on the second site, it still puts in the hash...



greets
thibaut

tboheeren
Joomla! Apprentice
Joomla! Apprentice
Posts: 42
Joined: Fri Aug 07, 2009 10:27 am
Location: Belgium

Re: Users Sharing or Synchronisation between multiple sites

Postby tboheeren » Thu Feb 11, 2010 3:21 pm

Ok I changed the code also in the cbcore.php file but after that it refuses to upload the picture. I guess changing CB files is not really an option so I am back to the symbolic link solution.

Question: Will an alias on the server work just as fine as a symlink?

grts

tboheeren
Joomla! Apprentice
Joomla! Apprentice
Posts: 42
Joined: Fri Aug 07, 2009 10:27 am
Location: Belgium

Re: Users Sharing or Synchronisation between multiple sites

Postby tboheeren » Mon Feb 15, 2010 6:10 pm

Hey all (once again),

Iv been talking to my hosting a bit about symlinks. Unfortunately that is not possible on my hosting but the guy asked me about my goal and I explained him everything. He thinks it should be easy with a mod rewrite rule in the htaccess.

EDIT: I tried this :
RewriteRule ^leuven/images/comprofiler/(.*)$ http://localhost/diepenbeek/images/comprofiler/$1 [R=301,L]

Now the first is redirected to the second but the actual upload is still in the first website...:-(

Has anybody got experience with this?

Kind regards,

Thibaut

User avatar
beanluc
Joomla! Guru
Joomla! Guru
Posts: 922
Joined: Wed Mar 04, 2009 9:50 am
Location: Silicon Valley, CA, USA

Re: Users Sharing between multiple sites - Jms2Win works

Postby beanluc » Thu Feb 25, 2010 8:04 pm

The Joomla MultiSites extension was mentioned near the beginning.

I mention it again here (a little "BUMP") in case persons find this thread and are overwhelmed at the database hackery described above.

The good news is that the MultiSites extension does this for you. I've been using it and it's great. The sharing of users, as well as CommunityBuilder, JomSocial, and Kunena user profiles, is all built in to it already.

Now, I will say, I've had to resort to hackery of my own, because I've integrated sites which were previously separate, and which were each already full of data which I wanted to preserve.

JMS works best when starting a new site where you want integration/user sharing with an old, existing site.

But in my experience it's possible to integrate multiple existing sites too (three, in my case, with JomSocial and Kunena sharing).


Return to “Extensions for Joomla! 1.5”

Who is online

Users browsing this forum: No registered users and 10 guests