Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
$Comment->UserCommentCount in 0.9.3 (comments.php)
Is this variable supposed to work? I see that it is defined, but it doesn't seem to contain the actual number of comments the user has made; they all show 0. Is this a new feature that has not been completed yet?
Thanks!
0
This discussion has been closed.
Comments
*is not certain
you mean you're trying to show how many comments have been made by each user just in that particular thread?
// Used to prevent double posts and "back button" posts var $UserCommentCount;
So I think you've misinterpreted the use of that variable.
On the bright side, $Context->AuthUserID will get you the comment's author's ID numbert. The UserMananger's class' "GetUserById" function can then be used to return the Author's User object, which has a comment count as a field.
But to address your problem, I just added two new delegates to the CommentManager class that will allow you to alter the SQL queries that retrieve comments.
$this->DelegateParameters['SqlBuilder'] = &$s; $this->CallDelegate("CommentManager_GetCommentList");
Using delegation you can now add new joins and columns to that query. Then you can change up a template to display whatever new columns you've selected.