Integrate PunBB forum into Wordpress

Filed in: Web Development, WordPress — April 7th, 2005

advertisement

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:

  1. Edit main.tpl (remember to make a backup first) that sit in http://www.YOUR_PATH/forum/include/template directory.
  2. Plug in your template header(_HEADER_) and footer(_FOOTER_) code into main.tpl. It will looks something like this:
    HTML:
    1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    2.  
    3. <html dir="<pun_content_direction>">
    4. <head>
    5. <meta http-equiv="Content-Type" content="text/html; charset=<pun_char_encoding>" />
    6. <pun_head>
    7.  
    8. <!-- Wordpress Template CSS Stylesheet -->
    9. _CSS_
    10. <!-- Wordpress Template CSS Stylesheet -->
    11.  
    12. </head>
    13.  
    14. <!-- Wordpress template design header -->
    15. _HEADER_
    16. <!-- Wordpress template design header -->
    17.  
    18. <div id="punwrap">
    19. <div id="pun<pun_page>" class="pun">
    20.  
    21. <div id="brdheader" class="block">
    22.     <div class="box">
    23.         <div id="brdtitle" class="inbox">
    24.             <pun_title>
    25.             <pun_desc>
    26.         </div>
    27.         <pun_navlinks>
    28.         <pun_status>
    29.     </div>
    30. </div>
    31.  
    32. <pun_announcement>
    33.  
    34. <pun_main>
    35.  
    36. <pun_footer>
    37.  
    38. <!-- Wordpress template design footer -->
    39. _FOOTER_
    40. <!-- Wordpress template design footer -->
    41.  
    42. </div>
    43. </div>
    44. </body>
    45. </html>

  3. 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 edit Oxygen.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.
  4. 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.

Bookmark and Share

Read also:

  • hi
    nicee!
  • Hey, I was looking around the web how to do this. Very clear and easy instructions. Thanks a million.
  • Very useful and easy guide. I had integrated punbb into my previous theme, but it was not nearly as clean as this way. Thanks! :-)
  • Rob
    Would anyone be willing to help me transfer my current invison power board database, into punBB, and then add it to my word press site? I'd be willing to pay if anyone wouldn't mind helping. I managed to get word press setup, but I really have no idea how to do the rest.

    Please email me if you could possibly help. Again, I'd be willing to compensate you for your time.

    Thanks!

    rob@ugo.com
  • Jim
    Thanks for the little tutorial Liew. Adding PunBB to my site was a snap thanks to you.

    Jim
  • Thanks for the great info. Any chance an update for WordPress 1.5 is forthcoming? The template engine for the new WP is pretty different, I'm having trouble adapting the instructions here for the new Wordpress.
  • LcF
    The integration for WP 1.5 is similar. The PunBB is standalone from WP template engine.
  • Thank's a lot from Russia!
  • I just wanted to say thanks for the nice blog entry here. It really helped me to integrate my site. I wrote up blog post, too, that details the exact steps to integrate PunBB with the new k2 theme, and it even includes some files to download.

    http://www.almosteffortless.com/?p=21

    Thanks again!
  • Thanks for that, really helped me setup my forum easily ;)
  • I had another question for punBB integration.

    I want to use PunBB with wordpress, but my question is:

    1. Is it possible to have sub-forums in punBB 1.2.8?
    2. Can invision 2.0 be migrated to punBB 1.2.8 with all sub-forums intact?

    thanks.
  • LcF
    Sajid: PunBB does not support sub forum natively but you can use the punbb sub forum mod
  • Thanks for your reply.

    I tried that link but it sayd its is for version 1.2.6 and i am using 1.2.8

    Anyways I have been able to import invision data into punBB (except the sub forums).

    My next question was about this tutorial.

    I did all the steps as mentioned here, but then how do i add the link of PUNBB to Wordpress??

    thanks again
  • LcF
    mod that works for 1.2.6 SHOULD work for 1.2.8 as well, there is not much changes between the versions.

    You may manually edit wordpress template to add the PunBB link.
  • Wow... very cool... I added a forum to my Star Trek site. It looks really slick in my semi-hacked Trekkie theme. Thanks for the easy tips.
  • Thanks :) I'm still working on my site, but got it to load with in wordpress looks beautiful

    Thanks again
  • ryan
    Would there be a way to do this but also integrate login information?
  • LcF
    too bad, we haven't figure out how to integrate the members database with wordpress.
  • Between this article and your help to other people in the forums, I was able to integrate beautifully. Thanks a ton.
  • Thanks for the tip!
  • Nnyan
    Between this guide and the one at Almost Efortless (which had some more specific information) I got punBB inbedded into my WP site. Looks great (still have to tweak some of the default colors).

    Only issue I have is that the Administration section spawns a new page (much bigger) and does not display with the header/footer like all the other pages (that I've tried so far).

    Any idea how to get the Admin page to behave like the others?
  • has anyone got the information for the install of punbb to intergrate the username and pass with WP?
    so, that both pull the same user/pass from the db?
  • eldrick
    I've followed the instructions on this and some other sites and my forum integration looks great, except for the search page. The 'container' background does not extend to the extent of the search area, instead i get the page background .gif image and its really not good. Any ideas?
  • Hi, Newbie question - How do you rip the header?
    Ajay
  • LcF
    view page source, select and copy what you have between <head> and </head>. Remove any wordpress related code.
  • view page source, select and copy what you have between and . Remove any wordpress related code.
  • 300 is a great movie full of visual effects and graphics which made it different and much better.
    Acting was great, director did a wonderful job and chose great actors, full of action, and it is based on a true story.
  • Oh that was really helpfull! Thanks.
blog comments powered by Disqus