phpDocumentor pond
[ class tree: pond ] [ index: pond ] [ all elements ]

Source for file _antispam_settings.form.php

Documentation is available at _antispam_settings.form.php

  1. <?php
  2. /**
  3.  * This file implements the UI view for the antispam settings.
  4.  *
  5.  * This file is part of Quam Plures - {@link http://quamplures.net/}
  6.  * See also {@link https://launchpad.net/quam-plures}.
  7.  *
  8.  * @copyright (c) 2009 - 2011 by the Quam Plures developers - {@link http://quamplures.net/}
  9.  * @copyright (c)2003-2009 by Francois PLANQUE - {@link http://fplanque.net/}
  10.  *  Parts of this file are copyright (c)2004-2006 by Daniel HAHLER - {@link http://thequod.de/contact}.
  11.  *
  12.  *  {@internal License choice
  13.  *  - If you have received this file as part of a package, please find the license.txt file in
  14.  *    the same folder or the closest folder above for complete license terms.
  15.  *  - If you have received this file individually (e-g: from http://evocms.cvs.sourceforge.net/)
  16.  *    then you must choose one of the following licenses before using the file:
  17.  *    - GNU General Public License 2 (GPL) - http://www.opensource.org/licenses/gpl-license.php
  18.  *    - Mozilla Public License 1.1 (MPL) - http://www.opensource.org/licenses/mozilla1.1.php
  19.  *  }}}
  20.  *
  21.  *  {@internal Open Source relicensing agreement:
  22.  *  Daniel HAHLER grants Francois PLANQUE the right to license
  23.  *  Daniel HAHLER's contributions to this file and the b2evolution project
  24.  *  under any OSI approved OSS license (http://www.opensource.org/licenses/).
  25.  *  }}}
  26.  *
  27.  *  {@internal Below is a list of authors who have contributed to design/coding of this file: }}
  28.  * @author blueyed: Daniel HAHLER
  29.  *
  30.  * @package pond
  31.  */
  32. if!defined('QP_MAIN_INIT') ) die'Please, do not access this page directly.' );
  33.  
  34.  
  35. /**
  36.  * @var GeneralSettings 
  37.  */
  38. global $Settings;
  39.  
  40. global $Plugins;
  41.  
  42.  
  43. $Form new FormNULL'antispam_checkchanges' );
  44.  
  45. $Form->global_iconT_('Antispam blacklist').' &raquo;'NULL'?ctrl=antispam'NULL0);
  46.  
  47. $Form->begin_form'fform'T_('Antispam Settings') );
  48. $Form->hiddens_by_keyget_memorized() );
  49.  
  50. $Form->hidden'action''update' );
  51.  
  52. $Form->begin_fieldsetT_('Comments/Feedback') );
  53.     $Form->text'antispam_threshold_publish'$Settings->get('antispam_threshold_publish')3T_('Publishing threshold')T_("(-100 to 100). Automatically publish feedbacks with a spam karma below this value.") );
  54.     $Form->text'antispam_threshold_delete'$Settings->get('antispam_threshold_delete')3T_('Deletion threshold')T_("(-100 to 100). Automatically delete feedbacks with a spam karma over this value.") );
  55.  
  56.     $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') ) );
  57. $Form->end_fieldset();
  58.  
  59.  
  60. $Form->begin_fieldsetT_('Misc') );
  61.     $Form->checkbox'antispam_block_spam_referers'$Settings->get('antispam_block_spam_referers'),
  62.         T_('Block spam referers')T_('If a referrer has been detected as spam, should we block the request with a "403 Forbidden" page?') );
  63. $Form->end_fieldset();
  64.  
  65.  
  66. $Form->begin_fieldsetT_('Spam detection relevance weight') );
  67.  
  68. echo '<p>'.T_('This defines the weight of the plugin, in relation to the others.').'</p>';
  69.  
  70. $karma_plugins $Plugins->get_list_by_eventsarray('GetSpamKarmaForComment') );
  71.  
  72. ifempty($karma_plugins) )
  73. {
  74.     echo '<p>'.T_('There are no spam karma plugins enabled.').'</p>';
  75. }
  76. else foreach$karma_plugins as $loop_Plugin )
  77. {
  78.     $Form->text'antispam_plugin_spam_weight['.$loop_Plugin->ID.']'$Plugins->index_ID_rows[$loop_Plugin->ID]['plug_spam_weight']2$loop_Plugin->name );
  79. }
  80.  
  81. $Form->end_fieldset();
  82.  
  83.  
  84. if$current_User->check_perm'options''edit' ) )
  85. {
  86.     $Form->end_formarray(
  87.         array'submit''submit'T_('Update')'SaveButton' ),
  88.         array'reset'''T_('Reset')'ResetButton' ),
  89.         array'submit''submit[restore_defaults]'T_('Restore defaults')'ResetButton' ),
  90.         ) );
  91. }
  92.  
  93.  
  94. ?>