Post-Thumb Revisited: version 2.2

Thumbnails

2.2 17/12/2007

  • Options: option screen has been re-organized to make it clearer (hopefully). An help screen has also been added.
  • DIRNAME: dirname is now a depth parameter. It will analyse the image url and include the sub-directory up to the specified number (or when it finds ‘:’ or ‘.’). This will enable sticking to WP way of saving images. Example:
    • mysite.com/wp-content/uploads/2008/01/myimage.jpg
    • DIRNAME=2
    • thumbnail name will be: thumb-200801myimage.jpg
  • NOFORM: new parameter. It will return the html string without any space, tab and return.
  • OBJECT: new parameter. If specified, the functions will return an object containing information instead of an html string. This is for developper usage.
  • MAX: new parameter. if set to 1, post-thumb will not resize image which are smaller than targetted size. Works only if keepratio is set to 1.
  • Thumbnail names are now sanitize in WP way. It means that only numeric, alphabetic and ‘-’ are now allowed in them (including append string).
  • nextgen gallery and ptalbum should now be thumbnailed properly. Note that this feature is resource consuming during the update of the post table.
  • Excerpt: Post-Thumb provides an excerpt alternative to wordPress standard. See description in the documentation.
  • Recent images: a simple function to return thumbnail of all the last images in posts. Can use a simple cache.
  • Post formatting
    • A sub-directory can now be set in options to save thumbnails generated by post formatting functions.
    • Names of thumbnails generated by post formatting functions can now be modified by including directory name. It works the same way than DIRNAME parameter.
    • You can tell Post-Thumb to add lightbox compatibility (rel=”lightbox”) when it generates thumbnail inside posts.
  • Bug corrections:
    • some php5 only functions were in the code (stripos).
    • a function was mispelled causing error in some specific cases.
    • correct some WP<2.1 compatibility issues.
    • improve post parsing masks.

36 Responses to “Post-Thumb Revisited: version 2.2”

  1. Nicola Greco Says:

    hi, i’ve tried your plugin, i put in the loop , and it works so good, but i would like change the default link (to the original photo), to a link of the post (permalink). Where do i must edit to do this?

    Excuseme, for my inglish, i’m italian.

  2. alakhnor Says:

    Put link=p in the parameters.
    http://code.google.com/p/post-thumb-revisited/wiki/Parameters

  3. oliver Says:

    hello. the plugin is working great. i would like to change the default link to link to the post, rather than the image, within the pt_the_excerpt function. i have tried the ‘link=p’ attribute, however it does not work.

    I would like to have the title, the excerpt and the thumbnail on the homepage.

  4. yoichi Says:

    Hi alakhnor,

    Thanks for an amazing update. No wonder you were being quite :-)

    I have one problem.
    For random_thumb, my previous parameters is giving me an error.
    This is what I had inside ( ).
    subfolder=random&altappend=random_&link=p&width=160&height=100&limit=1&keepratio=1&LB_effect=0,

    How should I change this for your updated plugin?

    Thanks.

  5. alakhnor Says:

    Hi :). What error do you have?

  6. yoichi Says:

    This is what I’m getting.

    Warning: array_rand() [function.array-rand]: Second argument has to be between 1 and the number of elements in the array in wp-content\plugins\alakhnors-post-thumb\post-thumb.php on line 429

    Warning: Invalid argument supplied for foreach() in wp-content\plugins\alakhnors-post-thumb\post-thumb.php on line 406

  7. alakhnor Says:

    Have you tried to re-generate the table?

  8. alakhnor Says:

    Oliver>the syntax of pt_get_excerpt is:

    < ?php echo pt_get_excerpt(< e param >, < t param >, < add string >); ?>

    e param: excerpt param. There, you need to specify “SHOW=TEI” (T=title, E=excerpt, I=thumbnail). The order of the letters sets the display order.
    t param: thumbnail param. There you need to specify “link=p”.
    add string: additional string. If “SHOW” in excerpt param contains “A”, it will be displayed there.

  9. nicola greco Says:

    i don’t understand where i must put link=p, can you help me? thanks

  10. alakhnor Says:

    Something like:
    < ?php the_thumb("link=p"); ?>

    Check here: http://code.google.com/p/post-thumb-revisited/wiki/Parameters for more information.

  11. DarkMirage Says:

    I have the same problem using echo the_recent_thumbs(’altappend=thumbnail_&width=144&height=144&myclassimg=sthumb&showtitle=t&link=p&keepratio=0&showpost=1&limit=1′);

    “link=p” is already specified.

    I get the same error.

  12. DarkMirage Says:

    Refreshing the database fixed the random thumb error, but now half my entries are showing the default thumbnail…

  13. DarkMirage Says:

    Hi. It seems that the thumbnail generation is only working for images that were inserted using
    <img=’path’ />
    and not
    <img=”path” />

    Example:
    http://www.darkmirage.com/category/money/

  14. alakhnor Says:

    Have you changed something? because all images seem ok now.

  15. yoichi Says:

    Hi,

    Yeap.Regenerating the tables fixed it. Thanks.

    By the way, now that it’s 2.2 and probably stable for a while, would you like me to localize this into Japanese? Just one way of showing appreciation of your wonderful plugin. My blog cannot do without Post-Thumb :-D I’m getting tired of translating the text into Japanese directly onto the files anyway.
    If you could send me the .pot file I’ll get right on it.

    Cheers.

  16. alakhnor Says:

    It should be stable as soon as I release the next correction version.^^
    However, the translation files will not change. I do not have any pot file but you can use the po files which are provided with the plugin (one for the admin part, another for the rest). :)

  17. yoichi Says:

    OK.

    But could you send me the po files without the French translation in them.
    I must be doing something wrong but the Japanese translation is not working. So I want to start from fresh.

    Thanks.

  18. alakhnor Says:

    I thought you would just have to copy the po file then change the translation and save it to an mo.
    I’ll try to prepare something.

  19. yoichi Says:

    Yes, that’s what I was doing but …

  20. alakhnor Says:

    you may just have to change the character encoding in the project description. I must admit, I’m not very familiar with poedit and japanese translation ;)

  21. yoichi Says:

    Yes, I did that…

    By the way, I found a minor error in style_hs.css on line 82.
    “;” misplaced?

  22. spenny Says:

    Under “post options” the plugin will not let me change the thumbnail size from 120×120. I would like to make them bigger, but every time I click on update after I change the size, it reverts back to 120×120. Any thoughts?

  23. hhl Says:

    Hi, im using your plugin and its great.. but just today i started having problems like:

    ================================
    Warning: imagecreatefromstring() [function.imagecreatefromstring]: Data is not in a recognized format. in /home/myhost/public_html/mysite/wp-content/plugins/alakhnors-post-thumb/lib/post-thumb-image-editor.php on line 791
    ===============================

    can you please help me out??

  24. alakhnor Says:

    spenny>It’s a bug. I’ll fix this.

  25. alakhnor Says:

    hhl>what is the picture that caused the problem?

  26. hhl Says:

    it happens to any new post i post, and this error code shows up anytime a new post is posted.

    Well i saw it was fixed soon as i upgraded the plugin, but there is still a PROBLEM, the picture in the post doesn’t show up as the thumb, but rather the default picture (thumb) keeps showing.. and it happens to any new post i make excluding posts already posted before upgrading..

    can u please help?

  27. alakhnor Says:

    Try to save options then generate post-thumb table again.

  28. hhl Says:

    how do i generate the table again? do i have to refresh all posts in database or? please let me know..

    thanks

  29. alakhnor Says:

    Go to options screen and check the checkboxes in the “overview” page.

  30. Ivan Says:

    dear alakhnor,

    In your site the recent fotos are next to eachother (3 in a row). in my site it keeps on 1 (under eachother). how do i make them to be like in your site (of maybe 4 or 5 in a row). i have plenty of space to have them next to eachother. but cant find any options to do so.

    please can you help me out?

    Kind regards and thank you for the great plugin!!

    Ivan

  31. alakhnor Says:

    It all depends on your theme and how you insert posts/thumbnails.

    If you just output the thumbnail in a div, the basic css to use is:
    #whatever_id { width: (so_many_thumbnails)px }
    #whatever_id a img { float: left; }

    whatever_id being the wrapping div for all thumbnails.

    As I’m using the widget here, it produces an unordered list, so I just have to set:
    .wid_recent li { float: left; }
    then, the number of thumbnails in a row is given by the width of the sidebar.

  32. Ivan Says:

    hi alakhnor thanks for the quick reply. I am using your widget indeed.
    so i have to put the line “.wid_recent li { float: left; }” (within the quotes). but where exactly do i put that line?

    kind regards for the quick answer.

    Ivan

  33. alakhnor Says:

    Just put it in your style.css file.

  34. Ivan Says:

    Is nt working on my site ( http://www.creatief010.nl ) But thanks anyway for your help and keep up the good work.

    Kind regards,

    Ivan

  35. En Sabah Nur Says:

    hy,
    when i put paramets on the my page will not load, it shows a blank page instead of the post
    i want to put the instead of the link to the image, a link to the post (link:p)
    what ca i do? maybe link:p is not for random_thmb, is it ? i got to modify something in my style.css ?
    great plugin by the way
    kind regards for the quick answer.

  36. En Sabah Nur Says:

    all fixed now, see below a random example:
    http://iporn.nimic.org/pretty-in-pink.html
    if anyone have a question i’m sure i can answer it.
    best regardes,
    ESN

Leave a Reply