Support » Plugin: Simple Ajax Chat » Username as chat name

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Jeff Starr


    Not currently, yet planned for a future version of the plugin.

    Hi, first time i’ve replied to a wordpress support post but they’ve helped me ALOT in the past so here goes.

    Navigate to simple-ajax-chat-form.php in the plugin folder, line 103-104 there should be this code:

    <?php } else { ?>
    				<fieldset id="sac-user-info">

    Remove the <label> element & change the <input> to the following:
    <input type="hidden" name="sac_name" id="sac_name" value=" <?php $currentuser = wp_get_current_user();echo $currentuser->user_login; ?> " />

    So now you just have the message & submit button, and the chat uses your currently logged in username as the chat username.

    Hope this helps someone one day. Also, thanks for the plugin.

    Should you prefer the display name to be well, displayed, instead of the login

    Change “user_login” to “display_name”. Which gives

    <input type=”hidden” name=”sac_name” id=”sac_name” value=” <?php $currentuser = wp_get_current_user();echo $currentuser->display_name; ?> ” />

    Thanks to Eddie for his code.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Username as chat name’ is closed to new replies.