Instructions for use

From Redazione
Jump to navigation Jump to search
Line 11: Line 11:
  
 
{{unordered list
 
{{unordered list
   | As soon as an organization is added, it has to be created an entry in LocalSettins.php   
+
   | Once that an organization is added, it has to be created an entry in LocalSettins.php   
 
       <syntaxhighlight> $wgGroupPermissions['memberof_{organization name}']['edit'] = false; </syntaxhighlight>
 
       <syntaxhighlight> $wgGroupPermissions['memberof_{organization name}']['edit'] = false; </syntaxhighlight>
 
     where {organization name} should be replaced with the organization name with spaces replaced by underscores, and the user affiliated to the organization should be added to a group with edit rights ''and'' to such group ('memberof_{organization name}')
 
     where {organization name} should be replaced with the organization name with spaces replaced by underscores, and the user affiliated to the organization should be added to a group with edit rights ''and'' to such group ('memberof_{organization name}')

Revision as of 21:38, 16 February 2020

  • added parser functions: #userAffiliatedTo and #userRealName, the first returns the organization to which the logged in user is affiliated and the second the user real name. This is used for instance in forms, to allow the user to appear as affiliated to his/her organization when contributing to some common contents, to add a prefix to uploaded pictures, and more.
  • Once that an organization is added, it has to be created an entry in LocalSettins.php
     $wgGroupPermissions['memberof_{organization name}']['edit'] = false;
    where {organization name} should be replaced with the organization name with spaces replaced by underscores, and the user affiliated to the organization should be added to a group with edit rights and to such group ('memberof_{organization name}')
  • added attribute "filename prefix" to be used in forms, e.g.
     {{{field|organization logo|uploadable|filename prefix={{#userAffiliatedTo:}}
    in combination with #userAffiliatedTo