forum.coppermine-gallery.net

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Themes/Skins/Templates => Topic started by: mcaswell on December 02, 2004, 07:51:39 am

Title: Add filesize and image size below thumbnails
Post by: mcaswell on December 02, 2004, 07:51:39 am
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