Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+2 votes
1.5k views
in Q2A Core by

Hi, 

i just try this open source on my computer. i'm novice. I would like to hide the user/nickname for all user. If someone can help me, i will appreciate. Thank you 

Version 1.6.2

1 Answer

+2 votes
by
edited by

Place below code into your theme file. Below code will hide from everywhere

function post_meta_who($post, $class){}

If you want to display on question (view) page than use below code

function post_meta_who($post, $class)
{
    if($this->template == 'question')
        qa_html_theme_base::post_meta_who($post, $class);
}

I have posted code on Gist here https://gist.github.com/q2amarket/8356498

<<<------- Version 1.01 ------->>>

I have modified code as per your need. Now the meta who will be visible on the moderation section to Moderator and higher level users and question view page. It will be hidden rest of the areas.

Get code from Gist: https://gist.github.com/q2amarket/8405467 ( you will find detailed description there)

Or just copy and paste below


	

function post_meta_who($post, $class)
{ 
    $type = $post['raw']['type'];
    $level  = qa_get_logged_in_level();
    $type_array = array('Q_QUEUED', 'A_QUEUED', 'C_QUEUED');
 
    if($this->template == 'question' || (in_array($type, $type_array) && $level >= QA_USER_LEVEL_MODERATOR))
        qa_html_theme_base::post_meta_who($post, $class);
}

 

by
Thanks for reporting issue .... Let me see...
by
Hi jatin,

i find another issue:

without register or login, you can see all information from the user.

EX: http://www.example.com/?qa=user/"name for user"

than you get an access.

I don't know really if it's an issue, but i would like just protect the user information if you are not register. I think is a good idea.

Thank you
by
That is different than this hack/issue
...