Jump to content
×
×
  • Create New...

Créer son BBCode


Bullllet58
 Share

Recommended Posts

voici mon script pour créer son BBcode

// Creer son BBcode
       $simple_search = array(
                               '/\[b\](.*?)\[\/b\]/is',
                               '/\[i\](.*?)\[\/i\]/is',
                               '/\[u\](.*?)\[\/u\]/is',
                               '/\[s\](.*?)\[\/s\]/is',
                               '/\[quote\](.*?)\[\/quote\]/is',
                               '/\[link\=(.*?)\](.*?)\[\/link\]/is',
                               '/\[url\=(.*?)\](.*?)\[\/url\]/is',
                               '/\[color\=(.*?)\](.*?)\[\/color\]/is',
                               '/\[size=small\](.*?)\[\/size\]/is',
                               '/\[size=large\](.*?)\[\/size\]/is',
                               '/\[code\](.*?)\[\/code\]/is',
                               );

       $simple_replace = array(
                               '$1',
                               '$1',
                               '$1',
                               '$1',
                               "$1",
                               "$2",
                               "$2",
                               "$2",
                               "$1",
                               "$1",
                               '$1',
                               );

       $str = preg_replace ($simple_search, $simple_replace, $str);

       return $str;

 

à vous d'en faire ce que vous voulez ;)

Link to comment
Share on other sites

  • Replies 11
  • Created
  • Last Reply

Top Posters In This Topic

  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share



  • Flux d'Activité

    1. 0

      Présentation Barbossa

    2. 3

      I18N Editor ( C# D2I Editor )

    3. 0

      Recherche un développeur pour compléter notre team pour un projet INTER

    4. 21

      Partage Populus 2.51

    5. 4

      KraizyReworked

    6. 0

      wsl2 and systemd

    7. 1

      Need Help pour WPE PRO/FAILLE - Recherche personne qualifié & rémunération.

    8. 1

      Need Help pour WPE PRO/FAILLE - Recherche personne qualifié & rémunération.

  • Recently Browsing

    • No registered users viewing this page.

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.