• Hi There,

    I’ve been trying to solve this problem all day, TimThumb appears to be screwing up my external images. I’ve googled and tried all the solutions I could find (CHMOD the directory to 777, make sure external images were allowed, tried updating the script, etc)

    Could someone take a look at my site and let me know where I’m going wrong?

    https://ablemagazine.co.uk/

Viewing 10 replies - 1 through 10 (of 10 total)
  • Wrong use of timthumb.

    You have:

    <a href="https://ablemagazine.co.uk/the-challenge-of-inspecting-home-care/" rel="bookmark" title="Permanent Link to The challenge of inspecting home care">
    <img src="https://ablemagazine.co.uk/wp-content/themes/templegate/scripts/timthumb.php?src=<img src="https://static.guim.co.uk/sys-images/Guardian/Pix/pictures/2012/3/21/1332338624072/lady-in-care-home-003.jpg" />&w=200&h=150&zc=1&q=100"
    alt="The challenge of inspecting home care" class="image" width="200" /></a>

    You should have:

    <a href="https://ablemagazine.co.uk/the-challenge-of-inspecting-home-care/" rel="bookmark" title="Permanent Link to The challenge of inspecting home care">
    <img src="https://ablemagazine.co.uk/wp-content/themes/templegate/scripts/timthumb.php?src=https://static.guim.co.uk/sys-images/Guardian/Pix/pictures/2012/3/21/1332338624072/lady-in-care-home-003.jpg&w=200&h=150&zc=1&q=100" alt="The challenge of inspecting home care" class="image" width="200" /></a>

    Thread Starter craven222

    (@craven222)

    How would I change this? I don’t see any preferences. This is how timthumb ran out of the box.

    This theme use Custom Fields.
    You must add new eg.: name: image, value: https://static.guim.co.uk/sys-images/Guardian/Pix/pictures/2012/3/21/1332338624072/lady-in-care-home-003.jpg

    Thread Starter craven222

    (@craven222)

    Thanks, that certainly does fix it.

    But why has it put all my old images inside <img src=””> inside the custom fields? Is there any sort of script I can run that’ll remove all these double quotes? (I have 1000+ posts)

    by sql queries?

    update wp_postmeta set meta_value = replace(meta_value, ‘<img src=”‘, ”) where meta_key=image;
    update wp_postmeta set meta_value = replace(meta_value, ‘” />’, ”) where meta_key=image;

    Thread Starter craven222

    (@craven222)

    Getting the following error when trying to run those queries

    #1054 - Unknown column 'image' in 'where clause'

    Can I run

    update wp_postmeta set meta_value = replace(meta_value, '<img src="', '');
    update wp_postmeta set meta_value = replace(meta_value, '" />', '');

    ?

    sorry

    update wp_postmeta set meta_value = replace(meta_value, ‘<img src=”‘, ”) where meta_key=’image’;
    update wp_postmeta set meta_value = replace(meta_value, ‘” />’, ”) where meta_key=’image’;

    -it should work.

    Thread Starter craven222

    (@craven222)

    ‘961 row(s) affected. ( Query took 0.0206 sec )’

    Woohoo, Thanks – you just saved me a lot of work! ??

    ….but update your timthumb! last version: https://timthumb.googlecode.com/svn/trunk/timthumb.php

    …and change allowed sites

    if(! isset($ALLOWED_SITES)){
    	$ALLOWED_SITES = array (
    		'ablemagazine.co.uk',
    		'static.guim.co.uk',
    	);
    }

    Thread Starter craven222

    (@craven222)

    This works for posts already made. But all new posts autoblogged post are corrupt the image.

    How can I change it so that the <img src=” “> isn’t posted in the field in the first place?

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘TimThumb & Temple Gate’ is closed to new replies.