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 ( '

The box below sets $PHORUM[\'mod_htmlpurifier\'][\'wysiwyg\']. When checked, contents sent for edit are now purified and the informative message is disabled. If your WYSIWYG editor is disabled for admin edits, you can safely keep this unchecked.

' ); $frm->addRow ( 'Use WYSIWYG?', $frm->checkbox ( 'wysiwyg', '1', '', $PHORUM ['mod_htmlpurifier'] ['wysiwyg'] ) ); $frm->addMessage ( '

The box below sets $PHORUM[\'mod_htmlpurifier\'][\'suppress_message\'], which removes the big how-to use HTML Purifier message.

' ); $frm->addRow ( 'Suppress information?', $frm->checkbox ( 'suppress_message', '1', '', $PHORUM ['mod_htmlpurifier'] ['suppress_message'] ) ); $frm->addMessage ( '

Click on directive links to read what each option does (links do not open in new windows).

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' ); $htmlpurifier_form->setTextareaDimensions ( 23, 7 ); // widen a little, since we have space $frm->addMessage ( $htmlpurifier_form->render ( $config, $PHORUM ['mod_htmlpurifier'] ['directives'], false ) ); $frm->addMessage ( "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." ); $frm->addrow ( 'Reset to defaults:', $frm->checkbox ( "reset", "1", "", false ) ); // hack to include extra styling echo ''; $js = $htmlpurifier_form->getJavaScript (); echo ''; $frm->show (); } function phorum_htmlpurifier_show_config_info() { global $PHORUM; // update mod_htmlpurifier for housekeeping phorum_htmlpurifier_commit_settings (); // 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. You can also set $GLOBALS['PHORUM']['mod_htmlpurifier']['wysiwyg'] or $GLOBALS['PHORUM']['mod_htmlpurifier']['suppress_message']

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

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.