size 50 = tiny
size 85 = small
size 100 = normal
size 150 = large
size 200 = huge
But I need to add support for bbcode that is to be copied over from a vbulletin board. Users will be manually copying posts that contain bbcode for size that looks like this:
Code: Select all
[size="6"]Some text[/size]
I don't know php but I do know a little c++ so I need help on how exactly to code this. Here is an example in pseudocode of what I want to do:
if size = 1
set font-size to 50%
if size = 2
set font-size to 100%
if size = 3
set font-size to 120%
if size = 4
set font-size to 140%
if size = 5
set font-size to 160%
if size = 6
set font-size to 180%
if size = 7
set font-size to 200%
I would like this to function in addition to (not replace) the default bbcode for size, since I don't want people formatting future posts using the old sizes. I'm essentially trying to add backwards compatibility that bumps those smaller sizes from vbulletin into readable text.
I've looked through bbcode.php a bit but I'm lost, I need some help from someone who knows what they are doing. Thank you.