I have this function in qa-theme.php to override the main function in qa-base-theme.php.
function post_meta_who($post, $class)
{
if (isset($post['who'])) {
$this->output('<SPAN CLASS="'.$class.'-who"><br />');
if (isset($post['avatar'])) {
if (isset($prefix))
$this->output($prefix);
$this->output('<SPAN CLASS="'.$class.'-avatar">', $post['avatar'], '</SPAN>');
}
if (isset($post['who']['data']))
$this->output('<SPAN CLASS="'.$class.'-who-data">'.$post['who']['data'].'</SPAN>');
if (isset($post['who']['title']))
$this->output('<SPAN CLASS="'.$class.'-who-title">'.$post['who']['title'].'</SPAN>');
// You can also use $post['level'] to get the author's privilege level (as a string)
if (isset($post['who']['points'])) {
$post['who']['points']['prefix']=''.$post['who']['points']['prefix'];
$post['who']['points']['suffix'].='';
$this->output_split($post['who']['points'], $class.'-who-points');
}
if (strlen(@$post['who']['suffix']))
$this->output('<SPAN CLASS="'.$class.'-who-pad">'.$post['who']['suffix'].'</SPAN>');
$this->output('</SPAN>');
}
}
After I installed the badge plugin I saw this function
function post_meta_who($post, $class)
{
if (@$post['who'] && @$post['who']['data'] && qa_opt('badge_active') && (bool)qa_opt('badge_admin_user_widget') && ($class != 'qa-q-item' || qa_opt('badge_admin_user_widget_q_item')) ) {
$handle = preg_replace('|.+qa-user-link" title="@([^"]+)".+|','$1',$post['who']['data']);
$post['who']['suffix'] = (@$post['who']['suffix']).' '.qa_badge_plugin_user_widget($handle);
}
qa_html_theme_base::post_meta_who($post, $class);
}
does this function suppose to add badge pointer next to username? Because it's not working for me.