Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
New FireEvent in CategoryModel->GetFull
Hi all,
I'm writing a plugin which will hide categories so that a user only sees categories in his language. In order to make this change as system-wide as possible, I need a FireEvent in CategoryModel->GetFull.
I added the following
after
Thanks in advance!
I'm writing a plugin which will hide categories so that a user only sees categories in his language. In order to make this change as system-wide as possible, I need a FireEvent in CategoryModel->GetFull.
I added the following
$this->FireEvent('AfterGetFullQuery');
after
$this->SQLAny chance for this change to go mainstream so that I can update by VanillaBB in the feature? It works perfectly for me and it won't do any harm IMHO.
->Select('c.Name, c.CategoryID, c.TreeRight, c.TreeLeft, c.Depth, c.Description, c.CountDiscussions, c.CountComments, c.UrlCode, c.LastCommentID, c.PermissionCategoryID')
->Select('co.DateInserted', '', 'DateLastComment')
->Select('co.InsertUserID', '', 'LastCommentUserID')
->Select('cu.Name', '', 'LastCommentName')
->Select('cu.Photo', '', 'LastCommentPhoto')
->Select('co.DiscussionID', '', 'LastDiscussionID')
->Select('d.Name', '', 'LastDiscussionName')
->From('Category c')
->Join('Comment co', 'c.LastCommentID = co.CommentID', 'left')
->Join('User cu', 'co.InsertUserID = cu.UserID', 'left')
->Join('Discussion d', 'd.DiscussionID = co.DiscussionID', 'left')
->Where('c.AllowDiscussions', '1');
Thanks in advance!
Tagged:
0
Comments
Vanilla Forums COO [GitHub, Twitter, About.me]