Bbcodes Complete List And Tutorial

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

    Bbcodes Complete List And Tutorial

    hope this tutorial will help you guys in bbcode formats on your scripts
    Attached Files









    Dont Ask Me Dumb Questions.Or you'l get a Dumb Answer..
    Want A Profesional Logo or Theme For Your wap site Pm Me.If I Have The Time Ill Make It For Free


    #2
    hmmm okay... i guess... lol

    but i would like 2 knw how cn i make tht only admins of site write sum BB codes....?

    in lava script 4 exsample.......


    is ti tht i just put tht bb code
    Code:
      if (isadmin(getuid_sid($sid)))
      {
        $text=preg_replace("/\[b\](.*?)\[\/b\]/i","[b]\\1[/b]", $text);
      }
    sigpiceeeeerrr....

    Comment


      #3
      hmmm okay... i guess... lol

      but i would like 2 knw how cn i make tht only admins of site write sum BB codes....?

      in lava script 4 exsample.......
      is ti tht i just put tht bb code
      Code:
        if (isadmin(getuid_sid($sid)))
        {
          $text=preg_replace("/\[b\](.*?)\[\/b\]/i","[b]\\1[/b]", $text);
        }
      [/b]
      easy just use the function in core.php copy that and add to the new bbcode funtions u dnt want normal users to use like this for example
      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("/\[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);
      if(ismod($uid))
      {
      $text = preg_replace("/\[blog\=(.*?)\](.*?)\[\/blog\] is","<ahref=\"index.php?action=viewblog&amp;bid=$1 &amp;sid=$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);
      }
      }
      maybe that will work lol havennt thought of that feature but yeah guess that would be ho u add it in









      Dont Ask Me Dumb Questions.Or you'l get a Dumb Answer..
      Want A Profesional Logo or Theme For Your wap site Pm Me.If I Have The Time Ill Make It For Free

      Comment


        #4
        easy just use the function in core.php copy that and add to the new bbcode funtions u dnt want normal users to use like this for example
        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("/\[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);
        if(ismod($uid))
        {
        $text = preg_replace("/\[blog\=(.*?)\](.*?)\[\/blog\] is","<ahref=\"index.php?action=viewblog&amp;bid=$1 &amp;sid=$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);
        }
        }
        maybe that will work lol havennt thought of that feature but yeah guess that would be ho u add it in[/b]
        yeah i thought so
        sigpiceeeeerrr....

        Comment


          #5
          easy just use the function in core.php copy that and add to the new bbcode funtions u dnt want normal users to use like this for example
          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("/\[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);
          if(ismod($uid))
          {
          $text = preg_replace("/\[blog\=(.*?)\](.*?)\[\/blog\] is","<ahref=\"index.php?action=viewblog&amp;bid=$1 &amp;sid=$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);
          }
          }
          maybe that will work lol havennt thought of that feature but yeah guess that would be ho u add it in[/b]
          hmm i think this will only make only MOD and above permission to see that bb code

          and alesh want something else.. he wants only MOD and above permission can USE BB code
          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
            hmm i think this will only make only MOD and above permission to see that bb code

            and alesh want something else.. he wants only MOD and above permission can USE BB code [/b]

            hmmm yees, i didnt tried yet but i also thnk tht way...

            no good....

            i want all cn c BB code but tht only mods cn write it in BB code style

            example is tht freakin site proCRAPdigits lol

            mods cn write clicable links and users c em, but than again users cannot writ clicable links...

            i knw the temporal way.....
            4 example

            $text=preg_replace("/\[only_me_cn_write_this\](.*?)\[\/only_me_cn_write_this\]/i","\\1", $text);

            lol
            so only u knw the right BB code LMFAO
            sigpiceeeeerrr....

            Comment


              #7
              yeah its possible i uses array for my bbcode
              Code:
              //patern to replace
              
              $patern =array( &#39;/\[url=(.*?)\](.*?)\[\/url\]/is&#39;);
              
              
              if(!isadmin(getuid_sid($sid))
              {
              $with=array("only admin can use this code :P ");
              }
              else
              {
              //user is a admin
               
              $with = array("<a href=\"$1\">$2</a>");
              }
              $from ="[url=http://Jamvibes.org]Jam Vibes[/url]";
              echo preg_replace($patern,$with,$from);
              it works one hundred percent

              R.M.C
              ----------
              PHP Adovocate B)

              Comment

              Working...
              X