Results 1 to 4 of 4

Thread: I found the reason why thumbails are not showing up

  1. #1
    Thread Starter
    jamai's Avatar
    Join Date
    Nov 2009
    Posts
    32
    Thanks
    0
    Thanked 0 Times in 0 Posts

    I found the reason why thumbails are not showing up

    Hi All,

    After reading all posts regards issue with thumbnails which was not showing on the main page, I figure out what cause problem in my case - I'm sure I'm not the only person who has the same problem.

    The problem which cause thumbnails not displayed is WordPress address (URL) and Blog address (URL) path on wordpress settings. In my case, I have wordpress installed in subdirectory. My domain - http://www.a-gratka.pl" onclick="window.open(this.href);return false; - is looking on that directory so my server settings are /wordpress (as wordpress is name of subdirectory where wordress and classipress is installed)

    So, if I my settings are:

    WordPress address (URL) - http://www.a-gratka.pl" onclick="window.open(this.href);return false;
    Blog address (URL) - http://www.a-gratka.pl" onclick="window.open(this.href);return false;

    I don't see thumbails when post a ad

    but if I change to:

    WordPress address (URL) - http://www.szperaj.com/wordpress" onclick="window.open(this.href);return false;
    Blog address (URL) - http://www.szperaj.com/wordpress" onclick="window.open(this.href);return false;

    problem with images does't exist so when place ad I can see thumbnails

    Now I have two qestions:

    1. My question then is, why do I need to have path of my blog like http://www.szperaj.com/wordpress" onclick="window.open(this.href);return false; but not as my domain name: http://www.a-gratka.pl" onclick="window.open(this.href);return false; - to get images works right?
    2. Is that any common that I have my wordress in subdirectory I can't receive registration link? How to solve that problem?
    (settings in wordpress are to allow user to register)

    regards,
    Adam

  2. #2
    Thread Starter
    jamai's Avatar
    Join Date
    Nov 2009
    Posts
    32
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: I found the reason why thumbails are not showing up

    by the way, sorry for my english, still learning

    regards,
    Adam

  3. #3
    Thread Starter
    jamai's Avatar
    Join Date
    Nov 2009
    Posts
    32
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: I found the reason why thumbails are not showing up

    Hi All,

    Ok, finally problem solved. Moved wordpress from subdirectory to main directory and now works fine under http://www.nadajesz.pl" onclick="window.open(this.href);return false;
    So if ayone have the same problem which I had (no thumbails on page, wrong login link and if yu have wordpress not in main root )- then you know solution

    regards,
    Jamai

  4. #4
    Founder dcowgill's Avatar
    Join Date
    Mar 2009
    Location
    San Francisco, CA
    Posts
    1,939
    Thanks
    66
    Thanked 135 Times in 99 Posts

    Question Re: I found the reason why thumbails are not showing up

    Thanks for sharing your solution but the problem doesn't have to do with the name or number of folders.

    It just can't find the correct path of where your images are located when trying to display the thumbnail. You can easily fix this by going into wp-content/themes/classipress/includes/img_resize.php and tinker with the following path near the top:

    Code:
    $image_url = "../../../../wp-content/uploads/classipress/".$_GET["url"];
    and then in your case add another ../ like so:
    Code:
    $image_url = "../../../../../wp-content/uploads/classipress/".$_GET["url"];
    For others, you might need to remove a ../ instead. It's just a matter of trial and error. Sometimes you might need to add/remove a couple ../../ before the thumbnail will show up.

    The reason is not everyone has their folders setup the same way and each ../ equals a step down in a directory.

    Version 3.0 won't have this issue and will be using timthumb instead which is much more flexible and dynamically discovers your image directory.

    UPDATE

    Instead of following the above directions and manually having to figure out your path, I recommend using this instead.

    Comment out the following line in img_resize.php like so:
    Code:
    // $image_url = "../../../../wp-content/uploads/classipress/".$_GET["url"];
    and then below it, add the following:

    Code:
    $paths = array(
    		"../..",
    		"../../..",
    		"../../../..",
    		"../../../../..",
    		"../../../../../..",
    		"../../../../../../.."
    	);
    	
    foreach($paths as $path) {
    	$cpath = $path . '/wp-content/uploads/classipress/' . $_GET["url"];
    	if(@file_exists($cpath)) {
    		$image_url = $cpath;
    	}
    }
    Save and then try loading up your page again. It should now work. If not, chances are you didn't setup the image upload folder correctly. Make sure your folder structure looks exactly like this in (all in lowercase) /wp-content/uploads/classipress/

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)