View Full Version : Addon Help: Secret Image Addon
kriepl
02-11-2008, 08:54 PM
Can someone help me and explain why the image border/page is not adjusting when the secret image is being shown.
Example here: PALS (http://gatheringofpixels.com/index.php?showimage=8)
thanks.
kevin
austriaka
02-12-2008, 07:17 AM
because the secret image's size is different from the size of the main image
kriepl
02-12-2008, 02:35 PM
yes i get that.
but when i was trying out the horizon template the border/page adjusted with the secret image.
now using the delicious template, it does not.
austriaka
02-12-2008, 03:50 PM
Just a guess: in horizon the border is done by styling the image tag itself and in delicious the image is within a div in size of the image which is styled
kriepl
02-12-2008, 04:06 PM
yes, looking at both image_template.html files from both templates...i see there is a difference in how it's presented.
Horizon:
<div id="photobox">
<a href="index.php?showimage=<IMAGE_PREVIOUS_ID>">
<img src="images/<IMAGE_NAME>" name="mainimage" alt="<IMAGE_TITLE>" title="[<IMAGE_TITLE>] - <EXIF_CAMERA_MODEL>, <EXIF_EXPOSURE_TIME>, <EXIF_APERTURE>, ISO:<EXIF_ISO>, <EXIF_FOCAL_LENGTH>" width="<IMAGE_WIDTH>" height="<IMAGE_HEIGHT>" id="photo" /></a>
<br />
<br />
</div> <!-- /photo -->
Delicious:
<div id="photobox" style="width:<IMAGE_WIDTH>px;height:<IMAGE_HEIGHT>px;">
<div id="image-border" style="width: <IMAGE_WIDTH>px; height: <IMAGE_HEIGHT>px;">
<img src="images/<IMAGE_NAME>" name="mainimage" alt="<IMAGE_TITLE>" title="<IMAGE_TITLE>" width="<IMAGE_WIDTH>" height="<IMAGE_HEIGHT>" id="photo" name="photo" style="background:black;"/>
<div id="menu_browse" style="width: <IMAGE_WIDTH>px; height: <IMAGE_HEIGHT>px;">
would there be a way to get this to work with my delicious template...as with some post processing, i do crop images, and would like the secret image to adjust the border to it's aspect ratio when shown?
thanks again for help Karin.
Kevin
austriaka
02-12-2008, 05:49 PM
Kevin, ist always looks weird if the images are not the same size since the Javascript fade-in is jumping around in this case.
You can try this little hack:
find this line in admin_secret.php (far at the end):
$tpl = str_replace("<SECRET_LINK>",$fadescript.'<a href="#" onclick="return false;"...
change it to this:
$tpl = str_replace("<SECRET_LINK>",$fadescript.'<a href="#" onclick="return false;" title="'.$secret_title.'"><img name="secret" src="thumbnails/s_grafic1.gif" border="0" onmouseover="'.($fade==1?'opac_in(document.images[\'mainimage\']); ':'').'document.images[\'secret\'].src=\'thumbnails/s_grafic2.gif\'; document.images[\'mainimage\'].src=\'images/o_'.$image_name.'\'; document.images[\'mainimage\'].style.height=\''.$sheight.'px\';document.images[\'mainimage\'].style.width=\''.$swidth.'px\'; document.getElementById(\'photobox\').style.height =\''.$sheight.'px\';document.getElementById(\'phot obox\').style.width=\''.$swidth.'px\';" onmouseout="'.($fade==1?'opac_out(document.images[\'mainimage\']); ':'').'document.images[\'secret\'].src=\'thumbnails/s_grafic1.gif\'; document.images[\'mainimage\'].src=\'images/'.$image_name.'\'; document.images[\'mainimage\'].style.height=\''.$image_height.'px\';document.ima ges[\'mainimage\'].style.width=\''.$image_width.'px\'; document.getElementById(\'photobox\').style.height =\''.$image_height.'px\';document.getElementById(\ 'photobox\').style.width=\''.$image_width.'px\';" alt="secret grafic" /></a>',$tpl);
kriepl
02-12-2008, 06:26 PM
thanks karin,
however the hack didn't work.
I did notice that the background color under the image, expanded/changed with the secret image. (if that makes any sense). you can see it at the bottom left of image.
here (http://gatheringofpixels.com/index.php?showimage=8)
so the hack IS doing something to expand .
austriaka
02-13-2008, 06:04 AM
ok, sorry, I didn't look close enough.
Use this line instead:
$tpl = str_replace("<SECRET_LINK>",$fadescript.'<a href="#" onclick="return false;" title="'.$secret_title.'"><img name="secret" src="thumbnails/s_grafic1.gif" border="0" onmouseover="'.($fade==1?'opac_in(document.images[\'mainimage\']); ':'').'document.images[\'secret\'].src=\'thumbnails/s_grafic2.gif\'; document.images[\'mainimage\'].src=\'images/o_'.$image_name.'\'; document.images[\'mainimage\'].style.height=\''.$sheight.'px\';document.images[\'mainimage\'].style.width=\''.$swidth.'px\'; document.getElementById(\'image-border\').style.height=\''.$sheight.'px\';document .getElementById(\'image-border\').style.width=\''.$swidth.'px\'; document.getElementById(\'menu_browse\').style.hei ght=\''.$sheight.'px\';document.getElementById(\'m enu_browse\').style.width=\''.$swidth.'px\';" onmouseout="'.($fade==1?'opac_out(document.images[\'mainimage\']); ':'').'document.images[\'secret\'].src=\'thumbnails/s_grafic1.gif\'; document.images[\'mainimage\'].src=\'images/'.$image_name.'\'; document.images[\'mainimage\'].style.height=\''.$image_height.'px\';document.ima ges[\'mainimage\'].style.width=\''.$image_width.'px\'; document.getElementById(\'image-border\').style.height=\''.$image_height.'px\';doc ument.getElementById(\'image-border\').style.width=\''.$image_width.'px\'; document.getElementById(\'menu_browse\').style.hei ght=\''.$image_height.'px\';document.getElementByI d(\'menu_browse\').style.width=\''.$image_width.'p x\';" alt="secret grafic" /></a>',$tpl);
don't use the string from the notification email, I edited it here!
kriepl
02-13-2008, 03:11 PM
PERFECT!!!
Thank you so much Karin!
I really do appreciate the help you and everyone else provide on this forum.
Would you be willing to look at something else on my site, to help me with?
instead of clogging up this thread I will just link you to the thread I posted.
http://www.pixelpost.org/forum/showthread.php?t=7880
If you can't or don't have time. That's fine..I am grateful of the help you've provided thus far.
Regards,
Kevin
Mielec
07-31-2008, 01:50 PM
Hi im sorry if this is the wrong place to ask, but im also having som problem with the secret image addon, im not quite sure what to put where, but this is what i have today, and it seems to only work in IE not FF ?
Im using the Focus Theme
<img src="images/<IMAGE_NAME>" name="mainimage"alt="" title="" width="<IMAGE_WIDTH>" height="<IMAGE_HEIGHT>" id="photo" name="photo" />
in Dreamweaver the line lights up in a bright yellow when entering the īname="mainimage" ī but if it works ... anyway i would like to know if i have done anything wrong, becourse i would really like this to work.
Btw when looking at Krieplīs website it works in FF ?
Thanks in advance and this is really a great Addon, thank you
Br Kenneth
http://pixel.veringtiemroth.dk
vBulletin® v3.7.3, Copyright ©2000-2013, Jelsoft Enterprises Ltd.