r98730 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r98729‎ | r98730 | r98731 >
Date:02:11, 3 October 2011
Author:krinkle
Status:ok
Tags:
Comment:
[RL2] Example user groups and i18n messages
Modified paths:
  • /branches/RL2/extensions/Gadgets/Gadgets.i18n.php (modified) (history)
  • /branches/RL2/extensions/Gadgets/Gadgets.php (modified) (history)

Diff [purge]

Index: branches/RL2/extensions/Gadgets/Gadgets.i18n.php
@@ -104,6 +104,14 @@
105105 'right-gadgets-definition-create' => 'Create new gadgets',
106106 'right-gadgets-definition-delete' => 'Delete gadgets',
107107 'right-gadgets-definition-edit' => 'Modify gadget properties',
 108+
 109+ # User groups
 110+ 'group-gadgetartists' => 'Gadget artists',
 111+ 'group-gadgetartists-member' => 'gadget artist',
 112+ 'grouppage-gadgetartists' => '{{ns:project}}:Gadget artists',
 113+ 'group-gadgetmanagers' => 'Gadget managers',
 114+ 'group-gadgetmanagers-member' => 'gadget manager',
 115+ 'grouppage-gadgetmanagers' => '{{ns:project}}:Gadget managers',
108116 );
109117
110118 /** Message documentation (Message documentation)
@@ -168,6 +176,14 @@
169177 'right-gadgets-definition-create' => '{{doc-right}}',
170178 'right-gadgets-definition-delete' => '{{doc-right}}',
171179 'right-gadgets-definition-edit' => '{{doc-right}}',
 180+
 181+ # User groups
 182+ 'group-gadgetartists' => '{{group|gadgetartists}}',
 183+ 'group-gadgetartists-member' => '{{group|gadgetartists|member}}',
 184+ 'grouppage-gadgetartists' => '{{group|gadgetartists|page}}',
 185+ 'group-gadgetmanagers' => '{{group|gadgetmanagers}}',
 186+ 'group-gadgetmanagers-member' => '{{group|gadgetmanagers|member}}',
 187+ 'grouppage-gadgetmanagers' => '{{group|gadgetmanagers|page}}',
172188 );
173189
174190 /** Afrikaans (Afrikaans)
Index: branches/RL2/extensions/Gadgets/Gadgets.php
@@ -87,6 +87,14 @@
8888 'gadgets-definition-delete'
8989 ) );
9090
 91+// Example of user groups
 92+// Copy to your LocalSettings.php to use these
 93+// or grant the rights to an existing group (e.g. sysops)
 94+#$wgGroupPermissions['gadgetartists']['gadgets-edit'] = true;
 95+#$wgGroupPermissions['gadgetmanagers']['gadgets-definition-create'] = true;
 96+#$wgGroupPermissions['gadgetmanagers']['gadgets-definition-edit'] = true;
 97+#$wgGroupPermissions['gadgetmanagers']['gadgets-definition-delete'] = true;
 98+
9199 $wgHooks['AfterImportPage'][] = 'GadgetHooks::gadgetDefinitionImport';
92100 $wgHooks['ArticleDeleteComplete'][] = 'GadgetHooks::gadgetDefinitionDelete';
93101 $wgHooks['ArticleDeleteComplete'][] = 'GadgetHooks::cssJsPageDelete';

Status & tagging log