Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-04-18 19:12:10

squaredeye
Member
From: Greenville, SC
Registered: 2005-07-31
Posts: 1,495
Website

password protect and options

I’ve got a client who would like a password protected section / ie: downloads.

They’ve got several forms of content (audio/pdfs/docs/html) that they would like password protected. The dilemma comes when some of this information (in the pages) could stand to remain accessible and indexable, while the files in particular could be password protected if some form of that existed.

Does anyone have any suggestions for scenarios they’ve had like this before?

I’d thought that perhaps one could have a normal article (public) with a link to downloads/writing/#a-specific-pdf, and that if one wanted to get that pdf they’d have to

  1. click the link
  2. fill in username/pass (with ign_pass protect for instance),
  3. and then I think the original URL would populate the page and assuming the id is correct it would take them to the appropriate download
  4. The user would click the download if it was correct

Seems like there are two issues wrong with this scenario.

  1. I can see folks forgetting the user/pass and needing some kind of a “forget your password?” kind of a link
  2. The method mentioned above requires atleast one more click than necessary

Does anyone know of a solution for password protecting files?

Is it simply a matter of adjusting the javascript alert to include a link to a “forgot my password” contact form so that the user can send an email if that is the case?

Thanks. As always.

Matthew


Offline

#2 2007-04-18 20:09:19

hakjoon
Member
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,634
Website

Re: password protect and options

What happens if you .htaccess protect your files directory? Does it work at all? Of course you might not want to password protect all your files.


Shoving is the answer – pusher robot

Offline

#3 2007-04-18 20:28:57

hakjoon
Member
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,634
Website

Re: password protect and options

More complicated, only roughly fleshed out, but cooler in the end.

  1. Create a plugin for pretext that detects if it’s a file download and sets $s to something else like ‘proctected_download’ if no valid password is supplied.
  2. In the plugin but outside of a function check that $s = protected download and send them to some authentication function. Which then posts back and runs through the previous pretext doohickey.
  3. create some interface to attach passwords to individual files in TXP.

Shoving is the answer – pusher robot

Offline

#4 2007-04-19 00:17:07

squaredeye
Member
From: Greenville, SC
Registered: 2005-07-31
Posts: 1,495
Website

Re: password protect and options

Hak,
This is a payed job, so I’d be into you developing something for it :)
I could throw $50 at something at the moment. Might be more complicated than that’s worth?

the .htaccess thing won’t work for the reason you mention

:)


Offline

#5 2007-04-19 14:38:56

sthmtc
Member
From: CGN, GER
Registered: 2005-01-17
Posts: 586
Website

Re: password protect and options

hakjoon, i’d be interested in what you described as well!

Offline

#6 2008-04-17 12:47:57

Zanza
Plugin Author
Registered: 2005-08-18
Posts: 699
Website

Re: password protect and options

Has this thread evolved in something for protecting file download, so far?

Z

Offline

Board footer

Powered by FluxBB