Howdy, Stranger!

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

Try Vanilla Forums Cloud product

In this Discussion

Please upgrade to 2.3 here. The 2.2 and earlier branches are no longer being updated.

Modify query


For a plugin I'm writing I want to modify a query in the method 'Categories' in 'class.categorymodel.php' so that I can add an extra join and where condition (I want to fetch only categories linked to the current language of the user). How could I best achieve this?

Thanks in advance!


  • A better approach is to make a role for each language. Then give view permission for that category to that user.

    A user can have multiple roles, and it is is additive.

    grep is your friend.

  • Thanks. However, the language needs to be assigned/determined by using the current URL, so I need to be able to assign a 'language rol' to a user dynamically. Any idea how I could assign a rol dynamically?

    And just out of curiosity, do you know how I could best have changed that query :)?

Sign In or Register to comment.