Notifications
Clear all

wpForo 1.x.x [Closed] Is there a way to block links to competitor sites?

10 Posts
5 Users
1 Likes
2,129 Views
StocksForum
Posts: 135
Topic starter
(@stocksforum)
Estimable Member
Joined: 6 years ago

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?

9 Replies
Sofy
Posts: 4308
 Sofy
Admin
(@sofy)
Support Team
Joined: 6 years ago

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. 

StocksForum
Posts: 135
Topic starter
(@stocksforum)
Estimable Member
Joined: 6 years ago

Ok. Would be useful feature to add. It's not my competitors that will post it but rather users of the site.

1 Reply
Sofy
 Sofy
Admin
(@sofy)
Joined: 6 years ago

Support Team
Posts: 4308

This will be taken into consideration for future releases. 

Robert
Posts: 10503
Admin
(@robert)
Support Team
Joined: 8 years ago

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
Posts: 5
(@apollo)
Active Member
Joined: 6 years ago

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);

 

Page 1 / 2