• Hi everyone,

    I made a new plugin called Post Thumbs to share. It has barely been tested, so if anyone tries it and has some problems hopefully I’ll know what’s wrong. It works on my site fine.

    What it does is scan a post for an included image and convert that image into a thumbnail to be used in The Loop. You could use this to show a list of posts as thumbnail links if you wanted. It will only work for images that reside on your server. No support for cross domain images as of yet.

    The documentation is shoddy, but it’ll have to do for now. If anyone has any suggestions, feel free to reply. The plugin is here.

Viewing 15 replies - 31 through 45 (of 84 total)
  • feverinlove

    (@feverinlove)

    This didnt work:

    <?php previous_post_link(‘« echo tb_post_thumb()’) ?>

    it output text tb_post_thumb()

    Thread Starter callmeforsox

    (@sunscream)

    @wagawaga
    Video regex if you are using the extreme video plugin like me would be: [gv data=”(.*?)”][\gv]
    You may want to look up how to do regex if you have something else.

    Video default image is the URL to where the image is.

    Folder name, append, prepend text is where the thumbnail is saved to.

    Example
    folder name: thumbs
    append: thumb
    Script will make a thumbnail out of example.jpg, save it into thumbs folder and rename example.jpg to example_thumb.jpg

    @fevermore
    This can only be used in The Loop because it scans the post for an image. There might be a way to make a new loop to get the next and previous posts and generate your own code.

    theiconoclast31

    (@theiconoclast31)

    My thumbnails don’t seem to resize before they crop, so I end up with thumbnails that have a 75×75 patch of sky (Examples, scroll down a bit, left side) I’m using the tag <?php echo tb_post_thumb(false, '', 75, 75, 75, 75); ?>

    Am I doing something incorrect with the template tag? The thumbnails on your site are so nicely done.

    wagawaga

    (@wagawaga)

    Hi, very intersted to use this plug in.

    I have got a multimedia category in my wordpress page, and i’m using coolplayer as the plug in to display it in my post.

    I would like to display the multimedia category in my sidebar, using exclue plug in to exclue it from the main post, and would like to display the catagoerry with the thumb of the you tube or google video.

    Could you please give me direction on how to do it?

    I’ve installed the plug in and need exact direction. I’m not suer whether i can do this because what said it just can be used within the loop

    emanoelmelo

    (@emanoelmelo)

    I see that theiconoclast31 also did have the same problem that I: we still cant delete the thumbs because of permissions, even changing that line to 0777, the server still says that the owner of the thumbs files and folders is ‘nobody’.
    Strangely, i installed wordpress and this plugin on another server, and using the same files, i did was able to delete the thumbs generated even without change that line!
    The problem could be resoled at this step, but i cant stay with my files at this server, so comming back to the old one, with that very problem of permissions, what should i do people???

    elena10

    (@elena10)

    Thank you for writing this plug-in. What a great idea.
    Everything is going well, but now I am trying to adding the echo code to index.php.

    I got this bit of code from the forum,
    <div class=”post-image”><?php echo tb_post_thumb(true, ‘alt text’, 0, 0, 120, 20); ?></div>

    but it only pastes my big default image at the top of my post.

    In your image.php file, where did you insert your new code?
    (Also, I noticed you gave sidebar code in an earlier post to wordpress China but that didn’t work for me. Where did you put that code?)

    Thanks!

    Thread Starter callmeforsox

    (@sunscream)

    For those of you having problems with deleting files, can you test this out? On line 102 in post-thumbs.php there should be $thumb->outputFile($save_dir."/".$rename_to, "");. After that line put in chmod($save_dir."/".$rename_to,0666);

    @theiconoclast31
    What does it look like when you set the resize to 75×75 in the options panel? And if you tick crop exact in the options panel? On your site it looks like the image is cropping to the size. What does the full image look like?

    @wagawaga
    I’m not sure how that plugin would work with my plugin. When I have some time, I might be able to check it out. Do you have a link?

    @elana10
    <div class="post-image"><?php echo tb_post_thumb(true, 'alt text'); ?></div> Does that also give a default image? This only works when used in The Loop.

    Is possible create thumbs of external server image ? I host all the image in a different site, but i would have thumbs for this…is possible do it ?

    @theiconoclast31
    What does it look like when you set the resize to 75×75 in the options panel? And if you tick crop exact in the options panel? On your site it looks like the image is cropping to the size. What does the full image look like?

    I played around with the PHP file to display multiple sized thumbnails. I basically copied the entire function, renamed it, and then changed a few things like the default image location, etc. I just changed some of the variables to numbers and removed a few of the conditional statements, and now it’s working.

    So on my wishlist for the next version: Multiple thumbnails with different sizes, etc. ??

    sunscream,
    it still does not works. The permission for the thumb files are not 666 or 777, but 644…

    sunscream, I’m new into the world of wordpress and php but am learning…
    I can’t make your plugin work:
    I’m on an apache server : https://dellserver/wordpress
    In the option fields I put:

    d. name: /wordpress
    def. img. : /wordpress/logo3.png
    f.d.n. :https://dellserver/wordpress
    b. path :/wordpress

    Then I don’t know WHERE to put your code and WHICH code in order to see thumbnails (in my sidebar) of the pictures in my posts?

    I tried to add this code of yours in my sidebar:

    <?php
    $posts = get_posts(‘numberposts=6&offset=9&order=DESC’);
    foreach($posts as $post) :
    setup_postdata($post);
    $post_link = tb_post_thumb(true,$post->post_title);
    if ( !empty($post_link) ) {
    echo $post_link; }
    endforeach;
    ?>

    nothing happens and if I write

    <?php echo tb_post_thumb(true, ‘test’, 0, 0, 60, 60) ?> in my sidebar,only the default image appears and in full size????
    Anyone could help me to use this plugin?

    Thanks in advance…

    Hi again, I figured out a few things on my own (after a long night without sleep ?? but still have errors:

    I left the paths as shown in my previous post and still can’t see thumbnails of my pictures but I managed to obtain the default picture as shortcut. In addition the resizing option doesn’t work for me, could it be due to a mistake in the paths as well?
    Thanks a lot for your help…

    By the way, thank you so much for your work, when I’ll manage to make it work this plugin is going to be great ??
    I’m still trying and achieved a few new steps. So I can make either the default image or the alt text in the sidebar and figured out how to use the function but there is no way that a thumbnail will appear. I tried all the base paths, domains, domain names and so on. Again, I’m on a local apache server (please read one of my previous blog with the configuration). Should the default image be resized as well? In my case it’s not…
    Thank you.

    is use this code for the sidebar:

    <?php $wp_query->query_vars[“cat”] = 3; ?>
    <?php $wp_query->query_vars[“showposts”] = 4; ?>
    <?php $wp_query->get_posts(); ?>
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <?php echo tb_post_thumb(); ?>
    <?php endwhile; else: ?>
    <h2>Not Found</h2>
    <p><?php _e(“Sorry, but you are looking for something that isn’t here.”); ?></p>
    <?php endif; ?>`

    In the homepage works good, but if i move in the single.php i see in the thumb the image in the single post, and not for cat = 3

    thanks for this great plugin,
    I have 2 questions

    1) I can’t manage to make it work for showing the next/previous post thumbs…
    <?php previous_post_link(‘? echo tb_post_thumb()’) ?> this does not work even if I put it in the loop ??

    2) is there any way to display RANDOM thumbs?

    thanks again

Viewing 15 replies - 31 through 45 (of 84 total)
  • The topic ‘New plugin: Post Thumbs’ is closed to new replies.