forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 bridging => Topic started by: kvs.net on February 28, 2011, 10:21:23 am

Title: How to use 1 database for 2 Coppermine instances?
Post by: kvs.net on February 28, 2011, 10:21:23 am
Hello!

I have 2 instance of Coppermine 1.5.8 on the different sites (both sites are on one physical server). One of galleries (not integrated) have populated database and still work correctly, another gallery instance was integrated to Joomla 1.5.22 and have empty database.
Is it possible to use  populated data base for both gallery instances (integrated and not integrated)?
And what can I do for it?

Thank you in advance,
Viktor.
Title: Re: How to use 1 database for 2 Coppermine instances?
Post by: Αndré on February 28, 2011, 04:05:31 pm
I'm currently not sure what you try to accomplish. You can use one database for two or more galleries, if you use another database prefix during the installation. But from your description I guess that you want to use the same categories, albums and pictures for two galleries (one unbridged, one bridged with Joomla)?
Title: Re: How to use 1 database for 2 Coppermine instances?
Post by: kvs.net on March 02, 2011, 01:54:10 pm
Yes, you are absolutely right. I want to use the same categories, albums and pictures for two galleries (one unbridged, one bridged with Joomla).
Is it possible?
Title: Re: How to use 1 database for 2 Coppermine instances?
Post by: Αndré on March 02, 2011, 02:02:49 pm
That's not possible by default, nor makes sense imo. Why do you want to have 2 galleries with absolutely the same content, but different users?
Title: Re: How to use 1 database for 2 Coppermine instances?
Post by: kvs.net on March 02, 2011, 04:04:17 pm
I have use joomla 1.xx site and there are link on the working Coppermine gallery.
Now I have created a new site on joomla 1.5.22 and I need to integrate into this new site working Coppermine gallery.
How can I do it?
Title: Re: How to use 1 database for 2 Coppermine instances?
Post by: Αndré on March 02, 2011, 04:28:31 pm
Is this a new question? Please have a look at the bridging docs (http://documentation.coppermine-gallery.net/en/bridging.htm#integrating_steps_start) if you don't know how bridging works.
Title: Re: How to use 1 database for 2 Coppermine instances?
Post by: kvs.net on March 02, 2011, 04:40:06 pm
No, this is not a new question. This is my task - to make 1 working Coppermine gallery on the both sites (one bridged and one unbridged).
Can you help me?
Title: Re: How to use 1 database for 2 Coppermine instances?
Post by: Αndré on March 02, 2011, 04:47:58 pm
Please post links to both websites/galleries. Please also have a look at the table in that section of the docs (http://documentation.coppermine-gallery.net/en/bridging.htm#integrating_cookie_start).
Title: Re: How to use 1 database for 2 Coppermine instances?
Post by: kvs.net on March 03, 2011, 09:51:07 am
This is a link on the joomla 1.xx website: http://www.veloclub.ru. Here you can see item of the menu "Фото галерея" (it is a link on the working unbridged instance of "Coppermine gallery" - working version).

This one: http://www.veloclub.ru/cms - the link on the developed website (joomla 1.5.22). Here you can see the similar item of the menu "Фото галерея" (it is a link on the bridged instance of "Coppermine gallery"). It is a test version of "Coppermine gallery" and all pictures you can see here now is not important for me.

I have a task to make visible here on the developed website working version of "Coppermine gallery" like bridged (as looks test version of "Coppermine gallery").
Title: Re: How to use 1 database for 2 Coppermine instances?
Post by: Αndré on March 03, 2011, 11:10:55 am
Just for clarification. Bridging means, that Coppermine doesn't have its own users or groups, but use them from the bridged application (Joomla in your case). The visual integration is a nice side effect of the Joomla plugin by mehdi. When you now try to use the same database for both galleries, you'll get inconsistencies and overlaps of the users from both systems. Do you want to run both galleries at the same time or do you plan to move your whole site from Joomla 1.xx to Joomla 1.5.22?

If you want to run both galleries simultaneously and want to use the same categories, albums and pictures I suggest to use 2 databases (or at least 2 different table prefixes) and sync those tables from time to time. If you allow your users to upload files you'll have to check a lot of stuff so you don't get inconsistencies.

Short: if you as admin are the only person who can upload files and create albums, it may be possible to sync your galleries. If not, it's a quite difficult task imo.
Title: Re: How to use 1 database for 2 Coppermine instances?
Post by: kvs.net on March 03, 2011, 05:20:00 pm
In the future I have plan to disable website on joomla 1.xx and use only joomla 1.5.22 based website with bridged gallery.
Now I have executed migration of content and users database with "com_migrator". And I need any solution at this period of transition from joomla 1.xx website to joomla 1.5.22  based website.

Probably you are right and I can use 2 databases (or 2 different table prefixes). It will be very well if you can explain to me how I can make it.
Title: Re: How to use 1 database for 2 Coppermine instances?
Post by: Αndré on March 03, 2011, 06:25:14 pm
Sorry, but this is a too individual request (which has actually nothing to do with Coppermine) we cannot support here.
Title: Re: How to use 1 database for 2 Coppermine instances?
Post by: phill104 on March 03, 2011, 07:30:11 pm
I agree and it is quite a complex task you are trying to achieve.

The hardest bit will be importing your user database from coppermine into Joomla. If you only have an admin user in coppermine then it will not be too hard but if you have many users then you really have your work cutout. I managed to achieve it a few years back using one od the aformentioned Mehdi's toos but it really is something I would not want to do again nor can remember how to do.
Title: Re: How to use 1 database for 2 Coppermine instances?
Post by: kvs.net on March 03, 2011, 09:33:24 pm
Well. Is it possible to add contents of a database of operating gallery in a database integrated (test version) gallery, that is to add with its information on categories, albums, photos?
Title: Re: How to use 1 database for 2 Coppermine instances?
Post by: Αndré on March 03, 2011, 09:37:46 pm
As MySQL creates for each table a separate file you could try to use symlinks for that files. I haven't tested that, but it may work.
Title: Re: How to use 1 database for 2 Coppermine instances?
Post by: kvs.net on March 04, 2011, 09:18:02 am
Sorry, but I do not know what is it "symlinks". Could you please explain to me.
Title: Re: How to use 1 database for 2 Coppermine instances?
Post by: Αndré on March 04, 2011, 10:53:36 am
http://lmgtfy.com/?q=symlink
Title: Re: How to use 1 database for 2 Coppermine instances?
Post by: phill104 on March 04, 2011, 02:36:09 pm
You could try the quickmerge.php file available from here - http://www.mehdiplugins.com/oldmisc/cpgjoom.htm

That may or may not work and you may end up with users tied up with the wrong users images. Then it would be a matter of swapping user ID's around until they are all correct.

It is going to be a complex task and if the above does not work then you are probably going to have to hire someon to do the work for you.
Title: Re: How to use 1 database for 2 Coppermine instances?
Post by: Αndré on March 04, 2011, 04:13:31 pm
What Phill describes differs from what I understand you try to accomplish. I thought you want to run two galleries with different users, but the same content simultaneously?
Title: Re: How to use 1 database for 2 Coppermine instances?
Post by: phill104 on March 04, 2011, 11:32:40 pm
What I understand it to be is he eventually wants a bridged copy of his install with his Joomla 1.5.22 site and to be able to just see that same gallery in an unbridged mode from his Joomla 1.0.x site but as he has an existing gallery not bridged with anything that is where I think his problem will be. Maybe I am wrong in this assumption.
Title: Re: How to use 1 database for 2 Coppermine instances?
Post by: kvs.net on March 16, 2011, 12:42:43 pm
Thanks you for your help, gentlemen! I shall try to execute your recommendations.