Icy Phoenix

     
 


Post new topic  Reply to topic 
Page 1 of 1
 
 
Reply with quote Download Post 
Post 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


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

Code: [Download] [Hide] [Select]
   // 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("/([!])+/", ">                 $message_array[$x] = preg_replace("/([!])+/", "\1", $message_array[$x]); <", $message_array[$x]);
                $message_array[$x] = preg_replace("/([?])+/", ">                 $message_array[$x] = preg_replace("/([?])+/", "\1", $message_array[$x]); <", $message_array[$x]);
            }
            $message = implode("n", $message_array);
        }
    }



P.S. Tried to post in IP Costumizations, but only mod can
 



 
Gianni PBSend private messageVisit poster's website  
Back to topPage bottom
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.

Support us
 
Reply with quote Download Post 
Post Re: Exclamation Point MOD 
 
Moved to Icy Phoenix Customizations.
 




____________
| Icy Phoenix ColorizeIt! |
Bipolar Disorder - Not good for you and definitely not good for everyone else.
 
ChaoticSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Exclamation Point MOD 
 
found a way

Code: [Download] [Hide] [Select]
    // 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("/([.]){4,}/", "...", $message_array[$x]);
           }

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


thanks to JC!
 



 
Gianni PBSend private messageVisit poster's website  
Back to topPage bottom
Post new topic  Reply to topic  Page 1 of 1
 


Display posts from previous:    

HideWas this topic useful?

Link this topic
URL
BBCode
HTML




 
Permissions List
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events


  

 

  cron