#5838 closed enhancement (fixed)
Remove "Profile" from Member page title
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 2.2 | Priority: | normal |
Severity: | normal | Version: | 2.0 |
Component: | I18N | Keywords: | has-patch |
Cc: | sooskriszta |
Description
The title tag of member profile page says Name's profile.
The ";s profile" seems extraneous. Perhaps we can say, quite simply, Name.
Attachments (3)
Change History (25)
#2
@
11 years ago
- Keywords reporter-feedback removed
http://buddypress.org/members/djpaul/
Paul Gibbs . Activity Streams . BuddyPress.org
http://buddypress.org/members/djpaul/profile/
Paul Gibbs . Extended Profiles . BuddyPress.org
I am talking about the title tag,
<title></title>
While for site developers and admins, or "extended profile" has a meaning, I feel that it does not add value and deteriorates the experience by adding noise.
The title of http://buddypress.org/members/djpaul/ should be simply
Paul Gibbs - BuddyPress.org
I don't think
http://buddypress.org/members/djpaul/profile/
http://buddypress.org/members/djpaul/activity/
http://buddypress.org/members/djpaul/forums/
should have titles different from the title for http://buddypress.org/members/djpaul/
But if they have to be, then we should consider changing them to:
http://buddypress.org/members/djpaul/profile/
Paul Gibbs - Profile - BuddyPress.org
http://buddypress.org/members/djpaul/activity/
Paul Gibbs - Activity - BuddyPress.org
http://buddypress.org/members/djpaul/forums/
Paul Gibbs - Forum Posts - BuddyPress.org
In fact, semantically, it's hard to explain why forum posts are now "activities", and how is it that other people's actions (e.g. calls) are posted on the Activities page for DJPaul. Perhaps we should consider renaming the "Activity" page. But I suppose that's for another ticket.
P.S. If you agree that this ticket is something we want, then I am happy to add a patch - seems pretty trivial.
#3
@
11 years ago
- Keywords needs-patch added
+1 to these changes. sooskrizta, I'm not sure how trivial the changes will be (I think there's some funkiness in the way these page titles are built) but please do feel free to have a go at a patch.
#5
@
10 years ago
- Keywords has-patch needs-testing added; needs-patch removed
I am pretty sure I am missing something crucial in the patch. Would appreciate feedback.
#11
@
10 years ago
- Owner set to djpaul
- Resolution set to fixed
- Status changed from new to closed
In 9106:
#12
@
10 years ago
- Keywords needs-testing removed
- Resolution fixed deleted
- Status changed from closed to reopened
The problem with r9105 is we get the same duplicate title tag across all pages for a user.
I'm not a fan of SEO, but we definitely should not have duplicate title tags.
Was the intent of r9105 to only have the displayed user's name for the <title>
tag on the landing page for a user (eg. /members/USERNAME/
)? If so, this makes more sense to me.
#13
@
10 years ago
- Keywords has-patch removed
No, the intent was:
I don't think http://buddypress.org/members/djpaul/profile/ http://buddypress.org/members/djpaul/activity/ http://buddypress.org/members/djpaul/forums/ should have titles different from the title for http://buddypress.org/members/djpaul/
we definitely should not have duplicate title tags.
Can you explain more?
#14
@
10 years ago
- Keywords has-patch added
Google doesn't recommend having duplicate title tags across different pages:
https://support.google.com/webmasters/answer/80407
ray.patch
does a couple of things:
- When on a user's landing page (eg.
example.com/members/admin/
), the page title will beadmin | {SITE NAME}
.
- Uses the BP nav name for the page title instead of the admin title used on the "
Settings > BuddyPress > Components
" page. For example, when onexample.com/members/admin/activity/
, the page title will beadmin | Activity | {SITE NAME}
.
- Added subnav title when on a member component sub-page. For example, when on
example.com/members/admin/activity/mentions/
, the page title will beadmin | Activity | Mentions | {SITE NAME}
.
This is similar to what sooskriszta proposed in the latter part of comment:2.
Let me know what you think.
#15
@
10 years ago
$span = strpos( $bp->bp_nav[$component_id]['name'], '<span' );
What items have a span? Is this to cover components with item counts in their names?- I think the
// translators
comment needs to be directly above the line of code it refers to. - The construction in
Append action name if we're on a member component sub-page
looks a bit dubious from a translation POV (e.g. in case you need to re-order the position of the seperator)`
#16
@
10 years ago
Thanks for the feedback!
$span = strpos( $bp->bp_nav[$component_id]name?, '<span' ); What items have a span? Is this to cover components with item counts in their names?
Yup! You got it. The default BP components that add counts to the nav name are - Friends, Groups, Notifications, Messages. This isn't counting plugins. If the language file is using a different element, then the <span> search doesn't work. Could use regex or strip_tags
and remove all numbers?
I think the translators comment needs to be directly above the line of code it refers to.
Thanks for that tidbit. This should be fixed in the updated patch.
The construction in Append action name if we're on a member component sub-page looks a bit dubious from a translation POV (e.g. in case you need to re-order the position of the seperator)
Right. The updated patch uses the sprintf()
argument syntax used to construct the current page title, which I kinda hate, but I guess there's no other way.
Let me know what you think.
#17
@
10 years ago
I have not tested this latest patch but I have spotted something I missed the first time I looked at it; I'm not 100% confident that ucwords
is multi-byte safe. See https://stackoverflow.com/questions/4528119/best-function-for-title-capitlization for the best result I could find in Google. I think it'll be simpler just leaving the case as-is, unless you're familiar with any multibyte changes in order to test this.
#18
@
10 years ago
To be clear, other than getting your opinion on the ucwords call, I think the patch looks good.
#19
@
10 years ago
ucwords()
was taken from the older title implementation. Just did a copypasta :)
But, you do have a legit point about ucwords()
being utf-8-compatible.
In the current patch, I think if we change:
$component_name = $bp->{$component_id}->id;
to:
$component_name = ucwords( $bp->{$component_id}->id );
And remove the other ucwords()
calls, we should be safe. It's very rare that the BP nav will not have a name attached to it.
I am not sure which page you are referring to and cannot easily find one that does this on my local install. Can you share a sample link, please?