You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <?php
  2. // based off of BBCode's settings file
  3. /**
  4. * HTML Purifier Phorum mod settings configuration. This provides
  5. * a convenient web-interface for editing the most common HTML Purifier
  6. * configuration directives. You can also specify custom configuration
  7. * by creating a 'config.php' file.
  8. */
  9. if(!defined("PHORUM_ADMIN")) exit;
  10. // error reporting is good!
  11. error_reporting(E_ALL ^ E_NOTICE);
  12. // load library and other paraphenalia
  13. require_once './include/admin/PhorumInputForm.php';
  14. require_once (dirname(__FILE__) . '/htmlpurifier/HTMLPurifier.auto.php');
  15. require_once (dirname(__FILE__) . '/init-config.php');
  16. require_once (dirname(__FILE__) . '/settings/migrate-sigs-form.php');
  17. require_once (dirname(__FILE__) . '/settings/migrate-sigs.php');
  18. require_once (dirname(__FILE__) . '/settings/form.php');
  19. require_once (dirname(__FILE__) . '/settings/save.php');
  20. // define friendly configuration directives. you can expand this array
  21. // to get more web-definable directives
  22. $PHORUM['mod_htmlpurifier']['directives'] = array(
  23. 'URI.Host', // auto-detectable
  24. 'URI.DisableExternal',
  25. 'URI.DisableExternalResources',
  26. 'URI.DisableResources',
  27. 'URI.Munge',
  28. 'URI.HostBlacklist',
  29. 'URI.Disable',
  30. 'HTML.TidyLevel',
  31. 'HTML.Doctype', // auto-detectable
  32. 'HTML.Allowed',
  33. 'AutoFormat',
  34. '-AutoFormat.Custom',
  35. 'AutoFormatParam',
  36. 'Output.TidyFormat',
  37. );
  38. // lower this setting if you're getting time outs/out of memory
  39. $PHORUM['mod_htmlpurifier']['migrate-sigs-increment'] = 100;
  40. if (isset($_POST['reset'])) {
  41. unset($PHORUM['mod_htmlpurifier']['config']);
  42. }
  43. if ($offset = phorum_htmlpurifier_migrate_sigs_check()) {
  44. // migrate signatures
  45. phorum_htmlpurifier_migrate_sigs($offset);
  46. } elseif(!empty($_POST)){
  47. // save settings
  48. phorum_htmlpurifier_save_settings();
  49. }
  50. phorum_htmlpurifier_show_migrate_sigs_form();
  51. echo '<br />';
  52. phorum_htmlpurifier_show_form();
  53. // vim: et sw=4 sts=4