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: Add filesize and image size below thumbnails  (Read 4092 times)

0 Members and 1 Guest are viewing this topic.

mcaswell

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 4
Add filesize and image size below thumbnails
« 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
Logged
Pages: [1]   Go Up
 

Page created in 0.015 seconds with 20 queries.