Author Role Argument

Owen Barton - July 16, 2007 - 21:21
Project:Views
Version:5.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs review
Description

This patch adds a new argument ' Role: Author Role' that means you can have views like 'myview/staff' to (for example) give a listing of staff blog posts.

I have tested it out and it seems to work fine (including summaries), but this is the first views arg I have written, so someone should check it over :)
I took the liberty of replacing spaces in the links with '+' symbols, which is nicer than the %20s you get with 'real' spaces.

AttachmentSize
views_role_arg.patch2.28 KB

#1

briwood@drupal.org - September 7, 2007 - 20:16
Title:Author Role Argument» Author Role Argument Installation

Using Drupal 5.1 here's what I did to apply this patch and get it working:

(Using Views module 5.x-1.6)

1. Disable Views and all dependant modules
2. Uninstall Views (Administer > Modules > Uninstall)
3. Download and apply the patch (linux shell access)

cd modules/views/modules
wget http://drupal.org/files/issues/views_role_arg.patch
patch
views_user.inc views_role_arg.patch
# (patch applied message)

4. Administer > Modules. Enable Views module. Enable Views UI module.
5. Administer > Views > Add. Goto Arguments section. Expand Add Argument select menu and you should see "Role: Author Role."

#2

merlinofchaos - May 1, 2008 - 04:24
Version:6.x-2.x-dev» 5.x-1.x-dev

Setting correct version.

#3

Owen Barton - May 1, 2008 - 17:43
Title:Author Role Argument Installation» Author Role Argument

Correcting title too (I wonder how the version changed?...is was entered as 5.x, and there is no change in the comment log...)

I can update this patch for 6.x if you would be interested.

#4

merlinofchaos - May 1, 2008 - 21:07

It was probably entered for HEAD which did eventually change to 6.x-2.x.

Views 2 for D6 already has a role argument, so no need to roll this for that.

 
 

Drupal is a registered trademark of Dries Buytaert.