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

is it possible to display "User titles based on points" on the user nav. 

 

Q2A version: 1.6.3

1 Answer

+2 votes
by
selected by
 
Best answer

Indeed screenshots help quite a lot. This is how to do that using the Snow theme in 1.6.3.

1. Remove the whole if statement in this line, which means removing up to line 72 inclusive

2. Add the following code in its place:

if (qa_is_logged_in()) {
    $userpoints=qa_get_logged_in_points();

    $pointshtml=($userpoints==1)
        ? qa_lang_html_sub('main/1_point', '1', '1')
        : qa_lang_html_sub('main/x_points', qa_html(number_format($userpoints)));
    
    require_once QA_INCLUDE_DIR . 'qa-app-format.php';
    require_once QA_INCLUDE_DIR . 'qa-app-options.php';

    if (qa_opt('show_user_titles')) {
        $pointTitleHtml =
            '<span class="qa-q-item-who-title">' .
                qa_get_points_title_html($userpoints, qa_get_points_to_titles()) .
            '</span>'
        ;
    } else {
        $pointTitleHtml = '';
    }
    $this->output(
        '<span class="qa-logged-in-points">',
        '('.$pointshtml.')',
        $pointTitleHtml,
        '</span>'
    );
}

After making these changes it should look like this:

by
thumbs up for simpler solution..!
by
thank you very much
...