The website is for sale. Check here for more information.
This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.
Removing Mycode from posts before calculating points
Hi there,

I'm trying to make it so that the mycode tags themselves are eliminated from posts so that they are not counted. I found in my forum that when posts are pasted into the rich text editor from the outside (such as from Word documents) it adds a lot of unnecessary mycode formatting which inflates points gain drastically.

I'm trying to edit this part to include mycode as well as quotes and quoted text, but I'm not well versed in regex. Would anyone be able to help me? Thank you very much in advance.

        // calculate points ber character bonus
        // let's see if the number of characters in the post is greater than the minimum characters
        $post_wo_quotes = preg_replace("/\[quote.*?\](.*?)\[\/quote\]((\s)*(\[\/quote])*)*/is", '', $post['message']);

Unfortunately you do not have sufficient rights to view replies in this thread. For full access, consider upgrading .

Users browsing this thread: 1 Guest(s)

About MyBB-Plugins

Plug Yourself into the best MyBB AddOn.

Copyright © 2009-2021 MyBB-Plugins Forums.


  • 51,000+ Posts
  • 19,000+ Members
  • 3,600+ Threads

Impressed? For sure
Check Full Stats here