does anybody know if its posible to get a single instance of wpg2 in wordpress to work with multiple gallery install's ( with diffrent gallery2 file paths/urls e.g. ..../pathone/gallery2first & ..../pathtwo/gallery2second)
You can't do it right now, and it wouldn't be a small code change to do it. All of the embed code (initialization, imageblock, rewrites, g2image) only know how to talk to one gallery.
EDIT This won't work. See next paragraph. /EDIT One thought would be to make a second copy of wpg2 in another /plugins/ folder, something like /plugins/wpg2_2/. You'd have to go through the code and carefully replace any path references to the wpg2 folder with wpg2_2. I don't think that is hardcoded very often, so it shouldn't be a huge task. DO NOT do a global search-and-replace, though. You'll need to go through using a find, look, replace method.
On second-thought, that won't work, because the options would be stored in one array for both plugins, with the last one to save the options winning. You'd also have to go through and rename all of the times that options are saved as a different array.
For the future, we could define a variable early in wpg2.php for the current directory name. It would default to wpg2/, but could be easily changed. This directory name would form the basis of the paths, the prefix in the options table, and the wpg2 tag so that each plugin would only need to change this one variable instead of going through all the code.
By having multiple plugins, you'd have the advantage of being able to have one embedded page per gallery. Also, the tags have to know which gallery they apply to.
But I don't see this happening soon, unless there are lots of users that want this. There are several other fish to fry first...
and I'll keep my finger's crossed, That ther's enough people who use the multi install for gallery2 and would like that sort of thing, to make sooner rather than later ;)
ozgreg
Joined: 2003-10-18
Posts: 1378
Posted: Mon, 2007-11-26 23:00
I be happy to open a feature request for this, but it be a lower priority and not be part of WPG2 3.1 due out early next year.
Posts: 492
You can't do it right now, and it wouldn't be a small code change to do it. All of the embed code (initialization, imageblock, rewrites, g2image) only know how to talk to one gallery.
EDIT This won't work. See next paragraph. /EDIT One thought would be to make a second copy of wpg2 in another /plugins/ folder, something like /plugins/wpg2_2/. You'd have to go through the code and carefully replace any path references to the wpg2 folder with wpg2_2. I don't think that is hardcoded very often, so it shouldn't be a huge task. DO NOT do a global search-and-replace, though. You'll need to go through using a find, look, replace method.
On second-thought, that won't work, because the options would be stored in one array for both plugins, with the last one to save the options winning. You'd also have to go through and rename all of the times that options are saved as a different array.
For the future, we could define a variable early in wpg2.php for the current directory name. It would default to wpg2/, but could be easily changed. This directory name would form the basis of the paths, the prefix in the options table, and the wpg2 tag so that each plugin would only need to change this one variable instead of going through all the code.
By having multiple plugins, you'd have the advantage of being able to have one embedded page per gallery. Also, the tags have to know which gallery they apply to.
But I don't see this happening soon, unless there are lots of users that want this. There are several other fish to fry first...
Kirk
____________________________________
G2Image Documentation, G2Image Demo Page, My Family Website
Posts: 9
thanks for the prompt reply,
and I'll keep my finger's crossed, That ther's enough people who use the multi install for gallery2 and would like that sort of thing, to make sooner rather than later ;)
Posts: 1378
I be happy to open a feature request for this, but it be a lower priority and not be part of WPG2 3.1 due out early next year.
____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo