oseawey / timthumb

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

Wordpress Multisite Fix For Thimthump 1.19 #135

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Timthumb will not work if Wordpress 3 multisite enabled.

I've a workaround on 
http://www.dillenberg.net/2010/11/timthumb-1-19-mit-wordpress-3-multisite-fix/

^^but it works not for single- and multisite. Please support both in your 
project. Links to my site are welcome ;)

Regards Jeuner

Original issue reported on code.google.com by jeu...@gmail.com on 28 Nov 2010 at 9:44

GoogleCodeExporter commented 9 years ago
Hi there - TimThumb is not a WordPress specific plugin so I am afraid I won't 
be adding WordPress specific code to it as that will break it for all the other 
websites that use it.

For example the following code : require_once('../../../wp-blog-header.php');

will only work if TimThumb is in a specific directory within a WordPress 
install. In addition that code will slow down the script massively as it will 
load WordPress and then connect to the database for something that shouldn't 
require a database connection.

The correct solution to the TimThumb with WordPress multisite is to pass the 
correct value to the src. Info on this here: 
http://www.binarymoon.co.uk/2009/10/timthumb-wordpress-mu/

Hope that all makes sense.

Original comment by BinaryMoon on 3 Dec 2010 at 4:05