Detect what filetype being display Detect what filetype being display
 

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

Main Menu

Detect what filetype being display

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

Previous topic - Next topic

0 Members and 3 Guests 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