Jump to the post that solved this thread.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Solved: 3 Years, 11 Months ago Disabling Word Filter in Thread Subject
#1
Solved: 3 Years, 11 Months ago
Is there a way to disable word filter on thread's subject? We use word filters as easter eggs, so when someone type in a word, it will link the word to something funny. However, when someone type in a word in the subject that is filtered, this happens:

[Image: 8N8xwJw.png]
just a noob.
Reply
#2
Solved: 3 Years, 11 Months ago
Parsing it via PHP will be the best option.
Arne Van Daele - Developer


Private Support? Send me a private message
Reply
#3
Solved: 3 Years, 11 Months ago
(08-11-2015, 12:55 PM)ArneVD Wrote: Parsing it via PHP will be the best option.

How do I do that?
just a noob.
Reply
#4
Solved: 3 Years, 11 Months ago
(08-11-2015, 07:06 PM)nollidnosnhoj Wrote:
(08-11-2015, 12:55 PM)ArneVD Wrote: Parsing it via PHP will be the best option.

How do I do that?


Search for the parse code of the wordfilter, and there add an exception for the thread subjects.
Arne Van Daele - Developer


Private Support? Send me a private message
Reply
#5
Solved: 3 Years, 11 Months ago
In line 798 of forumdisplay.php the subject is parsed on bad words. Could it help when you comment this line?
Regards, Ad Bakker (NL)
Reply
#6
Solved: 3 Years, 11 Months ago
(08-11-2015, 07:24 PM)Ad Bakker Wrote: In line 798 of forumdisplay.php the subject is parsed on bad words. Could it help when you comment this line?

how to comment a php line?
just a noob.
Reply
#7
Solved: 3 Years, 11 Months ago
(08-12-2015, 01:05 AM)nollidnosnhoj Wrote:
(08-11-2015, 07:24 PM)Ad Bakker Wrote: In line 798 of forumdisplay.php the subject is parsed on bad words. Could it help when you comment this line?

how to comment a php line?

Here is all information about comments. http://php.net/manual/en/language.basic-...mments.php

Basically you put 2 forward slashes in front of the line you want to comment out.

<?php

// <- This will comment this line out.

// $parseThread = parse($Thread);
Reply
#8
Solved: 3 Years, 11 Months ago
(08-12-2015, 01:22 AM)zamight Wrote:
(08-12-2015, 01:05 AM)nollidnosnhoj Wrote:
(08-11-2015, 07:24 PM)Ad Bakker Wrote: In line 798 of forumdisplay.php the subject is parsed on bad words. Could it help when you comment this line?

how to comment a php line?

Here is all information about comments. http://php.net/manual/en/language.basic-...mments.php

Basically you put 2 forward slashes in front of the line you want to comment out.

<?php

// <- This will comment this line out.

// $parseThread = parse($Thread);

Oh that makes since.

(08-11-2015, 07:24 PM)Ad Bakker Wrote: In line 798 of forumdisplay.php the subject is parsed on bad words. Could it help when you comment this line?

I commented it out, and it worked when viewed in forumdisplay.php

but when viewing showthread.php (like the screenshot presented in the first post), it didn't work.

I tried commenting out the lines in showthread.php with the phrase (badwords) and none didn't work.
just a noob.
Reply
#9
Solved: 3 Years, 11 Months ago
(08-13-2015, 06:29 AM)nollidnosnhoj Wrote: I commented it out, and it worked when viewed in forumdisplay.php

but when viewing showthread.php (like the screenshot presented in the first post), it didn't work.

I tried commenting out the lines in showthread.php with the phrase (badwords) and none didn't work.

I hope you did not comment out line 82, because then it is better to change lines 82 and 83 into:

$reply_subject = $thread['subject'];
$thread['subject'] = htmlspecialchars_uni($reply_subject);

I left it in this way because the coding is a bit messy there, and the variable $reply_subject is used also elsewhere.

In attition  line 1141 could be commented out, although this is only for similar threads and probably not relevant here. The same yields for line 1554, which is only used for threaded view, whereas I expect you only use linear mode.

I just see now, that for showthread, the subject is parsed on bad words again in inc/functions_post.php line 166, so also this line should be commented out.
Regards, Ad Bakker (NL)
Reply
#10
Solved: 3 Years, 11 Months ago
(08-13-2015, 08:35 AM)Ad Bakker Wrote:
(08-13-2015, 06:29 AM)nollidnosnhoj Wrote: I commented it out, and it worked when viewed in forumdisplay.php

but when viewing showthread.php (like the screenshot presented in the first post), it didn't work.

I tried commenting out the lines in showthread.php with the phrase (badwords) and none didn't work.

I hope you did not comment out line 82, because then it is better to change lines 82 and 83 into:

$reply_subject = $thread['subject'];
$thread['subject'] = htmlspecialchars_uni($reply_subject);

I left it in this way because the coding is a bit messy there, and the variable $reply_subject is used also elsewhere.

In attition  line 1141 could be commented out, although this is only for similar threads and probably not relevant here. The same yields for line 1554, which is only used for threaded view, whereas I expect you only use linear mode.

I just see now, that for showthread, the subject is parsed on bad words again in inc/functions_post.php line 166, so also this line should be commented out.

Alright! I did everything, and it worked! But now I need to disable word filter on the recent post on index.php
http://i.imgur.com/NyabU5G.png

And possibly on search.php

EDIT: Alright, I think I have fixed it. Thank you so much everyone for helping !
just a noob.
Reply
Jump to the post that solved this thread.


Forum Jump:


Users browsing this thread: 1 Guest(s)