Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest sNews - sNews 1.7 - with its own forums - for discussion and user mods.

Author Topic: Password protecting posts..? Anyone..?  (Read 6197 times)

Richard Waters

  • Jr. Member
  • **
  • Karma: 0
  • Posts: 88
    • http://www.richardsmagic.com
Password protecting posts..? Anyone..?
« on: September 15, 2006, 01:42:05 AM »

Has anyone considered a mod for password protecting articles?  Or maybe even Categories or Pages in either 1.4 or 1.5?

I have been looking at a few scripts and trying to work out how it might fit in?  I spose an extra column in the db for passwords?  The articles checks first to see if there is one, if not, continue, if there is displays the question in the Centre asking for the password to continue?

If the password is correct then the article/category/page displays, else a "not available" message appears and u are redirected to the home page?

Maybe even give the person 3 tries before it re-directs?

Just thinking out aloud?  And would anyone else be interested in such a mod?

Would there be a good way to do this without adding a password column to the db?  I spose that you could make a separate php file to "activate" the db changes?  Adding the tables column etc?

ANyway, just an idea - cos I need it for the website Im making at the end of the year.

:D
Logged
Transported to a surreal landscape, a young girl kills the first woman she meets and then teams up with three complete strangers to kill again!
:D -- The Wizard Of Oz

Patric Ahlqvist

  • Nobodys perfect, but Im pretty effing close
  • ULTIMATE member
  • ******
  • Karma: 65
  • Posts: 4867
  • I'm a self-made man and worships my creator.
    • p-ahlqvist.com
Password protecting posts..? Anyone..?
« Reply #1 on: September 15, 2006, 07:33:52 AM »

There is that .htaccess again ;)... One can do wonders with that... I can't say if it's the most secure one, but it works... Now, I don't know how to password protect one of our articles in sNews, but I'm sure someone can do that, I only konw how to password protect a specific folder...

Creat a htaccess in the folder that should be protected:
Code: [Select]
AuthType Basic
AuthUserFile /customers/url.com/url.com/httpd.www/txt/.htpasswd
AuthName "Members only"
require valid-user
Create another htaccess file in a folder called eg TXT, and in there you put the
username and the encrypted password, (Can get your password encrypted here ) and name that htaccess:
.htpasswd

But how to implement this onto a "virtual folder sort of thingy, kinda, like" in sNews, beats me... And I bet
that there is more secure and better ways thru PHP... But that's not my table ;)

Patric.
Logged
"It's only dead fish that goes with the flow... "
Updated

Richard Waters

  • Jr. Member
  • **
  • Karma: 0
  • Posts: 88
    • http://www.richardsmagic.com
Password protecting posts..? Anyone..?
« Reply #2 on: September 15, 2006, 08:30:14 AM »

Thanks Patric!

I have known about the .htaccess for protecting pages and the like, but I was more interested in doing this on a "per page" or "per article" basis - and make it an easy type of mod for snews.

I think I have found a nice script - in fact, its a "one liner" and will add the protection needed - once I understand a little more about the programing, I will see if I can post here - but with all the magic shows I have been doing lately for the "end-of-year" period, Im not sure how much time Ill have?

Thanks!
Logged
Transported to a surreal landscape, a young girl kills the first woman she meets and then teams up with three complete strangers to kill again!
:D -- The Wizard Of Oz

Patric Ahlqvist

  • Nobodys perfect, but Im pretty effing close
  • ULTIMATE member
  • ******
  • Karma: 65
  • Posts: 4867
  • I'm a self-made man and worships my creator.
    • p-ahlqvist.com
Password protecting posts..? Anyone..?
« Reply #3 on: September 15, 2006, 08:53:38 AM »

Hehe, thought I was posting in vain, but hey...somebody else might like the folder protection thingy ;)... And, Rich... Post when you have time, as long as you post ;)
Logged
"It's only dead fish that goes with the flow... "
Updated

Fotrane

  • Newbie
  • *
  • Karma: 1
  • Posts: 28
Password protecting posts..? Anyone..?
« Reply #4 on: September 22, 2006, 09:00:09 PM »

Richard,

Would you want this to work alongside the "Multi-User" mod, or protected by a "global" password?
Logged

abnaki

  • Guest
Password protecting posts..? Anyone..?
« Reply #5 on: September 27, 2006, 07:38:27 PM »

Quote from: Fotrane
Richard,

Would you want this to work alongside the "Multi-User" mod, or protected by a "global" password?
Work alongside the "Multi-User" mod would be dreamy in my humble opinion.
Logged

tyee

  • Jr. Member
  • **
  • Karma: 0
  • Posts: 56
Password protecting posts..? Anyone..?
« Reply #6 on: February 08, 2007, 07:13:28 AM »

Richard

  Did you ever get this working? I need to password protect one of my pages for a "members area". htaccess can't do it can it (using sNews), but can a script do it?

Also, I need a bunch more link buttons in the members area. How should I do that??

PS. I just searched for this and a suggestion by Patrick was made. I'll try to summarize it --

Use a link (create one yourself on an sNews page), then this link will take you to another sNews page that does not appear in the normal sNews menu. Oh, darn, I was thinking that link could take me to another folder that could be htaccess protected. I guess it could but can it really be another sNews page?? Hmmm, obviously not!

One of my sustitute grade 12 teachers (must have been in his 70's) once gave me a picture (after I won a math test) of "The Thinker" with 3 lines written on the back, in his own handwriting. I memorized them since that day. One of them was "The thinker makes easy what the non-thinker makes difficult". I better apply that right now!

tyee
Logged

Simple

  • Newbie
  • *
  • Karma: 2
  • Posts: 40
    • Simple webDesign
Re: Password protecting posts..? Anyone..?
« Reply #7 on: March 13, 2008, 09:01:03 AM »



But how to implement this onto a "virtual folder sort of thingy, kinda, like" in sNews, beats me... And I bet
that there is more secure and better ways thru PHP... But that's not my table ;)

Patric.

Does anyone figure it out how to implement this on a virtual folder for sNews? I kinda need it :)
Logged