Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    New to the CF scene
    Join Date
    Jun 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    This error is getting on my nerves

    When someone hits the enter button during text on my PM system it say
    rn when they press enter
    HELP

  • #2
    Regular Coder BWiz's Avatar
    Join Date
    Mar 2006
    Location
    Sol System
    Posts
    471
    Thanks
    7
    Thanked 21 Times in 21 Posts
    Could you be slightly more specific please?
    BWiz :: Happy Coding!
    2006
    2007 2008 2009
    2010 2011
    Irrational numbers make no sense.

  • #3
    New to the CF scene
    Join Date
    Jun 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    See for example
    HeyrnHeyrnHey
    instead of
    Hey
    Hey
    Hey

  • #4
    Regular Coder
    Join Date
    Feb 2005
    Location
    Texas
    Posts
    472
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Sounds like some kind of mistyping of "\r" and "\n."
    If you're reading this, it may already be too late!

  • #5
    New to the CF scene
    Join Date
    Jun 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i run this script to check
    Code:
    <? //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
                // [img]pathtoimage[/img]
                $Text = preg_replace("/\[IMG\](.+?)\[\/IMG\]/", '<img src="$1">', $Text);
                $Text = preg_replace("/\[img\](.+?)\[\/img\]/", '<img src="$1">', $Text);
                // [img=widthxheight]image source[/img]
                $Text = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.+?)\[\/img\]/", '<img src="$3" height="$2" width="$1">', $Text);
    
    	        return $Text;
    		}
    ?>

  • #6
    teh Moderatorinator
    Join Date
    Sep 2004
    Location
    USA
    Posts
    2,472
    Thanks
    4
    Thanked 40 Times in 40 Posts
    @KingBowser:
    In the future, please use a more descriptive subject when posting a question. See posting guidelines.

  • #7
    New to the CF scene
    Join Date
    Jun 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Sorry about that. Forgot to read that

  • #8
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    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.
    ||||If you are getting paid to do a job, don't ask for help on it!||||


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •