WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] how use timthumb with external image link?? (10 posts)

  1. ma7aba star
    Member
    Posted 3 years ago #

    please help me
    how i can use (http://code.google.com/p/timthumb/) to make Thumbnail Image to external image
    on hosting in "http://picasaweb.google.com/home"
    & whats the code
    i can put in wordpress themes
    please help me

    thanks all

  2. ma7aba star
    Member
    Posted 3 years ago #

    & atuo use first image in post

  3. ma7aba star
    Member
    Posted 3 years ago #

    ????????????????????????

  4. Jamal Mohamed
    Member
    Posted 3 years ago #

    For obvious security reasons, timthumb.php blocks any external image URL, unless that URL is added into the list of white listed websites.

    If you look into the code of timthumb.php, you'll see an array containing white list URLS. Add picasaweb.google.com into the allowed white list.

  5. ma7aba star
    Member
    Posted 3 years ago #

    Thank you very much
    But how can I add to the list
    Where do I find it?

  6. Jamal Mohamed
    Member
    Posted 3 years ago #

    Open timthumb.php file and you'll see an array of allowed websites.

    Find the following code:

    // external domains that are allowed to be displayed on your website
    $allowedSites = array (
    	'flickr.com',
    	'picasa.com',
    	'blogger.com',
    	'wordpress.com',
    	'img.youtube.com',
    );

    Now append picasaweb.google.com like this:

    // external domains that are allowed to be displayed on your website
    $allowedSites = array (
    	'flickr.com',
    	'picasa.com',
    	'blogger.com',
    	'wordpress.com',
    	'img.youtube.com',
    	'picasaweb.google.com',
    );

    That's it.

  7. ma7aba star
    Member
    Posted 3 years ago #

    You are a wonderful man
    Thank you very much
    May Allaah help you
    thank you from the depths of my heart
    I wish you success

  8. Jamal Mohamed
    Member
    Posted 3 years ago #

    @ma7aba star: thanks, mate. I'm glad that it worked for you.

  9. Ahmed Hamouda
    Member
    Posted 2 years ago #

    This is great but what if I modified the code to use the featured image of the post (starting from wp 2.9) instead of the custom field.. But it still doesnt work!

    Any help is appreciated..
    Thanks in advance :)

  10. erwinprasetyo
    Member
    Posted 2 years ago #

    works on wp 3.2 ... @Jamal nice info, thanks for your help

Topic Closed

This topic has been closed to new replies.

About this Topic