Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • nigelta Friend
    #129802

    In the hot topic module I have a problem with the images not resizing correctly, I have tried to alter the parameters but the images stay the same. Can anyone shed some light on this please?

    Sherlock Friend
    #254302

    Hi nigelta !
    – You login to admin >> extensions >> Hot topic module
    – On right panel you change value of height and width image text box. view image attachment for detail.

    nigelta Friend
    #254381

    I have tried that hainn84, but it has no effect at all. The only thing thats does have an effect is if I untick the auto resize box. Then it does size the image correctly but only shows a portion of it.

    You have the directions on your image the wrong way round too 😉

    Sherlock Friend
    #254383

    Hi nigelta !
    Please send link of your site and admin information via pm , i will check it for you.

    nigelta Friend
    #254399

    PM sent 😉

    Sherlock Friend
    #254514

    Hi nigelta !
    Please view your site , i have change image size to 100-100 , You Go to admin >> extensions >> Module manager >> Hot Off The Press module and view config for image.

    nigelta Friend
    #254619

    Hi, I checked the parameters as I have been playing about with them myself hainn84. This is where the problem lies. You changed the sizes there but the images didn’t match what you put in, as is happening to me.

    I found this code using Firebug;

    <blockquote>element.style {
    -x-background-x-position:0%;
    -x-background-y-position:0%;
    background-attachment:scroll;
    background-color:transparent;
    background-image:url(http://www.bikerworkshop.com/images/resized/images/stories/news_items/fatalites_down_in_lancashire_152_114.jpg);
    background-repeat:no-repeat;
    cursor: pointer;
    height:200px;
    }</blockquote>

    I was wondering if I need to add a “width” instruction somewhere as the height seems to work? but I can’t find this code!

    nigelta Friend
    #254686

    <blockquote> function jaResize($image,$max_width,$max_height){
    $path = JPATH_SITE;
    $sizeThumb = getimagesize(JPATH_SITE.’/’.$image);
    $width = $sizeThumb[0];
    $height = $sizeThumb[1];
    if(!$max_width && !$max_height) {
    $max_width = $width;
    $max_height = $height;
    }else{
    if(!$max_width) $max_width = 1000;
    if(!$max_height) $max_height = 1000;
    }
    $x_ratio = $max_width / $width;
    $y_ratio = $max_height / $height;
    if (($width <= $max_width) && ($height <= $max_height) ) {
    $tn_width = $width;
    $tn_height = $height;
    } else if (($x_ratio * $height) < $max_height) {
    $tn_height = ceil($x_ratio * $height);
    $tn_width = $max_width;
    } else {
    $tn_width = ceil($y_ratio * $width);
    $tn_height = $max_height;
    }</blockquote>

    I have looked through the code and I now think that the problem lies in the above but I am not expert enough to change it and I could well be wrong. Its located in /public_html/modules/mod_ja_catslwi.

    Can anyone confirm this or tell me I am wrong please? Just to recap, the image resize works on the height only and not the width and what I want to do is make sure that the displayed image has the size 200px high by 152px high.

    nigelta Friend
    #254751

    Anyone :confused:

    Sherlock Friend
    #254904

    Hi nigelta !
    I have found problem , it in jaResize function. I can explain detail below :
    1. Hot topic module get image from content and resize it (if you select auto rezise in module admin )
    2. logic of resize can understand :
    – Don’t resize if size config(config in hot topic admin) > real size image in content.
    – If size config < real size image in admin , image wil be resize but keep ratio between height and width( mean: old height / old width = new height / new width).

    You can try to clear about problem by way :
    Login to admin >> extensions >> module manager >> Hot topic module >> config height and width to 30 and 20. then go to imagesresizedimagesstoriesdemohot_news to view thumb image.

Viewing 10 posts - 1 through 10 (of 10 total)

This topic contains 10 replies, has 2 voices, and was last updated by  Sherlock 16 years, 5 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum