Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
WeightedWords
WeightedWords
0
This discussion has been closed.
Comments
I tried plugging in your example, but didn't come up with a good solution. Are there any good rules writers out there?
Edit: I figured out that I could modify the query statement to exclude a particular CategoryID. Try replacing the current $query statement in both places in the default.php file and change "CategoryID <> 2" to the Category you want to exclude.
$query = "SELECT * FROM ".$this->Context->Configuration['DATABASE_TABLE_PREFIX']."Comment COM INNER JOIN ".$this->Context->Configuration['DATABASE_TABLE_PREFIX']."Discussion DIS ON COM.DiscussionID = DIS.DiscussionID LEFT JOIN ".$this->Context->Configuration['DATABASE_TABLE_PREFIX']."Category CAT ON DIS.CategoryID = CAT.CategoryID WHERE DIS.CategoryID <> 2 AND Body > ' ' AND CommentID > 1 AND Deleted = '0' AND COM.WhisperUserID = 0";
I also realized this included Whispers which should also be excluded. So I added that.
The query will probably slow down response time.
Let me know how this works.
I did a little experimenting and think the following will work. There are 2 places in the default.php that have this while loop.
while ($row = mysql_fetch_array($result)) { $postwords = strip_tags($row[7]); $string = $string.$postwords; }
Change it to look like this. I'm not real good at preg_replace and would hope that others here will check this.
while ($row = mysql_fetch_array($result)) { $postwords = strip_tags($row[7]); $xbbpostwords = preg_replace('/\[.*?\]/', '', $postwords); // to strip out bbcode $string = $string.$xbbpostwords; }