开箱即用不支持此功能。您应该使用自定义 BBCode。如果您真的非常坚持使用 HTML 标签,您可以使用 启用 HTML< /a> MOD。
This is not supported out of the box. You should use custom BBCodes instead. If you really, really insist on HTML tags, you can use the Enable HTML MOD.
function enable_html($text, $uid)
{
return htmlspecialchars_decode($text);
}
最后一步是向用户授予新权限,我们得到了渲染的 HTML,就像在 Snitz 中一样。
Lately I was busy porting Snitz 2.x based forum to phpbb3 forum. The main challenge I had to deal with was around HTML support in the post body. Snitz allowed HTML inside the post body but phpbb3 forbids HTML tags inside the post. Since we have ~40000 posts that many of them contains HTML tags we had to find a solution for this. Here it is: we used Enable HTML MOD but we modify it. The original function:
发布评论
评论(2)
开箱即用不支持此功能。您应该使用自定义 BBCode。如果您真的非常坚持使用 HTML 标签,您可以使用 启用 HTML< /a> MOD。
This is not supported out of the box. You should use custom BBCodes instead. If you really, really insist on HTML tags, you can use the Enable HTML MOD.
最近我正忙着将基于 Snitz 2.x 的论坛移植到 phpbb3 论坛。
我必须应对的主要挑战是帖子正文中的 HTML 支持。
Snitz 允许帖子正文中包含 HTML,但 phpbb3 禁止帖子中的 HTML 标签。
由于我们有大约 40000 篇帖子,其中许多都包含 HTML 标签,我们必须为此找到解决方案。
如下:
我们使用启用 HTML MOD 但是我们修改它。
原始功能:
修改为
最后一步是向用户授予新权限,我们得到了渲染的 HTML,就像在 Snitz 中一样。
Lately I was busy porting Snitz 2.x based forum to phpbb3 forum.
The main challenge I had to deal with was around HTML support in the post body.
Snitz allowed HTML inside the post body but phpbb3 forbids HTML tags inside the post.
Since we have ~40000 posts that many of them contains HTML tags we had to find a solution for this.
Here it is:
we used Enable HTML MOD but we modify it.
The original function:
was modified to
The last step was to give the new permission to the users and we got the HTML rendered as we had it in Snitz.