Add filesize and image size below thumbnails Add filesize and image size below thumbnails
 

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

Add filesize and image size below thumbnails

Started by mcaswell, December 02, 2004, 07:51:39 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

mcaswell

I spent the last 3 days trying to work out a way to put the large file size and the large image size information below the thumbnails in FI Blue 3d (and others as it turns out)  . This small mod isn't pretty, and I'm sure it breaks about 100 rules for code, but being code stupid I had to do this by trial and error.  I can't figure out how to get the caption text to center under the thumbnail in the FI Blue3D theme. It works just fine in the other themes.

Ideally I would have replicated the code for adding it to the config page just like the "show views etc" section.

Matthew Caswell
mcaswell@macs4ever.com
--------------------------------------------------------------------

The change needs to be inserted into \include\functions.inc.php

see below for cut and pasted code:


-----------------------------
In file:  \include\fuctions.inc.php\

-----------------------------
FIND:  (there should be only 1 occurance of this section_

if ($CONFIG['display_uploader']){
-----------------------------

INSERT AFTER:  (And before the closing "}"  )

//set variable and round full filesize to no decimals
           $caption .=  '<span class="thumb_title">'."filesize: ".round ($rowset[$key]['filesize']/ 1024)." KB" . '</span>';
           $rowset[$key]['caption_text'] = $caption;

// set variable for image width and height
          $caption .= '<span class="thumb_title">'.$rowset[$key]['pwidth']. " x " .$rowset[$key]['pheight']. " pixels".'</span>';
          $rowset[$key]['caption_text'] =  $caption;


------------------------ END OF INSERT-----------------

IMPORTANT!:  DO NOT DELETE THE CLOSING  "}" that should be below this insertion