block-random.php with pop-up image

szac

Joined: 2003-07-08
Posts: 26
Posted: Tue, 2003-08-05 05:28

Hello, is it possible to have block-random.php link to just a pop-up of the sized image? I tried like hell to get it working with the info in this thread but to no avail.

this function would be nice for people who have Gallery iFrame'd into the existing layout of their site (I use mambo CMS for which there is no known integration of Gallery) and could have Random Block just pop-up the large version of the thumbnail.

thx for your smarts

 
szac

Joined: 2003-07-08
Posts: 26
Posted: Thu, 2003-09-25 06:28

*bump* Anybody have an idea?

 
J-Mann

Joined: 2003-03-21
Posts: 90
Posted: Sat, 2003-09-27 03:31

Can't you just find the line that has the href and add target="_blank"?

Even better is something like this:

				$photo = $gallery->album->getPhoto($i);
				$image = $photo->image;
				$albumURL = $gallery->album->getAlbumDirURL("full") . "/";
				$imageFile = $image->name . "." . $image->type;
				$imageURL = $albumURL . $imageFile;

and then your href of the random photo should be either:

echo "<a href=" . $imageURL . "target='_blank'>";

or

<a href="<?=$picDir?> target='_blank' ">

I'm not 100% sure about the syntax of the links, but it should work.

The topmost code in this thread simply defines variables that will give you the actual URL of the image, not the thumbnail, and not the URL with the inclusion of phpNuke... just the true, raw, URL to the image. If it doesn't work with $i, try using $index.

Hope this helps,

J-

www.perfectcell.org

 
SonicStang

Joined: 2004-01-18
Posts: 3
Posted: Sun, 2004-01-18 22:01

What about a "Random-Image from Gallery"-Module/Hack?

I am running Mambo 4.5 right now, but a simple hack to integrate it into plain html would suffice.

Anybody?