[ Index ] |
|
Code source de b2evolution 2.1.0-beta |
1 <?php 2 /** 3 * This file implements the UI view for the antispam settings. 4 * 5 * This file is part of the evoCore framework - {@link http://evocore.net/} 6 * See also {@link http://sourceforge.net/projects/evocms/}. 7 * 8 * @copyright (c)2003-2007 by Francois PLANQUE - {@link http://fplanque.net/} 9 * Parts of this file are copyright (c)2004-2006 by Daniel HAHLER - {@link http://thequod.de/contact}. 10 * 11 * {@internal License choice 12 * - If you have received this file as part of a package, please find the license.txt file in 13 * the same folder or the closest folder above for complete license terms. 14 * - If you have received this file individually (e-g: from http://evocms.cvs.sourceforge.net/) 15 * then you must choose one of the following licenses before using the file: 16 * - GNU General Public License 2 (GPL) - http://www.opensource.org/licenses/gpl-license.php 17 * - Mozilla Public License 1.1 (MPL) - http://www.opensource.org/licenses/mozilla1.1.php 18 * }} 19 * 20 * {@internal Open Source relicensing agreement: 21 * Daniel HAHLER grants Francois PLANQUE the right to license 22 * Daniel HAHLER's contributions to this file and the b2evolution project 23 * under any OSI approved OSS license (http://www.opensource.org/licenses/). 24 * }} 25 * 26 * @package admin 27 * 28 * {@internal Below is a list of authors who have contributed to design/coding of this file: }} 29 * @author blueyed: Daniel HAHLER 30 * 31 * @version $Id: _antispam_settings.form.php,v 1.1 2007/09/04 14:56:20 fplanque Exp $ 32 */ 33 if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' ); 34 35 36 /** 37 * @var GeneralSettings 38 */ 39 global $Settings; 40 41 global $Plugins; 42 43 44 $Form = & new Form( NULL, 'antispam_checkchanges' ); 45 46 $Form->global_icon( T_('Antispam blacklist').' »', NULL, '?ctrl=antispam', NULL, 0, 5 ); 47 48 $Form->begin_form( 'fform', T_('Antispam Settings') ); 49 $Form->hiddens_by_key( get_memorized() ); 50 51 $Form->hidden( 'action', 'update' ); 52 53 $Form->begin_fieldset( T_('Comments/Feedback') ); 54 $Form->text( 'antispam_threshold_publish', $Settings->get('antispam_threshold_publish'), 3, T_('Publishing threshold'), T_("(-100 to 100). Automatically publish feedbacks with a spam karma below this value.") ); 55 $Form->text( 'antispam_threshold_delete', $Settings->get('antispam_threshold_delete'), 3, T_('Deletion threshold'), T_("(-100 to 100). Automatically delete feedbacks with a spam karma over this value.") ); 56 57 $Form->info( '', sprintf( /* TRANS: %s gets replaced by the translation for this setting */ T_('Feedbacks with a spam karma between these two thresholds will get the default status of the blog ("%s").'), T_('New feedback status') ) ); 58 $Form->end_fieldset(); 59 60 61 $Form->begin_fieldset(); // TODO: needs legend title ("Misc"?) 62 $Form->checkbox( 'antispam_block_spam_referers', $Settings->get('antispam_block_spam_referers'), 63 T_('Block spam referers'), T_('If a referrer has been detected as spam, should we block the request with a "403 Forbidden" page?') ); 64 $Form->end_fieldset(); 65 66 67 $Form->begin_fieldset( T_('Spam detection relevance weight') ); 68 69 echo '<p>'.T_('This defines the weight of the plugin, in relation to the others.').'</p>'; 70 71 $karma_plugins = $Plugins->get_list_by_events( array('GetSpamKarmaForComment') ); 72 73 if( empty($karma_plugins) ) 74 { 75 echo '<p>'.T_('There are no spam karma plugins enabled.').'</p>'; 76 } 77 else foreach( $karma_plugins as $loop_Plugin ) 78 { 79 $Form->text( 'antispam_plugin_spam_weight['.$loop_Plugin->ID.']', $Plugins->index_ID_rows[$loop_Plugin->ID]['plug_spam_weight'], 2, $loop_Plugin->name ); 80 } 81 82 $Form->end_fieldset(); 83 84 85 if( $current_User->check_perm( 'options', 'edit' ) ) 86 { 87 $Form->end_form( array( 88 array( 'submit', 'submit', T_('Update'), 'SaveButton' ), 89 array( 'reset', '', T_('Reset'), 'ResetButton' ), 90 array( 'submit', 'submit[restore_defaults]', T_('Restore defaults'), 'ResetButton' ), 91 ) ); 92 } 93 94 95 /* 96 * $Log: _antispam_settings.form.php,v $ 97 * Revision 1.1 2007/09/04 14:56:20 fplanque 98 * antispam cleanup 99 * 100 * Revision 1.1 2007/06/25 10:59:23 fplanque 101 * MODULES (refactored MVC) 102 * 103 * Revision 1.7 2007/04/26 00:11:12 fplanque 104 * (c) 2007 105 * 106 * Revision 1.6 2006/11/24 18:27:26 blueyed 107 * Fixed link to b2evo CVS browsing interface in file docblocks 108 */ 109 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Thu Nov 29 23:58:50 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |