Forum Settings
Forums
New
Dec 14, 2006 11:32 PM
#1
Overlord

Offline
Nov 2004
5752
So I created my own BBCode parser. The one I was using before was made by someone else (the only piece of code I've ever used that I didn't make). However, it was shitty and you all saw that it was giving us serious issues (smilies, and the use of [] were only a few).

So yeah, I made this one. I put in the basics for now, so if there's something I left out, let me know please.

My parser won't "fix" any issues with forgetting to close tags though. So don't mess up! :P
Dec 15, 2006 12:38 AM
#2

Offline
Mar 2005
3806
hah, and if we intentionally don't close tags, that's gonna be a problem too =P
Dec 15, 2006 2:14 AM
#3
Offline
Sep 2006
126
Sweet. Seems like it would be pretty simple to write code that would check to see if there is a closing tag or not, though. Right?

*cracks whip* Oh yeah.
Dec 15, 2006 5:20 AM
#4

Offline
May 2006
482
In programming you would just have to do something like

Search post for [b and [i and so on
Go to found location
replace [b to ["b"] and so on for location 'had to use quote to stop tag from activating
next location
else
end

or an IF statement should work too.

However I don't know how it works with coding...


Though, nice one Xinil!

How about a
code
tag?

"I'll go crazy by the end of the year" - K Fu's comment while doing Proofs and Number Theory in Advanced Higher Maths
Dec 15, 2006 9:24 AM
#5
Overlord

Offline
Nov 2004
5752
What would the
code
tag do exactly? No way I'm programming syntax highlighting.
Dec 15, 2006 9:26 AM
#6

Offline
May 2006
482
The code tag basically disables all other tags inside it.

It is useful when explaining to someone how to use BBCode, or HTML, when posting codes just so that you don't have to stick them into quote tags and so on...

"I'll go crazy by the end of the year" - K Fu's comment while doing Proofs and Number Theory in Advanced Higher Maths
Dec 15, 2006 9:28 AM
#7
Overlord

Offline
Nov 2004
5752
Oh god...

I'd have to think about that one.
Dec 15, 2006 1:10 PM
#8
Offline
Sep 2006
126
In BBCode, is it necessary to have the text in the tags be lower case?

For instance...



appears to be interpreted as text and not BBCode. At least, that is the inference that I am making.

Conversely, if you change the tags to lower case, then this is the result...



Awwww. It's cute and informative. :)
Dec 15, 2006 1:13 PM
#9

Offline
May 2006
482
It usually doesn't, but looks like you found some work for Xinil. However most boards tend to use upper case for tags, when you click on the corresponding buttons to activate that tag.

"I'll go crazy by the end of the year" - K Fu's comment while doing Proofs and Number Theory in Advanced Higher Maths
Dec 15, 2006 1:49 PM
Overlord

Offline
Nov 2004
5752
It's not too difficult to include case insensitive activity.

More topics from this board

» [Challenge] You Should Read This Manga 2024 ( 1 2 3 4 5 )

Kineta - Feb 23

207 by Shin_016 »»
Yesterday, 7:32 PM

» Try MAL's New Mobile Site! ( 1 2 3 4 5 ... Last Page )

Xinil - Feb 15, 2015

423 by RED-clover12 »»
Yesterday, 10:19 AM

» Planned 5hr Maintenance, Thursday April 25 @ 1am-6am PT

Kineta - Apr 22

0 by Kineta »»
Apr 22, 8:10 PM

» New Site Update: Peak Anime đź—» ( 1 2 3 4 5 )

Kineta - Mar 31

213 by Lancelot73 »»
Apr 21, 4:28 AM

» Heavenly Easter Delusion: Devil and Dolce ( 1 2 3 4 5 ... Last Page )

Kineta - Mar 27

3331 by Terra_strong »»
Apr 17, 8:26 PM
It’s time to ditch the text file.
Keep track of your anime easily by creating your own list.
Sign Up Login