Hide banned user's post

  • Thread starter Thread starter AdminAdmin is verified member.
  • Start date Start date
Admin

AdminAdmin is verified member.

Well-Known Member
Staff member
Administrator
Sometimes our forum will spammed with lot of spam bots.
You have banned most of the bots, but they have created thousands of threads.
Deleting those threads takes time.
So while waiting those threads to be deleted, you can hide their content automatically so their content won't hurt you on SEO etc.



  • Zero additional query.
  • Tested on 4.1.11
  • I think it is supported too on previous version (4.1.x). (confirmed working on 4.1.3)




  1. Go to admincp
  2. Go to Plugins & Products >> Add New Plugin
    • Product : Vbulletin
    • Hook location : postbit_display_complete
    • Title : enter anything here, "Hide banned content", etc :)
    • Execution Order : leave at default (5)
    • PHP code :
      PHP:
      $my_banned_ids = array(8);/* Banned usergroup ids */if (THIS_SCRIPT == 'showthread') {	if (isset($post['usergroupid']) && in_array($post['usergroupid'], $my_banned_ids)) {		$post['title'] = 'User is banned';		$post['message'] = '<span style="color:#FF0000;font-weight:900">User is banned, content is deleted automatically.</span>';	}}
  3. Click "Save" button and you're done.



To disable the plugin :

  1. Go to admincp
  2. Go to Plugins & Products >> Plugin Manager
  3. Edit the plugin
  4. Set "Plugin is Active" as "No".
  5. Click "Save" button.
 

Facebook Comments

Similar threads

Admin
Replies
0
Views
5K
AdminAdmin is verified member.
Admin
Admin
Replies
0
Views
1K
AdminAdmin is verified member.
Admin
Admin
Replies
0
Views
5K
AdminAdmin is verified member.
Admin
Admin
Replies
0
Views
1K
AdminAdmin is verified member.
Admin
Admin
Replies
0
Views
3K
AdminAdmin is verified member.
Admin
Admin
Replies
0
Views
3K
AdminAdmin is verified member.
Admin
Admin
Replies
0
Views
3K
AdminAdmin is verified member.
Admin
Admin
Replies
0
Views
863
AdminAdmin is verified member.
Admin
Admin
Replies
0
Views
1K
AdminAdmin is verified member.
Admin
Admin
Replies
1
Views
797
AdminAdmin is verified member.
Admin
Back
Top