1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How are phrases for permissions fetched?

Discussion in 'XenForo Questions and Support' started by Luxus, Apr 18, 2013.

  1. Luxus

    Luxus Well-Known Member

    Some Permission phrases like permission_general_view aren't in admin templates although they are clearly there in the html output. And they can't be found in any core files either. The html for them is this:
    <tr class="permission">
    $permission.title is a variable for phrases. I have searched the core files for $permission.title. No results besides a few in the admin_templates.xml file of the install directory. So this begs the question how those phrases are fetched, or more specifically, how does $permission.title work?
  2. Jeremy

    Jeremy Well-Known Member

    You would really want to look for $permission['title'] or the specific Controller actions for those templates you found to see how $permission is populated.
  3. xf_phantom

    xf_phantom Well-Known Member

    Phrase titles for adminnavigation, cronjobs, options, user permissions, style properties, thread prefixes, trophies, userfields and warnings are generated by the model

    e.g. for the admin permission, you'll want to check the XenForo_Model_Permission

    ppublic function prepareAdminPermission(array $permission)
    $permission['title'] = new XenForo_Phrase($this->getAdminPermissionTitlePhraseName(

Share This Page