Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
294 views
in Plugins by

The badges plugin has this:

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);
  }

and my theme has this:

 function post_meta_who($post, $class) {
   if (isset($post['who'])) {
    $this->output('<SPAN CLASS="'.$class.'-who">');
    
    if (strlen(@$post['who']['prefix']))
     $this->output('<SPAN CLASS="'.$class.'-who-pad">'.$post['who']['prefix'].'</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>');
 
    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>');
   }
  }

Please log in or register to answer this question.

...