PDA

View Full Version : [Release] font size and font color hack


10-31-2000, 12:42 AM
The following hack is to add the and functions for posting.

Usage of the funtions:
[size=12] word will seet the "word" size to 10
[color=#555555] color of 555555 set the color to that of #555555

Implementation:

in global.php
find:
if ($dobbcode==1) {
// user defined bb codes
replace with

if ($dobbcode==1) {
$bbcode=eregi_replace("\\*)\\]","<font color=\\1>",$bbcode);
$bbcode=eregi_replace(quotemeta(""),quotemeta("</font>"),$bbcode);
$bbcode=eregi_replace("\\*)\\]","<font size=\\1>",$bbcode);
$bbcode=eregi_replace(quotemeta(""),quotemeta("</font>"),$bbcode);
// user defined bb codes


done!

10-31-2000, 04:40 AM
Hello,

Good idea...I won't use it just because I think allowing the user to change the color and size of the posts font tends to make the threads messy.

An idea for the hack....try to make it so that users can enter just [color=red] or [color=blue]. Most users will not know any hex numbers like #555555

Just a thought :)

10-31-2000, 04:42 AM
It would work if you put in the color names also.

10-31-2000, 04:51 AM
ok cool....nevermnd :)

10-31-2000, 11:37 AM
I've been using a color tag on my site for a while, and my users have gone while trying to make up ascii art in their sigs :)

Some's cool; a lot suck. LOL

12-08-2000, 03:52 PM
this is a very kewl hack :)
Now i have a reason to turn off HTML :)

12-10-2000, 05:13 AM
Awesome man, I wanted this for a while now!