WordPress.org

Ready to get started?Download WordPress

Forums

Advanced Post List
[resolved] list doesn't grab thumnail in 3.1.1: grabs medium I think (15 posts)

  1. bluejpro
    Member
    Posted 2 years ago #

    I love advanced post list!

    It was working fine until I upgraded to WP 3.1.1

    Now I have 2 problems:

    1) the image grabbed is not the thumbnail or the featured image. It's really big...

    2) the excerpt is missing altogether.

    I will put a screenshot of the problem here:
    the really big image is the problem.

    http://wordpress.org/extend/plugins/advanced-post-list/

  2. jokerbr313
    Member
    Plugin Author

    Posted 2 years ago #

    Yea, I've thought about adding params to set the size, but I usually use the styles functions in html.

    About the excerpt missing...do you have a custom excerpt set? ...and do you have 'code' at the beginning of the page that is being displayed?

  3. leecoder
    Member
    Posted 1 year ago #

    Hello,

    I'm having the same problem with the post image being too big. the [post_thumb] shortcode is actually grabbing the full sized featured image instead of the thumbnail. This is killing the layout in both sidebars (using the widget) and any main page (using shortcode).

    Is there something I can do to get around this? I'd really like to use the plugin because so far, this appears to be my only problem . . . however it is a very big problem.

    Thanks,
    LC

  4. EkoJr
    Member
    Plugin Author

    Posted 1 year ago #

    Actually, one way to fix this is to use inline styling. The only problem is, if the dimension ratio isn't the same, then some pictures would seem stretched in one way.

    The option I usually resort to is using the width and/or height style. <img src=[post_thumb] style="width: 100px;"/>

    There was another response simular to this in [resolved] Result-Layout. However, I don't have anything setup to grab a certain size. All the shortcode does is grab the picture that you had uploaded with the original size.

  5. leecoder
    Member
    Posted 1 year ago #

    Thank you for your reply. I tried the inline styling and this helps a lot (not ideal, but usable).

    Regards,
    LC

  6. EkoJr
    Member
    Plugin Author

    Posted 1 year ago #

    Yea, for now I'm going to leave this un-resolved until I can create a shortcode param that can properly re-size the image.

  7. jmchasco
    Member
    Posted 1 year ago #

    Hi there,
    I patched some code to solve this, and allow the use of thumbnail, medium, large or original image size.

    In wp-content/plugins/advanced-post-list/includes/class/APLCore.php
    At Line 2363
    Replace

    $arr = wp_get_attachment_image_src(get_post_thumbnail_id($page->ID),                                                                'thumbnail');
    $str = str_replace("[post_thumb]",$arr[0],                         $str);

    by

    $str = preg_replace_callback('#\[ *post_thumb *(size=[\'|\"]([^\'\"]*)[\'|\"])? *\]#',
                                     array(&$postCallback, 'postThumbnailCallback'),
                                     $str);

    In wp-content/plugins/advanced-post-list/includes/class/APLCallback.php
    Add the callback function:

    function postThumbnailCallback($matches){
    		$arr = wp_get_attachment_image_src(get_post_thumbnail_id($this->page->ID),$matches[2]);
    		return($arr[0]);
      }

    Then, the shortcode for [post_thumb] can be used as [post_thumb size="thumbnail"]
    medium and large values can also be specified, if size is empty or size parameter is not present original file will be returned.

    Thanks a lot for your useful plugin !

  8. EkoJr
    Member
    Plugin Author

    Posted 1 year ago #

    Thank you very much for posting this. Development on shortcodes is one of the things I have been planning to make the primary focus for on a later project, but right now I'm mainly working on getting everything corrected. Which btw, I think I'm going to start 0.3.Beta-6, and fix the backup feature...hopefully that will be the last beta.

    Another thing I was trying to do was add an area to report bugs in WordPress Plugin Trac, but I guess that option isn't available and they are even thinking about scrapping it. Tried Google Code, but their repository repeatedly had issues. GitHub is another option, and their layout is more what I was looking for, but now I'm wanting to stay away from outside sources. What I'm trying to say, stuff like this really needs an area, provided by WordPress in order to better support extensions, to report bugs, recommend enhancements, and questions regarding a particular task out of the plugin.

    I may add my own section for it, but for the most part, everyone is stuck waiting on WP developers to add support for reporting issues. Anyways, just me rambling, but thanks again for posting a fix for this issue.

  9. EkoJr
    Member
    Plugin Author

    Posted 1 year ago #

    Which btw, is this a fix for Version 0.3.b5?

  10. jmchasco
    Member
    Posted 1 year ago #

    Yes, it is v. 0.3.b5

    Keep it going !! you are doing a nice work with this plugin !!

    Let us know if you plan to include my [post_thumb] fix in next release, so i could update the plugin without repatch the code. !!

    By the way, in next days i will try to work in a new filter for the plugin, posts [prior|late] to a publishing date, or between a range. !! we will see.

    Cheers !!

  11. EkoJr
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks.

    There is one thing about the post date settings. I gave it some thought to add it to beta-5, but decided not to since it would require further planning on how I would add the variable(s) to the option database, and it required further organization on how I was going to implement it for preset post list. The option is nice to supply to people, but it would require modification to the plugin's database settings.

  12. butcher-pl
    Member
    Posted 1 year ago #

    Any news with thumbnail getting fixed ? I have a site I made for client and he seems NOT to understand to do small thumbs and he keeps uploading images straight from camera (3-5mb) that are re-sized by wp but not the advanced post list. And he gets this BIG thumbnails re-sized artificially by code... any progress on getting that fixed ? :)

    PS. Love this plugin.

  13. EkoJr
    Member
    Plugin Author

    Posted 1 year ago #

    At the moment I'm working finishing out 0.3 stable, but I actually spaced out on this topic, and forgot to implement it.

    The next release is mainly just updating the plugin info (description, screenshots, etc.), but I can add the fix, give it a test run, and possibly have it included with the next release. Seems like an easy fix.

  14. butcher-pl
    Member
    Posted 1 year ago #

    kk, waiting for it :) (as well as many other people ;)

  15. butcher-pl
    Member
    Posted 1 year ago #

    Any news with thumbnail issue ? :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic