MyBB Community Forums

Full Version: Need Code Help
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
How would i change

[align=left][/align]
[align=center][/align]
[align=right] [/align]
and 
[size=xx-small][/size] 
[size=xx-large][/size]
...ect.
To
[CENTER][/CENTER]
[RIGHT][/RIGHT]
[LEFT][/LEFT]
and
[SIZE="1"][/SIZE]
[SIZE="5"][/SIZE]
[SIZE="7"][/SIZE]
...ect

any help is greatly appreciated
I suppose you would have to look for cache_mycode() at class_parser.php.
(2009-05-29, 10:03 PM)Jockl Wrote: [ -> ]I suppose you would have to look for cache_mycode() at class_parser.php.

I found the codes in class_parser.php but i dont know what to to with them to change them
You could always use mybb's mycode to create your own custom bbcodes. If you use the mycode set up then you don't have to fix your changes in the core file you edited after every upgrade. Take a look at this thread.
http://community.mybboard.net/thread-49981.html
ok that helped, but i still dont know what i would use as a replacement code for

\[size="1"\](.*?)\[/size\]

i tried

<style="font-size: xx-small;">$1</style>

but that doesnt work.
(2009-05-31, 03:56 AM)xx50lashesxx Wrote: [ -> ]ok that helped, but i still dont know what i would use as a replacement code for

\[size="1"\](.*?)\[/size\]

i tried

<style="font-size: xx-small;">$1</style>

but that doesnt work.

First part is correct with the size regular expression, but where you are using the style you need a div like this

<div style="font-size: xx-small;">$1</div> 
Thank you very much skywalker2208 that worked great!!!

Your help is greatly appreciated. Also thanks to Jockl.