Using timthumb on WordPress , still not working:(( . Help,please
Here is my site,where the timthumb is not working :" http://vitinh.cz/?page_id=8 " I have tried many solutions but nothing .... And i also used your tips in your website (http://andrewroycarter.com/wordpress-2/using-timthumb-on-wordpress-multi-us开发者_StackOverflow社区er/ ). But I can not make it work anyway :(. Could you help me solve it ? Thank you . I'm waiting forward to your answer.
(Wordpress Version 3.0.1)
The problem is that you are trying to use timthumb.php to resize images that are not on your server.
The actual error for the resized images is this:
remote host "ongmat.cz" not allowed TimThumb version : 1.14
The solution is to edit the timthumb.php script and make a change to line 24 (or close to it)
// external domains that are allowed to be displayed on your website
$allowedSites = array (
'flickr.com',
'picasa.com',
'blogger.com',
'wordpress.com',
'img.youtube.com',
);
and add the domain you want to use images from, such as adding ongmat.cz to the array so it looks like this:
$allowedSites = array (
'flickr.com',
'picasa.com',
'blogger.com',
'wordpress.com',
'img.youtube.com',
'ongmat.cz',
);
or you can change this option (although not as secure)
define ('ALLOW_EXTERNAL', FALSE); // allow external website (override security precaution)
and change FALSE to TRUE
The first 30 lines should look like this:
/**
* TimThumb script created by Ben Gillbanks, originally created by Tim McDaniels and Darren Hoyt
* http://code.google.com/p/timthumb/
*
* GNU General Public License, version 2
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*
* Examples and documentation available on the project homepage
* http://www.binarymoon.co.uk/projects/timthumb/
*/
define ('CACHE_SIZE', 250); // number of files to store before clearing cache
define ('CACHE_CLEAR', 5); // maximum number of files to delete on each cache clear
define ('CACHE_USE', FALSE); // use the cache files? (mostly for testing)
define ('VERSION', '1.16'); // version number (to force a cache refresh)
define ('DIRECTORY_CACHE', './cache'); // cache directory
define ('DIRECTORY_TEMP', './temp'); // temp directory
define ('MAX_WIDTH', 1000); // maximum image width
define ('MAX_HEIGHT', 1000); // maximum image height
define ('ALLOW_EXTERNAL', TRUE); // allow external website (override security precaution)
// external domains that are allowed to be displayed on your website
$allowedSites = array (
'flickr.com',
'picasa.com',
'blogger.com',
'wordpress.com',
'img.youtube.com',
'ongmat.cz',
);
精彩评论