Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Add filesize and image size below thumbnails  (Read 5049 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.018 seconds with 21 queries.