Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Pano or wide thumbs problem.  (Read 10625 times)

0 Members and 1 Guest are viewing this topic.

lurkalot

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 947
  • +Tinyportal Support team.
Pano or wide thumbs problem.
« on: September 07, 2009, 08:19:25 pm »

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.

Code: [Select]
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

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

Joe Carver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1545
  • aka 'i-imagine'
    • Home Page
Re: Pano or wide thumbs problem.
« Reply #1 on: September 07, 2009, 11:24:52 pm »

Try removing the value:

Code: [Select]
imageheight"=>"80"
from your options array. It looks like you are forcing a resize of your thumbnails.

lurkalot

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 947
  • +Tinyportal Support team.
Re: Pano or wide thumbs problem.
« Reply #2 on: September 08, 2009, 08:12:44 pm »

Try removing the value:

Code: [Select]
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.
Logged
Running SMF 2.1.4  / Tinyportal 3.0.0, bridged with Coppermine 1.6.25, plus cpmfetch 2.0.0

Joe Carver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1545
  • aka 'i-imagine'
    • Home Page
Re: Pano or wide thumbs problem.
« Reply #3 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.

lurkalot

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 947
  • +Tinyportal Support team.
Re: Pano or wide thumbs problem.
« Reply #4 on: September 11, 2009, 09:43:17 am »

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...
Logged
Running SMF 2.1.4  / Tinyportal 3.0.0, bridged with Coppermine 1.6.25, plus cpmfetch 2.0.0

Joe Carver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1545
  • aka 'i-imagine'
    • Home Page
Re: Pano or wide thumbs problem.
« Reply #5 on: September 11, 2009, 04:23:33 pm »

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

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 947
  • +Tinyportal Support team.
Re: Pano or wide thumbs problem.
« Reply #6 on: September 11, 2009, 05:31:50 pm »

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.
Logged
Running SMF 2.1.4  / Tinyportal 3.0.0, bridged with Coppermine 1.6.25, plus cpmfetch 2.0.0

Joe Carver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1545
  • aka 'i-imagine'
    • Home Page
Re: Pano or wide thumbs problem.
« Reply #7 on: September 11, 2009, 06:07:23 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

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 947
  • +Tinyportal Support team.
Re: Pano or wide thumbs problem.
« Reply #8 on: September 11, 2009, 07:09:30 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. ;)
Logged
Running SMF 2.1.4  / Tinyportal 3.0.0, bridged with Coppermine 1.6.25, plus cpmfetch 2.0.0

lurkalot

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 947
  • +Tinyportal Support team.
Re: Pano or wide thumbs problem.
« Reply #9 on: May 10, 2010, 10:48:34 am »

Try removing the value:

Code: [Select]
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. ;)
Logged
Running SMF 2.1.4  / Tinyportal 3.0.0, bridged with Coppermine 1.6.25, plus cpmfetch 2.0.0
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 20 queries.