Hey Guys,
I am trying to use the code that Gallery2 offers in the image block section of the admin so i can display the latest photos added to my site directly on my main website. The problem im having is when somebody clicks on an image in the custom image block on my main website, it transfers that user 'directly'to the image in my gallery2 installation directory -
however i use the Joomla Gallery Bridge, how do i get the image block to transfer users to the image they click on, but through the bridge, NOT straight to the installation directory. - if you understand me?
Basically when a user clicks an image, i want that image to display, but via the bridge, not the main /gallery2/ directory
Posts: 7934
just replace the url with your embedded url
so for mine this is the gallery url:
<?php @readfile('http://www.flashyourweb.com/gallery2/main.php?g2_view=imageblock.External&g2_blocks=randomImage&g2_show=title'); ?>and this is the embedded:
<?php @readfile('http://www.flashyourweb.com/media/index.php?g2_view=imageblock.External&g2_blocks=randomImage&g2_show=title'); ?>or you can try my mediaBlock which is used in the same way.
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 56
Ahhh thanks a lot for that.
I just been checking out your media block, that is a seriously cool piece of kit. So far, i have been manually creating a table in each post i want to add images too, then adding an image to each cell in the table.
I always knew there 'must' be a better way to do it, and you just given it to me. thanks so much!!!
Andy
Posts: 56
How exactly do you implement the solution sir? I just downloaded it and its a php file, what do i need to do with that if you dont mind me asking. is there an installation guide anywhere?
Posts: 7934
[img]http://www.flashyourweb.com/gallery2/main.php?g2_view=core.DownloadItem&g2_itemId=37502[/img]
The embedUri is the url we mentioed above, and the g2Uri is gallery's true url. Full urls are ok too.
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 56
Fantastic. Very easy to use, i like that.
Thank you - such a great 'plugin'!!
Posts: 56
slight problem.
This is the code im trying to use, but the thumbnails link to a blank page. any idea what im doing wrong.
this is the code: <?php @readfile('http://www.mileycyrus-online.co.uk/gallery2/mediaBlock.php?g2_itemId=3880&mode=dynamic&g2_view=dynamicalbum.RandomAlbum&useThumb=1&column=4');?>
This is my line 28 area...
Secondly, ive included that "<?php @readfile('http://www.mileycyrus-online.co.uk/gallery2/mediaBlock.php?g2_itemId=3880&mode=dynamic&g2_view=dynamicalbum.RandomAlbum&useThumb=1&column=4');?>" into one of my posts html, and it doesnt show up. what am i doing wrong?
the url is http://www.mileycyrus-online.co.uk/miley-cyrus-videos/learn-hoedown-throwdown-dance-moves.html
Posts: 7934
the embedUri is the url to your embedded gallery, not the whole imageBlock url. http://www.mileycyrus-online.co.uk/g.html
and the g2Uri is http://www.mileycyrus-online.co.uk/gallery2/
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 56
Ah perfect. That sorted out the link problem - thank you!
Any idea with regards to the photos not showing up in a joomla post as per my above comment please?
Also id like to donate if you have the option anywhere. please pm me.
Posts: 7934
Looks like your joomla/wordpress is filtering out the <?php tags(or more precisely not allowing it to execute). Which means the imageBlock would not work either.
mediaBlock looks to be functioning correctly:
http://www.mileycyrus-online.co.uk/gallery2/mediaBlock.php?g2_itemId=3880&mode=dynamic&g2_view=dynamicalbum.RandomAlbum&useThumb=1&column=4
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 56
Yeah i tried adding the same url directly to the browser and its defo functioning.
Wondering how i work out why its filtering my php tags now. ill try changing my editor, see if it could be an editor related setting or whatever.
Posts: 7934
Yeah, I'd ask over at wordpress/joomla forums, they may have alternate tags like {php} or something.
I've been working on a javascript/ajax version using jQuery
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 56
Ive just did a quick search and it seems joomla by default reformats php code into html code, it doesnt interperat it as php apparantely, you need a plugin which will allow you to insert php into articles, so just downloading a few at the moment, will see whats best, and hopefully that will fix the problem.
THanks again for your help and advice - can i make a donation to you/your company?
Posts: 56
YESSSSSSSSSSSSSSSSSSSS. IT WORKS





Sorry for the slight over-reaction, but im well chuffed with the result. thanks so much for this
Just incase anybody has problems inserting php directly into articles in future, you need the "Sourcerer" plugin for joomla. http://www.nonumber.nl/sourcerer
Worked a treat
Posts: 7934
There is a donate button on the bottom of the mediaBlock page, or you can simply donate to Gallery
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 7934
Oh, and there is also a minislideshow that is a handy imageblock replacement.
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2