forum.coppermine-gallery.net
Support => Older/other versions => cpg1.3.x Support => Topic started by: unknown12 on May 10, 2005, 06:22:02 pm
-
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
-
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;
}
-
thanks.
-
in this (http://forum.coppermine-gallery.net/index.php?topic=17804.0) 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.
-
bump
-
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.
-
thanks for the tip. But the other thread is "solved"
-
But not closed. Post the question there and a mod can always "unsolve" it if need be.
-
merged the two threads that were mentioned above.
-
thanks.
-
I don't understand what you are asking, can you elaborate/provide an example ?
-
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.
-
I don't think you can.