Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
838 views
in Q2A Core by
I wanna show the user's email domain next to his name. How can i do that?
E.g. if the users emsil is john.morgan@sympatica.com i wanna didplay "sympatica.com" next to his name
Thank you in advance
by
You mean in the same way as in http://www.question2answer.org/qa/37875 ? Or somewhere else?
by
Hello,
To display the email same location as depicted in that question's image mockup

1 Answer

0 votes
by
selected by
 
Best answer

The answer is similar to the one in the comment. Edit file qa-include/qa-app-format.php and change:

if (isset($postuserid) && isset($usershtml[$postuserid])) {
    $whohtml=$usershtml[$postuserid];
    if ($microformats)
        $whohtml='<span class="vcard author">'.$whohtml.'</span>';
    $userinfo = qa_db_select_with_pending(qa_db_user_account_selectspec($postuserid, true));
    $domain = array_pop(explode('@', $userinfo['email']));
    $whohtml .= ' ' . $domain;
} else {
 
Note this will work only if external users is disabled.
...