First time here? Check out the FAQ!
1

How to make answers private on user's profile
 

Askbot shows the following information on the user's profile : questions, answers, votes, tags, badges. In my website (TrueShelf) all the answers are private. I want to make the list of answers on the profile page private i.e., only the user (say user A) can see his list of answers. If the user is not A then he should only see the questions, votes, tags and badges. But not answers.

  • How to make the answers list private on the user profile page ?

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
kintali's avatar
141
kintali
asked 12 years ago

Comments

see more comments

1 Answer

3

Try to edit askbot/skins/default/templates/user_profile/user_stats.html, replacing

{% include "user_profile/users_questions.html" %}
<a name="answers"></a>

by

{% include "user_profile/users_questions.html" %}
{% if request.user == view_user or request.user|can_moderate_user(view_user) %}
<a name="answers"></a>

and

<br/>
<a name="votes"></a>

by

<br/>
{% endif %}
<a name="votes"></a>

I haven't tested it, but normally it'll do what you want.

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
bgenevaux's avatar
201
bgenevaux
answered 12 years ago
link

Comments

Awesome. Thanks.

kintali's avatar kintali (12 years ago)
see more comments