[Plugin: Special Recent Posts] Issue with thumbnail in a network installation
-
Hi Luca,
Thanks for this plugin.
I am trying it a network installation where I use the main blog / for the English part and a 2nd blog called /fr/ for the French part (xpgoodway.com).When you have an article in the /fr/ blog with no featured image, your code can’t generate an image for the first image it finds.
I looked at your code and found out that the problem is happening when it tries to make out the physical path of the image from its url.
The code is located in classes > class-main.php > SpecialRecentPostsFree > generateGDImage()
I have written a workaround that works for me:
// Checking if we're processing a featured image or a first-post image. if ($image_origin == "firstimage" ) { global $blog_id; if($blog_id != 1) { $image_to_render = '/wp-content/blogs.dir/' . $blog_id . substr($image_to_render, strpos($image_to_render, "/" , 1)); } // Building image path. $image_path = $_SERVER[ "DOCUMENT_ROOT"] . $image_to_render; } else {You may already be aware of that …
Cheers
Fred
The topic ‘[Plugin: Special Recent Posts] Issue with thumbnail in a network installation’ is closed to new replies.