Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-12-06 15:56:18

dingoboy
Member
Registered: 2006-09-07
Posts: 48

Multiple users need access to a password-protected txp section

I need some help to layout a structure for this project, please — how do I do?

I am making a section of my existisng txp-powered site, which should be available to certain users only, who must use an individual login to see the section’s content. It will contain a forum and a few pages/articles with different stuff.

I have two primary questions concerning this:

  1. Is it possible to password-protect an entire section, so that pages in the section are not public? If not – could I make something similar to a section, to get this functionality?
  2. Which way is the best to administrate several hundred users, who need access to this section but generally no author-priviledges in Textpattern?

I much rely on your assistance, so please help if you can. :-)

Last edited by dingoboy (2006-12-06 16:08:47)

Offline

#2 2006-12-06 17:38:50

hcgtv
Plugin Author
From: Key Largo, Florida
Registered: 2005-11-29
Posts: 2,722
Website

Re: Multiple users need access to a password-protected txp section

See this example by Ruud.

Offline

#3 2006-12-07 07:55:43

dingoboy
Member
Registered: 2006-09-07
Posts: 48

Re: Multiple users need access to a password-protected txp section

Sorry, but I don’t think a htaccess protection is the solution in this case.
It would be way better to have all the user info in the database.

Would it maybe be a possibility to use some plugin for the password-protection and run the authentication up against txp’s user tables, ie. let the users sign up for a textpattern account (with low or no priviledges)?

Offline

#4 2006-12-07 09:37:35

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,726
Website

Re: Multiple users need access to a password-protected txp section

I think by giving users a txp login you are always going to be giving them some access to the back end. You might find it easier to turn around your approach and use the forum user tables for authentification and access and then either serve up the extra pages through the forum or add in a forum-user-authentification check (probably via a plug-in) for the ‘secret’ pages that your provide with txp.

I know that Vanilla lets you set up fine-grain access rights, including front-door login access. It has an add-on for providing some extra forum-associated pages. Dave Harper has also described his integration attempt with txp documented in this thread and on his homepage.


TXP Builders – finely-crafted code, design and txp

Offline

#5 2006-12-07 12:39:56

dingoboy
Member
Registered: 2006-09-07
Posts: 48

Re: Multiple users need access to a password-protected txp section

Thanks a lot for your tip on this Textpattern/Vanilla integration possibility, Jakob!

I have one question though: If one makes this integration as described by Dave Harper – what kind of access will the self-registered users be granted to the Textpattern backend? It’s a nice opportunity to have, giving some of the users co-authorship, as I’d need that anyway, but only a few should be able to suggest articles (this functionality isn’t a requirement though — see below).

I hope you see where I’m getting at. :-)

I had kind of set my eyes on PunBB, partly because of its integration with DokuWiki, but maybe Vanilla would suit my over all requirements just as well.

My requirements for the whole project being:

A “one login only” solution to access a private “community” section of my site, editable in Textpattern. The community itself will consist of:
  • A forum,
  • a wiki,
  • a few txp articles (containing a list of files for download, a mail form etc.).
    The user should only have to login once to gain access to the section and to use its services, as mentioned. New users have to be approved by an admin.

Last edited by dingoboy (2006-12-07 13:22:54)

Offline

#6 2006-12-07 13:16:07

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,726
Website

Re: Multiple users need access to a password-protected txp section

I’ve used both txp and vanilla individually but not together so I can’t tell you exactly how it works in Dave Harper’s setup. You’ve added the wiki as a new component to the equation in your last post, which changes things, so I’ll ignore that ;-)

If you were just testing the vanilla db-user privilege’s before displaying a txp-generated page, then they would not have any txp backend access at all. I think I remember reading that the txp plug-in for PW protected sections ign_password_protect now uses a separate table of its own. If you were to hook up that plug-in to the vanilla user db-tables then you’d have almost what you want. As regards letting some of the users have txp admin access, if it’s only handful of users, I’d do that by hand.

It really depends how many pages you wish to show through txp. If it’s just a few information pages, I’d use the vanilla page manager add-on to serve them and concentrate on getting the forum user-db to work with the wiki. There are some comments on the vanilla forum about hooking it up to other login systems such as wordpress, so it must be possible. Vanilla is the only forum I know, so maybe the rest is easier.


TXP Builders – finely-crafted code, design and txp

Offline

#7 2006-12-07 18:52:10

dingoboy
Member
Registered: 2006-09-07
Posts: 48

Re: Multiple users need access to a password-protected txp section

I think maybe punBB would be a better solution in this particular case.

However that leaves me kind of where I started, when it comes to the password-protection: How can I protect an entire textpattern section, containing this mentioned forum and wiki etc.?

Can I just modify the ign_password_protect and mem_self_register plugins, to share info with PunBB? I don’t mind a bit of PHP tweaking, but I have no experience with these plugins… – So if someone could give me a hint, whether this is even a good idea? :-)

Offline

#8 2006-12-08 01:20:07

hcgtv
Plugin Author
From: Key Largo, Florida
Registered: 2005-11-29
Posts: 2,722
Website

Re: Multiple users need access to a password-protected txp section

From a helpful PunBB Elf, I got this piece of code:

define('PUN_QUIET_VISIT', 1);
define('PUN_ROOT', './');
require PUN_ROOT.'include/common.php';

// If we are not logged in, we shouldn't be here
if ($pun_user['is_guest'])
{
     header('Location: index.php');
     exit;
}

Also, when PunBB 1.3 comes out, it should be easier to authenticate against it.

Offline

Board footer

Powered by FluxBB