Pano or wide thumbs problem. Pano or wide thumbs problem.
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Pano or wide thumbs problem.

Started by lurkalot, September 07, 2009, 08:19:25 PM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

lurkalot

OK, tried searching but drawn a blank.

I'm using copperminefetch to pull images to my front page.  This works just great until someone uploads a panoramic, or wide image to the gallery.  The wide images look awful, and cause the block to widen also widening my whole front page. 

Is there any way around this issue?  I have attached a screen grab below.

And here's the block code I'm using in a php.block.  SMF / tinyportal.


echo '<div id="cpmfetch">';
chdir("../gallery/cpmfetch/");
include "cpmfetch.php";                   
$objCpm = new cpm();
$options = array("imageheight"=>"80","subtitle" => "<center>{{pTitle}} <br> <center> <FONT color=#1A5EFF size=2>Image By</FONT></STRONG> {{pOwner_name}} <br>{{pHits}} Views <center> <FONT color=#3399FF size=2>Comments</FONT></STRONG> {{pComCount}} </center>");
$objCpm->cpm_viewLastAddedMedia(3,4,$options);
$objCpm->cpm_close();
chdir("../../");
echo '<a href="http://cameracraniums.com/gallery?action=gallery">View more latest images</a>';
echo '</div>';


And a link.  www.cameracraniums.com

Running SMF 2.1.4  / Tinyportal 3.0.1, bridged with Coppermine 1.6.25, plus cpmfetch 2.0.0

Joe Carver

Try removing the value:

imageheight"=>"80"

from your options array. It looks like you are forcing a resize of your thumbnails.


lurkalot

Quote from: i-imagine on September 07, 2009, 11:24:52 PM
Try removing the value:

imageheight"=>"80"

from your options array. It looks like you are forcing a resize of your thumbnails.



Thanks.  I originally set my script up like that if I remember, and the thumbs were all all different heights and widths.  Wondered if there's a way to keep the height at say 80 pixels, but set a max width around 100 pixels.  I'm not too worried if the pano images get squashed up, as they don't get uploaded very often.   I just want it to stop stretching my front page.

So I guess what I'm really asking is.  Is there any parameters I can use that will stop a image going over 100 pixels wide, but not force it to 100 pixels wide if it's smaller.
Running SMF 2.1.4  / Tinyportal 3.0.1, bridged with Coppermine 1.6.25, plus cpmfetch 2.0.0

Joe Carver

Why not just use Coppermine's thumbs? They work for me here Random Pics (no titles, etc....) with wider formats.

You should look at applying some css to your cpmFetch table and cells, instead of letting everything float around. Coppermine's uniform thumbs will then fit just fine.

lurkalot

Quote from: i-imagine on September 08, 2009, 11:04:46 PM
Why not just use Coppermine's thumbs? They work for me here Random Pics (no titles, etc....) with wider formats.

You should look at applying some css to your cpmFetch table and cells, instead of letting everything float around. Coppermine's uniform thumbs will then fit just fine.

Thanks for the reply.

I haven't a clue how to go about using the actual thumbs from coppermine.  I assume this is still using copperminefetch?, and pulling the actual thumbs as they are in coppermine, same size etc. 

Also tried reading up on the css, but found this very confusing.  Again I don't know where to start.  I'm using a php block in tinyportal to display my front page latest images.  Where would it read the css from?  Would I have to modify the theme css, or can I add some css to the block directly?  I'm no coder, and to be honest I'm lucky to have got my site working thus far. lol...
Running SMF 2.1.4  / Tinyportal 3.0.1, bridged with Coppermine 1.6.25, plus cpmfetch 2.0.0

Joe Carver

Perhaps I could have worded the reply a little different.

"Why don't you just leave the thumbs the size they are?" (meaning - cpmFetch pulls your thumbs from Coppermine and Coppermine will make uniform sized thumbs)

You assign your css styles in your Options array - it's all in the docs.

Here is one example - 'tablestyle' => 'tableh2', 'imagestyle' => 'image', etc, etc.........

I presume that you would need to add the values to the .css file(s) that the page is calling.

===================================

This is what I use, it is a very well done effort that could make your experience with cpmFetch more pleasant. You will still need to add/edit your .css!

Simple Javascript plugin for cpmFetch


lurkalot

Thanks for the link to jsfetch.  That looks like a cool plugin.  I'll bookmark that one and take a look when I get some spare time.

I guess as I'm using different themes on my site, I'll have to edit each theme's css file.  Worth it though. ;)

Thanks.
Running SMF 2.1.4  / Tinyportal 3.0.1, bridged with Coppermine 1.6.25, plus cpmfetch 2.0.0

Joe Carver

Quote from: lurkalot on September 11, 2009, 05:31:50 PM
I'll have to edit each theme's css file.

No, you have misinterpreted what I wrote - There are no needs for any more than one css file to contain your cpmFetch style per page.

Unless you are using different themes available to your users. And the cpmFetch is on that themed page.

lurkalot

Quote from: i-imagine on September 11, 2009, 06:07:23 PM
No, you have misinterpreted what I wrote - There are no needs for any more than one css file to contain your cpmFetch style per page.

Unless you are using different themes available to your users. And the cpmFetch is on that themed page.

Thanks again.  Yes I have themes available to users.  They are just basically different coloured versions based off the default theme.  I believe cpmfetch is using the css from each theme.  Screen grab below. ;)
Running SMF 2.1.4  / Tinyportal 3.0.1, bridged with Coppermine 1.6.25, plus cpmfetch 2.0.0

lurkalot

Quote from: Joe Carver on September 07, 2009, 11:24:52 PM
Try removing the value:

imageheight"=>"80"

from your options array. It looks like you are forcing a resize of your thumbnails.



Sorry just coming back to mark solved, as I forgot.

Also, Joe.  Tried what you said again, and it seems to be working for me now.  Thanks. ;)
Running SMF 2.1.4  / Tinyportal 3.0.1, bridged with Coppermine 1.6.25, plus cpmfetch 2.0.0