Bbc Code In Funmobile

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Bbc Code In Funmobile

    i add dis code but bbc code doesent work.help me guys.
    PHP Code:
    function bbcode($text)
    {
             
    $text=htmlspecialchars($text);
             
    $text=preg_replace("/\[b\]\[big\](.*?)\[\/b\]\[\/big\]/i","[b]<big>\\1</big>[/b]"$text);
             
    $text=preg_replace("/\[big\]\[b\](.*?)\[\/big\]\[\/b\]/i","[b]<big>\\1</big>[/b]"$text);
             
    $text=preg_replace("/\[u\]\[big\](.*?)\[\/u\]\[\/big\]/i","[u]<big>\\1</big>[/u]"$text);
             
    $text=preg_replace("/\[big\]\[u\](.*?)\[\/big\]\[\/u\]/i","[u]<big>\\1</big>[/u]"$text);
             
    $text=preg_replace("/\[b\]\[u\](.*?)\[\/b\]\[\/u\]/i","[b][u]\\1[/u][/b]"$text);
             
    $text=preg_replace("/\[u\]\[b\](.*?)\[\/u\]\[\/b\]/i","[b][u]\\1[/u][/b]"$text);
             
    $text=preg_replace("/\[b\]\[i\](.*?)\[\/b\]\[\/i\]/i","[b][i]\\1[/i][/b]"$text);
             
    $text=preg_replace("/\[i\]\[b\](.*?)\[\/i\]\[\/b\]/i","[b][i]\\1[/i][/b]"$text);
             
    $text=preg_replace("/\[b\]\[u\](.*?)\[\/b\]\[\/u\]/i","[b][u]\\1[/u][/b]"$text);
             
    $text=preg_replace("/\[u\]\[b\](.*?)\[\/u\]\[\/b\]/i","[b][u]\\1[/u][/b]"$text);
             
    $text=preg_replace("/\[b\]\[small\](.*?)\[\/b\]\[\/small\]/i","[size="1"][b]\\1[/b][/size]"$text);
             
    $text=preg_replace("/\[small\]\[b\](.*?)\[\/small\]\[\/b\]/i","[size="1"][b]\\1[/b][/size]"$text);
             
    $text=preg_replace("/\[i\]\[small\](.*?)\[\/i\]\[\/small\]/i","[size="1"][i]\\1[/i][/size]"$text);
             
    $text=preg_replace("/\[small\]\[i\](.*?)\[\/small\]\[\/i\]/i","[size="1"][i]\\1[/i][/size]"$text);
             
    $text=preg_replace("/\[u\]\[small\](.*?)\[\/u\]\[\/small\]/i","[size="1"][u]\\1[/u][/size]"$text);
             
    $text=preg_replace("/\[small\]\[u\](.*?)\[\/small\]\[\/u\]/i","[size="1"][u]\\1[/u][/size]"$text);
             
    $text=preg_replace("/\[b\]\[big\](.*?)\[\/b\]\[\/big\]/i","<big>[b]\\1[/b]</big>"$text);
             
    $text=preg_replace("/\[big\]\[b\](.*?)\[\/big\]\[\/b\]/i","<big>[b]\\1[/b]</big>"$text);
             
    $text=preg_replace("/\[i\]\[big\](.*?)\[\/i\]\[\/big\]/i","<big>[i]\\1[/i]</big>"$text);
             
    $text=preg_replace("/\[big\]\[i\](.*?)\[\/big\]\[\/i\]/i","<big>[i]\\1[/i]</big>"$text);
             
    $text=preg_replace("/\[u\]\[big\](.*?)\[\/u\]\[\/big\]/i","<big>[u]\\1[/u]</big>"$text);
             
    $text=preg_replace("/\[big\]\[u\](.*?)\[\/big\]\[\/u\]/i","<big>[u]\\1[/u]</big>"$text);
             
    $text=preg_replace("/\[b\](.*?)\[\/b\]/i","[b]\\1[/b]"$text);
             
    $text=preg_replace("/\[u\](.*?)\[\/u\]/i","[u]\\1[/u]"$text);
             
    $text=preg_replace("/\[i\](.*?)\[\/i\]/i","[i]\\1[/i]"$text);
             
    $text=preg_replace("/\[big\](.*?)\[\/big\]/i","<big>\\1</big>"$text);
             
    $text=preg_replace("/\[small\](.*?)\[\/small\]/i","[size="1"]\\1[/size]"$text);
             
    $text=preg_replace("/\[br\/\]/i","
    "
    $text);
             
    $text=preg_replace("/\[url\](.*?)\[\/url\]/i","<a href=\"\\1\">\\1</a>"$text);
             
    $text=preg_replace("/\[link\=(.*?)\](.*?)\[\/link\]/i","<a href=\"\\1\">\\2</a>"$text);
             
    $text=preg_replace("/\[img\=((.*?)(.jpg|jpeg))\]/i","<a href=\"\\1\"><img src=\"\\1\" alt=\"***\"/></a>"$text);
             
    $text eregi_replace('([_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,3})','[email="\\1"]\\1[/email]'$text);

    <div align="center">My Web Community ......... http://pahasara.net



    </div>

    #2
    PHP Code:
    function getbbcode($text$sid="")
    {
             
    $text=htmlspecialchars($text);
             
    $text=preg_replace("/\[b\]\[big\](.*?)\[\/b\]\[\/big\]/i","<big>\\1</big>"$text);
             
    $text=preg_replace("/\[big\]\[b\](.*?)\[\/big\]\[\/b\]/i","<big>\\1</big>"$text);
             
    $text=preg_replace("/\[u\]\[big\](.*?)\[\/u\]\[\/big\]/i","<big>\\1</big>"$text);
             
    $text=preg_replace("/\[big\]\[u\](.*?)\[\/big\]\[\/u\]/i","<big>\\1</big>"$text);
             
    $text=preg_replace("/\[b\]\[u\](.*?)\[\/b\]\[\/u\]/i","\\1"$text);
             
    $text=preg_replace("/\[u\]\[b\](.*?)\[\/u\]\[\/b\]/i","\\1"$text);
             
    $text=preg_replace("/\[b\]\[i\](.*?)\[\/b\]\[\/i\]/i","\\1"$text);
             
    $text=preg_replace("/\[i\]\[b\](.*?)\[\/i\]\[\/b\]/i","\\1"$text);
             
    $text=preg_replace("/\[b\]\[u\](.*?)\[\/b\]\[\/u\]/i","\\1"$text);
             
    $text=preg_replace("/\[u\]\[b\](.*?)\[\/u\]\[\/b\]/i","\\1"$text);
             
    $text=preg_replace("/\[b\]\[small\](.*?)\[\/b\]\[\/small\]/i","\\1"$text);
             
    $text=preg_replace("/\[small\]\[b\](.*?)\[\/small\]\[\/b\]/i","\\1"$text);
             
    $text=preg_replace("/\[i\]\[small\](.*?)\[\/i\]\[\/small\]/i","\\1"$text);
             
    $text=preg_replace("/\[small\]\[i\](.*?)\[\/small\]\[\/i\]/i","\\1"$text);
             
    $text=preg_replace("/\[u\]\[small\](.*?)\[\/u\]\[\/small\]/i","\\1"$text);
             
    $text=preg_replace("/\[small\]\[u\](.*?)\[\/small\]\[\/u\]/i","\\1"$text);
             
    $text=preg_replace("/\[b\]\[big\](.*?)\[\/b\]\[\/big\]/i","<big>\\1</big>"$text);
             
    $text=preg_replace("/\[big\]\[b\](.*?)\[\/big\]\[\/b\]/i","<big>\\1</big>"$text);
             
    $text=preg_replace("/\[i\]\[big\](.*?)\[\/i\]\[\/big\]/i","<big>\\1</big>"$text);
             
    $text=preg_replace("/\[big\]\[i\](.*?)\[\/big\]\[\/i\]/i","<big>\\1</big>"$text);
             
    $text=preg_replace("/\[u\]\[big\](.*?)\[\/u\]\[\/big\]/i","<big>\\1</big>"$text);
             
    $text=preg_replace("/\[big\]\[u\](.*?)\[\/big\]\[\/u\]/i","<big>\\1</big>"$text);
             
    $text=preg_replace("/\[b\](.*?)\[\/b\]/i","\\1"$text);
             
    $text=preg_replace("/\[u\](.*?)\[\/u\]/i","\\1"$text);
             
    $text=preg_replace("/\[i\](.*?)\[\/i\]/i","\\1"$text);
             
    $text=preg_replace("/\[big\](.*?)\[\/big\]/i","<big>\\1</big>"$text);
             
    $text=preg_replace("/\[small\](.*?)\[\/small\]/i","\\1"$text);
             
    $text=preg_replace("/\[br\/\]/i","
    "
    $text);
             
    $text=preg_replace("/\[url\](.*?)\[\/url\]/i","<a href=\"\\1\">\\1</a>"$text);
             
    $text=preg_replace("/\[link\=(.*?)\](.*?)\[\/link\]/i","<a href=\"\\1\">\\2</a>"$text);
             
    $text=preg_replace("/\[img\=((.*?)(.jpg|jpeg))\]/i","<a href=\"\\1\"><img src=\"\\1\" alt=\"***\"/></a>"$text);
             
    $text eregi_replace('([_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,3})','[email="\\1"]\\1[/email]'$text);

    i think but its most likely some of the bbcode are conflicting with each other like are you that lazy to just write [b ][i ]text here[/i]/[b]? or [ big][ u] text here [/u][/big]?

    Comment


      #3
      hey 1000 times thanks buddy.im begginer to coding.
      <div align="center">My Web Community ......... http://pahasara.net



      </div>

      Comment


        #4
        hey 1000 times thanks buddy.im begginer to coding.[/b]
        --------------------
        [img] dont work and even - in url adress,can anyone knows and help?
        www.inbuzunar.mobi - Your mobile portal pocket

        Comment


          #5
          --------------------
          [img] dont work and even - in url adress,can anyone knows and help?[/b]

          for IMG.. try this

          Code:
          $text = preg_replace("/\[img\=(.*?)\](.*?)\[\/img\]/is","<img src=\"\\1\"/>",$text);
          It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt.
          ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ !
          ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.
          キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!

          Comment


            #6
            Bro that code doesnt work on my site

            WapCHAT Forum Currenltly changing over to xhtml

            My Dowloads Site

            Comment

            Working...
            X