Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2010-02-16 21:22:45

WeibRabe
Member
Registered: 2010-02-16
Posts: 10
Website

Upload files during writing a new article

Is there any solution to give ability to upload different type of files when a author is typing a new article? The TextPattern has special account type – freelancer, which can add a new article, and I want to give them ability to upload images or some files (arhives) that are needed for article.


Disce, sed a doctis, indoctos ipse doceto

Offline

#2 2010-02-16 21:36:22

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: Upload files during writing a new article

Have a look at bot_privs.


Code is topiary

Offline

#3 2010-02-16 21:56:02

WeibRabe
Member
Registered: 2010-02-16
Posts: 10
Website

Re: Upload files during writing a new article

jsoo wrote:

Have a look at bot_privs.

Thanks, but unfortunatelly the freelancer is able to publish files and there is no way to deny publishing. I will ask the autor of plugin about that.

Are there other solutions?

Last edited by WeibRabe (2010-02-16 23:15:23)


Disce, sed a doctis, indoctos ipse doceto

Offline

#4 2010-02-16 23:38:26

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: Upload files during writing a new article

Well, I haven’t really tested the plugin, but it appears to offer control over just about every user privilege, including file publishing.


Code is topiary

Offline

#5 2010-02-16 23:59:44

WeibRabe
Member
Registered: 2010-02-16
Posts: 10
Website

Re: Upload files during writing a new article

jsoo, a freelancer can publish his or her files (even when he or she doesn’t have permission ‘publish files’), I tested the plugin hour ago.


Disce, sed a doctis, indoctos ipse doceto

Offline

#6 2010-02-17 10:30:03

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: Upload files during writing a new article

WeibRabe wrote:

jsoo, a freelancer can publish his or her files (even when he or she doesn’t have permission ‘publish files’), I tested the plugin hour ago.

Hi WeibRabe,
sorry but I can’t understand what you are trying to accomplish.
First of all keep in mind that there are two version of the plugin: one for txp 4.2 (v0.3.2) and one for pre 4.2 version(v. 0.2).
Secondly: do you want to make so that a freelancer can publish his own files or not? Maybe I’m too dumb but it’s really unclear to me.
Anyway I’ll test if the plugin works well (and I think it should) asap ok?

Offline

#7 2010-02-17 11:43:44

WeibRabe
Member
Registered: 2010-02-16
Posts: 10
Website

Re: Upload files during writing a new article

redbot, I’ll try to explain.

What I want – add ability to upload new images and files for freelancer users. I’m trying to find a plugin that adds new forms to ‘writing’ page (like lam_image_uploader). I need a simple solution to upload files and add them to article when you are writting it.

After installing bot_privs, I can give permissions to freelancers and they will be able to open tabs ‘Files’ and ‘Images’. But when a freelancer upload a file – he’s able to publish it and this file will apear on a site. He or she doesn’t have permission ‘User can publish files’, only ‘User can edit only his files’ and ‘User can delete only his files’.


Disce, sed a doctis, indoctos ipse doceto

Offline

#8 2010-02-17 15:42:08

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: Upload files during writing a new article

WeibRabe wrote:

What I want – add ability to upload new images and files for freelancer users. I’m trying to find a plugin that adds new forms to ‘writing’ page (like lam_image_uploader). I need a simple solution to upload files and add them to article when you are writting it.

Ok, I understand this, but this has little to do with the plugin

After installing bot_privs, I can give permissions to freelancers and they will be able to open tabs ‘Files’ and ‘Images’. But when a freelancer upload a file – he’s able to publish it and this file will apear on a site. He or she doesn’t have permission ‘User can publish files’, only ‘User can edit only his files’ and ‘User can delete only his files’.

Maybe I’m beginning to understand something… see, bot_privs only provides an interface for changing priv levels defined in admin_config.php.

I can’t check now but I think that “User can publish files” (file.publish) has to do with the ability to change the file status (hidden, visible ecc) while ‘User can edit files’ has to do with the ability to change the description and the file itself.

When I’ll be back home I’ll do some tests … but I continue to not understand: you want a user to upload a file but not publish it?

Offline

#9 2010-02-17 18:49:11

WeibRabe
Member
Registered: 2010-02-16
Posts: 10
Website

Re: Upload files during writing a new article

redbot, exactly. If a freelancer cannot publish articles, he won’t be able to publish files. I’ve got a textpattern and two users – the first is a admin, the second is a freelancer. The freelancer added a file and could change file status to ‘visible’.


Disce, sed a doctis, indoctos ipse doceto

Offline

#10 2010-02-17 21:28:50

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: Upload files during writing a new article

WeibRabe wrote:

redbot, exactly. If a freelancer cannot publish articles, he won’t be able to publish files. I’ve got a textpattern and two users – the first is a admin, the second is a freelancer. The freelancer added a file and could change file status to ‘visible’.

Ah, I see now! It took me a while before I understood…

Let’s summarize:

1) you set freelancer to access for the files tab (‘file’)
2) you set freelancer to ‘file.edit.own’ – now a freelancer can upload a new file and he seems to be able to set its status to ‘live’ even if he has no ‘file.publish’ privs, right?

I’ll add more: in file list mode the status for a given file says ‘live’ but when you click to edit it the status becomes ‘pending’?

Hmm… I think this has not to do with the plugin… have you tried disabling the plugin and modifying directly the ‘admin_config.php’ file? I tried and it seems to give the same result.
If you too can confirm this issue, you should ask in the ‘development’ section as it can be a txp bug.

That said I still don’t get what you want your freelancer to exactly do, so I can’t even think to an alternative way to achieve it.

Offline

#11 2010-02-17 21:41:10

WeibRabe
Member
Registered: 2010-02-16
Posts: 10
Website

Re: Upload files during writing a new article

redbot, on my site each article should contain different files and images (like screenshots). It’s important that files are stored on my sites, but if I give all users ability to publish their files it will lead to real mess – published files and pending articles. So I want to moderate each article and file and if a theme of the article is acceptable, I will publish the article and publish its files (users are allowed to browse all published files, because usually they know what they want and it’s faster to look throug list of files and find something interesting for them).

And, of course, it would be great if during writting a article user wasn’t made click to Files tab for adding one new. So, it looks like adding a new post on forum – if you want to add a archive – you can do it without going to another page.

Last edited by WeibRabe (2010-02-17 21:44:09)


Disce, sed a doctis, indoctos ipse doceto

Offline

#12 2010-02-18 16:31:01

kireol
New Member
From: Michigan
Registered: 2010-02-18
Posts: 1
Website

Re: Upload files during writing a new article

This is hard to do in drupal as well. Which is why i’m shopping for a new cms. Thanks for the info


Working Hard Playing Hard

Offline

Board footer

Powered by FluxBB