Forums Poster Name

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!

  • Mason
    • DEV MAN’s Sidekick


    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.

  • patung
    • Design Lord, Child of Thor

    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

  • drmike
    • DEV MAN’s Mascot

    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.

  • Mason
    • DEV MAN’s Sidekick


    I should have been more clear with the exact change. Glad you got it sorted.

    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.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.