WordPress.org

Ready to get started?Download WordPress

Forums

Related Posts Thumbnails
Bug in Newest release of the plugin (1 post)

  1. Debashish
    Member
    Posted 3 years ago #

    There is a bug which has been existent in this plugin, I had manually edited the plugin file and I realized it again when I upgraded to the latest version of the plugin as my changes were gone. The bug is related with how the path to images is formed when "custom fields" are used.

    In my theme I specify post thumbnails (absolute image path) in a custom field, and I configured your plugin similarly. My wordpress is installed in a subfolder so the path to my installation is not http://www.samayiki.com but http://www.samayiki.com/sam. The plugin takes the "Default image URL" correctly. But when trying to get the custom field URLs it manipulates the URL and make an image URL http://www.samayiki.com/sam/wp-content/uploads/2009/03/pod-thumb.jpg look like http://www.samayiki.com/wp-content/uploads/2009/03/pod-thumb.jpg (stripping "sam" from the URL breaks the URLs).

    if ( $thsource == 'custom-field' ) {
    				$debug .= 'Using custom field;';
    				$url = $basic_url = get_post_meta( $post->ID, get_option( 'relpoststh_customfield', $this->custom_field ), true );
    
    //I commented the problematic lines
    				//if (strpos($url, '/wp-content') !== false)
    				//	$url = substr($url, strpos($url, '/wp-content'));
    				$theme_resize_url = get_option( 'relpoststh_theme_resize_url', '' );
    				if ( !empty( $theme_resize_url ) )
    					$url = $theme_resize_url . '?src=' . $url . '&w=' . $width . '&h=' . $height . '&zc=1&q=90';
    			}

    Hope this is corrected in the plugin soon.

    http://wordpress.org/extend/plugins/related-posts-thumbnails/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic