Instructions for use

From Redazione
Jump to navigation Jump to search
(No difference)

Revision as of 19:28, 17 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, and more.
  • Once that an organization is added, create an entry in LocalSettins.php like
     $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}')


Forked functions

Below is a list of the changes made to mediawiki source code in order to fit the needs of "Culturaitaliana.org".

  • uploadApi (file includes/api/ApiUpload.php) on upload, the filename of uploaded file is prefixed with the name of the organization to which the logged in user if affiliated. The same applies, as above, to pictures uploaded through PageForms.
    • todo: update PageForms uploaded picture preview searching class "simpleupload_prv"
  • pages are protected from editing when the logged in user is not an administrator and the edited page or subpage does not belong to the organization to which he or she is not affiliated. We are using the extension "Abuse filter" with a custom filter at the moment based on a group in which users affiliated to organizations are inserted after subscription