Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+3 votes
522 views
in Q2A Core by
edited by
Ever noticed that you can favorite yourself?

Check your own profile page, there is a favorite star available

Why should one want to favorite himself?
Q2A version: 1.6beta
by
:P I never noticed however there should be simple hack by writing conditionally if is the logged in user. I guess.
by
I checked the database. A lot of my users have favorited themselves! wow :) ... I guess they were interested in clicking the star... or they do not understand the use of it.
by
I also care about this. Although it thought that there were not many people who follow themselves intentionally, it is problem supposing there are many those who click with interest.
by
see my answer below for the fix.

2 Answers

+1 vote
by

The fix, again core hack:

1. open qa-page-user-profile.php

2. find lines: 

      $qa_content['favorite']=qa_favorite_form(QA_ENTITY_USER, $useraccount['userid'], $favorite,
                qa_lang_sub($favorite ? 'main/remove_x_favorites' : 'users/add_user_x_favorites', $handle));

3. encapsulate, so that it becomes:

        if($userid != qa_get_logged_in_userid()) {
            $qa_content['favorite']=qa_favorite_form(QA_ENTITY_USER, $useraccount['userid'], $favorite,
                qa_lang_sub($favorite ? 'main/remove_x_favorites' : 'users/add_user_x_favorites', $handle));
        }
 

Should be implemented in core...

by
and instead the "favorite star" I am putting the "edit my profile" button, as described here: http://question2answer.org/qa/26022/request-for-next-version-merge-user-navigation-on-top
by
Good.. I think you should start to dig into core now... :)
by
I hope Scott will get the rights from gidgreen to do core changes, so that he can consider it :) or gidgreen finds the minute to do it by himself. Anyway, I am curious what the result of their exchange will be...
+1 vote
by

there is a good reason for that, if I favorite myself in My Updates page, I will be able to get update of all contents that I posted as well as posts, tags and categories which I favorited.

...