* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+forge_define_config_item('storage_base','projectimport-plugin','$core/data_path/plugins/projectimport/');
+forge_define_config_item('libmagic_db','projectimport-plugin','/usr/share/misc/magic.mgc');
+
class ProjectImportPlugin extends Plugin {
function ProjectImportPlugin () {
$this->Plugin() ;
$this->hooks[] = "userisactivecheckboxpost" ; //
$this->hooks[] = "project_admin_plugins"; // to show up in the admin page fro group
*/
+ // The plugin has a link added to the Project administration part of site admin
$this->hooks[] = "site_admin_project_maintenance_hook";
+ $this->hooks[] = "site_admin_user_maintenance_hook";
}
- function CallHook ($hookname, $params) {
+ function CallHook ($hookname, &$params) {
global $use_projectimportplugin,$G_SESSION,$HTML;
/*if ($hookname == "usermenu") {
$text = $this->text; // this is what shows in the tab
}
/**
- * Displays the link in the Project Admin part of the Site Admin ('site_admin_project_maintenance_hook' plugin_hook_by_reference() -style hook)
+ * Displays the link in the Project Maintenance part of the Site Admin ('site_admin_project_maintenance_hook' plugin_hook_by_reference() -style hook)
* @param array $params for concatenating return value in ['results']
*/
function site_admin_project_maintenance_hook (&$params) {
$params['result'] = $html;
}
+ /**
+ * Displays the link in the User Maintenance part of the Site Admin ('site_admin_user_maintenance_hook' plugin_hook_by_reference() -style hook)
+ * @param array $params for concatenating return value in ['results']
+ */
+ function site_admin_user_maintenance_hook (&$params) {
+ $html = $params['result'];
+ $html .= '<li>'.
+ util_make_link ('/plugins/'.$this->name.'/usersimport.php',
+ _("Import users"). ' [' . _('Project import plugin') . ']') .'</li>';
+ $params['result'] = $html;
+ }
+
}