• First, I have poured through numbers of pages of threads in this forum, searched the forum, searched the wiki, and attempted to find this information before starting a new thread. If I simply missed the post that already tells me what I know, please just point me to it. ??
    I am not looking for a full photo gallery. I am not looking for a full “photoblog.”
    Rather, I would like to find an easier way, if it’s possible, to upload a photo, display a thumbnail within the post that, when clicked, opens a new window to display the full-size photo.
    Right now, I am saving two image files (small and large), uploading both by FTP, then using html to display the small image where I want it in the post, linking to the larger photo. This method works, but it’s a pain in the @ss. If anyone has found an easier way or knows of a hack for 1.2 that will do this for me, please share!
    Thank you!

Viewing 8 replies - 16 through 23 (of 23 total)
  • Thread Starter sakamuyo

    (@sakamuyo)

    Interesting… If that works, it takes away the most complicated part of this whole thing. Hacking up the quicktags.js file to only need the filename of the original is easy enough.

    Thread Starter sakamuyo

    (@sakamuyo)

    w00t!
    Taking the code from that sitepoint article and reworking it to fit what I’m doing, I now have javascript that only requires me to enter the filename of the original and does everything else I need. Only trouble is that the popup window isn’t resizing in firefox. Does work in IE.
    I’m testing this script: here
    Could you give a look in your browser and see if the popup is resizing?

    Thread Starter sakamuyo

    (@sakamuyo)

    Verified working in IE 6 and Moz 1.6 for Windows.
    Verified non-working in Firefox 0.8 for Windows.
    Yes, I understand firefox users, on a global scale, are a small percentage. However, IE only accounts for 41% of traffic to my site. The other 59% is made up of firefox and Mac or Linux users. Cross-browser functionality is important to me.

    Thread Starter sakamuyo

    (@sakamuyo)

    ARGH!!!!
    Another V8 moment. ??
    I did not have firefox setup to allow javascript to resize windows. Once I enabled that feature, the script worked perfectly. For my purposes, the hack works. I don’t mind first uploading and then posting. Here is the final code in my quicktags.js file:
    function edInsertImage(myField) {
    var myValue = prompt('Enter the filename of the image', '');
    if (myValue) {
    myValue = '
    + myValue
    + '" onclick="window.open(\'popup.htm?/images/'
    + myValue
    + '\',\'\',\'resizeable=1,width=200,height=200\'); return false"'
    + '>'
    + '<img src="/images/thumb-'
    + myValue
    + '" alt="' + prompt('Enter a description of the image', '')
    + '" />';
    edInsertContent(myField, myValue);
    }
    }

    A couple notes: This assumes images are being uploaded to the /images directory at the web root, using relative URLs. It also assumes “thumb-” naming of the thumbnail. This works for me, since that’s how the file uploader is set to work. Your needs may vary.
    In addition, you will need a file named popup.htm. You can just copy directly the code from the sitepoint article linked to above by RobotHero.
    I may still play with this for a little while. Anyone knows how to clean this up or enhance, please share. After I’ve used it for a bit, I’ll post an entry with full hack instructions on my blog and figure out where (wiki? new hacks thread?) is appropriate to link to it so others may benefit. I can’t be the only one who would like this.
    Thanks, all!

    Sakamuyo – Firefox is working for me and I am running .08 on Windows XP.

    Thread Starter sakamuyo

    (@sakamuyo)

    Yeah. Started working for me once I checked the option in my preferences to allow javascript to resize windows. ??
    Thanks for confirming!

    @sakamuyo: would you please eMail me or post your valide URL to see your work integrating a photo plugin? Your current URL at https://tellitinlove.com/ does not show much. Thanks and read you later.

    Eddie

Viewing 8 replies - 16 through 23 (of 23 total)
  • The topic ‘Displaying Photos in Blog’ is closed to new replies.