Posted By

rabc on 06/14/12


Tagged

php wordpress thumb timthumb


Versions (?)

Correct URL to display Thumb in WP MU


 / Published in: PHP
 

http://www.binarymoon.co.uk/2009/10/timthumb-wordpress-mu/

  1. $theImageSrc = 'path/To/Image.jpg';
  2. global $blog_id;
  3. if (isset($blog_id) && $blog_id > 0) {
  4. $imageParts = explode('/files/', $theImageSrc);
  5. if (isset($imageParts[1])) {
  6. $theImageSrc = '/blogs.dir/' . $blog_id . '/files/' . $imageParts[1];
  7. }
  8. }

Report this snippet  

You need to login to post a comment.