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

I've enabled 'Show titles next to usernames:' and 'Show points next to usernames:' in Admin->Viewing.  I see the titles and points on all pages except Users page.

On Users page, I only see the points and not the titles.

Is this by design?  If so, how can I add the title there as well?

If not, it could be because of a plugin...

Q2A version: 1.8.6
by
+1
I  got this working with the following change.  But this requires changes to the Core code  :(
Next step: try to do the same in the theme.

qa-include/pages/users.php:
@@ -64,8 +64,10 @@ if (count($users)) {

                // avatar and handle now listed separately for use in themes
+               // Show Title on Users page
                $qa_content['ranking']['items'][] = array(
                        'avatar' => $avatarhtml,
                        'label' => $usershtml[$user['userid']],
                        'score' => qa_html(qa_format_number($user['points'], 0, true)),
+                       'title' => qa_get_points_title_html(@$user['points'], qa_get_points_to_titles()),
                        'raw' => $user,
                );

qa-include/qa-theme-base.php:
@@ -1442,4 +1442,8 @@ class qa_html_theme_base
                if (isset($item['score']))
                        $this->ranking_score($item, $class);
+
+               // Show title on Users Page
+               if (isset($item['title']))
+                       $this->ranking_title($item, $class);
        }

@@ -1465,4 +1469,9 @@ class qa_html_theme_base
        }

+       public function ranking_title($item, $class)
+       {
+               $this->ranking_cell($item['title'], $class . '-title');
+       }
+
        /**
         * @deprecated Table-based layout of users/tags is deprecated from 1.7 onwards and may be

qa-theme/SnowFlat/qa-styles.css:
@@ -3438,4 +3438,12 @@ input[type="submit"], button {
 }

+/* Show Title in Users page */
+.qa-top-users-title {
+        position: relative;
+        float: right;
+        padding: 2px 6px 2px 6px;
+}
+/* End Show Title in Users page */
+
 /* Show Stylized User Titles */
 .qa-user-title {

Please log in or register to answer this question.

...