Notifications
Clear all

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

10 Posts
5 Users
1 Likes
1,414 Views
StocksForum
Posts: 135
Topic starter
(@stocksforum)
Estimable Member
Joined: 4 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: 4057
 Sofy
Admin
(@sofy)
Support Team
Joined: 5 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. 

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

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

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

Support Team
Posts: 4057

This will be taken into consideration for future releases. 

Reply
Robert
Posts: 9278
Admin
(@robert)
Support Team
Joined: 6 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
Reply
Apollo
Posts: 5
(@apollo)
Active Member
Joined: 4 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);

 

Reply
Page 1 / 2
Share: