Ask Your Question
1

How to make answers private on user's profile

asked 2012-08-08 16:08:25 -0600

kintali gravatar image

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 ?
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2012-08-09 02:57:57 -0600

bgenevaux gravatar image

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.

edit flag offensive delete link more

Comments

Awesome. Thanks.

kintali gravatar imagekintali ( 2012-08-10 01:55:23 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2012-08-08 16:08:25 -0600

Seen: 101 times

Last updated: Aug 09 '12