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.

CommentFileSizeAuthor
views_role_arg.patch2.28 KBowen barton

Comments

bwood’s picture

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."

merlinofchaos’s picture

Version: 6.x-2.x-dev » 5.x-1.x-dev

Setting correct version.

owen barton’s picture

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.

merlinofchaos’s picture

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.

esmerel’s picture

Status: Needs review » Closed (won't fix)

At this time, only security fixes will be made to the 5.x version of Views.