virgoshyam / timthumb

Automatically exported from code.google.com/p/timthumb
0 stars 0 forks source link

thumbnail does't showing on theme with wordpress 3.5 #419

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.I updated my wordpress to 3.5
2. all old thumbnail is working
3. just new post and new image thumnail not showing on the theme

What is the expected output? What do you see instead?

i cant see any thumbnail the last post. you can check post on the top.

http://mutfaksirlari.com/mutfak/pratik-tarifler

What version of the product are you using? On what operating system?

timthumb v. 2.8.11
wordpress 3.5

Thank you

Please provide any additional information below.

Original issue reported on code.google.com by bora.tu...@gmail.com on 19 Dec 2012 at 2:32

GoogleCodeExporter commented 8 years ago
I found the problem and fixed it. 

it is not because of timthumb.php, problem is function catch_that_image() which 
is include my functions.php.

Thank you

Original comment by bora.tu...@gmail.com on 19 Dec 2012 at 10:35

GoogleCodeExporter commented 8 years ago
Glad you worked it out

Original comment by BinaryMoon on 20 Dec 2012 at 9:20

GoogleCodeExporter commented 8 years ago
I have the same issue. What did you do to fix the issue?

Original comment by ajaykuma...@gmail.com on 26 Jan 2013 at 6:34

GoogleCodeExporter commented 8 years ago
I found different code from somewhere and i changed catch_that_image function 
code in function.php with below code

// Get URL of first image in a post
function catch_that_image() {
global $post, $posts;
$first_img = '';
ob_start();
ob_end_clean();
$output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', 
$post->post_content, $matches);
$first_img = $matches [1] [0];

// no image found display default image instead
if(empty($first_img)){
$first_img = "/images/default.jpg";
}
return $first_img;
}

Original comment by bora.tu...@gmail.com on 7 Feb 2013 at 11:50