The great FreeBASIC forum post converter by notthecheatr

This is a nice program I hacked together in a couple hours.  Not perfect by far (just try
improperly nesting certain tags and you'll see what I mean) but it works very well so long
as everything is formatted correctly.  It comes with emoticons, though emoticon conversion
is optional, and it has its own stylesheet (which you'll obviously have to modify if you want to
change the coloring or anything else).  I don't recommend using it for web design purposes,
but if you're just converting a regular forum post to a HTML page, it works quite well.


It supports:
-An article title
-Emoticon conversion
-A copyright message at the bottom

It properly converts:
-All the standard formatting tags (b, u, i, s, font, size, color, sub, sup)
-All the standard linking tags (url, url=, email, img)
-All the standard tags for including things (code, quote) - even nested ones
-All the standard tags for lists and tables (list, list=, li, table, tr, td)
-All the standard emoticons supported by most forums:  :), ;), :D, ;D, >:(, :(, :o, 8(, ???, ::), :P, :-[, :-\, :-*, and :'( - these are simply converted to regular images (which are included, and of course you
can always change some to suit your fancy) - emoticon conversion is optional though, and they
can be left as text also.
-Marquees (sorry, I'm not adding glow or shadow because those are too non-standard;  at least marquees are still semi-standard)

It will convert most forum posts you can imagine, so as long as you're able to access the original
post (if all else fails, you can use the Quote button most forums have) you can convert.

Using the program is pretty easy, just follow the prompts and enter what you like.  The source is
included, but if you use it for anything I require you give me credit, because after all it took me a
couple hours to make.

To save time, you may wish to use the commandline version instead.  You can just type the
proper lines of input in the following order (do not add any other lines in between!) into a file
and then drag and drop the file onto the program.  The lines you must type into the file are, in
order:
  Name of the text file containing the forum code (INPUT FILE)
  Name of the HTML file to write to (OUTPUT FILE)
  Title of the post/article (ARTICLE TITLE)
  Copyright or other message to be displayed at the bottom of the page (COPYRIGHT)
  Emoticon conversion flag - the letter y if you want emoticons converted to graphics, anything else if not (EMOTECONV)



Note:  Be careful of tag nesting, spelling, and form!  Most things will be fine, but the converter
doesn't check for correctness, so if something is not done properly you'll end up with a
nonsense-looking page rather than a nice properly formatted page.  Because it's such a hack,
it really can't check for such things, so don't expect it to.  On a similar note, don't bother trying
to add stuff to this or remove stuff - it's so hackish that to do anything else with it is probably
impossible.  This is actually the case with most of my parsing programs, because I'm not
very good at parsing things :P


I'm not sure if it's legal to use the included emoticons;  hopefully it is, but if you know otherwise
tell me so I can remove them.  In any case, these emoticons are rather ugly and way over-used,
so you may wish to use different ones.  There is a text file in the directory with names of the
emoticon images and what text they replace.  The path must be exact!  If you create a page
using this program with emoticon conversion, the emoticons must be in a subdirectory named
"emoticons" in the same directory as the page itself!  Anywhere else will not work, although
you could probably do a pretty simple search and replace in the generated HTML if you
wanted to.