Hi!
I'm rather new yo WP and still working on the CSS and the page lay-out.
But what I want to know is whether there exist a hack for popup when you click in pictures publish in the blog.
I have searched the Support Forums, but can't see that this question have been asked earlier...
So, I want a popup when we click on a picture. Preferably without margins around the picture. I think Greymatter had such a feature....?
eggwife
Member
Posted 8 years ago #
i am using a popup script from CodeLifter.com.
you can find it here:
http://www.codelifter.com/main/javascript/autosizeimagepopup.html
Thank you, it seems as a script I would like to use!
Just a short question; where do I post the code for the <a href-tag?
Anonymous
Unregistered
Posted 8 years ago #
From source:
popImage("url_of_image","title_of_image")
Use the relative or absolute path of the image where we show
url_of_image. This is the url of the image you wish to show
in the auto-sizing popup window.
Use any text you wish where we show title_of_image. This is
the title that will appear in the titlebar of the popup. (Note:
do not use single- or double-quotes within a title.)
I saw that, but in which file in the WP-directory do I have to add changes to make sure every picture added to the blog uses the popup-code?
Anyone understood that? :)
eggwife
Member
Posted 8 years ago #
oh, it's not automatic. you have to insert the code with every picture. i just started my blog so i had no existing pictures. it's manual.
phpNeophyte
Member
Posted 8 years ago #
Doesn't seem to work in Opera, anybody tried in Firefox? Works in Mozilla and IE
Kevin
Anonymous
Unregistered
Posted 8 years ago #
Well yes, it could be hacked. If you take a look at the quicktags.js file at the top, you can copy the syntax and create your own.
Michiel
Member
Posted 8 years ago #
Did anybody succeed in "hacking" this one?
Anonymous
Unregistered
Posted 8 years ago #
Im using this... a really ugly hack that creates a textarea below the normal "copy this code" part in upload.php
Beware! This can screw things up really bad since sourcecode editing is required.
First, upload a file called openwin.js into your wordpress root.
Openwin.js
[code]
function OpenThumb (param) {
window.open('thumb.php?bimg='+param, "macewan", "width=550, height=550, location=no, menubar=no, status=no, toolbar=no, scrollbars=no, resizable=yes");
}
[/code]
Then insert this into the header part of index.php
[code]
<script src="openwin.js" type="text/javascript"></script>
[/code]
Now too the tricky part.
Insert this on line 218 in upload.php
[code]
<?PHP
echo "Copy this code to make the image popupable<br>";
echo "<textarea name=\"textarea\" cols=\"100\" rows=\"5\"> <img src=\"" . get_settings('fileupload_url') . "/thumb-$img1_name\" alt=\"$imgdesc\" border=\"0\"></img></textarea>";
?>
[/code]
Michiel
Member
Posted 8 years ago #
Thanks! I will give it a try:-)!