Just wondering if there is a way to block people posting links to certain sites?
ie. links to my competitors sites.
Can you block or stop certain url's from being posted in the forum?
Hi @stocksforum,
I'm sorry, but wpForo doesn't have such feature. I'd suggest you check out the alternative option. On the Dashboard > Forums > Tools > Antispam admin page, there is the "Min number of posts to be able post links" option, you can increase the value of the option, so only the trusted members will be able to attach files.
Ok. Would be useful feature to add. It's not my competitors that will post it but rather users of the site.
Hi @stocksforum,
It's hard to filter or add control to links. Currently there is a good solution in wpForo Span Control. It sets all new topics and posts unapproved if it finds some links in posts.It works for New registered users and you can control the level of new registered users in Dashboard > Forums > Tools admin page. For example you can set users is new till the 5th post.
If you need to control links for old members you should find some developer and ask to write some code for that. That code can use wpForo content filter hooks and filter links. The main content filter hook are these:
- wpforo_content_before
- wpforo_content
- wpforo_content_after
Shouldn't be very difficult. Take this code I was messing around with and modify it as appropriate.
// Modify forum Post
function apply_the_content_on_wpforo_content( $content, $post ){
if (strpos($content, 'over') !== false) {
$newcontent = 'dogs are cool';
$content = $content.'<div class="post-addon">'.$newcontent.'</div>';
}
elseif (strpos($content, 'test') !== false) {
$newcontent = 'cats are cool';
$content = $content.'<div class="post-addon">'.$newcontent.'</div>';
}
else {}
return apply_filters( 'the_content', $content );
}
add_filter( 'wpforo_content', 'apply_the_content_on_wpforo_content', 10, 2);