MyBB Community Forums

Full Version: Question about the word filter
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is is possible to have the word filter (at least the mybb code) only affect post content, and not post titles? I am trying to automatically include links in user posts wherever possible. If anyone knows how to do this, I'd appreciate it if you'd share it.
Open ./inc/functions_post.php and find;
	// Dont want any little 'nasties' in the subject
	$post['subject'] = $parser->parse_badwords($post['subject']);
and Change it into;
	// Dont want any little 'nasties' in the subject
	//$post['subject'] = $parser->parse_badwords($post['subject']);
(2012-01-21, 02:20 AM)Yaldaram Wrote: [ -> ]Open ./inc/functions_post.php and find;
	// Dont want any little 'nasties' in the subject
	$post['subject'] = $parser->parse_badwords($post['subject']);
and Change it into;
	// Dont want any little 'nasties' in the subject
	//$post['subject'] = $parser->parse_badwords($post['subject']);

Wow! That was easy. thanks for your help.

I just noticed something interesting. This solution does, in fact, deal with the thread title problem, but I noticed something odd. When I test the wordfilter links using "preview," They show up as links, like they should, However, after I submit the post, the bb code is what is visible. The link actually works, but the text on the page is all mucked up. Any suggestions on why this is happening? I know this is probably not what the plugin was designed to do, but this is a very valuable option if it can be made to work properly. This could be extremely helpful for seo and forum administrators who use affiliate programs to pay the bills.
Alright. I've just about got this problem addressed. This solution removes the filter from the title of the post WITHIN the post, but it doesn't prevent the formatting from showing in the thread title ABOVE the post, or on the main page. Where would I look to stop this from happening in those locations?
I wouldn't do that, use mycode instead. There was a similar thread here:

http://community.mybb.com/thread-111943.html
I'm thinking the answer lies in functions_forumlist.php, but, not being a programmer, I'm afraid to mess with anything.
(2012-02-05, 04:37 AM)Jammerx2 Wrote: [ -> ]I wouldn't do that, use mycode instead. There was a similar thread here:

http://community.mybb.com/thread-111943.html

Sorry. I didn't see your reply before I posted again. I'll check it out. Thanks.
That totally resolves the issue! Thanks, Jammerx2.