oh I agree that it looks like attempted video tags. It just doesn't look like ones that would work on any site. If he by some chance just copied and pasted his post from some other site and therefore that site is using those tags, the site developers need to take a crash course in design.
According to that design they would be using some homemade bbcode script that first pools all the tags and then throws them into some switch that makes decisions based on the data. That's retarded. I could write a regex that would practically blink-replace the whole page. The silliest part is they would have to use some .indexOf and .substring function to make the pool and then a . replace function to make the modification, all of which are just wrappers for regex in the first place. Why not just run a complex regex with a global flag and skip all the unnecessary code that would be required to pool, switch/case and replace.
A good example would be my math expression parser. If I did it a way similar to what would be necessary for those video tags I would have code like
if("sin"){}else if("cos"){}else if("floor"){}else if("ceil"){}..................................... .
that is absolutely ridiculous.
In contrast, that video syntax would be like if I made it necessary to write expressions like these
[math=sin]expression[/math]
where
[sin]expression[/sin] ultimately sin(expr) is all that is necessary
According to that design they would be using some homemade bbcode script that first pools all the tags and then throws them into some switch that makes decisions based on the data. That's retarded. I could write a regex that would practically blink-replace the whole page. The silliest part is they would have to use some .indexOf and .substring function to make the pool and then a . replace function to make the modification, all of which are just wrappers for regex in the first place. Why not just run a complex regex with a global flag and skip all the unnecessary code that would be required to pool, switch/case and replace.
A good example would be my math expression parser. If I did it a way similar to what would be necessary for those video tags I would have code like
if("sin"){}else if("cos"){}else if("floor"){}else if("ceil"){}..................................... .
that is absolutely ridiculous.
In contrast, that video syntax would be like if I made it necessary to write expressions like these
[math=sin]expression[/math]
where
[sin]expression[/sin] ultimately sin(expr) is all that is necessary
Comment