Quote:
Originally Posted by vbresults
No need to edit any templates (this will be a pain in the ass later) --
Hook: postbit_display_start
PHP Code:
// Overwrite the original post count, alleviating the need for a template edit
$post['posts'] = vb_number_format(intval(str_replace(",", "", $posts['posts'])) + $post['field7']);
...
|
Yeah, I thought about it after I posted and realized that it wasn't really that hard to undo the number formatting - good call. Your code assumes the thousands separator is a comma, which is probably true for grom815, but to generalize it you could use $vbulletin->userinfo['lang_thousandsep'].
But it needs to use hook postbit_display_complete, and there's also a typo ($posts['post'] needs to be $post['posts']).