Example #1
0
 function output_plugin_UI()
 {
     echo "<dl>";
     parent::output_plugin_UI(false);
     // call default constructor
     if (!function_exists("imagecreate") || !function_exists('imagepng')) {
         echo "<dt><strong><p style=\"color:red;\">" . __("Your install of PHP seems to be missing the GD library (or a more recent version is needed). You should ask your host to update the GD module for PHP and disable the Captcha module until then.", 'sk2') . "</p></strong></dt>";
     }
     echo "</dl>";
 }
 function output_plugin_UI()
 {
     echo "<dl>";
     parent::output_plugin_UI(false);
     // call default constructor
     if (!function_exists("curl_init") && !ini_get('allow_url_fopen')) {
         echo "<dt><strong><p style=\"color:red;\">" . __("Both <code>allow_url_fopen</code> and <code>CURL</code> are disabled on this PHP install: TB Referrer Check plugin cannot run. You should disable it.", 'sk2') . "</p></strong></dt>";
     }
     echo "</dl>";
 }
 function sk2_blacklist_plugin()
 {
     parent::__construct();
     $this->description = "<a href=\"options-general.php?page=" . $_REQUEST['page'] . "&sk2_section=blacklist\">Click here</a> to manage your blacklist.";
 }
Example #4
0
    function output_UI()
    {
        ?>
	  <div class="wrap hide" id="sk2_settings_pane"><h2><?php 
        _e("Spam Karma 2 Settings", 'sk2');
        ?>
</h2>
	  <form name="sk2_settings_form" id="sk2_settings_form" method="post">
		<fieldset class="options">
			<legend><?php 
        _e("General Settings", 'sk2');
        ?>
</legend>
		<ul>
<?php 
        global $sk2_settings;
        foreach ($sk2_settings->core_defaults as $name => $format) {
            if (@$format['auto_draw'] != true) {
                continue;
            }
            // no UI
            echo "<li";
            if (@$format['advanced']) {
                echo " class=\"advanced\"";
            }
            echo ">\n";
            if ($format['type'] == "check" || $format['type'] == "checkbox") {
                sk2_plugin::output_UI_input($name, "checkbox", $sk2_settings->get_core_settings($name));
                if (!empty($format['caption'])) {
                    echo " " . __($format['caption'], 'sk2');
                }
                if (!empty($format['after'])) {
                    echo " " . __($format['after'], 'sk2');
                }
            } else {
                if (!empty($format['caption'])) {
                    echo __($format['caption'], 'sk2') . " ";
                }
                if ($format['type'] == "menu" || $format['type'] == "select") {
                    sk2_plugin::output_UI_menu($name, $format['options'], $sk2_settings->get_core_settings($name));
                } else {
                    sk2_plugin::output_UI_input($name, "text", $sk2_settings->get_core_settings($name), @$format['size']);
                }
                if (!empty($format['after'])) {
                    echo " " . __($format['after'], 'sk2');
                }
            }
            echo "</li>\n";
        }
        ?>
	
		</ul></fieldset>
		  <p class="submit"><input type="submit" id="sk2_settings_save" name="sk2_settings_save" value="<?php 
        _e("Save new settings", 'sk2');
        ?>
"></p>
		<fieldset class="options">
			<legend><?php 
        _e("Filter Plugins Settings", 'sk2');
        ?>
</legend>
<?php 
        foreach ($this->plugins as $plugin) {
            if ($plugin[1]->is_filter()) {
                $plugin[1]->output_plugin_UI();
            }
        }
        ?>
		</fieldset>
		<fieldset class="options">
			<legend><?php 
        _e("Treatment Plugins Settings", 'sk2');
        ?>
</legend>
<?php 
        foreach ($this->plugins as $plugin) {
            if ($plugin[1]->is_treatment() && !$plugin[1]->is_filter()) {
                $plugin[1]->output_plugin_UI();
            }
        }
        ?>
		</fieldset>
						
		  <p class="submit"><input type="submit" id="sk2_settings_save" name="sk2_settings_save" value="<?php 
        _e("Save new settings", 'sk2');
        ?>
"></p>
		</form></div>
<?php 
    }
 function output_plugin_UI()
 {
     echo "<dl>";
     parent::output_plugin_UI(false);
     echo "<dd>";
     echo sprintf(__("Last run was %s ago", 'sk2'), sk2_time_since($this->get_option_value('last_run')));
     echo "</dd>";
     echo "</dl>";
 }