Log in

View Full Version : Keeping banned members out of the membership total


snowbird
06-16-2006, 01:44 PM
The DB we are using has hundreds of banned members. We would like these banned accounts to NOT be included in the membership total. The CP can't do it..... anyone have a suggestion? Thanks!

Alan @ CIT
06-18-2006, 12:44 AM
Hi,

I've knocked something together which should do what you want:

https://vborg.vbsupport.ru/showthread.php?t=118922

It adjusts the Member count on the forum homepage to take account of Banned users.

Thanks,
Alan.

snowbird
06-19-2006, 12:59 PM
Thank you, but I use 3.5.4 and it did not install :cry: Database error in vBulletin 3.5.4:

Invalid SQL:

### INSERT QUERY GENERATED BY fetch_query_sql() ###
INSERT INTO plugin
(`active`, `executionorder`, `title`, `hookname`, `phpcode`, `product`)
VALUES
('1', '5', 'Exclude Banned Users', 'forumhome_complete', '// Count the number of banned users\r\n$banned_count_q = \"SELECT count(userid) AS banned_count FROM \" . TABLE_PREFIX . \"userban\";\r\n$banned_count_a = $vbulletin->db->query_first($banned_count_q);\r\n\r\n// Update the totals\r\n$numbermembers = vb_number_format($vbulletin->userstats[\'numbermembers\'] - $banned_count_a[\'banned_count\']);', 'cit_exclude_banned_users');

MySQL Error : Unknown column 'executionorder' in 'field list'
Error Number : 1054
Date : Monday, June 19th 2006 @ 07:54:38 AM
Script : http://www.MYDOMAINDELETEDFORPRIVACY.com/forums/admincp/plugin.php
Referrer :
IP Address : 24.50.113.222
Username : MYUSERNAMEDELETEDFORPRIVACY
Classname : vb_database

Alan @ CIT
06-19-2006, 01:01 PM
To get it to install on 3.5.4, edit the XML file in the zip, and find "executionorder="5" and delete it :)

Save the XML, then try installing it agian.

Thanks,
ALan.

snowbird
06-19-2006, 01:31 PM
This time it installed but it does not function properly. The number of members dropped by 36, which, probablbly not coincidently, is the sum of members in two seperate other non-banned usergroups. The hundreds of banned members still remain included in the total.

Alan @ CIT
06-19-2006, 03:32 PM
It just counts all the rows from the "userban" table. How have to banned your members?

Thanks,
Alan.

snowbird
06-20-2006, 12:43 PM
If you are asking how we ban members, we view their profile in the cp, we select Ban User from the Quick User Links, and that's where you select which banned usergroup they go into, when the ban is lifted, and the Reason to show the user, then click Ban User.

Alan @ CIT
06-20-2006, 12:46 PM
ok, leave it with me, I'll adjust the the way it works so that it's based on banned usergroups, rather than the userban table.

Thanks,
Alan.

snowbird
06-29-2006, 12:47 AM
Any progress on the adjustment?

snowbird
07-09-2006, 04:11 PM
Guess that's a no. :(