From: <lex...@us...> - 2005-04-21 12:39:39
|
Update of /cvsroot/egroupware/jinn/plugins/db_fields_plugins/__disable In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12287/plugins/db_fields_plugins/__disable Added Files: class.disable.php register.php Log Message: upgraded all other plugins to new classbased plugin style --- NEW FILE: class.disable.php --- <?php /* JiNN - Jinn is Not Nuke, a multi-user, multi-site CMS for eGroupWare Copyright (C)2002, 2004 Pim Snel <pi...@li...> eGroupWare - http://www.egroupware.org This file is part of JiNN JiNN is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. JiNN is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with JiNN; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --------------------------------------------------------------------- //TODO: This plugin must be replaced by a disabled/enabled checkbox in the field list /*------------------------------------------------------------------- Disable This Field PLUGIN -------------------------------------------------------------------*/ class db_fields_plugin_disable { function db_fields_plugin_disable() { } function formview_edit($field_name,$value, $config,$attr_arr) { return '__disabled__'; } function formview_read($field_name,$value) { return '__disabled__'; } function listview_read($field_name,$value, $config,$attr_arr) { return '__disabled__'; } } ?> --- NEW FILE: register.php --- <?php /* JiNN - Jinn is Not Nuke, a multi-user, multi-site CMS for eGroupWare Author: Lex Vogelaar for Lingewoud Copyright (C)2005 Pim Snel <pi...@li...> eGroupWare - http://www.egroupware.org This file is part of JiNN JiNN is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. JiNN is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with JiNN; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --------------------------------------------------------------------- */ $this->registry->plugins['disable']['name'] = 'disable'; $this->registry->plugins['disable']['title'] = 'Disable Field'; $this->registry->plugins['disable']['author'] = 'Pim Snel'; $this->registry->plugins['disable']['version'] = '1.0'; $this->registry->plugins['disable']['enable'] = 1; $this->registry->plugins['disable']['description'] = 'This just hides the input field for users'; $this->registry->plugins['disable']['db_field_hooks'] = array ( 'binary', 'auto', 'string', 'int', 'float', 'blob', 'date', 'timestamp' ); ?> |