Tweaking TimThumb Plugin Code Need Php Small Help

Discussion in 'PHP' started by amitpatel_3001, Oct 13, 2008.

Thread Status:
Not open for further replies.
  1. #1
    Hey, i wanted some help regarding the TimThumb plugin available for mimbopro wordpress theme.

    <img src="/scripts/timthumb.php?src=/images/image.jpg&h=150&w=150&zc=1" alt="" />

    In the above code the script calls all the images and shows a small resized image.

    The problem iam facing is that :

    The Blog URL is http://www.myblog.com/wordpress/

    If images are hosted at http://www.myblog.com/wordpress/ ... eg - http://www.myblog.com/wordpress/images/ then the plugin works and shows the images.

    If images are hosted at http://www.myblog.com/images then the plugin wont work and no images are shown because i think the plugin searches for any images located below the wordpress installation folder and not from the root folder.

    Can someone check out the attachment file and suggest some changes in the file to make sure it works and searches for images in the whole domain and imports.

    Note : TimThumb PHP Script is a custom image-sizing script, that allows you to produce a cropped and sized version of an image - http://code.google.com/p/timthumb/w/list
     

    Attached Files:

    amitpatel_3001, Oct 13, 2008 IP
  2. vishwaa

    vishwaa Well-Known Member

    Messages:
    271
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    138
    #2
    Around line no 325-328 in the script, you can see comments like below.

    So it should work only when you use the 2nd format (src=/images/...).

    Hope it helps.
     
    vishwaa, Oct 14, 2008 IP
Thread Status:
Not open for further replies.