$this->hooks[] = "groupisactivecheckbox" ; // The "use ..." checkbox in editgroupinfo
$this->hooks[] = "groupisactivecheckboxpost" ; //
$this->hooks[] = "project_public_area";
+ $this->hooks[] = "role_get";
+ $this->hooks[] = "role_normalize";
+ $this->hooks[] = "role_translate_strings";
}
function CallHook ($hookname, $params) {
return;
}
if ( $project->usesPlugin ( $this->name ) ) {
- print '<hr size="1" />';
- print '<a href='. util_make_url ('/plugins/mediawiki/wiki/'.$project->getUnixName().'/index.php').'>';
+ echo '<div class="public-area-box">';
+ print '<a href="'. util_make_url ('/plugins/mediawiki/wiki/'.$project->getUnixName().'/index.php').'">';
print html_abs_image(util_make_url ('/plugins/mediawiki/wiki/'.$project->getUnixName().'/skins/fusionforge/wiki.png'),'20','20',array('alt'=>'Mediawiki'));
- print 'Mediawiki';
+ print ' Mediawiki';
print '</a>';
+ echo '</div>';
}
- } elseif ($hookname == "blahblahblah") {
- // ...
- }
+ } elseif ($hookname == "role_get") {
+ $role =& $params['role'] ;
+
+ $edit = new PluginSpecificRoleSetting ($role,
+ 'plugin_mediawiki_edit') ;
+ $edit->SetAllowedValues (array ('0', '1', '2')) ;
+ $edit->SetDefaultValues (array ('Admin' => '2',
+ 'Senior Developer' => '2',
+ 'Junior Developer' => '1',
+ 'Doc Writer' => '2',
+ 'Support Tech' => '0')) ;
+ } elseif ($hookname == "role_normalize") {
+ $role =& $params['role'] ;
+ $new_sa =& $params['new_sa'] ;
+
+ $role->normalizeDataForSection ($new_sa, 'plugin_mediawiki_edit') ;
+ } elseif ($hookname == "role_translate_strings") {
+ $edit = new PluginSpecificRoleSetting ($role,
+ 'plugin_mediawiki_edit') ;
+ $edit->setDescription (_('Mediawiki write access')) ;
+ $edit->setValueDescriptions (array ('0' => _('No editing'),
+ '1' => _('Edit existing pages only'),
+ '2' => _('Edit and create pages'))) ;
+ }
}
-}
+ }
// Local Variables:
// mode: php