2007-06-28 23:01:27 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
// based off of BBCode's settings file
|
|
|
|
|
|
|
|
/**
|
|
|
|
* HTML Purifier Phorum mod settings configuration. This provides
|
|
|
|
* a convenient web-interface for editing the most common HTML Purifier
|
|
|
|
* configuration directives. You can also specify custom configuration
|
|
|
|
* by creating a 'config.php' file.
|
|
|
|
*/
|
|
|
|
|
|
|
|
if(!defined("PHORUM_ADMIN")) exit;
|
|
|
|
|
2007-06-29 20:34:19 +00:00
|
|
|
// error reporting is good!
|
|
|
|
error_reporting(E_ALL ^ E_NOTICE);
|
|
|
|
|
|
|
|
// load library and other paraphenalia
|
|
|
|
require_once './include/admin/PhorumInputForm.php';
|
|
|
|
require_once (dirname(__FILE__) . '/htmlpurifier/HTMLPurifier.auto.php');
|
|
|
|
require_once (dirname(__FILE__) . '/init-config.php');
|
|
|
|
require_once (dirname(__FILE__) . '/settings/migrate-sigs-form.php');
|
|
|
|
require_once (dirname(__FILE__) . '/settings/migrate-sigs.php');
|
|
|
|
require_once (dirname(__FILE__) . '/settings/form.php');
|
|
|
|
require_once (dirname(__FILE__) . '/settings/save.php');
|
|
|
|
|
|
|
|
// define friendly configuration directives. you can expand this array
|
|
|
|
// to get more web-definable directives
|
|
|
|
$PHORUM['mod_htmlpurifier']['directives'] = array(
|
2007-06-28 23:01:27 +00:00
|
|
|
'URI.Host', // auto-detectable
|
|
|
|
'URI.DisableExternal',
|
|
|
|
'URI.DisableExternalResources',
|
|
|
|
'URI.DisableResources',
|
|
|
|
'URI.Munge',
|
|
|
|
'URI.HostBlacklist',
|
|
|
|
'URI.Disable',
|
|
|
|
'HTML.TidyLevel',
|
|
|
|
'HTML.Doctype', // auto-detectable
|
|
|
|
'HTML.Allowed',
|
|
|
|
'AutoFormat',
|
|
|
|
'-AutoFormat.Custom',
|
2008-01-13 05:28:39 +00:00
|
|
|
'AutoFormatParam',
|
2007-06-28 23:01:27 +00:00
|
|
|
'Output.TidyFormat',
|
|
|
|
);
|
|
|
|
|
2007-06-29 20:34:19 +00:00
|
|
|
// lower this setting if you're getting time outs/out of memory
|
|
|
|
$PHORUM['mod_htmlpurifier']['migrate-sigs-increment'] = 100;
|
|
|
|
|
2007-06-29 00:28:07 +00:00
|
|
|
if (isset($_POST['reset'])) {
|
|
|
|
unset($PHORUM['mod_htmlpurifier']['config']);
|
|
|
|
}
|
|
|
|
|
2007-06-29 20:34:19 +00:00
|
|
|
if ($offset = phorum_htmlpurifier_migrate_sigs_check()) {
|
2007-06-29 20:00:38 +00:00
|
|
|
// migrate signatures
|
2007-06-29 20:34:19 +00:00
|
|
|
phorum_htmlpurifier_migrate_sigs($offset);
|
|
|
|
} elseif(!empty($_POST)){
|
2007-06-29 20:00:38 +00:00
|
|
|
// save settings
|
2007-06-29 20:34:19 +00:00
|
|
|
phorum_htmlpurifier_save_settings();
|
2007-06-28 23:01:27 +00:00
|
|
|
}
|
|
|
|
|
2007-06-29 20:34:19 +00:00
|
|
|
phorum_htmlpurifier_show_migrate_sigs_form();
|
|
|
|
echo '<br />';
|
|
|
|
phorum_htmlpurifier_show_form();
|
2007-06-28 23:01:27 +00:00
|
|
|
|