SitePoint Sponsor

User Tag List

Results 1 to 9 of 9

Thread: Forum widget

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Nov 2009
    Posts
    83
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Forum widget

    Are there any open source forums capable of acting like a widget? ...where the forum display can be loaded as the contents of a division (<div>) in an arbitrary enclosing CMS? (in other words I wish I could find an open source forum I could plug into my CMS).

    Most forums expect to be the whole show, with <html><head> and <body> tags. Getting rid of those elements ( so the forum itself could become the contents of an enclosing division ) is tricky, because of information passing in the head (if (a,b,c) { header("location: xyz") }, etc.

    Forum widgets seem like the inevitable future. But I haven't been able to find any yet. Ah. And I don't want to use an I frame. Thank you.

  2. #2
    SitePoint Enthusiast
    Join Date
    Sep 2009
    Posts
    53
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Are you using an open source CMS or is it custom built?

  3. #3
    SitePoint Enthusiast
    Join Date
    Nov 2009
    Posts
    83
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I use my own CMS (Robopages)

    Montana Riverboats runs on it.

    But I'm not sure it matters. A forum that could plug in as the contents of an arbitrary div could work anywhere. That would be a handy tool.

  4. #4
    SitePoint Enthusiast
    Join Date
    Nov 2009
    Posts
    83
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There aren't any "well-known" open source forums that can easily act like a widget, inside any arbitrary division. With Phorum, for instance, if you erase the html head and body output from the templating engine the whole system
    breaks down, because they do too much hotrod stuff in the head.

    But at sourceforge there are a dozen or more projects that can be made to work, simply by erasing the html, head and body tags from the templating system. Non of the forums I found (that can be made to work that way) use captcha for the registration process. But that's easily added.

    I think I'll get one of those going so it works well enough. And then I'll think about writing a threaded forum that uses XPath instead of SQL, over XML stored in a blob in mysql. An XML-based forum seems like the most elegant fit to me. Threaded messages are the same thing as a hierarchy. It's possible to model hierarchies with relations, but awkward and difficult. With XML hierarchies are the native model. SQL queries over kludged hierarchies are slow as molasses. With XPath, hierarchical querying is lighting fast by comparison.

  5. #5
    Keeper of the SFL StarLion's Avatar
    Join Date
    Feb 2006
    Location
    Atlanta, GA, USA
    Posts
    3,748
    Mentioned
    71 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by pittendrigh View Post
    Threaded messages are the same thing as a hierarchy. It's possible to model hierarchies with relations, but awkward and difficult. With XML hierarchies are the native model. SQL queries over kludged hierarchies are slow as molasses. With XPath, hierarchical querying is lighting fast by comparison.
    Threaded messages are the same thing as a List, unless you're trying to do something fancy with the display.

    Take a look at this thread - there is no difference between your first post and mine, except that yours occured first (ORDER BY date).

    XML is a viable means of storing forum data, I suppose, but how are you going to link poster name to post? Store the name over and over? And the XML tags? Date? How are you going to do post counts for users?

  6. #6
    SitePoint Enthusiast
    Join Date
    Nov 2009
    Posts
    83
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by StarLion View Post
    Threaded messages are the same thing as a List, unless you're trying to do something fancy with the display.....

    ............. but how are you going to link poster name to post? Store the name over and over? And the XML tags? Date? How are you going to do post counts for users?
    XML makes it easy to figure parent/child indenting in a message heading list, so you can see this post is a response to that one, etc. That is doable with relations but ugly.

    Storing the names is an interesting question. Not normalized data (in the oft repeated data sense) is a big no no in relations, because in relational schemas the oft-repeated data tends to be stored in different tables. So synchronizing updates is a nightmare. Oft-repeated data in XML is less error prone, because it all tends to exist at the same oft-repeated xpath. So updates are reliable. It may not be space efficient. But disk space is cheap. Reliability matters more.

    HOWEVER
    But the equivalent of "foreign keys" from one xpath to another are not difficult to do, if you are good at XML and xpath. At least if you process the query result as an array merge between two separate queries. That may sound inefficient. But it's still faster than the dog slow hierarchy modeling done with relations. (I spent 5 years working with Exist and SleepyCat, which are Java Servlet XML databases....that was before mysql began to support xpath queries over XML blobs). I think what I (sort of) proposed is eminently doable. And that it would be both easy to manipulate and zippy fast.

    Post counts for users are not a problem. You need the right xpath statement to do it, sometimes but not always (in cases like that) with a little post query processing.

  7. #7
    Keeper of the SFL StarLion's Avatar
    Join Date
    Feb 2006
    Location
    Atlanta, GA, USA
    Posts
    3,748
    Mentioned
    71 Post(s)
    Tagged
    0 Thread(s)
    If you're going to display the threads as a heirarchy, then i'd entirely agree with you. My point was that a thread displayed as this forum (and most forums) does isnt actually a hierarchy, it's just an ordered list.

  8. #8
    SitePoint Addict
    Join Date
    Apr 2009
    Posts
    357
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    vanillaforums has an embed mode with a tutorial on embedding the forum in a wordpress cms.
    Doug G
    =====
    "If you ain't the lead dog, the view is always the same - Anon

  9. #9
    SitePoint Enthusiast
    Join Date
    Nov 2009
    Posts
    83
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Doug G View Post
    vanillaforums has an embed mode with a tutorial on embedding the forum in a wordpress cms.

    Hmmmm. It does look like Javascript magic of some kind. I don't want the forum's contents to be invisible to the search engines. And I don't want no IFrames'a no kind.

    I will have to check it out. Thank you.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •