Detect what filetype being display Detect what filetype being display
 

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]

Main Menu

Detect what filetype being display

Started by dreams83, September 14, 2006, 09:14:45 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

dreams83

How do you detect if and MP3 file is being played or an JPEG file is being viewed?
Is there a variable in cpg that will tell what type of file is being view?

Because what I want is something like this

if ( file being view is mp3 ) {
    I want to display extra stuff here.
    //I think I know what to do here but I don't know how to detect the file type.
}
else
    do nothing



If you guys could point me in the right direction that would be cool.

Nibbler

Depends where you are using the code. Post details.

dreams83

i think in the intermediate display image part.

I only want to show the highlighted part if it is a mp3 file, but I don't know how to detect if it is or not.

dreams83

I was able to figured out how to do it now. I just read the url and look at the extension.

Thank You