0
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2024-12-22 08:21:52 +00:00

[Phorum] Minor enhancements: add cache purge support and give a friendly HTML is on message above editor.

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1281 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang 2007-06-29 15:43:23 +00:00
parent cff498ef67
commit ea1362ce5c
2 changed files with 17 additions and 0 deletions

View File

@ -47,6 +47,11 @@ function phorum_htmlpurifier_format($data)
continue;
}
if (isset($_GET['purge'])) {
// purge the cache
unset($message['meta']['body_cache']);
}
if (
isset($message['meta']['body_cache']) &&
isset($message['meta']['body_cache_serial']) &&
@ -201,3 +206,14 @@ function phorum_htmlpurifier_before_editor($message) {
return $message;
}
function phorum_htmlpurifier_editor_after_subject() {
if (!empty($GLOBALS['PHORUM']['mod_htmlpurifier']['wysiwyg'])) return;
?><tr><td colspan="2" style="padding:1em 0.3em;">
HTML input is <strong>on</strong>. Make sure you escape all HTML and
angled-brackets with &amp;lt; and &amp;gt; (you can also use CDATA
tags, simply wrap the suspect text with
&lt;![CDATA[<em>text</em>]]&gt;. Paragraphs will only be applied to
double-spaces; single-spaces will not generate <tt>&lt;br&gt;</tt> tags.
</td></tr><?php
}

View File

@ -3,5 +3,6 @@ hook: quote|phorum_htmlpurifier_quote
hook: posting_custom_action|phorum_htmlpurifier_posting
hook: common|phorum_htmlpurifier_common
hook: before_editor|phorum_htmlpurifier_before_editor
hook: tpl_editor_after_subject|phorum_htmlpurifier_editor_after_subject
title: HTML Purifier Phorum Mod
desc: This module enables standards-compliant HTML filtering on Phorum. Please check migrate.bbcode.php before enabling this mod.