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.

migrate.bbcode.php 1.0KB

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. /**
  3. * This file is responsible for migrating from a specific markup language
  4. * like BBCode or Markdown to HTML. WARNING: THIS PROCESS IS NOT REVERSIBLE
  5. *
  6. * Copy this file to 'migrate.php' and it will automatically work for
  7. * BBCode; you may need to tweak this a little to get it to work for other
  8. * languages (usually, just replace the include name and the function name).
  9. *
  10. * If you do NOT want to have any migration performed (for instance, you
  11. * are installing the module on a new forum with no posts), simply remove
  12. * phorum_htmlpurifier_migrate() function. You still need migrate.php
  13. * present, otherwise the module won't work. This ensures that the user
  14. * explicitly says, "No, I do not need to migrate."
  15. */
  16. if(!defined("PHORUM")) exit;
  17. require_once(dirname(__FILE__) . "/../bbcode/bbcode.php");
  18. /**
  19. * 'format' hook style function that will be called to convert
  20. * legacy markup into HTML.
  21. */
  22. function phorum_htmlpurifier_migrate($data)
  23. {
  24. return phorum_mod_bbcode_format($data); // bbcode's 'format' hook
  25. }
  26. // vim: et sw=4 sts=4