Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Where to begin on coding a forum

by Coplan (Pilgrim)
on Feb 20, 2002 at 05:56 UTC ( [id://146508]=perlquestion: print w/replies, xml ) Need Help??

Coplan has asked for the wisdom of the Perl Monks concerning the following question:

I'm working with a buddy of mine on a pretty large web portal project for the computer based demoscene, a site that I call SceneSpot (http://www.scenespot.org). It's done in perl and mySQL with apache. We have a cookie system and a membership system in place (where they can have a login, change preferences, etc). I would like to implement some sort of forums into the system. Honestly, I dont' know exactly where to begin.

Considering that I want to integrate the forums with each news brief, or other items within the site, I can't really adapt one of those open source forum systems that's already out there. I am envisioning some sort of system that uses the same login information, and allows users to reply on the spot -- just like they do at Slashdot, or here for that matter.

I went browsing CPAN, and I didn't realy come up with much luck. Perhaps I'm going about things the wrong way. I could use a few pointers in the right direction. Considering the amount of integration I want, would a pm do any service for me here?

As an additional note...are there any loopholes or potential problems that I might have to code for that I might be overlooking? So far, I realize that I will likely have to create a way to parse HTML commands out so that people don't screw up my page's HTML. I can't think of any other potential problems of having a forum.

--Coplan

Edit kudra, 2002-02-20 Corrected typo in title

Replies are listed 'Best First'.
Re: Were to begin on coding a forum
by jepri (Parson) on Feb 20, 2002 at 08:43 UTC
    I would recommend going back and having a look at some of those open source efforts. I agree you won't just be able to drop them in place, but you may find that you can reprogram their login system fairly quickly. If nothing else, take one, rip the guts out of it and use the skeleton to model your program on. Open source isn't an all or nothing effort, you are welcome to use the parts of it that work for you, and discard the parts that don't.

    ____________________
    Jeremy
    I didn't believe in evil until I dated it.

Re: Were to begin on coding a forum
by rjray (Chaplain) on Feb 20, 2002 at 06:06 UTC

    While I offer kudos for checking CPAN before coming here, you should widen your search somewhat, particularly when you are looking for application-level packages. Try looking on either Freshmeat.net or SourceForge.

    --rjray

Re: Where to begin on coding a forum
by Yoda (Sexton) on Feb 20, 2002 at 12:49 UTC
    I know you said you didn't want an open source forum, but you do like the perl monk forum. Did you look at the "Everything Development Company". They are the ones who wrote this engine. It is highly customizable and very powerful. Their link is at the bottom of this page. There are several implementations of the forum that you can reach from their home page. I have not tried to install it yet or even read a lot about it. It does seem have some administrative overhead.
(cLive ;-) Re: Where to begin on coding a forum
by cLive ;-) (Prior) on Feb 20, 2002 at 19:44 UTC
Re: Where to begin on coding a forum
by IOrdy (Friar) on Feb 20, 2002 at 13:19 UTC
    Part 1) Yep, I thought it would be a good idea to write an xml based forum a)To learn to work with confidence around any xml (this helped me the other day when I wrote some javascipt using the DOM) b)To learn better OO coding practices c)To be able to handle a large (at least for me) code base and code for the future.anyway...The first thing I did was download the scoop, everything, slash and any other open sourced portal or message board system I could lay my hands on and install them. This helped heaps.

    Part 2) Letting your users use HTML? I got around this problem by turning everything to >'s etc. Then turning back only the tags I allow them to use everything else just gets printed out.

    Part 3)Regarding intergration with your news system, Isn't your news system just a flat or limited node depth forum? If you write your own forum system allow the administrator to set the depth on any node, that way you can restrict if for some parts and not for others. At least thats how I did it.


    Even if you dont use any of the code it's a good idea to at least get a good look at how others before you have done it :)
Re: Where to begin on coding a forum
by thpfft (Chaplain) on Feb 20, 2002 at 19:41 UTC

    if you've got a login mechanism and a database hookup, it should be very simple to set up a basic threaded discussion. Use something high-level like Class::DBI and you could do it in an afternoon, most of which could be spent on fun stuff like tree display and mutual moderation. All you really need is a discussion class, a message class and three templates (thread, message and input). You've got the rest already.

    Integration with other parts of the site has been a big advantage, in my experience: you start thinking about attaching discussions to all sorts of things in ways that wouldn't otherwise be possible, and the goodwill generated in the discussion is much more directly shared with the rest of the site.

    But if you want something more complicated than basic conversation, or you just have to have those little (gak) smily things, you might be better off taking one of the existing systems and hacking on it a bit to use your layout templates and user identities. The open directory has hundreds to choose from, though installing ACS just to run your forum might be a bit rough.

    Normally i wouldn't recommend the commercial ones like UBB, but since your users are computer people they might go for that button-crazy look.

    As for the html input, my (blush) HTML::TagFilter was written for exactly this purpose and will give you more fine-grained control and fewer loopholes than if you hand-roll it. It's stable, but not exactly mature. Version 0.08 is due, oh, any day now.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://146508]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (7)
As of 2024-04-19 09:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found