Instructions for use

From Redazione
Jump to navigation Jump to search
 
(21 intermediate revisions by the same user not shown)
Line 4: Line 4:
  
 
{{unordered list
 
{{unordered list
|Regular users (authorized people from centers of Italian culture and language) can have a page in the form  
+
|Regular users (authorized people from centers of Italian culture and language) can manage a page with the url in the form  
 
<code>
 
<code>
 
https://culturaitaliana.org/wiki/[language]/[name of center]
 
https://culturaitaliana.org/wiki/[language]/[name of center]
Line 16: Line 16:
  
 
Other pages or subpages of this wiki are protected from editing when they do not belong to the organization to which the logged in user is affiliated.
 
Other pages or subpages of this wiki are protected from editing when they do not belong to the organization to which the logged in user is affiliated.
An exception, are the contents created using the forms "Add announcement", "Add book suggestion", or any other content created by forms. (i.e., not through the standard buttons "edit" or "edit source" button on the page).
+
An exception, are the contents created using the forms "Add announcement", "Add book suggestion", or any other content created by forms. (i.e., not through the standard buttons "edit" or "edit source" on the page).
 
If you wish to edit the common pages and to collaborate with this platform further, just join our team using this [[Form_join_team|form]]!
 
If you wish to edit the common pages and to collaborate with this platform further, just join our team using this [[Form_join_team|form]]!
  
This is also true for uploaded files: the system adds to every uploaded file a prefix with the name of the organization, for instance
 
<code>
 
Centro_culturale_italiano_Barcellona_Italian_class_August_2019.jpg
 
</code>
 
this helps keeping the file system ordered and to clearly attribute files ownership.
 
  
 
| The assigned "domain" is in the form  
 
| The assigned "domain" is in the form  
Line 37: Line 32:
 
In future the project might also offer a private wiki, with the address in this form
 
In future the project might also offer a private wiki, with the address in this form
 
<code>
 
<code>
https://culturaitaliana.org/[name of center]/wiki/[language]
+
https://culturaitaliana.org/[name of center]/wiki
 
</code>
 
</code>
 
only with the aim to manage private content (such as students, courses, budget, copyrighted contents), but not aimed at interoperability and open access.
 
only with the aim to manage private content (such as students, courses, budget, copyrighted contents), but not aimed at interoperability and open access.
 
}}
 
}}
  
== For administrators ==
+
==For administrators==
  
 
{{unordered list
 
{{unordered list
Line 52: Line 47:
 
    
 
    
 
}}
 
}}
* the system only displays the title of the current page when it is a subpage without displaying the entire path. It also recognizes if the current page is a language code and in this case behaves as expected (i.e. it shows the second last and the last page of the path). At the moment this is done within the extension "HidePrefix" but the code can be moved to our custom extension "CulturaItalianaAddons".
 
  
* 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 (see below),--> and more.
+
*the system only displays the title of the current page when it is a subpage without displaying the entire path. It also recognizes if the current page is a language code and in this case behaves as expected (i.e. it shows the second last and the last page of the path). At the moment this is done within the extension "HidePrefix" but the code can be moved to our custom extension "CulturaItalianaAddons".
 +
 
 +
*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 (see below),--> and more.
  
 
{{unordered list
 
{{unordered list
 
   | Once that an organization is added, create an entry in LocalSettins.php like
 
   | Once that an organization is added, create an entry in LocalSettins.php like
       <syntaxhighlight> $wgGroupPermissions['memberof_{organization name}']['edit'] = false; </syntaxhighlight>
+
       <pre> $wgGroupPermissions['memberof_{organization name}']['edit'] = false; </pre>
 
     where {organization name} should be replaced with the organization name with spaces replaced by underscores. Then add the user affiliated to that organization to such group ('memberof_{organization name}') and to a group with edit rights: by this way the system knows that he or she is affiliated to that organization and can behave accordingly.
 
     where {organization name} should be replaced with the organization name with spaces replaced by underscores. Then add the user affiliated to that organization to such group ('memberof_{organization name}') and to a group with edit rights: by this way the system knows that he or she is affiliated to that organization and can behave accordingly.
 
}}
 
}}
Line 64: Line 60:
 
{{unordered list
 
{{unordered list
 
   |added attribute "filename prefix" to be used in forms, e.g.
 
   |added attribute "filename prefix" to be used in forms, e.g.
       <syntaxhighlight> {{{field|organization logo|uploadable|filename prefix={{#userAffiliatedTo:}}  </syntaxhighlight>
+
       <pre> {{{field|organization logo|uploadable|filename prefix={{#userAffiliatedTo:}}  </pre>
 
     in combination with #userAffiliatedTo
 
     in combination with #userAffiliatedTo
 
}}
 
}}
 
-->
 
-->
* on upload (file includes/api/ApiUpload.php) 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.
+
 
 +
*on upload (file includes/api/ApiUpload.php) 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" '''
 
'''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. Check it [[Special:AbuseFilter|here]].
+
*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. Check it [[Special:AbuseFilter|here]].
 +
 
 +
*PageForms extension has been modified (at the time without using hooks, thus in the file extensions/PageForms/includes/PFHooks.php is mentioned a global variable 'wgPageFormsFormPrinter' which ''might'' do the trick) in the file includes/PF_Autoedit_API.php in order to retrieve an alternate HTML for the form content (usually created by includes/PF_FormPrinter.php) since the standard form does not render properly with skin 'Minerva' and extension 'MobileFrontend'. The script will now search the alternate html for the form (which in such way can be completely customized, while keeping the input names expected by PageForms itself) at the page "Form:[form name]_html", so, once that you have created a PageForms form in the standard way, for instance called 'Form:Reading suggestion', create a page with name 'Form:Reading suggestion html' similar to [[Form:Reading suggestion html|this one]] and adjust the form input names on the reference of the original form (at Form:[form name]).<p>The alternate html can be completed with client side verification, in any case the aim of this workaround is to have clean and fast forms (on loading) working on mobile as well, able to fill in the related templates with semantic properties (as the script still does, because for this purpose it uses as reference the original form, which should remain unchanged, with reference of the html) without the javascript added by PageForms required to prepare input fields triggered by the original html of PageForms (see file includes/PF_FormPrinter.php), which indeed slows down the page and does not work properly: at a later time it could be completed as well using the Wikimedia library [https://doc.wikimedia.org/oojs-ui/master/demos/demos.php? OOUI] which also includes the 'TagMultiselectWidget' (also called “chips”) which we expect to use.</p>

Latest revision as of 16:25, 28 June 2020

For users

  • Regular users (authorized people from centers of Italian culture and language) can manage a page with the url in the form

    https://culturaitaliana.org/wiki/[language]/[name of center] and whatever subpage within it. A subpage is a page below the main page after the slash, for instance https://culturaitaliana.org/wiki/[language]/[name of center]/articles and they can be arbitrarily nested.

    Other pages or subpages of this wiki are protected from editing when they do not belong to the organization to which the logged in user is affiliated. An exception, are the contents created using the forms "Add announcement", "Add book suggestion", or any other content created by forms. (i.e., not through the standard buttons "edit" or "edit source" on the page).

    If you wish to edit the common pages and to collaborate with this platform further, just join our team using this form!
  • The assigned "domain" is in the form https://culturaitaliana.org/wiki/[language]/[name of center] rather than https://culturaitaliana.org/wiki/[name of center]/[language] because the wiki is shared (the portion "name of center" is a wiki page, and not an arbitrary part of the url) in the aim of a greater collaborativeness (with reference of the model itself of Wikipedia) and because in such way each center can enjoy, de facto, a fully maintained platform, where professionals can set up templates, modules, settings, extensions, forms, semantic properties, and other elements which guarantee a profitable and rich experience both from the side of visitors, and the organizations themselves. In future the project might also offer a private wiki, with the address in this form https://culturaitaliana.org/[name of center]/wiki only with the aim to manage private content (such as students, courses, budget, copyrighted contents), but not aimed at interoperability and open access.

For administrators

  • the system only displays the title of the current page when it is a subpage without displaying the entire path. It also recognizes if the current page is a language code and in this case behaves as expected (i.e. it shows the second last and the last page of the path). At the moment this is done within the extension "HidePrefix" but the code can be moved to our custom extension "CulturaItalianaAddons".
  • 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. Then add the user affiliated to that organization to such group ('memberof_{organization name}') and to a group with edit rights: by this way the system knows that he or she is affiliated to that organization and can behave accordingly.
  • on upload (file includes/api/ApiUpload.php) 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. Check it here.
  • PageForms extension has been modified (at the time without using hooks, thus in the file extensions/PageForms/includes/PFHooks.php is mentioned a global variable 'wgPageFormsFormPrinter' which might do the trick) in the file includes/PF_Autoedit_API.php in order to retrieve an alternate HTML for the form content (usually created by includes/PF_FormPrinter.php) since the standard form does not render properly with skin 'Minerva' and extension 'MobileFrontend'. The script will now search the alternate html for the form (which in such way can be completely customized, while keeping the input names expected by PageForms itself) at the page "Form:[form name]_html", so, once that you have created a PageForms form in the standard way, for instance called 'Form:Reading suggestion', create a page with name 'Form:Reading suggestion html' similar to this one and adjust the form input names on the reference of the original form (at Form:[form name]).

    The alternate html can be completed with client side verification, in any case the aim of this workaround is to have clean and fast forms (on loading) working on mobile as well, able to fill in the related templates with semantic properties (as the script still does, because for this purpose it uses as reference the original form, which should remain unchanged, with reference of the html) without the javascript added by PageForms required to prepare input fields triggered by the original html of PageForms (see file includes/PF_FormPrinter.php), which indeed slows down the page and does not work properly: at a later time it could be completed as well using the Wikimedia library OOUI which also includes the 'TagMultiselectWidget' (also called “chips”) which we expect to use.