OSCOMMERCE SUPPORT CALL 702-453-3332

 

Help - Search - Members - Calendar
Full Version: need help with thumbnails in admin section
osCommerce Community Support Forums > osCommerce Online Merchant v2.x > General Support
IAAF
under admin - configuration - images - I have set the following

Small Image Width: 100
Small Image Height
Heading Image Width: 60
Heading Image Height
Subcategory Image Width: 100
Subcategory Image Height
Calculate Image Size: true
Image Required: true
Small Image Height:

This setting works ok for getting a less 'distorted' thumbnail image in the store catalog - but now I do not get any thumbnail images in the admin section - which makes it hard when trying to enter new items or trying to modify existing ones since the large image pushes everything over to make room for image.

What do I need to change to get back a thumbnail in the admin section? thanks for any help - I've tried searching but its difficult to narrow it down to specifically what I'm searching for.
Monika in Germany
hi, I had my fight with exactly the same thing this week ... I'm pretty sure on older sites the thumbnailing worked, but not on this project.

Anyway, here is my hack:
in admin/includes/functions/html_output.php find

CODE
////
// The HTML image wrapper function
function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '') {
    $image = '<img src="' . tep_output_string($src) . '" border="0" alt="' . tep_output_string($alt) . '"';

    if (tep_not_null($alt)) {
      $image .= ' title=" ' . tep_output_string($alt) . ' "';
    }

    if (tep_not_null($width) && tep_not_null($height)) {
      $image .= ' width="' . tep_output_string($width) . '" height="' . tep_output_string($height) . '"';
    }

    if (tep_not_null($parameters)) $image .= ' ' . $parameters;

    $image .= '>';

    return $image;
  }


replace by
CODE
////
// The HTML image wrapper function
  function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '') {
    $image = '<img src="' . tep_output_string($src) . '" border="0" alt="' . tep_output_string($alt) . '"';

    if (tep_not_null($alt)) {
      $image .= ' title=" ' . tep_output_string($alt) . ' "';
    }
/*
    if (tep_not_null($width) && tep_not_null($height)) {
      $image .= ' width="' . tep_output_string($width) . '" height="' . tep_output_string($height) . '"';
    }
*/
    if (tep_not_null($width)) {
      $image .= ' width="' . tep_output_string($width);
    }
    if (tep_not_null($height)) {
      $image .= ' height="' . tep_output_string($height) . '"';
    }

    if (tep_not_null($parameters)) $image .= ' ' . $parameters;

    $image .= '>';

    return $image;
  }


as you can see, the image in the original function only resized if both paramaters were added, which could have resulted in distorted images of course.

enjoy!
vcudnik
QUOTE (Monika in Germany @ Aug 3 2007, 04:30 AM) *
hi, I had my fight with exactly the same thing this week ... I'm pretty sure on older sites the thumbnailing worked, but not on this project.

...

as you can see, the image in the original function only resized if both paramaters were added, which could have resulted in distorted images of course.

enjoy!


I don't think that's the problem the original poster had. It's not that they are distorted, it's that they are missing. They show up fine in the store, just not in the admin section. I've had the same problem, but since it's a small store I quit worrying about it. Now that I'm adding more products, I'd like to solve it too.

Here's what the location lists for a missing thumbnail in my admin section:
https://cozumel.globat.com/shoponline//usr/...ges/pigmans.jpg

Here's what the location lists for a working thumbnail in my store section:
http://www.peanutsandpork.com/shoponline/p...;w=100&h=80

The admin section is calling out the full size image, but it doesn't show. I'm thinking it has to do with the long address, the extra cozumel.globat.com/shoponline//usr/local/psa/home/vhosts/ .. is it a Globat thing? When I set this up I had to copy all my image files to two places to get them to work. (All this from what was supposed to be a 1-click store install.)
Monika in Germany
this was definitely OP's issue ... thumbnails not created, instead huge images grabbing all available space on screen
QUOTE
but now I do not get any thumbnail images in the admin section - which makes it hard when trying to enter new items or trying to modify existing ones since the large image pushes everything over to make room for image.


You on the other hand have a double slash in your url. I think the RC1 thread has a fix for that - you have probably incorrect paths in your configure.php or so.
Jo H
I am having the exact same problem as the OP - and I know it's a pathing issue, I just don't know where to make the change that would correct it. The images appear fine in all other sections of the shop apart from admin. The paths are as shown below:

In the main catalogue (which works) the path is: http://mysite.com/shop/images/290_bd_maini...eigh%20main.png

In the admin side (which doesn't work) the path becomes: http://mysite.com/shop/admin/shop/images/2...eigh%20main.png

If any kind soul could tell me which file I need to edit, I would be eternally grateful! Obviously I need to get rid of the admin/shop addition to the path - but how?

This is costing me a fortune in headache pills!
Jo H
Still battling with this problem - is there anywhere apart from this forum that I could get help? Sorry to go on and on about it, but it's the one thing that's still to be sorted out before I can hand the shop over to its owner, and I just can't find the solution...
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.