Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-10-25 20:56:35

kevinpotts
Member
From: Ghost Coast
Registered: 2004-12-07
Posts: 370

Restrict Section Access Based on Author?

I’m currently trying to figure out if I can build the following in Textpattern. The idea is a large site featuring lots of independent artists, each with their own section within the site to add items and content. However, the client is talking about 50 artists to start. While I have no problem creating 50 unique sections, it would be a major hassle for each artist to sort through 49 others’ content in order to edit their own.

My question: is it possible to restrict content based on the author? For instance, Joe Painter logs in and wants to edit content from his site. He clicks on the “Articles” tab and is presented with only the articles in his section (named joe_painter or something). Similarly, he clicks the “Images” tab and is only presented with images of his art, I would assume defined by image categories.

In Textpattern’s user definitions, these would be Staff Authors, who, by definition, can only affect and publish their own work. However, I want to take the idea further and not even show other articles and images from other authors.

Thoughts?


Kevin
(graphicpush)

Offline

#2 2007-10-25 21:06:04

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Restrict Section Access Based on Author?

not without hacking TXP source… although you can do this by duplicating TXP include-dir files in a plugin and have them override the default TXP include-dir files, but that gives you very big plugins.

Offline

#3 2007-10-25 22:06:31

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

Re: Restrict Section Access Based on Author?

Hi Kevin, yes you do have to hack the source code, but the good news it has been done before for txp 4.03/4.04.

I want to take the idea further and not even show other articles and images from other authors.

I’ve hacked txp to be a multi-author blog-like site that uses the txp interface. Each contributing user of a certain user-type sees only their own articles, images and files, in effect giving each a mini-blog of their own. The admin can see all the articles. More infos in this and this thread (which in turn are a further development of this thread). It does involve changing the source code and if you want author ownership of files too, a column needs to be added to the database (as txp does not as yet cater for this).

… it would be a major hassle for each artist to sort through 49 others’ content in order to edit their own.

To add to this, unless it’s been changed in the most recent release, author’s can delete each other’s images, even as staff authors.

Similarly, he clicks the “Images” tab and is only presented with images of his art, I would assume defined by image categories.

You can restrict output by author, so you can also use image categories if you want to.

BTW: On a related topic, check your mail.

Last edited by jakob (2007-10-25 22:41:20)


TXP Builders – finely-crafted code, design and txp

Offline

Board footer

Powered by FluxBB