coppermine-gallery.com/forum

Support => Older/other versions => cpg1.3.x Support => Topic started by: hardlocke on December 21, 2004, 03:34:43 PM

Title: Video / Sound: show filename
Post by: hardlocke on December 21, 2004, 03:34:43 PM
how can i show the filenames of sounds and video on the thumbnail site?

thanks for help
Title: Re: Video / Sound: show filename
Post by: hardlocke on December 22, 2004, 12:02:25 PM
no idea?
Title: Re: Video / Sound: show filename
Post by: Hein Traag on December 22, 2004, 01:20:23 PM
Sounds like your requesting the same as the person who posted this one: http://forum.coppermine-gallery.net/index.php?topic=11159.0

A thumbnail is thumbnail and you both seem to want the filename underneath the thumbnail.
As said in the in thread i copied here it takes some coding skills to edit the nescesary pages, themes.php and the functions page.

Would be nice if someone with more coding skills then me could look at it  ;)
Title: Re: Video / Sound: show filename
Post by: Joachim Müller on December 22, 2004, 04:56:30 PM
there are in fact various places where the caption of a thumbnail are being defined, depending on the type of the thumbnail (wether it's a thumbnail representing an album or a thumbnail representing an actual pic/file; there are definitions for various meta album thumbnail captions as well).
To edit them, you'd have to edit include/functions.inc.php and find$caption - you'll see there are a lot of definitions for this var.
As I guess you want the filename to be displayed in "regular" thumbnail view (thumbnail representing an actual pic/file), you'll need to find                // Set picture caption
                if ($set_caption) foreach ($rowset as $key => $row){

                        $caption = "<span class=\"thumb_title\">";
                        $caption .= ($rowset[$key]['title']||$rowset[$key]['hits']) ? $rowset[$key]['title'] : '';
and add after it (in a new line)                        $caption .= $rowset[$key]['filename'] . "<br />\n";

If you want this to be displayed in another way, the code I posted should give you an idea what to look for.

Joachim
Title: Re: Video / Sound: show filename
Post by: Hein Traag on December 23, 2004, 08:44:51 AM
 ;D ta GauGau
Title: Re: Video / Sound: show filename
Post by: blockcipher on January 14, 2005, 01:19:12 AM
GauGau,

This works great for me!  Thanks!  But one quick Q.  How am I able to remove the .jpg from the end of the file name, anyway to do that?  To display the filename without the .<ext>?

Thanks again!
Title: Re: Video / Sound: show filename
Post by: kegobeer on January 14, 2005, 03:01:48 AM
If you only want to drop .jpg, a str_replace would work.  If you want all extensions dropped, do something like this:

substr($rowset[$key]['filename'], 0, strrpos($rowset[$key]['filename'], '.'))
Title: Re: Video / Sound: show filename
Post by: blockcipher on January 15, 2005, 07:41:02 PM
Quote
If you only want to drop .jpg, a str_replace would work.

This is what I would like to do, I tried your code below and get errors.  I took a look at php.net as well, and I'm not able to get it to work.  Sorry im not PHP savvy :(

What exact code would I put in there?

Thanks again for your asstiance.   8)
Title: Re: Video / Sound: show filename
Post by: kegobeer on January 15, 2005, 10:01:41 PM
$caption .= substr($rowset[$key]['filename'], 0, strrpos($rowset[$key]['filename'], '.')) . "<br />\n";
Title: Re: Video / Sound: show filename
Post by: blockcipher on January 16, 2005, 09:28:42 PM
AH! I was so close :-)

Thank you so much! This works perfect!!!  8)
Title: Picture name
Post by: Pr0FiT on February 05, 2005, 05:24:20 PM
This I imagine should be rather simple for you guys ^^

I set up coppermine strictly as a video library for my FFXI guild. Everything works great and all but I would like it to display the names of the videos under the "thumbnail" on the index page. Specifically under the "Random files" and "Last additions" categories that are displayed on the front page (and subsequent pages for that matter). So basically I want it to go something like :

Latest Editions
Thumbnail
<video name>

I found this thread http://forum.coppermine-gallery.net/index.php?topic=12818.0 which seems to address what I want, but honestly after reading it I'm more confused than I was before.

Can anybody help me?
Title: Re: Video / Sound: show filename
Post by: Joachim Müller on February 10, 2005, 10:26:09 AM
merged your question with the thread you were refering to. What exactly is your question?

Joachim
Title: Re: Video / Sound: show filename
Post by: Michael-CGC on February 10, 2005, 07:13:41 PM
When I try turning to the thread Profit is reffering to. I'm getting this error:

An Error Has Occurred!
The topic or board you are looking for appears to be either missing or off limits to you.
Title: Re: Video / Sound: show filename
Post by: Joachim Müller on February 11, 2005, 01:10:24 PM
Quote from: GauGau on February 10, 2005, 10:26:09 AM
merged your question with the thread you were refering to.
You're exactly in the thread he was refering to - it just got another thread id as a result of the merge. In other words: don't click on the link in Pr0FiT's posting, as it will lead nowhere. ::)

Joachim
Title: Re: Video / Sound: show filename
Post by: MetalHellsAngel on November 15, 2005, 07:56:21 PM
I was just wondering, if anyone ever figured out the last uploads, Most View, Top Rated issue?

Thanks,
Angel