Pixelpost Forum

Pixelpost Forum (http://www.pixelpost.org/forum/index.php)
-   Addons (http://www.pixelpost.org/forum/forumdisplay.php?f=13)
-   -   Addon: Secret Image (http://www.pixelpost.org/forum/showthread.php?t=5821)

austriaka 12-21-2006 10:23 PM

Addon: Secret Image
 
CHANGES:
2009-03-22 Modified version for Switchy users (http://www.pixelpost.org/forum/showt...5192#post65192)
2007-11-22 Version Check added
2006-12-22 Download file updated (I forgot to remove a debugging part -sorry)

Description:
SECRET IMAGE ADDON reveals a "secret" image by a simple mouseover. You can use this addon for showing the raw image before processing or to show any other image instead.

http://uhlig.at/tmp/screenshot1.jpghttp://uhlig.at/tmp/screenshot2.jpg

Installation:
Drop the admin_secret.php into addons folder.
Create two little grafic elements for the "secret" grafic (one for normal, one for highlight) and save them as .gif-files.
Upload new "secret" grafics in admin addons area

http://uhlig.at/tmp/admin_screenshot1.jpg

Use it:
Upload the secret image along when uploading a new image.
Edit the secret image in a submenu of image edit.

http://uhlig.at/tmp/admin_screenshot2.jpg

http://uhlig.at/tmp/admin_screenshot3.jpg

Adjustments: (optional)
Change the title of the secret grafic in admin_secret.php (line 2)
Switch off/on the JavaScript fade effect (line 3)
Change the values of the JavaScript fade effect (lines 4 and 5)

Prefix for secret image:
"o_" (Don't care about it unless you want to upload secret images with FTP.)

NEW TAGS (for use in image_template.html):
<ATTRIBUT_NAME> - Main image must have attribute "name" for the JavaScript working! Put this tag after <img src="images/<IMAGE_NAME>" !
<SECRET_LINK> - The Secret grafic with mouseover, place it wherever you want in the image_template.html

No changes to database are made.

Download Secret Image

The idea came from here: http://movie.leova.com/index.php?x=secret
Thanks to klimin_a_s for testing and for forcing me to the image size correction

You can look at the live action at http://blog.uhlig.at


You like this addon?
https://www.paypal.com/en_US/i/btn/x-click-but04.gif
have fun with it!
KArin

Vernon.Trent 12-21-2006 10:35 PM

very very cool :-)
thanks for sharing!

klimin_a_s 12-22-2006 02:14 AM

Good work!

fredxeric 01-11-2007 03:46 AM

Instead of uploading gif file in the addons sections on the pp admin console it is possible to upload a jpeg file?

austriaka 01-11-2007 05:43 AM

Quote:

Originally Posted by fred-eric (Post 41353)
Instead of uploading gif file in the addons sections on the pp admin console it is possible to upload a jpeg file?

sorry, in this version not.
If you want to hack the script, you can change ".gif" into ".jpeg" in lines
16, 17, 39 (2x), 40 (2x), 155 (2x)

KArin

GeoS 01-12-2007 08:21 AM

@austriaka: Try to define image filename at the beginning of addon code. IMHO image file also should be outside addon dir as it isnt addon (but that is only small sugestion) :P
Anyway - great work :)

austriaka 01-12-2007 08:34 AM

You mean name of the "secret" image (gif, the mousover grafic) or attribute "name" of the photo to be changable?

Secret Image file is saved in thumbnail folder because this has writing permission

KArin

KArin

irishblue 01-12-2007 04:09 PM

Thanks for the add-on!

The admin area works well. But I have a problem though... my secret link doesn't work.. Did I paste the tags wrongly?
Code:

<a href="index.php?showimage=<IMAGE_PREVIOUS_ID>"><img id="image" src="./images/<IMAGE_NAME>" <ATTRIBUT_NAME> alt="<IMAGE_TITLE>" title="<IMAGE_PREVIOUS_TITLE>" width="<IMAGE_WIDTH>" height="<IMAGE_HEIGHT>" /></a>
<br /><SECRET_LINK>

Also, I noticed that you'll need to be logged in to the admin area prior to uploading the add-on, else it'll return a "fatal error". Thought you'd like to know :)

austriaka 01-12-2007 04:53 PM

Quote:

Originally Posted by irishblue (Post 41436)
my secret link doesn't work.. Did I paste the tags wrongly?
Code:

<a href="index.php?showimage=<IMAGE_PREVIOUS_ID>"><img id="image" src="./images/<IMAGE_NAME>" <ATTRIBUT_NAME> alt="<IMAGE_TITLE>" title="<IMAGE_PREVIOUS_TITLE>" width="<IMAGE_WIDTH>" height="<IMAGE_HEIGHT>" /></a>
<br /><SECRET_LINK>


Looks correct. Please give me the link to your blog, otherwise I cannot say anything
Quote:

Also, I noticed that you'll need to be logged in to the admin area prior to uploading the add-on, else it'll return a "fatal error". Thought you'd like to know :)
???
You mean uploading the addon file by FTP?
What did the "fatal error" say furtheron?

KArin

GeoS 01-12-2007 11:03 PM

[quote=austriaka;41423]You mean name of the "secret" image (gif, the mousover grafic) or attribute "name" of the photo to be changable?/QUOTE]

Secret image filenames (both normal and mouseover) can a variable at the beginning of addon script.

[quote=austriaka;41423]
Secret Image file is saved in thumbnail folder because this has writing permission
/QUOTE]

Thats good idea :D


All times are GMT. The time now is 09:55 PM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.