-
AuthorPosts
-
nigelta Friend
nigelta
- Join date:
- September 2006
- Posts:
- 85
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 4
- Thanked:
- 13 times in 2 posts
June 18, 2008 at 1:15 am #129802In 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 FriendSherlock
- Join date:
- September 2014
- Posts:
- 11453
- Downloads:
- 0
- Uploads:
- 88
- Thanks:
- 221
- Thanked:
- 2478 times in 2162 posts
June 18, 2008 at 3:46 am #254302Hi 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 Friendnigelta
- Join date:
- September 2006
- Posts:
- 85
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 4
- Thanked:
- 13 times in 2 posts
June 18, 2008 at 10:05 am #254381I 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 FriendSherlock
- Join date:
- September 2014
- Posts:
- 11453
- Downloads:
- 0
- Uploads:
- 88
- Thanks:
- 221
- Thanked:
- 2478 times in 2162 posts
June 18, 2008 at 10:07 am #254383Hi nigelta !
Please send link of your site and admin information via pm , i will check it for you.nigelta Friendnigelta
- Join date:
- September 2006
- Posts:
- 85
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 4
- Thanked:
- 13 times in 2 posts
June 18, 2008 at 11:48 am #254399PM sent 😉
Sherlock FriendSherlock
- Join date:
- September 2014
- Posts:
- 11453
- Downloads:
- 0
- Uploads:
- 88
- Thanks:
- 221
- Thanked:
- 2478 times in 2162 posts
June 19, 2008 at 1:46 am #254514Hi 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 Friendnigelta
- Join date:
- September 2006
- Posts:
- 85
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 4
- Thanked:
- 13 times in 2 posts
June 19, 2008 at 9:16 am #254619Hi, 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 Friendnigelta
- Join date:
- September 2006
- Posts:
- 85
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 4
- Thanked:
- 13 times in 2 posts
June 19, 2008 at 2:56 pm #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 Friendnigelta
- Join date:
- September 2006
- Posts:
- 85
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 4
- Thanked:
- 13 times in 2 posts
June 19, 2008 at 6:36 pm #254751Anyone :confused:
Sherlock FriendSherlock
- Join date:
- September 2014
- Posts:
- 11453
- Downloads:
- 0
- Uploads:
- 88
- Thanks:
- 221
- Thanked:
- 2478 times in 2162 posts
June 20, 2008 at 8:23 am #254904Hi 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. -
AuthorPosts
This topic contains 10 replies, has 2 voices, and was last updated by Sherlock 16 years, 6 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum