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
16 years 10 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
16 years 9 months ago - 16 years 9 months 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
16 years 9 months 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 4 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 1 month ago - 16 years 1 month 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 3 weeks 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 2 weeks 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 7 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 7 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...

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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


Powered by Kunena Forum