how to: allow html in static pages 1.0.3 [phpBB3]

[posted: ]  [0 comments]

if you’re using phpBB version 3.x in combination with vondra vojtech’s static pages mod (v. 1.0.3), and you would like to be able to use standard html on static pages, you can easily enable it by inserting a little code snippet into “page.php” in your phpBB installation’s root folder:

simply find this section:
// Parse the page content to transform BBCode
$content = generate_text_for_display($row['page_content'], $row['bbcode_uid'], $row['bbcode_bitfield'], 7);

and add the following snippet below it:
//allow HTML
   $replacearray = array(
      'before' => array("&lt;","&gt;","&quot;","<?"),
      'after' => array("<",">","\"","&lt;?")
   $content = str_replace($replacearray['before'],$replacearray['after'],$content);
//end allow HTML

what this does, is replace the html entities for the opening and closing of tags with the actual characters.

[category: computers & technology] [tags: , , ]

Leave a Reply