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: View image dimensions and filesize under thumbnail  (Read 2802 times)

0 Members and 1 Guest are viewing this topic.

Fo

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
View image dimensions and filesize under thumbnail
« on: July 29, 2005, 06:13:56 pm »

Sorry if this has been asked/solved before, I checked around and didn't see it.

I wanted to view image dimensions and filesize under each thumbnail in thumbnails.php. Since you can view them when you hover a thumbnail it should be possible to write them under a thumbnail.

Anyone knows how? I tried.. but failed miserably!

Thanks in advance
« Last Edit: July 29, 2005, 09:02:38 pm by Nibbler »
Logged

Nibbler

  • Guest
Re: View image dimensions and filesize under thumbnail
« Reply #1 on: July 29, 2005, 06:29:19 pm »

Hi,

Similar things have been posted in the past, but here's what you need to do.

include/functions.inc.php:

find:

Code: [Select]
if($select_columns != '*') $select_columns .= ', title, caption,hits,owner_id,owner_name';
change to:

Code: [Select]
if($select_columns != '*') $select_columns .= ', title, caption,hits,owner_id,owner_name, pwidth, pheight';
scroll down to

Code: [Select]
$rowset[$key]['caption_text'] = $caption;
and just before/above it, add:

Code: [Select]
$caption .= "<span class=\"thumb_caption\">{$rowset[$key]['pwidth']} x {$rowset[$key]['pheight']}</span>";
That will apply the caption to regular album thumbnail views. You can apply it to meta albums using a similar method later on in the file.
Logged

Fo

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: View image dimensions and filesize under thumbnail
« Reply #2 on: July 29, 2005, 08:48:46 pm »

Thanks so much, you're a star!  ;)
Logged

CPG Guru

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Female
  • Posts: 40
  • Cool Buddy
Re: View image dimensions and filesize under thumbnail
« Reply #3 on: August 01, 2005, 08:02:46 am »

THANKS NIBBLER ,IT ALSO HELPS ME :____---God BlessYou
Logged
Pages: [1]   Go Up
 

Page created in 0.035 seconds with 15 queries.