Three websites accessing the same gallery

Hi,
I am wondering if it is something possible ?
To have three separate websites (on the same server) that they both share the same zenphoto album ?
My gallery has more than 2,000 images, I do not find it practical (especially during updates) to duplicate the same gallery into three websites.
Any clue?
Thanks

Comments

  • acrylian Administrator, Developer
    Bascially you would have to pick one of these choices:
    http://www.zenphoto.org/news/integration-with-existing-sites-and-other-cms

    However it cannot be intergrated into three sites making it look like it is part of them. The Zenphoto install is always separate with its own urls anyway.

    The ugly way we don't even list for various reasons would be to use an iframe.
  • What if a created from the basic theme, three different versions according to each of my site in the main gallery.
    Is there a way when accessing the gallery, I could indicate what will be the theme ?
    That would be great, but not sure if it is possible!

    BTW: the link « CMS plugin Zenpage » in the page you indicated, return a 404 not found.
    Thanks
  • acrylian Administrator, Developer
    Thanks for the note, apparently a very old outdated link escaped us. This is the right url: http://www.zenphoto.org/news/zenpage-a-cms-plugin-for-zenphoto

    It should generally be possible to set the theme via the object model using the gallery object:
    http://www.zenphoto.org/documentation/classes/Gallery.html#methodsetCurrentTheme

    More info about the object model:
    http://www.zenphoto.org/news/zenphotos-object-model-framework

    You would have to check somewhere from which site you are coming from and then set another theme. There might be issues for example if you try to use the static_html_cache plugin but that does naturally not work with frequent "theme switching".
  • thanks.
    I looked at all links you gave me, but it exceeds my knowledge :-)
    I am good in learning by example, do you know if there is a demo somewhere ? If not, that's ok. thanks again!
  • acrylian Administrator, Developer
    I fear there is no concret example. The closest is probably the themeswitcher plugin but even that you need to adapt. Easiest would be to try to pass a site identifyier to the Zenphoto site and then switch the theme based on that. But this would indeed be rather advanced theming already.
  • For the last week, I have been working with themeswitcher.
    I finally was able to do exactly what I wanted. Now my three websites are using the same gallery by using themeswitcher but each with the look of its respective site.
    Many thanks for your advice.
  • acrylian Administrator, Developer
    Good to hear. Did you adapt the plugin for your usage? Maybe you can release the adaption in case other users may need the same. Some info how to do that best we have listed here:
    http://www.zenphoto.org/news/general-contributor-guidelines#providing-themes-and-plugins
  • I did not modify the themeswitcher script.
    As my gallery serves only to show MY images, I activated the script and leave it private.
    This way the script runs, but nothing shows up in the gallery.
    I edited scripts of only three files ... album.php, image.php and index.php
    The codes to run zenphoto is the same for both themes.
    I am using the basic theme as a template for the gallery, but I created a css (gallery.css that I inserted <link rel="stylesheet" right after the basic css file) to customize and overwrite some values of the basic/styles/light.css
    I edited files in my websites to point to its proper theme by adding [?themeSwitcher=site1] at the end of all links.
    As I am using Google AdSense and Analytics, it is important to use the google code of the main site IN ALL THEMES.
    Because when you are accessing the gallery, in fact, you are leaving the original site.
    For sitemaps, I am using xml-sitemaps.com to point to my main site and the /gallery/ folder.
    For the other websites, I only create sitemap for the site, as there are no more /gallery/ in the site folder.
    Everything looks great!
  • acrylian Administrator, Developer
    Ah, okay. Great you worked it out for your purpose!
Sign In or Register to comment.