Forums

[resolved] [Plugin: User Photo] user photo with fixed width (2 posts)

  1. viter-z-bayraku
    Member
    Posted 10 months ago #

    for fixed width photos and thumbnails generation in file user-photo.php
    comment this lines (line 852)

    // figure out the longest side
    
    		//if ( $info[0] > $info[1] ) {
    			$image_width = $info[0];
    			$image_height = $info[1];
    			$image_new_width = $maxdimension;
    
    			$image_ratio = $image_width / $image_new_width;
    			$image_new_height = $image_height / $image_ratio;
    			//width is > height
    		//} else {
    		//	$image_width = $info[0];
    		//	$image_height = $info[1];
    		//	$image_new_height = $maxdimension;
    
    		//	$image_ratio = $image_height / $image_new_height;
    		//	$image_new_width = $image_width / $image_ratio;
    			//height > width
    		//}

    enjoy :))

  2. EvilMammoth
    Member
    Posted 9 months ago #

    Thanks for posting this. It works really well, for the most part.

    I was just wondering if you'd come across a similar problem as I have.

    It looks like after I add this code (or change the dimension settings) that only photos uploaded after implementing the change are affected. Photos that were already in the system still display at the same size as always within the template.

    Do you know if it might be possible to remedy this?

    Thanks again for your post.

Reply

You must log in to post.

About this Topic