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