Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

BBCode Color Bug (Sending PM)

Asked Modified Viewed 2,126 times
B
botivix
B
  • Newbie, joined since
  • Contributed 3 posts on the community forums.
  • Started 1 thread in the forums
  • Started this discussions
asked
Newbie

Not sure if this has been posted, but when sending a PM and using the BBCode "color=" when you write color=orange, it runs the color preg_replace after it runs the smiley preg_replace.

Because of this the output ends up being:
<span style="color:<img src="images/smileys/shock.gif">


instead of:
<span style="color: orange">


so, if you have this problem, on line 367 of maincore.php find
$text = preg_replace('#\[color=(black|blue|brown|cyan|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|violet|white|yellow)\](.*?)\[/color\]#si', '<span style=\'color:\1\'>\2</span>', $text);


and replace with:
$text = preg_replace('#\[color=(black|blue|brown|cyan|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|violet|white|yellow)\](.*?)\[/color\]#si', '<span style=\'color: \1;\'>\2</span>', $text);


Woo, i found a bug and fixed it. Maybe you could make that little simple change for the next release.
Edited by botivix on 26-02-2006 19:50,
0 replies

7 posts

S
shedrock
S
phpfusion-themes.com/siriuslogo.jpg
  • Senior Member, joined since
  • Contributed 232 posts on the community forums.
  • Started 10 threads in the forums
answered
Senior Member

...but where is bbcode colors used in the PM? You mean you'r ejust manually entering BBCode for text colours?

Shedrock
0 replies
F
Falk
F
Falk 146
Need help?, Having trouble?
• View our Documentation for Guides, Standards and Functions
• Name and Organize your Topics and Content correctly in the corresponding Forums for best support results
• Attaching Log Files and Screenshots when reporting issues will help
• Provide with an URL to live example if one exists
• Please read the How to Report an Error post
• Please read and comply with the Code of Conduct

(¯·._.·(¯°·._.·°º*[ Project Manager ]*º°·._.·°¯)·._.·¯)
  • Super Admin, joined since
  • Contributed 6,201 posts on the community forums.
  • Started 639 threads in the forums
  • Answered 12 questions
answered
Super Admin

Sorry but your wrong, in messages.php you need to switch line 239 & 240

$message = parseubb(nl2br($data['message_message']));
if ($data['message_smileys']=="y") $message=parsesmileys($message);


Like so:

if ($data['message_smileys']=="y") $message=parsesmileys($message);
$message = parseubb(nl2br($data['message_message']));
0 replies
S
shedrock
S
phpfusion-themes.com/siriuslogo.jpg
  • Senior Member, joined since
  • Contributed 232 posts on the community forums.
  • Started 10 threads in the forums
answered
Senior Member

So then why isn't there an option like the dropdown box to choose the colors?
0 replies
B
botivix
B
  • Newbie, joined since
  • Contributed 3 posts on the community forums.
  • Started 1 thread in the forums
  • Started this discussions
answered
Newbie

yeah i was entering the bbcode manually.

and no, im not wrong, my way of changing it still worked, but your way is just the better way.
0 replies
B
Bad Boy
B
____________________
BadBoy aka GoogleDude
http://www.googlecityforums.com
  • Member, joined since
  • Contributed 155 posts on the community forums.
  • Started 1 thread in the forums
answered
Member

lol I noticed this bug a while ago when I entered manual bb codes into a PM and got a funky result.

I just thought, "Oh well, that's what you get for using BBcode where your not supposed to. LMAO
0 replies
B
botivix
B
  • Newbie, joined since
  • Contributed 3 posts on the community forums.
  • Started 1 thread in the forums
  • Started this discussions
answered
Newbie

lol
0 replies
B
Bad Boy
B
____________________
BadBoy aka GoogleDude
http://www.googlecityforums.com
  • Member, joined since
  • Contributed 155 posts on the community forums.
  • Started 1 thread in the forums
answered
Member

Quote

Digitanium wrote:
Sorry but your wrong, in messages.php you need to switch line 239 & 240

$message = parseubb(nl2br($data['message_message']));
if ($data['message_smileys']=="y") $message=parsesmileys($message);


Like so:

if ($data['message_smileys']=="y") $message=parsesmileys($message);
$message = parseubb(nl2br($data['message_message']));


This makes my smileys not appear in any messages unless I am responding to a message.
Edited by shedrock on 03-03-2006 22:26,
0 replies

Category Forum

Bugs and Errors - 6

Labels

None yet

Statistics

  • Views 0 views
  • Posts 7 posts
  • Votes 0 votes
  • Topic users 4 members

0 participants

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet