[Plugin: Post Tiles] Using NextGen Gallery thumbnails
-
Out of the box Post I was unable to use NextGen’s thumbnails.
So I changed the code a bit. pst-files.php line 459 became:// Retrieve the featured image. $id = get_post_thumbnail_id(); if(stripos($id,'ngg-') !== false && class_exists('nggdb')){ $nggImage = nggdb::find_image(str_replace('ngg-','',$id)); $nggThumb = $nggImage->imageURL; // split URL in order to recreate an URL to the NextGen thumb $thePath = pathinfo( $nggImage->imageURL ); $nggThumb = $thePath['dirname'] . "/thumbs/thumbs_" . $thePath['basename']; $thumb = array( $nggThumb, $nggImage->width, $nggImage->height ); } else { $thumb = wp_get_attachment_image_src( get_post_thumbnail_id(), array(350,350)); }
I also made a little change to $featured-style (line 462)
$featured_style = "style='background: url(".$url.") 0 0; background-size: contain;' class='featured-image ".$animation_style."'";
Now post-tiles shows nextgen’s thumbnails.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘[Plugin: Post Tiles] Using NextGen Gallery thumbnails’ is closed to new replies.