Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter

Categories

In this Discussion

Who's Online 18

BulliesofNCCurtisOdenMarc905ericgillettepehja +13 guests

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

$this->FireEvent('AfterGetFullQuery');

after
$this->SQL
->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');
Any 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.

Thanks in advance!
Tagged:
Sign In or Register to comment.