PunBB SDK for Ruby on Rails

March 12th, 2007

After my last post about getting IPB SDK working for the latest IPB Release, I realized that, regardless of my dislike of forums as forums for online communication (PUN intended, shapap, double-entendre in yo face, mother!@#$%^), I have tons of code and projects that revolved around PHP Forums, and Rails backend applications.

In keeping with my New Years Resolution of sharing those tidbits that make my life easier, here is a PunBB SDK/Wrapper! It creates ALL of the models needed for the punbb’s database objects, as well as a VERY simple controller/views for auto-login capabilities. The projects that I’ve used this on are very niche-oriented and don’t lend themselves to extracting much generic code. I can say, that a simple PunBB installation plus this generator can you have you running a fairly pimptastic site in no time! If you like forums, that is ;)

To use it, install your rails app, install your punbb installation, then grab the plugin


./script/plugin install svn://ahgsoftware.com/punbb_sdk/trunk

When developing a Rails application that requires at least ‘autologin’ integration with a PHP forum application, I usually have to decide between several routes.

    The direct DB/cookie method: You replicate the entire logic path of the forum system (PunBB/Vanilla EASY, IPB not so much).
    By Proxy: You use Net::HTTP, or libcurl, to submit the login form, intercept the cookie, and set the user’s browser cookies. This sucks, because some software makes the submitted variables jump through hoops of its own creation (coughJoomla/cough)
    AJAX: I am beginning to love this method, you just have your login form submit directly to your own software AND to the forum application via some nifty ajax. This PunBB SDK uses that particular technique

As far as forums go, PunBB is at the top of my list, because its developer friendly, and I just like the overall attitude that Rickard has over there! Consider donating to their cause if you end up using this plugin (the cause of bringing a SIMPLE forum to the world).

2 Responses to “PunBB SDK for Ruby on Rails”

  1. Natalie Says:
    Hi Michael, I realize this post is a bit dated but I'm very interested in using your SDK for punBB and unable to find anything similar elsewhere. However running ./script/plugin install svn://ahgsoftware.com/punbb_sdk/trunk hangs up for several minutes, then gives the error "svn: Can't connect to host 'ahgsoftware.com': Connection timed out". I'm sorry if this is an error on my end but just wondering if the code is still intact in the same location as you posted... Thank you
  2. Michael Cerna Says:
    Hey Natalie, yeah, I've restructured my repo quite a bit. The sdk will also get a huge (as in total rewrite) update in a few weeks, heres' the new url.. http://dev.axehomeyg.com/svn/punbb_sdk Enjoy!

Leave a Reply

 

Michael Cerna Chicago-based Rails Developer and Avid Musician. More ...

Search

Categories

  • Home (15)
  • Rails Plugins (5)
  • Pages (9)
  • Archives

    Tags

    BlogRoll