New Bbcode For Lavalair

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

    New Bbcode For Lavalair

    replace in core.php this function gettbbcode with




    <div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>///////////////////////////////////parse bbcode

    function getbbcode($text, $sid="")
    {
    $text=preg_replace("/\[b\](.*?)\[\/b\]/i","\\1", $text);
    $text=preg_replace("/\[i\](.*?)\[\/i\]/i","\\1", $text);
    $text=preg_replace("/\[u\](.*?)\[\/u\]/i","\\1", $text);
    $text=preg_replace("/\[big\](.*?)\[\/big\]/i","<big>\\1</big>", $text);
    $text=preg_replace("/\[small\](.*?)\[\/small\]/i","\\1", $text);

    $text=preg_replace("/\[red\](.*?)\[\/red\]/i","<font color=\"red\">\\1</font>", $text);
    $text=preg_replace("/\[lime\](.*?)\[\/lime\]/i","<font color=\"lime\">\\1</font>", $text);
    $text=preg_replace("/\[green\](.*?)\[\/green\]/i","<font color=\"green\">\\1</font>", $text);
    $text=preg_replace("/\[yellow\](.*?)\[\/yellow\]/i","<font color=\"yellow\">\\1</font>", $text);
    $text=preg_replace("/\[white\](.*?)\[\/white\]/i","<font color=\"white\">\\1</font>", $text);
    $text=preg_replace("/\[blue\](.*?)\[\/blue\]/i","<font color=\"blue\">\\1</font>", $text);
    $text=preg_replace("/\[grey\](.*?)\[\/grey\]/i","<font color=\"grey\">\\1</font>", $text);
    $text=preg_replace("/\[silver\](.*?)\[\/silver\]/i","<font color=\"silver\">\\1</font>", $text);

    $text = preg_replace("/\[url\=(.*?)\](.*?)\[\/url\]/is","<a href=\"$1\">$2</a>",$text);
    $text = preg_replace("/\[topic\=(.*?)\](.*?)\[\/topic\]/is","<a href=\"index.php?action=viewtpc&amp;tid=$1&amp;sid =$sid\">$2</a>",$text);
    $text = preg_replace("/\[club\=(.*?)\](.*?)\[\/club\]/is","<a href=\"index.php?action=gocl&amp;clid=$1&amp;sid=$ sid\">$2</a>",$text);
    $text = preg_replace("/\[blog\=(.*?)\](.*?)\[\/blog\]/is","<a href=\"index.php?action=viewblog&amp;bid=$1&amp;si d=$sid\">$2</a>",$text);
    //$text = ereg_replace("http://[A-Za-z0-9./=?-_]+","<a href=\"\\\">\</a>", $text);
    if(substr_count($text,"[br/]")<=3){
    $text = str_replace("[br/]","
    ",$text);
    }
    $text = str_replace("2wap","2crapforwap",$text);
    $text = str_replace("2WAP","2crapforwap",$text);
    $text = str_replace("2wAp","2crapforwap",$text);
    $text = str_replace("2w4p","2crapforwap",$text);
    $text = str_replace("2waP","2crapforwap",$text);
    $text = str_replace("2Wap","2crapforwap",$text);
    $text = str_replace("hiphop4u","britneyspears",$text);
    $text = str_replace("HIPHOP4U","britneyspears",$text);
    $text = str_replace("HiPhOp4U","britneyspears",$text);
    $text = str_replace("hIpHoP4u","britneyspears",$text);
    $text = str_replace("Hiphop4U","britneyspears",$text);
    $text = str_replace("Hiphop4u","britneyspears",$text);
    $text = str_replace("HipHop4u","britneyspears",$text);
    $text = str_replace("hh4u","britneyspears",$text);
    $text = str_replace("HH4U","britneyspears",$text);
    $text = str_replace("Hh4u","britneyspears",$text);
    $text = str_replace("hH4U","britneyspears",$text);
    $text = str_replace("HH4u","britneyspears",$text);
    $text = str_replace("hh4U","britneyspears",$text);
    return $text;
    }</div>

    this and write everywhere than eg:[color]text[/color]

    #2
    it&#39;s possible to do that with just 1 line

    Comment


      #3
      Code:
      $bro=("$REMOTE_ADDR");
          $usr = explode("/",$_SERVER[&#39;HTTP_USER_AGENT&#39;]); 
          $phone = ("$usr[0]");
      $text = str_replace("[phone]","$phone",$text);
      
      
        $text = preg_replace("/\[updatepro]/is","<a href=\"index.php?action=uset&amp;sid=$sid\">Update Profie</a>",$text);
      
      
              $unreadinbox=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private WHERE unread=&#39;1&#39; AND touid=&#39;".$uid."&#39;"));
              $pmtotl=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private WHERE touid=&#39;".$uid."&#39;"));
              $unrd="[".$unreadinbox[0]."l".$pmtotl[0]."]";
        $text = preg_replace("/\[inbox]/is","<a href=\"inbox.php?action=main&amp;sid=$sid\">Inbox $unrd</a>",$text);
      
      
          $nick = getnick_sid($sid);
      $text = str_replace("[user]","$nick",$text);

      Comment


        #4
        especcially this ones are cool:

        Code:
          $text = str_replace("2wap","2crapforwap",$text);
          $text = str_replace("2WAP","2crapforwap",$text);
          $text = str_replace("2wAp","2crapforwap",$text);
          $text = str_replace("2w4p","2crapforwap",$text);
          $text = str_replace("2waP","2crapforwap",$text);
          $text = str_replace("2Wap","2crapforwap",$text);
        Advertise your mobile site for FREE with AdTwirl

        Comment


          #5
          especcially this ones are cool:

          Code:
            $text = str_replace("2wap","2crapforwap",$text);
            $text = str_replace("2WAP","2crapforwap",$text);
            $text = str_replace("2wAp","2crapforwap",$text);
            $text = str_replace("2w4p","2crapforwap",$text);
            $text = str_replace("2waP","2crapforwap",$text);
            $text = str_replace("2Wap","2crapforwap",$text);
          [/b]

          lol

          Comment


            #6
            especcially this ones are cool:

            Code:
              $text = str_replace("2wap","2crapforwap",$text);
              $text = str_replace("2WAP","2crapforwap",$text);
              $text = str_replace("2wAp","2crapforwap",$text);
              $text = str_replace("2w4p","2crapforwap",$text);
              $text = str_replace("2waP","2crapforwap",$text);
              $text = str_replace("2Wap","2crapforwap",$text);
            [/b]
            lol that has been there since the ravingwap.net version.

            Comment


              #7
              talking over 2 years as that was dj who put that there lol

              Comment


                #8
                these 2 may b useful

                Code:
                $text=preg_replace("/\[font\=(.*?)\](.*?)\[\/font\]/is","$2",$text);
                $text=preg_replace("/\[img\=(.*?)\]/i","<img src=\"$1\" alt=\"\"/>",$text);

                Comment


                  #9
                  talking over 2 years as that was dj who put that there lol[/b]
                  Yeah i remember that lol.. ah the good old days pmpl. How things do change.

                  He still missed some combos anyway lol 2WaP, 2W4P, 2W4p, 2w4P, and probably more lol..

                  Should of used that other case insensitive replace...

                  Comment


                    #10
                    especcially this ones are cool:

                    Code:
                      $text = str_replace("2wap","2crapforwap",$text);
                      $text = str_replace("2WAP","2crapforwap",$text);
                      $text = str_replace("2wAp","2crapforwap",$text);
                      $text = str_replace("2w4p","2crapforwap",$text);
                      $text = str_replace("2waP","2crapforwap",$text);
                      $text = str_replace("2Wap","2crapforwap",$text);
                    [/b]
                    pardon me is ravingwap copy....

                    Comment


                      #11
                      Code:
                      $text=preg_replace("/\[scr\](.*?)\[\/scr\]/i","<marquee loop=\"800\" direction=\"right\">\\1</marquee>", $text);
                        $text=preg_replace("/\[scl\](.*?)\[\/scl\]/i","<marquee loop=\"800\" direction=\"left\">\\1</marquee>", $text);

                      Comment


                        #12
                        Code:
                        $bro=("$REMOTE_ADDR");
                            $usr = explode("/",$_SERVER[&#39;HTTP_USER_AGENT&#39;]); 
                            $phone = ("$usr[0]");
                        $text = str_replace("[phone]","$phone",$text);
                          $text = preg_replace("/\[updatepro]/is","<a href=\"index.php?action=uset&amp;sid=$sid\">Update Profie</a>",$text);
                                $unreadinbox=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private WHERE unread=&#39;1&#39; AND touid=&#39;".$uid."&#39;"));
                                $pmtotl=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private WHERE touid=&#39;".$uid."&#39;"));
                                $unrd="[".$unreadinbox[0]."l".$pmtotl[0]."]";
                          $text = preg_replace("/\[inbox]/is","<a href=\"inbox.php?action=main&amp;sid=$sid\">Inbox $unrd</a>",$text);
                            $nick = getnick_sid($sid);
                        $text = str_replace("[user]","$nick",$text);
                        [/b]

                        at page index???
                        if like my post click:

                        http://coding-talk.com/images/totall...ost_thanks.gif

                        Comment


                          #13
                          $text = str_replace("Gumslone","preety man",$text);
                          $text = str_replace("GUmslone","preety man",$text);
                          $text = str_replace("GUMslone","preety man",$text);
                          $text = str_replace("GUMSlone","preety man",$text);
                          $text = str_replace("GUMSLone","preety man",$text);
                          $text = str_replace("GUMSLONe","preety man",$text);
                          $text = str_replace("GUMSLONE","preety man",$text);[/b]

                          haha ..

                          thats cool

                          Comment


                            #14
                            how to add properly BB code to lava or funmobile

                            for:
                            code..../code
                            php...../php
                            codebox.../codebox
                            html...../html
                            sql...../sql

                            so users will actually see all those boxes like here?
                            is that even possible?
                            or is that just for I.P.B. ??
                            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


                              #15
                              how to add properly BB code to lava or funmobile

                              for:
                              code..../code
                              php...../php
                              codebox.../codebox
                              html...../html
                              sql...../sql

                              so users will actually see all those boxes like here?
                              is that even possible?
                              or is that just for I.P.B. ??
                              [/b]
                              Code:
                              $str = preg_replace( "/\[html\](.*?)\[\/html\]/eis", "unhtmlentities( &#39;$1&#39; )", $str );
                              Code:
                              $str = preg_replace( "/\[php\](.*?)\[\/php\]/eis", "unhtmlentities( &#39;$1&#39; )", $str );
                              Code:
                              $str = preg_replace( "/\[sql\](.*?)\[\/sql\]/eis", "unhtmlentities( &#39;$1&#39; )", $str );
                              codebox uses frames and its not for mobiles
                              Advertise your mobile site for FREE with AdTwirl

                              Comment

                              Working...
                              X