Make WordPress Core

Opened 18 years ago

Closed 18 years ago

Last modified 3 months ago

#3120 closed enhancement (fixed)

Restrict Manage Posts by Author as well.

Reported by: westi's profile westi Owned by: westi's profile westi
Milestone: 2.1 Priority: normal
Severity: normal Version: 2.1
Component: Administration Keywords: bg|has-patch
Focuses: Cc:

Description

Following on from #2340

We could also restrict by Author to keep Lorelle happy (http://lorelle.wordpress.com/2006/09/08/sort-posts-by-category-now-available-in-wordpress/)

Attachments (2)

show-only-authors-hide-empty-cats.diff (1.6 KB) - added by westi 18 years ago.
Add ability to filter by author and hide-empty cats
3120.diff (769 bytes) - added by westi 18 years ago.
Fix the category list to remove empty cats and add do_action

Download all attachments as: .zip

Change History (15)

@westi
18 years ago

Add ability to filter by author and hide-empty cats

#1 @westi
18 years ago

Attached patch allows filtering by author and also enabled the hiding of empty cats.

#2 @westi
18 years ago

  • Owner changed from wes to westi
  • Status changed from new to assigned

#3 @ryan
18 years ago

Some blogs have a huge number of authors.

#4 @westi
18 years ago

Ok Ryan.

We do display an author dropdown on the edit post /edit page pages.

Would this patch be more acceptable if I reduced it to one query with a JOIN to wp_users to get the nicename rather than using get_userdata?

Otherwise could we just add an add_action here so that it's really simple for plugins to extend the available filtering?

#5 @ryan
18 years ago

That author dropdown on the post page is problematic too. That's why I'm hesitant to add another author/user dropdown.

I'm not sure how best to handle it. One option is to type an author name into a text field to search.

#6 @filosofo
18 years ago

How about make the last option in the drop-down be something like "Show next 50 authors . . .", then with a little AJAX magic re-populate the drop-down?

#7 @westi
18 years ago

I'm not convinced that AJAX magic would help here.

I think we may need to work on a better way of managing the author <> post relationship to replace the author dropdown on the post page and to provide filtering by author here.

Maybe we could do one or more of the following:

  1. Add add_action('filter_edit_posts'); into wp-admin/edit.php to allow plugins to add extra filters easily.
  2. Add an extra Manage interface for managing Authorship of Posts (and Pages) so as to allow us to remove the dropdown from the write post page and move the work to a seperate page with more UI space for an intelligent system which scales to large numbers of authors.

Ryan - What size of authorship are we aiming to support well? 100's / 1000's or authors or more?

#8 @markjaquith
18 years ago

I don't think we need to put an author dropdown here. It doesn't scale well.

What does scale is the users.php page. Next to each author is the "View # posts" link. That gives you post management by author without a clunky interface.

#9 @westi
18 years ago

Markjaquith: I hadn't noticed that :-(. I agree that does scale well and does provide the functionality required.

I'm musing on a new patch with the following features:

  1. Add the do_action in wp-admin/edit.php to allow for a plugin to easyily provide the badly scaling dropdown for sites with a low number of authors. And for anyother filtering facilities to be added there by a plugin. Adding more actions is always good.
  2. Fix the category stuf to not show empty cats in the dropdown.

I'll code this one up later today.

@westi
18 years ago

Fix the category list to remove empty cats and add do_action

#10 @westi
18 years ago

New patch attached which just fixes the two points described earlier no more author dropdown here.

#11 @markjaquith
18 years ago

+1 on hiding empty cats (no-brainer)

Should the action hook be outside the form? More flexibility, perhaps, but requires more work as they need to build their own form. Thoughts?

#12 @westi
18 years ago

The action hook is outside the form.

Each of the "filters" has it's own form and own submit button.

#13 @markjaquith
18 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [4321]) Manage Posts: hide empty categories in dropdown, provide hook for custom filtering. Props westi. fixes #3120

Note: See TracTickets for help on using tickets.