1 picture database, 2 sites with different layouts ?
psygarden
Joined: 2003-03-25
Posts: 128 |
Posted: Mon, 2003-04-14 15:39 |
my question: is it possible to run one database of images on 2 sites, with a different color panel ? so i have one site up and running, but would like to include this gallery in another site, hosted at another server, with different color pallette (background colors etc). is this at all possible and if so, how would i approach this? thanks for your comments/suggestions! keep up the good work! ------ |
|
Posts: 3474
If the two sites are on the same server, or the other site is mounted on the first site's file hierarchy somehow (this can be done, albeit with security concerns), then the answer is yes. If the servers are completely separate, then the answer is "essentially no".
What do I mean by "essentially no"?
Gallery needs to be able to write to its own files in the albums directory. Meaning: each site needs write permission, otherwise things like adding/editing pictures, updating click counters, saving of user comments couldn't happen. Now, you *could* copy your albums directory to the second server, and remove all the photos, saving just the ".dat" database files. You'd point your second gallery's photos to the other website's address in the configuration, so the photos would all load from one server, but each server would be able to "write" to its local copy of the database.
The big problem now is that you can't add photos to one without having to update all the ".dat" files in the other. Conversely, changes made to the other server wouldn't be reflected in both places, so things could get very messy very quickly. If you were to forego things like click counts and user comments, and were consistent about syncing the two sites after making any changes, then this might work for you.
Gallery isn't set up to "talk" to another gallery across the web. If you have oodles of time on your hands, you could probably set this sort of thing up, but I don't think it's a very realistic goal.
-Beckett (
)
Posts: 128
they are on different servers for now, maybe we could change this in the future... (if we really have to)
a work around that comes to mind is that i simply run the 2nd gallery on the same server and present in in a frame on the second site ? i think this should work ?
any tips on how i could go about the realisation of this?
Posts: 3474
Hmm. Sounds promising. :roll: Although maybe not the perfect solution.
Let us know what you end up deciding on! This question pops up from time to time... so we'd like to know what people decide on doing.
-Beckett (
)
Posts: 128
it would be out of the question for a read-only version of the gallery with no login/upload functionality ? or does it also need write acces for other purposes ? (supposedly running on the same machine as the full acces database, with a manually edited stylesheet)
ofcourse... it would be a lot of me to ask to have this coded... but you never know there are coders out there with simular interests
Posts: 3474
psygarden, next time start a new post if you're on a different topic. :smile:
As for read-only versions:
It's about halfway-coded. It started in 1.3.4-cvs-b6 by an effort from Dr. Tilman Bubeck. Joan McGalliard has done the other half of the coding, and her changes are not integrated yet, but are available in this patch:
<!-- BBCode Start --><A HREF="http://sourceforge.net/tracker/index.php?func=detail&aid=704888&group_id=7130&atid=307130" TARGET="_blank">Offline Browsing</A><!-- BBCode End -->
Dr. Bubeck's idea is to detect if the browser is wget, which can be used to grab websites. The downloaded site is then "read-only" and all in HTML, with no dynamically generated content. Joan in her patch has added support for another program httrack.
Write access is needed for things such as adding comments, increasing click counters, and changing anything in the gallery. It sounds to me that you might just want to remove the [login] links. That makes it "read-only" to everybody except for yourself. But let's keep this thread on-topic, and post to a different thread to continue this conversation.
-Beckett (
)
Posts: 128
instead of solving the problem we worked around it, we are currently merging all sites, and moving it to a bigger server for our conveniance. we don't have any php skills so solving even the slightest configuration error ends up in a night's work :p
anyway, it's all running on one server so the problem no longer exists