Only main album displays when embedding site - sub albums broken. Original main.php site still works ok.
|
greggb
Joined: 2008-09-07
Posts: 10 |
Posted: Tue, 2009-10-13 19:52
|
|
Customised Carbon theme. Std main.php site still works ok but gallery2embeded version only displays main album - all others linked from there give 404. Using the Carbon theme and I have tweaked and customized a number of things using forum posts as my guide. All works well and now I am trying to embed the gallery into my site. Before performing the actual embedding process with my site, I am setting up the gallery in embedded mode to ensure functionality first and it appears I have broken something (and did note note what or where I made the change that broke it). When referencing the orignal site, it works ok: (still needs some work on the redesign but you get the idea) But trying to use the embedded site: The main album displays fine but any attempt to bring up a sub-album gives a 404 error. Not sure if this helps but the RESULTING URL when clicking one of the sub-albums in the standard (working) gallery is: I note that hovering over that album picture BEFORE clicking it shows: That happens to be the URL displayed when trying to click the same sub-album in the embedded gallery: http://www.sitename.com/gallery/gallery2Embedded.php?g2_itemId=193&g2_enterAlbum=1 I WAS using the URL Rewrite module but read about issues so I disabled and cleared cache (loacl browser and gallery maintenance). No change. I remember customising an element that allowed going direct to pictures instead of going through the intermediate album step and I have used the "local" folder process throughout the customisation of Gallery (before embedding). I read something about not using those when embedding so I copied those modified "local" files to the main carbon-templates folder. No change. What am I missing? Any help appreciated. I tried the searching the forums (which usually gets me what I'm looking for until this one). thank you, Gallery URL = http://www.sitename.com/gallery/main.php |
|

Posts: 6138
Not sure where the g2_enterAlbum is coming from.
your init should look like:
require_once ('embed.php'); // Path to Gallery's embed.php $ret = GalleryEmbed::init(array('g2Uri'=>'/gallery/', 'embedUri'=>'/gallery/gallery2embedded.php', 'fullInit'=>'false'));-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 10
Thanks for the reply.
The galler2embedded.php is as you have described (although I did use FQDM/gallery).
I think the g2_enterAlbum comes from the aforementioned customisation which does work in the std gallery but not when using the embedded entry to that same gallery.
Any other thoughts?
Posts: 6138
If you switch themes to matrix are the results the same?
Make sure you completely disable rewrite - rename gallery/.htacess to .htacess_old or similar.
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 10
Tried both. Cleared cache local and in Gallery. Same results.
G.
Posts: 6138
Ah! spotted it.
you named the script gallery2embedded.php not gallery2Embedded.php
the capitol E makes the difference.
cannot believe I did not spot it earlier.
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 6138
BTW you can name it whatever you want, just make the appropriate change in the GalleryEmbed::init()
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 10
Oh SH*T! - you are so right. It works like a charm now. Thank you!!! Knew it would be something stupid and "simple".
Now the 404 makes sense since it's saying it cannot find 'gallery2Embedded.php' - WTF? Now I know. I also now know why I was going crazy last night typing in the URL and it would not come up unless I litterally copied and pasted from the FTP file-name (with the capital "E" I guess. I've always thought everything web-related was best-practices to use lower-case and for the most part it was not case sensitive. I guess not. Glad it all fits with that as a fix so again, thanks for your keen eye. I'm getting so close to embedding this into the existing site that it was frustrating to think I'd broken it after all this careful customisation.
Thanks again.
Now to figure out how to put that php inside my existin html file :^
G.
Posts: 6138
php won't execute in html pages unless... repeating myself.
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2