1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Message Parser 1.0

Provides ability to change final message content when message is saved.

  1. AndyB

    AndyB Well-Known Member

    AndyB submitted a new resource:

    Message Parser - Provides ability to change final message content when message is saved.

    Read more about this resource...
     
  2. AndyB

    AndyB Well-Known Member

    Here's an example where the [ IMG ] tags would be converted to [ URL ] tags.

    PHP:
            //########################################
            // start preg_replace
            //########################################       
           
            // replace [IMG] with [URL]
            
    $messageParsed preg_replace('/\[IMG\]/i''[URL]'$messageParsed);
           
            
    // replace [/IMG] with [/URL]
            
    $messageParsed preg_replace('/\[\/IMG\]/i''[/URL]'$messageParsed);
           
            
    //########################################
            // end preg_replace
            //########################################
     
  3. The Forum Heroes

    The Forum Heroes Well-Known Member

    Will this change old posts too or only posts created after the parsed message was added?
     

Share This Page