Support Forum
Just tested the Profanity Filter plugin and it works like a charm, thanks! Just have a special request...
It would be just dandy if we could replace specific keywords or phrases with hyperlinked text. I tried doing this and the filter stripped out the href tag I added to the replacement word. I understand this may be difficult, or perhaps impossible, but consider this scenario, in our canine amputation support forums:
Member A posts about a helpful "ruffware harness" they found on our site.
Member B wants more info about product, but member A provided no link, and spelled the item name wrong making searching difficult.
We create Profanity filter to replace "ruffware harness" with Ruff Wear harness, link and all.
Any thoughts? Thank you for your consideration.
Simple:Press powers the Tripawds Discussion Forums.
It's better to hop on three legs than to limp on four.
The Tripawds Blogs Community is made possible by The Tripawds Foundation.
hmmm... sounds like a different plugin to me... though I can understand why you are trying to use the existing one...
but still think an auto hyperlinking plugin might not be a bad idea... can open a ticket to make note of this...
Visit Cruise Talk Central and Mr Papa's World
Thumb's up for auto-hyperlinking plugin! Just thought I'd give the filter a try to see if it passed tags since correcting spelling at the same time would be a big plus.
Thanks!
Simple:Press powers the Tripawds Discussion Forums.
It's better to hop on three legs than to limp on four.
The Tripawds Blogs Community is made possible by The Tripawds Foundation.
If you want, you could try editing the plugin... sp-profantiy-filter-admin-options-save.php... around line 12 change
$filter['replacementwords'] = sp_esc_regex(sp_filter_title_save(trim($_POST['replacementwords']), false));
to
$filter['replacementwords'] = sp_esc_regex(sp_filter_save_kses(trim($_POST['replacementwords']), false));
and then in sp-profanity-filter-components.php around line 36 change
$content = sp_filter_display_stripslashes($content);
to
$content = esc_html($content);
that is completely untested and possible the html will throw off the regex, but worth a try...
Visit Cruise Talk Central and Mr Papa's World
Thanks for the valiant attempt!
Filter content settings on admin pane saved without issue when including hyperlink tag, but interesting behavior when loading topic or adding new post...
Loading topic with existing keywords replaced by filter resulted in "Invalid Database Query", and testing filter resulted in various issues:
- odd slash-stripping behavior for URLs.
- <p> tags being added to all posts in topic
- and Polls conflict with shortcodes rendering as "Poll ID invalid"
FYI Only, happy to wait for and help test any new plugin development.
Simple:Press powers the Tripawds Discussion Forums.
It's better to hop on three legs than to limp on four.
The Tripawds Blogs Community is made possible by The Tripawds Foundation.
yeah was afraid the regex might not like that... okay, yeah, will need to wait until I can dig into... will be post 5.2 which is couple weeks away...
Visit Cruise Talk Central and Mr Papa's World
Hey, Jim... why not give this early, pre-release plugin in a shot and see if it does what you want...
Visit Cruise Talk Central and Mr Papa's World
Sweet! Thought you were busy with 5.2?
Anyway... seems to work like a charm so far. Still trying to find fault.
Been testing it in conjunction with the Profanity Filter to correct spellings and add links at same time. Only identified one issue so far:
The Profanity Filter is replacing words on the Auto-Link admin pane. But while the keyword on the left does get replaced, the link still gets added to the original word in posts. So, for example, by adding links to various spellings of the same keywords, the words get replaced but the link gets added. In this case, words in a post get replaced (is also added to PF) and a link added, so it's mainly a visual thing.
Thanks for working on this! Will report back with any other issues I might find.
Simple:Press powers the Tripawds Discussion Forums.
It's better to hop on three legs than to limp on four.
The Tripawds Blogs Community is made possible by The Tripawds Foundation.
not sure I understand the interaction with profanity filter you are referring to... can you explain further? are you replacing the same word with both plugins?
Visit Cruise Talk Central and Mr Papa's World
which do you want to run first?
find this line in the auto link plugin main file:
add_filter('sph_display_post_content_filter', 'sp_autolink_filter');
and change it to
add_filter('sph_display_post_content_filter', 'sp_autolink_filter', xx);
replace xx with 20 if you want profanity to run first... or replace xx with 7 if you want autolink to run first...
Visit Cruise Talk Central and Mr Papa's World
1 Guest(s)