coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 themes/skins/templates => Topic started by: Tchit on April 10, 2006, 09:12:03 AM

Title: Show file size under the thumbs
Post by: Tchit on April 10, 2006, 09:12:03 AM
Hi !

I have a video gallery with Coppermine and I would like to show the size of each video under the thumbnails. I know it is quite simple to do (something like one line of code in the right place), but I don't know how... It would be great if someone helped me !

And optional question : Is it also possible to show the video lenght ? (I know it's hard).



Thank you a lot (and congratulations for Coppermine and the dev team !)  :o
Title: Re: Show file size under the thumbs
Post by: Stramm on April 10, 2006, 10:04:20 AM
you'll have to modify the core code in file functions.inc.php (function build_caption)

to show the video length in the info area...
config ->  Custom fields for image description
you'll have to edit all movies and add the 'video length' manually.

Title: Re: Show file size under the thumbs
Post by: Sami on April 10, 2006, 10:45:30 AM
if you have CPG 1.4.4 installed you should change line 1698 of your function.inc.php from

$thumb_list[$i]['caption'] = bb_decode($row['caption_text']);

to

$thumb_list[$i]['caption'] = bb_decode($row['caption_text'].($row['filesize'] >> 10).$lang_byte_units[1]);


Title: Re: Show file size under the thumbs
Post by: Tchit on April 10, 2006, 11:15:21 AM
Thank you it works great !
Title: Re: Show file size under the thumbs
Post by: Sami on April 10, 2006, 11:30:46 AM
your welcome
then someone please flag this thread as a Solved :)