- Posts: 1
COMMUNITY FORUM
- Forum
- Commercial Joomla Extensions & Templates
- Simple Image Gallery PRO
- All thumbnails the same size
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
- Joost Akkermans
- Offline
- New Member
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.
- overallq
- Offline
- New Member
- Posts: 5
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
- Offline
- New Member
- Posts: 11
Please Log in or Create an account to join the conversation.
- dax702
- Offline
- Senior Member
- Posts: 44
Please Log in or Create an account to join the conversation.
- sexdrum
- Offline
- New Member
- Posts: 2
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.
- dax702
- Offline
- Senior Member
- Posts: 44
Please Log in or Create an account to join the conversation.
- Phonecare Services Pvt Ltd
- Offline
- New Member
- Posts: 12
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.
- Lensboy
- Offline
- New Member
- Posts: 1
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.
- Katia
- Offline
- Platinum Member
- Posts: 4696
Fit thumbnails to available viewport? to Yes.
Clean your cache and that is all!
Now your thumbnails should have the same dimensions...
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Forum
- Commercial Joomla Extensions & Templates
- Simple Image Gallery PRO
- All thumbnails the same size