Skip to:
Content

Opened 4 years ago

Closed 3 years ago

Last modified 3 years ago

#2820 closed enhancement (wontfix)

Admin columns - Add Topics, Replies, Author avatar column

Reported by: Stagger Lee Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.5.7
Component: General - Administration Keywords:
Cc:

Description

Sorry if it is already sked, but cannot find it.

I think it would make life much easier for forum moderators and admins if in backend Topics and replies post types could have one Author avatar extra column.

Something as it is easy to add featured image column, but just for authors avatar.

http://wptavern.com/how-to-add-a-featured-image-column-to-the-post-listing-page-in-the-wordpress-backend

Tried Admin Columns plugin, but has no support for it. Avatars are not custom fields meta so not possible to make some workaround with custom fields in AC.

If someone can direct me to some snippet for it I would be thankful. Difficult to search on Google, no matter what keywords you use all is polluted with other answers.

Yes, I know moderation is possible on frontend, but still it would be very nice exstension and improvement I think anyway.

Change History (10)

#1 in reply to: ↑ description @Robkk
4 years ago

Replying to Stagger Lee:

I think it would make life much easier for forum moderators and admins if in backend Topics and replies post types could have one Author avatar extra column.

How would it make moderation much easier?

I have some ideas , but I want to know what your reason is.

#2 follow-up: @Stagger Lee
4 years ago

For instance when looking at the lists, much easier to spot topic, reply by user avatar.

Maybe second, when using avatar easier to spot clones accounts. Sort by IP address and just brief look at avatars.

What are your ideas ?

#3 in reply to: ↑ 2 @Robkk
4 years ago

Replying to Stagger Lee:

For instance when looking at the lists, much easier to spot topic, reply by user avatar.

Maybe second, when using avatar easier to spot clones accounts. Sort by IP address and just brief look at avatars.

What are your ideas ?

Okay just sorting the users is what you want then. It should do this by clicking on the post authors name in the author column. It even says this in the help menu in each section.

After clicking the help dropdown at the very top right
In the Screen Content Section it says this

You can refine the list to show only replies in a specific category or from a specific month by using >the dropdown menus above the replies list. Click the Filter button after making your selection. You >also can refine the list by clicking on the reply author, category or tag in the replies list.

Since it says that I'm going to assume it is a bug in bbPress or incomplete functionality.

Sort by IP address , I don't Know really maybe good for anonymous posting?? Banning?? Maybe the Users > All Users section would be better for this??

For what I thought you were heading for was maybe just keeping your forum users avatars PG and keep avatars that are X-rated off your forum. In Settings > Discussion you can restrict what kind of avatar rating is shown on your website, but that works well when you overall use Gravatar for user avatars and that they actually rated their avatars.

Last edited 4 years ago by Robkk (previous) (diff)

#4 @Stagger Lee
4 years ago

Give us a filter, hook ?
You dont need to force anyone to use avatars in columns. Admin Columns plugin takes care of rest.

Last edited 4 years ago by Stagger Lee (previous) (diff)

#5 @netweb
4 years ago

Take a look the following plugin for an example that adds an extra column to bbPress topics admin section via the bbp_admin_topics_column_headers filter: ( Replies uses bbp_admin_replies_column_headers)

#6 @thebrandonallen
3 years ago

  • Keywords 2nd-opinion removed
  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

Closing as this can already be done via plugin, and it definitely feels like plugin territory.

#7 @Stagger Lee
3 years ago

It was not so difficult. Here it is if it can help someone else. I use WP User Avatar plugin, but if using other plugin just adapt avatar function.
I use Author column in Admin Columns plugin, actually can be used any, Author is most simple.

Topics list:

add_filter( 'cac/column/value', 'myplugin_cac_column_topic_avatar_value', 10, 4 ); 
function myplugin_cac_column_topic_avatar_value( $value, $postid, $column, $post_type ) {

	if ( $column->properties->type == 'bbp_topic_author' ) {
		if ( ! $value ) {
			if ( $post_type == 'topic' ) {
			$value = get_avatar(get_the_author_meta('ID'), 96); 
			echo '<style>
			td.column-bbp_topic_author {font-size:0;}
			</style>';
		}
	}
	}
	return $value;
}

Reply list:

add_filter( 'cac/column/value', 'myplugin_cac_column_reply_avatar_value2', 10, 4 );
function myplugin_cac_column_reply_avatar_value2( $value, $postid, $column, $post_type ) {

	if ( $column->properties->type == 'bbp_reply_author' ) {
		if ( ! $value ) {
			if ( $post_type == 'reply' ) {
			$value = get_avatar(get_the_author_meta('ID'), 96); 
			echo '<style>
			td.column-bbp_reply_author {font-size:0;}
			</style>';
		}
	}
	}
	return $value;
}

#8 @netweb
3 years ago

Thanks for the follow up @Stagger Lee and the code snippet :)

#9 follow-up: @Stagger Lee
3 years ago

@netweb, you should have snippet / filter like this in Documentation (standalone one, not dependent of Admin Columns plugin). Believe me it makes tremendous difference, I know it now. Looks very professional and more important instead of dull letters and numbers meaning nothing when compressed so much on so small space, now you have an bird eye on whole topics and replies, and actually see directly what is going on as moderator.

Just to change something. This function above calling avatar is not from WP User avatar plugin. But just go to the plugin Info site and you see right function directly there.

Last edited 3 years ago by Stagger Lee (previous) (diff)

#10 in reply to: ↑ 9 @netweb
3 years ago

Maybe add it as a new guide in the codex here: https://codex.bbpress.org/getting-started/user-submitted-guides/ ?

Note: See TracTickets for help on using tickets.