Advanced search  

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]

Pages: [1]   Go Down

Author Topic: .txt files  (Read 6957 times)

0 Members and 1 Guest are viewing this topic.

unknown12

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
.txt files
« 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
« Last Edit: May 12, 2005, 09:04:42 am by GauGau »
Logged

Nibbler

  • Guest
Re: .txt files
« Reply #1 on: May 10, 2005, 06:41:23 pm »

Open your displayimage.php, find:

Code: [Select]
$mime_content = get_type($CURRENT_PIC_DATA['filename']);
and add under it

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

unknown12

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: .txt files
« Reply #2 on: May 10, 2005, 09:10:11 pm »

thanks.
Logged

unknown12

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
[again] .txt files
« Reply #3 on: May 10, 2005, 09:54:35 pm »

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.
Logged

unknown12

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: [again] .txt files
« Reply #4 on: May 11, 2005, 04:40:05 pm »

bump
Logged

Hein Traag

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: nl
  • Offline Offline
  • Gender: Male
  • Posts: 2166
  • A, B, Cpg
    • Personal website - Spintires.nl
Re: [again] .txt files
« Reply #5 on: May 11, 2005, 08:22:23 pm »

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.
Logged

unknown12

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: [again] .txt files
« Reply #6 on: May 11, 2005, 08:30:29 pm »

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

Hein Traag

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: nl
  • Offline Offline
  • Gender: Male
  • Posts: 2166
  • A, B, Cpg
    • Personal website - Spintires.nl
Re: [again] .txt files
« Reply #7 on: May 11, 2005, 08:31:51 pm »

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

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: .txt files
« Reply #8 on: May 12, 2005, 09:05:20 am »

merged the two threads that were mentioned above.
Logged

unknown12

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: .txt files
« Reply #9 on: May 12, 2005, 09:25:35 pm »

thanks.
Logged

Nibbler

  • Guest
Re: .txt files
« Reply #10 on: May 13, 2005, 05:05:43 pm »

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

unknown12

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: .txt files
« Reply #11 on: May 13, 2005, 05:10:10 pm »

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.
Logged

Nibbler

  • Guest
Re: .txt files
« Reply #12 on: May 13, 2005, 05:29:39 pm »

I don't think you can.
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 19 queries.