3 // based off of BBCode's settings file
6 * HTML Purifier Phorum mod settings configuration. This provides
7 * a convenient web-interface for editing the most common HTML Purifier
8 * configuration directives. You can also specify custom configuration
9 * by creating a 'config.php' file.
12 if(!defined("PHORUM_ADMIN")) exit;
14 // error reporting is good!
15 error_reporting(E_ALL ^ E_NOTICE
);
17 // load library and other paraphenalia
18 require_once './include/admin/PhorumInputForm.php';
19 require_once (dirname(__FILE__
) . '/htmlpurifier/HTMLPurifier.auto.php');
20 require_once (dirname(__FILE__
) . '/init-config.php');
21 require_once (dirname(__FILE__
) . '/settings/migrate-sigs-form.php');
22 require_once (dirname(__FILE__
) . '/settings/migrate-sigs.php');
23 require_once (dirname(__FILE__
) . '/settings/form.php');
24 require_once (dirname(__FILE__
) . '/settings/save.php');
26 // define friendly configuration directives. you can expand this array
27 // to get more web-definable directives
28 $PHORUM['mod_htmlpurifier']['directives'] = array(
29 'URI.Host', // auto-detectable
30 'URI.DisableExternal',
31 'URI.DisableExternalResources',
32 'URI.DisableResources',
37 'HTML.Doctype', // auto-detectable
45 // lower this setting if you're getting time outs/out of memory
46 $PHORUM['mod_htmlpurifier']['migrate-sigs-increment'] = 100;
48 if (isset($_POST['reset'])) {
49 unset($PHORUM['mod_htmlpurifier']['config']);
52 if ($offset = phorum_htmlpurifier_migrate_sigs_check()) {
54 phorum_htmlpurifier_migrate_sigs($offset);
55 } elseif(!empty($_POST)){
57 phorum_htmlpurifier_save_settings();
60 phorum_htmlpurifier_show_migrate_sigs_form();
62 phorum_htmlpurifier_show_form();