Keyword
Please note that official support for commercial extensions & templates is provided in the Subscriber Help Desk.
Support requests should ONLY be directed there and require an active subscription plan.
This forum board is to be used for archive purposes and knowledge exchange ONLY.

All thumbnails the same size

More
17 years 3 months ago #2646 by Lori Hebert
Replied by Lori Hebert on topic Re: All thumbnails the same size

I would like all the thumbnails to display with the same dimensions regardless of the original image size.  Is anyone aware of what needs to be done to accomplish this?

Here is the page that I am working on:
www.sitesolutionsla.com/seminole-towne-center.html

Thanks!


I like how Eskwire brought the Previous/Next navigation down towards the bottom of the image and how the thumbnail display is changed to have a darker outline.  I am slightly CSS savvy, but am not sure how to make these updates.  Any advice out there?  Thanks in advance!

Please Log in or Create an account to join the conversation.

More
17 years 3 months ago #2647 by Lori Hebert
Replied by Lori Hebert on topic Re: All thumbnails the same size


I like how Eskwire brought the Previous/Next navigation down towards the bottom of the image...


OK- I just played around until I figured this part of my question out.  I just changed the "left/right 15%" to "left/right 85%".  Easy right?

#prevLink {left:0;float:left;background:url(prevlabel.gif) left 85% no-repeat;}
#nextLink {right:0;float:right;background:url(nextlabel.gif) right 85% no-repeat;}
#prevLink:hover, #prevLink:visited:hover {background:url(prevlabel.gif) left 85% no-repeat;}
#nextLink:hover, #nextLink:visited:hover {background:url(nextlabel.gif) right 85% no-repeat;}

Any advice out there for modifying the CSS to style the appearance of the thumbnail?

Please Log in or Create an account to join the conversation.

More
17 years 3 months ago #2648 by acijanos
Replied by acijanos on topic Re: All thumbnails the same size
Elle, Thank you for this!!

I've been working on a client's e-commerce site - I was hoping to use SIGPro, but there was no way to do this unless I could set all of the thumbnails to display at the same ratio.

It's a HUGE help.  Thanks.

Professional, Eco-Friendly Joomla! Web Design: www.cartanova.ca

Please Log in or Create an account to join the conversation.

More
17 years 3 months ago - 17 years 3 months ago #2649 by acijanos
Replied by acijanos on topic Thumbnail Spacing
One more Question : The Hack works great.

However, in IE6 I have a large empty space vertically (and apparently horizontally as well, since the thumbnail doesn't display inline with the content).

Any suggestions?

/Update/

By adding this CSS to my "IE6Template_Fix.css" file.
.sig {
	display: inline; 
}

and then modifying the jw_plugin_sigpro.php file, to a height of '+0', I was able to eliminate most of the space.

However, there's still an extra 10-15px of whitespace below each of the thumbnails.  By modifying the readon property in my template CSS I was able to determine that the culprit is something realated to SIGPro, but still havent' found the answer.

Please help if you can!  :)

Professional, Eco-Friendly Joomla! Web Design: www.cartanova.ca

Please Log in or Create an account to join the conversation.

More
17 years 3 months ago #2650 by Cornelio Caday
Replied by Cornelio Caday on topic Re: All thumbnails the same size
So, the SIG PRO v1.3 that was supposed to be released last May 2007 has never been released yet?

Please Log in or Create an account to join the conversation.

More
17 years 2 months ago #2651 by tAkeda
Replied by tAkeda on topic Re: All thumbnails the same size

and then modifying the jw_plugin_sigpro.php file, to a height of '+0', I was able to eliminate most of the space.

However, there's still an extra 10-15px of whitespace below each of the thumbnails.


thanks for this, it works. i managed to pull the text closer by using a negative value:

instead of +0 i used -30 and it elminates some of the space that was annoying me between the images and the next line of text

Please Log in or Create an account to join the conversation.

More
17 years 2 months ago #2652 by acijanos
Replied by acijanos on topic Re: All thumbnails the same size

instead of +0 i used -30 and it elminates some of the space that was annoying me between the images and the next line of text


Glad that works for you - I tried using Negative values also, but it caused a problem with the spacing of my 'readon' class in IE 6.

Professional, Eco-Friendly Joomla! Web Design: www.cartanova.ca

Please Log in or Create an account to join the conversation.

More
17 years 2 months ago - 17 years 2 months ago #2653 by enrciosanchez
Replied by enrciosanchez on topic Re: All thumbnails the same size
Nice work with the code. It runs fine for me, although there is one problem  :(

I am running SIG Pro in Joomla 1.5.1 The images display correctly (all the same size) on the first viewing, however after the images are stored in the cache (and the page is refreshed) they display at their original sizes again.

Here is the URL of the testing page www.verdigrisdesign.com.au/index.php/test

Anyone have any ideas?  ???

PS: It'd be great to see this as a theme in the next version.

EDIT: After emptying the browser's cache, the images still display in their original format. It seems as though the server's image cache has to expire before the images will display correctly locally. (I really don't know what's going on)  :'(

EDIT-2:
SOLUTION

[move]:D :D :D[/move]
The original solution posted forgot to change the code for when the cache timer has not run out and the thumbnails exist, so the script was reverting back to the original thumbnails. To fix this I replaced the original "create thumbnails" code with this:
// create thumbnails
							if (file_exists($mosConfig_absolute_path.$tempfolder.md5($_images_dir_.$name).".".$format) && filemtime ($mosConfig_absolute_path.$tempfolder.md5($_images_dir_.$name).".".$format) + $cache_expire_time * 60 > time()) {
								$html .= '<div class="thumb_size" title="'.$clickopen.'" style="background-image:url('.$mosConfig_live_site.$tempfolder.md5($_images_dir_.$name).".".$format.')" ></div>';
							} else {
								$fromname = $mosConfig_absolute_path.$rootfolder.$_images_dir_.'/'.$images[$a];
								$toname = $mosConfig_absolute_path.$tempfolder.md5($_images_dir_.$name).".".$format;
								$toname_live = $mosConfig_live_site.$tempfolder.md5($_images_dir_.$name).".".$format;
								$result = $this->makeThumb( $fromname, $toname, $image_type, $_quality_, $_width_final_, $_height_final_);
								if($result)
								$html .= '<div class="thumb_size" title="'.$clickopen.'" style="background-image:url('.$toname_live.')" ></div>';
								else
								$html .='<span>Error creating thumbnail!</span>';
							}

I have no idea what I'm doing, but this works  :D

Please Log in or Create an account to join the conversation.

  • Martin Smith Photography
  • Martin Smith Photography's Avatar
  • Offline
  • New Member
More
17 years 2 months ago #2654 by Martin Smith Photography
Replied by Martin Smith Photography on topic Re: All thumbnails the same size
Apologies if I am prolonging this subject unnecessarily. The first link below shows a page with thumbnails for a set of images in landscape format. The second link shows another page with images in portrait format. The first set of images is laid out nicely whilst the second is not, with too large a gap between the thumbnails. How can I correct this, as the settings seem to be working OK for the landscape images but not the others. Thumbnail settings are 200 x 180. Thanks, Martin Smith

Link 1 [Landscape Format]
www.mgjsphotography.co.uk/v15/index.php/image-gallery/34-digital-photography/83-norway-2007-set-02

Link 2 [Portrait Format]
www.mgjsphotography.co.uk/v15/index.php/image-gallery/34-digital-photography/77-norway-2007

Please Log in or Create an account to join the conversation.

  • Martin Smith Photography
  • Martin Smith Photography's Avatar
  • Offline
  • New Member
More
17 years 2 months ago - 17 years 2 months ago #2655 by Martin Smith Photography
Replied by Martin Smith Photography on topic Re: All thumbnails the same size
Don't ask me how, but the images on the portrait link now appear to be OK. Strange, as I have made no amendments at all since my previous post. Anyone know what is going on here? Thanks, Martin

Please Log in or Create an account to join the conversation.

More
17 years 2 months ago #2656 by Joost Akkermans
Replied by Joost Akkermans on topic Re: All thumbnails the same size
Used the hack and al the other great ideas/solutions posted here. I ran into a little problem with the captions. They get displayed over the 'old' thumbnail width.

I changed line 371 in jwsigpro.php to:

$html .= '<span class="sig_pseudocaption" style="width:116px"><b>'.$final_caption.'</b></span><span class="sig_caption" style="width:116px" title="'.$clickopen.'">'.$final_caption.'</span>';

where i changed the two width values from a variable to a hard coded value of 116px (my thumbs are 120x120).

This did the trick for me very well. Hope this is useful to someone, thought i'd share it.

Please Log in or Create an account to join the conversation.

More
17 years 1 month ago - 17 years 1 month ago #2657 by overallq
Replied by overallq on topic Re: All thumbnails the same size

In the /mambots/content/plugin_jw_sigpro.php file look for this line of code:

$html .=$leftcomment.'<img alt="'.$clickopen.'" title="'.$clickopen.'" src="'.$toname_live.'" />'.$rightcomment;

and replace it with this line (or add a line and comment out the original if you're scared to delete it like me!):

$html .= '<div class="thumb_size" title="'.$clickopen.'" style="background-image:url('.$toname_live.')" ></div>';


I tried it, but get this error on my site:

Parse error: syntax error, unexpected T_STRING in /home/quiltmap/public_html/overallquilter/mambots/content/plugin_jw_sigpro.php on line 1

Nevermind ... I figured it out. Works great! Thanks!

Please Log in or Create an account to join the conversation.

  • Hj Izad Rithauddin Hj Abd Majid
  • Hj Izad Rithauddin Hj Abd Majid's Avatar
  • Offline
  • New Member
More
17 years 1 month ago #2658 by Hj Izad Rithauddin Hj Abd Majid
Replied by Hj Izad Rithauddin Hj Abd Majid on topic Re: All thumbnails the same size
anyone has any luck this? Those who has the success, show your website.  :)

Please Log in or Create an account to join the conversation.

More
16 years 8 months ago #2659 by dax702
Replied by dax702 on topic Re: All thumbnails the same size
I read through this thread and see lots of fixes and code changes proposed. Is there a final "do this, this and this" to get the thumbnails working properly?

Please Log in or Create an account to join the conversation.

More
16 years 5 months ago - 16 years 5 months ago #2660 by sexdrum
Replied by sexdrum on topic Re: All thumbnails the same size
lol.... I did a different way long time ago since Joomla 1.0.12.

In Joomla1.5 I modified /plugins/content/plugin_jw_sig/showthumb.php

to generate cropped square thumbnail from the beginning.
if($_GET['img'] == "")
exit;

$_GET['img'] = str_replace( '..', '', urldecode( $_GET['img'] ) );
$_image_ = '../../../images/stories/'.$_GET['img'];

$dst_img_w = intval($_GET['width']); // Destination Width
$dst_img_h = intval($_GET['height']); // Destination Height
$_quality_ = intval($_GET['quality']); // Destination Quality

$src_img_size = getimagesize($_image_); // Source Image Size Width x Height

if(!$src_img_size[0])
exit();

$src_img_init_x= 0; $src_img_init_y = 0; // Source Image Initial Coordinator

//width > height
if($src_img_size[0] > $src_img_size[1]) {
$src_img_init_x = (int)(($src_img_size[0]-$src_img_size[1])/2);
$src_img_w = $src_img_size[1];
$src_img_h = $src_img_size[1];
}
//width < height
if($src_img_size[0] < $src_img_size[1]) {
$src_img_init_y = (int)(($src_img_size[1]-$src_img_size[0])/2);
$src_img_w = $src_img_size[0];
$src_img_h = $src_img_size[0];
}

//width = height
if($src_img_size[0] == $src_img_size[1]) {
$src_img_w = $src_img_size[0];
$src_img_h = $src_img_size[0];
}

if(strtolower(substr($_GET['img'],-3)) == "jpg") {
header("Content-type: image/jpg");
$dst_img=ImageCreate($dst_img_w,$dst_img_h);
$src_img=ImageCreateFromJpeg($_image_);
$dst_img = imagecreatetruecolor($dst_img_w,$dst_img_h);
imagecopyresampled($dst_img,$src_img,0,0,$src_img_init_x,$src_img_init_y,$dst_img_w,$dst_img_h,$src_img_w,$src_img_h);
$img = Imagejpeg($dst_img,'', $_quality_);
}

if(substr($_GET['img'],-3) == "gif") {
header("Content-type: image/gif");
$dst_img=ImageCreate($dst_img_w,$dst_img_h);
$src_img=ImageCreateFromGif($_image_);  
ImagePaletteCopy($dst_img,$src_img);
ImageCopyResized($dst_img,$src_img,0,0,$src_img_init_x,$src_img_init_y,$dst_img_w,$dst_img_h,$src_img_w,$src_img_h);
$img = Imagegif($dst_img,'', $_quality_);
}

if(substr($_GET['img'],-3) == "png") {
header("Content-type: image/png");
$src_img=ImageCreateFromPng($_image_);
$dst_img = imagecreatetruecolor($dst_img_w,$dst_img_h); 
ImagePaletteCopy($dst_img,$src_img);
ImageCopyResized($dst_img,$src_img,0,0,$src_img_init_x,$src_img_init_y,$dst_img_w,$dst_img_h,$src_img_w,$src_img_h);
$img = Imagepng($dst_img,'', $_quality_);
}

You can see my live demo on
www.ibualoy.net/iblog/travel/new-year-via-nongkhai.html
www.ibualoy.net/iblog/travel/10-days-in-tel-aviv.html

PS. I still have problem mootools conflict between SIG and Joomlart template at this moment. It should work fine in Firefox 2 and Firefox 3.

Please Log in or Create an account to join the conversation.

More
16 years 4 months ago #2661 by dax702
Replied by dax702 on topic Re: All thumbnails the same size
I don't see SIG on those links?

Please Log in or Create an account to join the conversation.

  • Phonecare Services Pvt Ltd
  • Phonecare Services Pvt Ltd's Avatar
  • Offline
  • New Member
More
16 years 4 months ago #2662 by Phonecare Services Pvt Ltd
Replied by Phonecare Services Pvt Ltd on topic Re: All thumbnails the same size and thumbnails overwriting over text
My thumbnails are overwriting over the text:
new.phonecare.in/index.php?option=com_content&view=article&id=588&Itemid=325
Please help.

Please Log in or Create an account to join the conversation.

More
14 years 11 months ago #2663 by Lensboy
Replied by Lensboy on topic Re: All thumbnails the same size
Hi Guys


im having the same problem, I would like both landscape and portrait thumbs to be the same size, i tried what is described here in this post but i dont seem to be able to find this path or even that file: /mambots/content/plugin_jw_sigpro.php

any help appreciated. thanks

Please Log in or Create an account to join the conversation.

More
14 years 11 months ago #2664 by Katia
Replied by Katia on topic Re: All thumbnails the same size
Go to the SIG PRO settings, set the thumbnail view port width and height and of course set
Fit thumbnails to available viewport? to Yes.

Clean your cache and that is all!
Now your thumbnails should have the same dimensions...

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum