Generalizing the Discuss Bot

Started by rjprince, August 02, 2005, 09:09:47 PM

Previous topic - Next topic

rjprince

I have an idea for an enterprising, bored programmer, based on the discussbot. ;)

How about a function in an include file that allows component developers to add a discuss link anywhere in their component.

For example, I have a recipe component and a chess component at www.princeclan.org. I would like to add a "discuss this recipe/game" link at the bottom of appropriate pages. I imagine a function like this:



function ShowSMFDiscussThisLink($board, $icon, $subject, $message, $showposts=false, $quickreply=false)

/*******************************************************************
* Searchs SMF board called $board (or use the ID) for topic with subject = $subject.
* If found:
*             Either lists the posts (if $showposts is true) or shows a link to the topic.
*             Show a quick reply form (if $quickreply is true) or a link to add a post.
* If not found:
*             Show a quick reply form (if $quickreply is true) or a link to add a post.
*
* If first post is being added, it will use $icon, $subject, and $message to
* populate the first post. If $quickreply is true, it will be populated accordingly. If
* false, then the first post will be added and the user will be taken to the add
* new post form in SMF.
******************************************************************/


Anyone game to take this on? It would be a huge boon to developers everywhere, and would pretty much replace any commenting features needed by Mambo, ever.

rjprince

By the way, nothing in this is specific to Mambo - theoretically, it could be an SSI function. Think of the power!

Orstio

Interesting.  I can see this merging a number of developments....

In Mambo, it can easily be set up as a dormant bot with the function call in pretty much any component (would be really nice for DocMan as well).

Advertisement: