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

I need to edit qa-theme-base.php to get the points programmatically within function function post_meta_who($post, $class).

I tried to change line 1577:

from: $this->output('<SPAN CLASS="'.$class.'-who-title">'.$post['who']['title'].'</SPAN>');

to: $this->output('<SPAN CLASS="'.$class.'-who-title">'.$post['who']['points'].'</SPAN>');

which does not output the points but an error.

Also $post[''points'] throws an error: PHP Notice:  Undefined index:  points

 

PS: I need to get the points as int to convert them.

2 Answers

0 votes
by

print_r($post['raw']) is your friend...

by
Thanks for the tip. Makes a blind see again :)
by
Just did not see that 'raw' is set. Thought I can only access 'who' and 'points' ...
0 votes
by

This works:

$this->output('<SPAN CLASS="'.$class.'-who-title">'.$post['raw']['points'].'</SPAN>');

...