Integrate PunBB forum into Wordpress
Filed in: Web Development, WordPress — April 7th, 2005
As I promised previously after installed LiewCF.com Forum, here I describe how to integrate PunBB forum into Wordpress. The softwares used are Wordpress 1.2.2 and PunBB 1.2.4. The same method probably works for later version, too.
Preparation:
Rip the header and footer code of your Wordpress template. Remember to remove any Wordpress template tags from the code, also the CSS stylesheet links of your template. Here I use _HEADER_ as template header code, _FOOTER_ as template footer code and _CSS_ as template css stylesheet links.
Step-by-step:
- Edit main.tpl (remember to make a backup first) that sit in
http://www.YOUR_PATH/forum/include/templatedirectory. - Plug in your template header(_HEADER_) and footer(_FOOTER_) code into main.tpl. It will looks something like this:
HTML:
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-
-
<html dir="<pun_content_direction>">
-
<head>
-
<meta http-equiv="Content-Type" content="text/html; charset=<pun_char_encoding>" />
-
<pun_head>
-
-
<!-- Wordpress Template CSS Stylesheet -->
-
_CSS_
-
<!-- Wordpress Template CSS Stylesheet -->
-
-
</head>
-
-
<!-- Wordpress template design header -->
-
_HEADER_
-
<!-- Wordpress template design header -->
-
-
<div id="punwrap">
-
<div id="pun<pun_page>" class="pun">
-
-
<div id="brdheader" class="block">
-
<div class="box">
-
<div id="brdtitle" class="inbox">
-
<pun_title>
-
<pun_desc>
-
</div>
-
<pun_navlinks>
-
<pun_status>
-
</div>
-
</div>
-
-
<pun_announcement>
-
-
<pun_main>
-
-
<pun_footer>
-
-
<!-- Wordpress template design footer -->
-
_FOOTER_
-
<!-- Wordpress template design footer -->
-
-
</div>
-
</div>
-
</body>
-
</html>
-
- You are almost done now. Now we need to tweak the PunBB forum CSS code to make the forum looks better in Wordpress. Goto
http://www.YOUR_PATH/forum/style/and edit the CSS code of the PunBB template you are using. I use PunBB Oxygen template, so I editOxygen.css.In fact, the PunBB forum looks fine after done Step #2 but the font size is very small in Internet Explorer. That's why I tweak the forum's CSS code for IE. - That's it. You are done!
Additional: PunBB Plug-ins
Beside default PunBB installation, I install RSS mod and Active Topics mod from Alex King PunBB Mods collection.
Thought:
Hope this small instruction to integrate PunBB forum into Wordpress is helpful to some bloggers. Initially, I was planning to use miniBB for my blog but its simple (read: limited) admin control scared me off.


