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.
17 if(!defined("PHORUM")) exit;
19 require_once(dirname(__FILE__
) . "/../bbcode/bbcode.php");
22 * 'format' hook style function that will be called to convert
23 * legacy markup into HTML.
25 function phorum_htmlpurifier_migrate($data) {
26 return phorum_mod_bbcode_format($data); // bbcode's 'format' hook