.txt files .txt files
 

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

.txt files

Started by unknown12, May 10, 2005, 06:22:02 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

unknown12

When i add .txt files to my gallery, and go to them, i have to click again (the link that would bring up a full res image) to bring up the file. Is there any way I can intergrate this so i don't have to click the link that opens a new window?

thanks

Nibbler

Open your displayimage.php, find:

$mime_content = get_type($CURRENT_PIC_DATA['filename']);

and add under it

if ($mime_content['extension'] == 'txt'){
$url = get_pic_url($CURRENT_PIC_DATA, 'fullsize');
header("Location: http://www.yoursite.com/coppermine/$url");
exit;
}

unknown12


unknown12

in this i got a code to forward to the text file. Is there anyway to get it to forward to the id of the text file, like 0.txt 1.txt etc?

thanks.

unknown12


Hein Traag

You might want to ask this question in the thread where you got that code. Opening up a new thread only serves to make the forum messy.
And bumping like this is something you better not do if you expect people to help out.

unknown12

thanks for the tip. But the other thread is "solved"

Hein Traag

But not closed. Post the question there and a mod can always "unsolve" it if need be.

Joachim Müller

merged the two threads that were mentioned above.

unknown12


Nibbler

I don't understand what you are asking, can you elaborate/provide an example ?

unknown12

in the code you gave me $url is the link to the file. How can i have a var that contains the pos of the file?

thanks.

Nibbler

I don't think you can.