Mobile app version of vmapp.org
Login or Join
Samaraweera270

: Unified data source for k2 installed Joomla websites I am responsible for a few web sites of my organization. I use Joomla! 2.5.9 for those web sites. They all are running at the same server.

@Samaraweera270

Posted in: #Cms #Joomla #Mysql

I am responsible for a few web sites of my organization.

I use Joomla! 2.5.9 for those web sites. They all are running at the same server.

I use K2 component for content managing.

I have a general website in which shows all the staff information at the 'Staff' page. Also some of those people and their contents are shown in another department's website. So, there are databases for each web site.

For example:

In the general website (let's say general.org), when I click on the 'Staff' menu item, page shows all of the people work at my organization. Also they work at different departments.

In another web site (eg: education.general.org) when I click on the 'Staff' menu item, it shows the people work at education department.

But for each web site, I have different user accounts which means a modification in one of them does not affect the other one. If the one of the education staff tries to change his profile picture on the education web site, he also has to do it on the general web site.

And sometimes one person might be working at two departments. Thus he has to edit three times of his data.

Is it possible to merge the records for all websites? In other words, I want everyone to insert/update their data on the general web site, and the other web sites will be updated automatically.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Samaraweera270

1 Comments

Sorted by latest first Latest Oldest Best

 

@Angela700

I think what you are trying to do is share users/profiles across the different sites without changing articles or anything else. If that is correct, I think you need to do something like this:

DROP TABLE xxxx2_session
DROP TABLE xxxx2_usergroups
DROP TABLE xxxx2_users
DROP TABLE xxxx2_user_notes
DROP TABLE xxxx2_user_profiles
DROP TABLE xxxx2_user_usergroup_map

CREATE VIEW xxxx2_users AS SELECT * FROM xxxx1.jos_users
CREATE VIEW xxxx2_session AS SELECT * FROM xxxx1.jos_session
CREATE VIEW xxxx2_usergroups AS SELECT * FROM xxxx1.jos_usergroups
CREATE VIEW xxxx2_user_notes AS SELECT * FROM xxxx1.jos_user_notes
CREATE VIEW xxxx2_user_profiles AS SELECT * FROM xxxx1.jos_profiles
CREATE VIEW xxxx2_user_usergroup_map AS SELECT * FROM xxxx1.jos_usergroup_map


Source

Please be aware that I have not tested this but in theory it should work. Be sure to make backups of everything before working on your site, especially when messing with DB tables.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme