Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+4 votes
597 views
in Q2A Core by
edited by
I have banned words enabled and have tested that this works on question titles, question content and wall posts. However I have a problem that the banned words are still allowed in the outgoing emails.

For instance, a user intentionally insults another user by posting a banned word on their wall. The wall does not show the banned word, however the user still recieves the banned word in the email stating that a person has commented on their wall. This also occurs if the question/answer/comment has a banned word in it. It still shows in the email even though on the site it has * symbols replacing it.

Is there a way to enable the banned words to also be considered in outgoing emails and search results or is this a bug?
Q2A version: 1.6.2
by
I have also found that the search results show the banned words as well - even in the question title.
by
I reposted the question specifically about the search results here:
http://www.question2answer.org/qa/26751/bug-banned-words-fully-visible-in-search-results
Then later found the solution and posted the code.

2 Answers

0 votes
by
 
Best answer
Found the solution to this, I had to change a few lines in /qa-include/qa-app-emails.php:
 
$blockwordspreg = qa_get_block_words_preg();
$mailer->Subject= qa_block_words_replace($params['subject'], $blockwordspreg);
$mailer->Body=qa_block_words_replace($params['body'], $blockwordspreg);
by
Someone down voted this? That's kinda sad :( I was just trying to post how I fixed the bug using the best of my knowledge (not quite up to writing plugins yet).
0 votes
by

here is the solution for

 search results show the banned words as well and TO REMOVE below is the code

in qa-include/qa-app-search.php

find this:

if (!isset($result['title'])) {
if (isset($result['question']))
 
 
elseif (isset($result['page']))
$result['title']=$result['page']['heading'];
}
 
Change it to this:
 
if (!isset($result['title'])) {
if (isset($result['question']))
{
$blockwordspreg = qa_get_block_words_preg();
$result['title']=qa_block_words_replace($result['question']['title'], $blockwordspreg);
}
elseif (isset($result['page']))
$result['title']=$result['page']['heading'];
}

 

source: http://findoutanswer.com

by
I like your website, the findoutanswer.com.The best thing I like about your site is the way you handled the flogin. Can you share the solution with us please?
Thank you
by
Thanks..You need only FB login or all logins?
by
I mostly need FB login
by
Ok I will do it for you if you want, you can give me the access or just download facebook login plugin...Please LIKE our page https://www.facebook.com/Findoutanswers
by
I liked your page. From where I should download the facebook plugin?
by
I have asked our developer who customized the q2a for us and he told me that he has created the plugin for us..so what to do..sorry?
...