Topic: Add Lightbox to image upload mod
Download Lightbox2 and unpack to folder lbox. Go to /lbox/ and copy (not cut) folder /images/ and paste to PUN_ROOT.
Now if you have installed image_upload_mod:
Open header.php
Find:
echo '<link rel="stylesheet" type="text/css" href="style/imports/image_upload.css" />'."\n";
After add:
echo '<script type="text/javascript" src="lbox/js/prototype.js"></script>'."\n";
echo '<script type="text/javascript" src="lbox/js/scriptaculous.js?load=effects"></script>'."\n";
echo '<script type="text/javascript" src="lbox/js/lightbox.js"></script>'."\n";
echo '<link rel="stylesheet" href="lbox/css/lightbox.css" type="text/css" media="screen" />'."\n";
Open image_upload.php (located in /includes/image_upload)
Find:
if (!$edit) $output[] = "\t\t\t\t\t\t\t\t\t<a href='postgallery.php?".
"pid=$pid&filename=$url_name'>";
Replace with:
$source = $pid.'/';
if (!$edit) $output[] = "\t\t\t\t\t\t\t\t\t<a href='uploads/".$source.
"$url_name' rel='lightbox[roadtrip]'>";
But i have only one problem. If i upload some image with space in filename Lightbox don't work (space become +) anyone know where i can change -> to space become % ?
Sorry about my bad English