Is there any way to get the Forums plugin to NOT use the username of the poster but instead their Display Name, which is what Wordpress does. My username on my site is something like ksdfjsdk&kdYSD)# ie it's like a password, to make it doubly hard to hack my admin account, but it looks bad with the forums plugin and then everyone can see it!
Is there any way to get the Forums plugin to NOT use the username of the poster but instead their Display Name, which is what Wordpress does. My username on my site is something like ksdfjsdk&kdYSD)# ie it's like a password, to make it doubly hard to hack my admin account, but it looks bad with the forums plugin and then everyone can see it!
6593 pointsLike some sort of WPMU DEV GodExceptionally helpfulLifetime member
Keeper of the Dark Chocolate
—
15th August 2010 13:39
#
Gotta admit that that's one of my biggest pet peeves with wordpress in general. No offense to Mason but display_name should be what's used when it comes to choosing how a username is displayed. That's why there's an option on the profile page for allowing the user what they want displayed. Many theme designers hard code in how they want it with username or first name or whatever they feel it;s best.
I think that's on our checklist of things to check for new themes.
From memory the private messaging plugin here also makes this mistake. Someone on my site would find it pretty funny to get a private message from kdjfajdJ&jds$!
Responses (8)
Sales & Support Lead — 15th August 2010 02:12 #
Hiya,
Actually, after looking into this, I think showing the "display name" makes more sense than the way it currently displays the user login.
It's an easy change:
Go to line 1708 in forums-framework.php
change "user_login" to "display_name"
Now it'll pull your display name (you can edit this without editing your login info) which is the way many themes show this info as well.
Member — 15th August 2010 09:25 #
Thanks I did that, but now it doesn't display anything for the name.
Member — 15th August 2010 09:28 #
This is the sort of thing that will work
<?php echo $user_identity ?>Member — 15th August 2010 09:33 #
It's line 1908 for me:
function forums_author_display_name($author_ID){global $wpdb;
if ( !empty($wpdb->base_prefix) ) {
$db_prefix = $wpdb->base_prefix;
} else {
$db_prefix = $wpdb->prefix;
}
$tmp_user_login = $wpdb->get_var("SELECT user_login FROM " . $db_prefix . "users WHERE ID = '" . $author_ID . "'");
return $tmp_user_login;
1708 is $tmp_forum_border_size
Member — 15th August 2010 09:36 #
Got it now, I changed all three instances of user_login to display_name. Thanks I guess that's what you meant.
Keeper of the Dark Chocolate — 15th August 2010 13:39 #
Gotta admit that that's one of my biggest pet peeves with wordpress in general. No offense to Mason but display_name should be what's used when it comes to choosing how a username is displayed. That's why there's an option on the profile page for allowing the user what they want displayed. Many theme designers hard code in how they want it with username or first name or whatever they feel it;s best.
I think that's on our checklist of things to check for new themes.
Member — 15th August 2010 15:08 #
From memory the private messaging plugin here also makes this mistake. Someone on my site would find it pretty funny to get a private message from kdjfajdJ&jds$!
Sales & Support Lead — 15th August 2010 20:41 #
Hiya
@patung
I should have been more clear with the exact change. Glad you got it sorted.
@drmike
I actually am in agreement with you on this point. My point was that many themes use display_name and I agree, they all should be doing this.
Become a member