Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??

As the others have said, the code above has many problems. If you just want a good working bulletin board, you should probably look for one of the many that others have already written. If you are doing it for a learning experience, try to post smaller portions of code and ask about a specific problem instead of posting the entire code and asking for "any problems."

In general, writing a good bulletin board is a tricky thing, and can be much harder than it looks. I've written my own and it's now at 4000 lines (and growing), and I tend to write small, efficient code. :) Here are some things to keep in mind when rolling your own:

  • Use a database if possible. It saves a lot of trouble.
  • If you can't use a database, keep the data separate from the html files that are displayed. Keep the html out of your code as much as possible. Break up the data into multiple files, and create your own indexes (subsets of your data) to allow quick accessing of the data.
  • Check and double-check your file locking. This part will really get you in trouble: since multiple processes are writing to the same file, a simple mistake can cause your files to be erased.
  • Some sort of login/authentication will be needed eventually. Design it that way from the beginning.
  • Abstract everything as much as possible. Adding or removing an entire table, for example, should involve changing a configuration file and NOT the code. Things such as the error messages, the names of the boards/threads, the "improper language" words, etc. should not be inside the main code itself.
  • Perlmonks is a great resource, especially for specific problems in large projects. :)

In reply to Re: bulletin board by turnstep
in thread bulletin board by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others romping around the Monastery: (8)
    As of 2014-09-20 20:57 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      How do you remember the number of days in each month?











      Results (163 votes), past polls