Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt November 11, 2024
Jon Basniak Posted July 21, 2010 Posted July 21, 2010 While playing around with the badword filter, I realized that the badword filter completely replaces the word in the post(losing the original word that was in there to begin with), is there a reason as to why this is? Or am I simply overlooking the feature? Other forum software that I've used only swapped out the badword if it was turned on for that member, so the original words were still retained.
bfarber Posted July 21, 2010 Posted July 21, 2010 It's more efficient to do it during save than runtime, and it's easier to honor the restriction that way. We need to know if the member is restricted or not, and we have that data always available during save. At runtime, however, you may need extra database queries to retrieve data for the member that originally posted the content to determine their group membership, and thusly their restrictions.
Jon Basniak Posted July 22, 2010 Author Posted July 22, 2010 It's more efficient to do it during save than runtime, and it's easier to honor the restriction that way. We need to know if the member is restricted or not, and we have that data always available during save. At runtime, however, you may need extra database queries to retrieve data for the member that originally posted the content to determine their group membership, and thusly their restrictions. Ok, that is understandable. Then why not censor the words via the browser? Like, have a script load on page load that parses the text in the post block class? I don't see how that could break on much browsers, and it really wouldn't hinder the experience for users as they would get what they want. Hmm. EDIT: By then again.. what if you have a topic with lengthy posts all on one page? Makes you wonder how well JS would put up with that. I guess the same could be said about scaling with the tag, too..
Wolfie Posted July 22, 2010 Posted July 22, 2010 I'd like the option of using regex for finding words to filter. For word replacement, could there be something of an embedded code that would get parsed/stripped when being viewed, something similar to: [badword:(word filtered):(replacement)] Then when someone goes to edit it, the filtered word could show up, but when viewed, the replacement would be shown. That way if the admin wants to see the word, they can edit the post (and cancel) or perhaps have another option show up to view the post with the original content.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.