Skip to:
Content

BuddyPress.org

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#6632 closed idea (no action required)

User_id based mention API

Reported by: tafmakura's profile Tafmakura Owned by:
Milestone: Priority: low
Severity: trivial Version:
Component: Core Keywords: dev-feedback
Cc:

Description

I'm not a developer so please mind the incorrect terminology and wild ideas.
Currently it seems that buddypress mention API uses the username to work, which means three things

1) A user cannot change their username/@mentionname (easily or at all) as all mentions use the user login as reference
2) Users MUST ALWAYS use the @mentionname to mention another user, they cant use the display name like facebook
3) Users are stuck with the username they registered with, this particularly sucks for auto generated usernames based on e mail address or social login plugins

Can the mention API not use the user ID to store and reference mentions instead of the user login? The mention name can then be rendered dynamically as a template tag based on the user's ID across all buddypress pages (I'm not sure about how posts would work though) , so that when the mention name is changed the user Id will then reference the current display name and current profile permalink for each mention tag, it also gives site admins the flexibility to decide the display they like. Display name a la Facebook or the user's unique login as the mention name, a la twitter.

An alternative is resorting to good'ol Javascript where the static @mention <a> tag has some classes added to it on creation including the user_id, that way on document ready a Javascript function can then find and replace all static mention links by class with the latest permalink and username dynamically based on the site admin's preference. (it sounds like a hack to me)

Change History (4)

#1 @DJPaul
9 years ago

  • Milestone changed from Awaiting Review to Under Consideration

I'm not totally convinced by the argument but to make this possible, as you point out, we'd need a way for BuddyPress to allow members to set their "mention name" somewhere in their user profile. By default, we use the nicename field from the wp_users table.

Due to how things are structured internally, this would also change the slug part of the URL for that members profile, which itself is probably a good enhancement.

I took a quick look at the code and there's nothing obvious that would make this impossible; it's just considerations around if we want to do this, and how we'd let the user change their profile slug.

#2 @DJPaul
9 years ago

  • Keywords dev-feedback added

#3 @DJPaul
9 years ago

  • Milestone Under Consideration deleted
  • Resolution set to invalid
  • Status changed from new to closed

This ticket is really about whether we should let users be able to change their at-name in the default BuddyPress experience.

I don't think we'll do this at the moment. There's been no comments from anyone else, so I'm assuming little interest in such a change. I think the majority of sites will be happy with us continuing to use the username for this.

#4 @DJPaul
9 years ago

  • Component changed from API to Core
Note: See TracTickets for help on using tickets.