mods/htmlpurifier/config.php already exists. To change settings, edit that file. To use the web form, delete that file.
"; } else { if (!isset($_POST['reset'])) $config->mergeArrayFromForm($_POST, 'config', $directives); $PHORUM['mod_htmlpurifier']['config'] = $config->getAll(); if(!phorum_db_update_settings(array("mod_htmlpurifier"=>$PHORUM["mod_htmlpurifier"]))){ $error="Database error while updating settings."; } else { echo "Settings Updated
"; } } } // warning that's used by both messages $warning = " Warning: Changing HTML Purifier's configuration will invalidate the cache. Expect to see a flurry of database activity after you change any of these settings. "; if ($config_exists) { // clear out mod_htmlpurifier for housekeeping phorum_db_update_settings(array("mod_htmlpurifier"=>$PHORUM["mod_htmlpurifier"])); // politely tell user how to edit settings manually ?>
How to edit settings for HTML Purifier module

A config.php file exists in your mods/htmlpurifier/ directory. This file contains your custom configuration: in order to change it, please navigate to that file and edit it accordingly.

To use the web interface, delete config.php (or rename it to config.php.bak).

hidden("module", "modsettings"); $frm->hidden("mod", "htmlpurifier"); // this is the directory name that the Settings file lives in if (!empty($error)){ echo "$error
"; } $frm->addbreak("Edit settings for the HTML Purifier module"); $frm->addMessage('

Click on directive links to read what each option does. Warning: This will navigate you to a new page.

For more flexibility (for instance, you want to edit the full range of configuration directives), you can create a config.php file in your mods/htmlpurifier/ directory. Doing so will, however, make the web configuration interface unavailable.

'); require_once 'HTMLPurifier/Printer/ConfigForm.php'; $htmlpurifier_form = new HTMLPurifier_Printer_ConfigForm('config', 'http://htmlpurifier.org/live/configdoc/plain.html#%s'); $frm->addMessage($htmlpurifier_form->render($config, $directives, false)); $frm->addMessage($warning); $frm->addrow('Reset to defaults:', $frm->checkbox("reset", "1", "", false)); // hack to include extra styling echo ''; $js = $htmlpurifier_form->getJavaScript(); echo ''; $frm->show(); }