KingBowser
06-19-2006, 04:05 AM
When someone hits the enter button during text on my PM system it say
rn when they press enter
HELP
rn when they press enter
HELP
|
||||
This error is getting on my nervesKingBowser 06-19-2006, 04:05 AM When someone hits the enter button during text on my PM system it say rn when they press enter HELP BWiz 06-19-2006, 04:18 AM Could you be slightly more specific please? KingBowser 06-19-2006, 05:13 AM See for example HeyrnHeyrnHey instead of Hey Hey Hey Digger3000 06-19-2006, 05:17 AM Sounds like some kind of mistyping of "\r" and "\n." KingBowser 06-19-2006, 05:18 AM i run this script to check <? //BBCODE function //Local copy function BBCode($Text) { // Replace any html brackets with HTML Entities to prevent executing HTML or script // Don't use strip_tags here because it breaks [url] search by replacing & with amp // Convert new line chars to html <br /> tags $Text = nl2br($Text); // Set up the parameters for a URL search string $URLSearchString = " a-zA-Z0-9\:\&\/\-\?\.\=\_\~\#\'"; // Set up the parameters for a MAIL search string $MAILSearchString = $URLSearchString . " a-zA-Z0-9\.@"; // Perform URL Search $Text = preg_replace("(\[url\]([$URLSearchString]*)\[/url\])", '<a href="$1">$1</a>', $Text); $Text = preg_replace("(\[url\=([$URLSearchString]*)\]([$URLSearchString]*)\[/url\])", '<a href="$1" target="_blank">$2</a>', $Text); $Text = preg_replace("(\[URL\=([$URLSearchString]*)\]([$URLSearchString]*)\[/URL\])", '<a href="$1" target="_blank">$2</a>', $Text); // Perform MAIL Search $Text = preg_replace("(\[mail\]([$MAILSearchString]*)\[/mail\])", '<a href="mailto:$1">$1</a>', $Text); $Text = preg_replace("/\[mail\=([$MAILSearchString]*)\](.+?)\[\/mail\]/", '<a href="mailto:$1">$2</a>', $Text); // Check for bold text $Text = preg_replace("(\[b\](.+?)\[\/b])is",'<b>$1</b>',$Text); // Check for Italics text $Text = preg_replace("(\[i\](.+?)\[\/i\])is",'<I>$1</I>',$Text); // Check for Underline text $Text = preg_replace("(\[u\](.+?)\[\/u\])is",'<u>$1</u>',$Text); // Check for strike-through text $Text = preg_replace("(\[s\](.+?)\[\/s\])is",'<span class="strikethrough">$1</span>',$Text); // Check for over-line text $Text = preg_replace("(\[o\](.+?)\[\/o\])is",'<span class="overline">$1</span>',$Text); // Check for colored text $Text = preg_replace("(\[color=(.+?)\](.+?)\[\/color\])is","<span style=\"color: $1\">$2</span>",$Text); // Check for sized text $Text = preg_replace("(\[size=(.+?)\](.+?)\[\/size\])is","<span style=\"font-size: $1px\">$2</span>",$Text); // Check for list text $Text = preg_replace("/\[list\](.+?)\[\/list\]/is", '<ul class="listbullet">$1</ul>' ,$Text); $Text = preg_replace("/\[list=1\](.+?)\[\/list\]/is", '<ul class="listdecimal">$1</ul>' ,$Text); $Text = preg_replace("/\[list=i\](.+?)\[\/list\]/s", '<ul class="listlowerroman">$1</ul>' ,$Text); $Text = preg_replace("/\[list=I\](.+?)\[\/list\]/s", '<ul class="listupperroman">$1</ul>' ,$Text); $Text = preg_replace("/\[list=a\](.+?)\[\/list\]/s", '<ul class="listloweralpha">$1</ul>' ,$Text); $Text = preg_replace("/\[list=A\](.+?)\[\/list\]/s", '<ul class="listupperalpha">$1</ul>' ,$Text); $Text = str_replace(" ", "<li>", $Text); $Text = preg_replace("(\[quote\](.+?)\[\/quote])is",'<center><table class="quotecode"><tr row="forumrow"><td>Quote:<br>$1</td></tr></table></center>',$Text); $Text = preg_replace("(\[code\](.+?)\[\/code])is",'<center><table class="quotecode"><tr row="forumrow"><td>Code:<br>$1</td></tr></table></center>',$Text); // Check for font change text $Text = preg_replace("(\[font=(.+?)\](.+?)\[\/font\])","<span style=\"font-family: $1;\">$2</span>",$Text); // Images // pathtoimage $Text = preg_replace("/\(.+?)\[\/IMG\]/", '<img src="$1">', $Text); $Text = preg_replace("/\[img\](.+?)\[\/img\]/", '<img src="$1">', $Text); // [img=widthxheight]image source $Text = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.+?)\[\/img\]/", '<img src="$3" height="$2" width="$1">', $Text); return $Text; } ?> Brandoe85 06-19-2006, 05:23 AM @KingBowser: In the future, please use a more descriptive subject when posting a question. See posting guidelines. (http://www.codingforums.com/postguide.htm) KingBowser 06-19-2006, 05:26 AM Sorry about that. Forgot to read that :( _Aerospace_Eng_ 06-19-2006, 05:57 AM Just try echoing out $Text to see what you get. Don't run it through the preg replaces just yet. I think you might need to assign nl2br($Test) to a variable of its down rather than reassigning it to $Text. |
| |||
EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum