1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Post Images 1.8

Add thumb images to your posts

  1. baadier

    baadier Well-Known Member

    There is currently a plugin that deals with that already,i think it was ties intention to integrate the 2. If im not mistaken this plugin http://hotarucms.org/showthread.php?286-Video-Inc-0.3 along with the thickbox plugin accomplishes that.
  2. zigstonk

    zigstonk Donor Donor

    Thanks for the response, baadier. I thought Video Inc. did the lightbox pop-up for photos too, but couldn't get it to work on one of my sites (photo was static, but did link to post..but did not pop up in lightbox). Will try it again later this eve.
    Last edited: Jun 9, 2010
  3. baadier

    baadier Well-Known Member

    @ties any chance of modifiying the the plugin to have curl support?
  4. shibuya246

    shibuya246 Hotaru Developer Staff Member Admin

    Can you tell me which functions you want to replace with CURL and I will have a look. I am guessing its the file_get_contents you want an alternative for.
    What error are you getting on your server or do you just want something with better speed performance?
  5. baadier

    baadier Well-Known Member

    I think ties was working on replacing the fopen function for guys who don't have it available on there hosts
  6. ties

    ties Theme & Plugin Development

    yeah sry im a bit busy these times... but its basicly replacing file_get_contents if i remember correctly
  7. baadier

    baadier Well-Known Member

    Cheers ties hope you knocked the exams out the park
  8. twine

    twine New Member

    I would be looking to do something similar so any suggestions would be helpful
  9. zigstonk

    zigstonk Donor Donor

    Hello all. Regrets, but did not realize so many had responded to this thread. Shibuya, no error received. Was just hoping to get the photos to pop up in the lightbox, iike the videos. Many thanks.
  10. Nick

    Nick Well-Known Member

    Combining Post Images with Tim Thumb

    I've just made a new plugin called Tim Thumb, which uses the open source TimThumb script to create and cache thumbnails on the fly.

    This Post Images plugin already creates thumbnails, but what if you wanted to save larger images for a "Featured post" box or similar? What you could do is set the image size in Admin -> Post Images to something big like 270x180, and the use Tim Thumb to generate thumbnails from those larger images for display on regular posts.

    Featured posts is off-topic, but here's how you can edit the Post Images "display_image.php" template to use Tim Thumb:

    1. Install and enable Tim Thumb, following the instructions on that thread.
    2. Move Tim Thumb above Post Images in the plugin order.
    3. Set a new large size for images in Admin -> Plugin Settings -> Post Images
    4. Copy /content/plugins/post_images/templates/display_image.php into your theme folder.
    5. Open it and change this:
        if(substr($img,0,32) != 'http://images.sitethumbshot.com/'){
    // Make it 0.1 compatible and add baseurl
    $img BASEURL.'content/images/post_images/' preg_replace('/.*content\/images\/post_images\//','',$img);
    to this:

        if(substr($img,0,32) != 'http://images.sitethumbshot.com/'){
    // Make it 0.1 compatible and add baseurl
    $img BASEURL.'content/images/post_images/' preg_replace('/.*content\/images\/post_images\//','',$img);
            if (
    defined('TIM_THUMB')) {
    $img TIM_THUMB 'images/post_images/' $h->post->vars['img'] . "&w=90&h=60&zc=1";
    6. Change &w=90&h=60&zc=1 in the code above to suit your needs, where w=width, h=height and zc=zoom control (1 = no zoom).

    7. Save and upload the file.

    So what does that do? It will copy your post images, shrink them and store them in the Tim Thumb cache.

    The original post image is still available in /content/images/post_images and the name of the image is held in $h->post->vars['img']. You can use that for a featured post box or whatever else you like.

    EDIT: Note: Post Images won't fetch any images smaller than the size you specify in the Post Images settings page....
    Manolof likes this.
  11. kmai

    kmai New Member

    It's possible the 0.5 Post Images on display regular posts
    In a standard Thumb

  12. caudurow3

    caudurow3 New Member

    OK, 2 questions!

    1) Is there a way to add multiple images to a post? How would I go about modifying the code?
    2) How can you display a small thumb on the home and a larger image in the main story page?

  13. Nick

    Nick Well-Known Member

    No, there isn't, and modifying the code to do that would be quite challenging.

    I did something similar using Tim Thumb. Read my post above.
  14. Moset

    Moset New Member

    Really nice plugin but i got 1 problem, i can show some thumbnails but one photo dont work i get error. Nothing show in preview when i chose this photo: http://allamusing.com/post/962447502/thoughts-on-islamic-center-ny

    Get this error when i click next:

    Warning: Division by zero in public_html/test/content/plugins/post_images/post_images.php on line 246

    Warning: Division by zero in public_html/test/content/plugins/post_images/post_images.php on line 247

    Warning: Division by zero in public_html/test/content/plugins/post_images/post_images.php on line 248

    Warning: Division by zero in public_html/test/content/plugins/post_images/post_images.php on line 249

    Warning: Cannot modify header information - headers already sent by (output started at public_html/test/content/plugins/post_images/post_images.php:246) in public_html/test/content/plugins/submit/submit.php on line 427


    Found 1 more problem, if i crop one image and click next and forgot to write description i get this error:

    Warning: getimagesize(http://www.site.com/test/content/im...aring_ste_komma_ih_aring_g__1282328453_04.jpg) [function.getimagesize]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /public_html/test/content/plugins/post_images/post_images.php on line 204
    Last edited: Aug 20, 2010
  15. Moset

    Moset New Member

    For the above post im using 1.4.1 hotaru and mysql 5 newest php.

    It would be really good if there was an option to not crop insert an thumbnail because some articles dont have good images and now u have to choose one :) !
  16. Nick

    Nick Well-Known Member

    Hi Moset, I'm afraid the author of this plugin has been absent from these forums for a while. If he comes back I'm sure he'll look into the issues you've reported. Sorry I can't be of any help.
  17. carlo75

    carlo75 Design & Development

    Anyone has experienced some problem during Editing a post?
    My WAMP local installation goes in infinite loop when I try to edit a post, that has attached an image, taken with Post Images... I need every time to stop and restart all services of WAMP, and this is really frustrating. Any ideas on this issue?
  18. Nick

    Nick Well-Known Member

    Is the image really huge? I had that problem with an image over 1MB.
  19. carlo75

    carlo75 Design & Development

    No Nick, it's a simply little image from a page, anyway the problem atm is on all the post edited. If I disable Post Images, all works fine.
  20. agent314

    agent314 Donor

    It feels a tad bit buggy at times but I like this plugin... I hope either the developer or someone will take it up and keep it going...


Share This Page