Quote:
Originally Posted by grom815
Maybe I can create a custom non-user-editable field, and put their offset post count in there. For the example, I will name this field 'Offset'.
So if a user has 20 posts on my forum, his 'Total Posts' will say 20. As admin, I would edit his 'Offset' field to say 50.
Then, I would edit the postbit to show 'Total Posts' + 'Offset' for post count. In this example, it would show Postcount: 70.
Is math like this even possible?
|
I think this would be easiest, if just changing the postbit display is enough. There's a minor complication in that the posts number is formatted as a string and the original integer is not saved, so there's no easy way to recalculate it after that. But what you might do is create a plugin using hook postbit_display_start and create your own "adjusted posts" value in $post, then edit your postbit (or postbit_legacy) to use the new value.
For example, if your non-user-editable field is field7, then maybe the plugin code is:
Code:
$post['adjusted_posts'] = vb_number_format($post['posts'] + $post['field7']);
Then in the postbit template, change {vb:raw post.posts} to {vb:raw post.adjusted_posts}.
But IIRC, the profile field has to at least be publicly readable or else you'll find $post['field7'] will be empty.