Jump to content

bolGallery displaying via TinyBox


duabreeye

Recommended Posts

I am using a bolGallery script to display images on my site (the script can be seen at the authors' site http://bolgallery.free.fr/). What I would want to use to display the popups is TinyBox (as seen on the author's testsite http://sandbox.leigeber.com/tinybox/)

 

I have a very vague knowledge of php, but I managed to located the part of the code which pops up a image in bolGallery script

 

// Bolgallery Javascript popup function
$bolGalleryPopup = "<!-- BolGallery Javascript popup window function -->
<SCRIPT type=\"text/javascript\">

function bolGalleryPopup(imageFile, width, height, title){

var html = '<title>' + title + ' - Click to close </title><body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 onclick=\"javascript:window.close()\"><img src=\"' + imageFile + '\" alt=\"Click to close\"></body>';
var popup = window.open(imageFile, '_blank', 'width=' + width+ ', height=' + height + ', status=no');
popup.document.write(html);
popup.focus();
}
</SCRIPT>\n\n";

// Display the thumbnail image and set a popup link to the big one
			$alt = str_replace("_", " ", substr($referenceImageName, 0, -4)); 
			$HTML .= "\t\t<TD align=\"center\">\n\t\t\t<A href=\"" . $currentImage . "\" onClick=\"bolGalleryPopup(this.href, " . $referenceImageWidth. ", " . $referenceImageHeight . ", '" . $alt . "'); return(false);\" target=\"_blank\">\n"; // target attribute to be tested
			$HTML .= "\t\t\t\t<IMG src=\"" . $thumbnail . "\" title=\"" . $alt . "\" border=0>\n";
			$HTML .= "\t\t\t</A>\n\t\t</TD>\n";

 

The two snippets above I want change so that they behave so:

<script type="text/javascript">
var content2 = "<img src='images/rhino.jpg' width='298' height='373' alt='' />";
T$('testclick2').onclick = function(){TINY.box.show(content2,0,0,0,1)}
</script>

 

I've attached an image, which perhaps will clear it up.

tinybol.jpg

Link to comment
https://forums.phpfreaks.com/topic/186455-bolgallery-displaying-via-tinybox/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.