https://www.icyphoenix.com/viewtopic.php?f=28&t=5031&p=33808#p33808
-----------------------------------
Gianni PB
Fri 14 Nov, 2008 21:44

Exclamation Point MOD
-----------------------------------
I have installed this mod www.phpbbhacks.com/download/5908 that allows you to automatically delete uneeded exclamation points and question marks in messages. 

For example, "Question!!!!!" will be changed to "Question!" and "Who can help?????" will be changed to "Who can help?"

but "I love you...my baby" will be changed to "I love you.my baby" and this is not good :wink: 


I want change in 3 points, if there are more than 3

[code linenumbers=false]   // Exclamation point in message 
    if (preg_match("/([!?.])+/", $message)) 
    { 
        $message_array = preg_split("/n/", $message); 

        for ($x = 0; $x < count($message_array); $x++) 
        { 
                if (!preg_match("/[.*//", $message_array[$x])) // Ignore BBCode... 
                { 
                    $message_array[$x] = preg_replace("/([.])+/", "...", $message_array[$x]); 
                } 
                $message = implode("n", $message_array); 
        } 

        for ($x = 0; $x < count($message_array); $x++) 
        { 
            if (!preg_match("/[.*//", $message_array[$x])) // Ignore BBCode... 
            { 
                $message_array[$x] = preg_replace("/([!])+/", "\1", $message_array[$x]); 
                $message_array[$x] = preg_replace("/([?])+/", "\1", $message_array[$x]); 
            } 
            $message = implode("n", $message_array); 
        } 
    }[/code]


[u]P.S. Tried to post in IP Costumizations, but only mod can[/u]


