Prepended constants with C_ to avoid reserved words as per https://www.php.net/manual...
[htmlpurifier/darkodev.git] / plugins / phorum / settings.php
blob8158f02823cb99bf93f46bff0ceeedd7b1b4a97d
1 <?php
3 // based off of BBCode's settings file
5 /**
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',
33 'URI.Munge',
34 'URI.HostBlacklist',
35 'URI.Disable',
36 'HTML.TidyLevel',
37 'HTML.Doctype', // auto-detectable
38 'HTML.Allowed',
39 'AutoFormat',
40 '-AutoFormat.Custom',
41 'AutoFormatParam',
42 'Output.TidyFormat',
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()) {
53 // migrate signatures
54 phorum_htmlpurifier_migrate_sigs($offset);
55 } elseif(!empty($_POST)){
56 // save settings
57 phorum_htmlpurifier_save_settings();
60 phorum_htmlpurifier_show_migrate_sigs_form();
61 echo '<br />';
62 phorum_htmlpurifier_show_form();
64 // vim: et sw=4 sts=4