PDA

View Full Version : Statistics Modifications - Total Member Count Excluding Banned Members


Mosh
03-10-2008, 10:00 PM
Hack Support

This hack is obsolete and has now been discontinued, as it has now been integrated into my Banned Members Log hack - this means that while it will remain available for download and use, there will be no further updates, nor will support be provided as the thread is no longer monitored.

Please click Mark as Installed if you are using this hack.


vBulletin Version Compatibility

This hack can be used with v3.6.10 and v3.7.x. This has not been tested with earlier versions of v3.6.x, but should work.


What Does This Hack Do?

This simple hack will alter the total member count on your forum's homepage to exclude all banned members, you can optionally show the banned member count.

This hack was created because I liked the idea of this hack by Alan @ CIT, and as it was in the Modification Graveyard I had rewrite it from scratch, and I have added the option to display the banned member count (as this hack calculates it, so thought I would display that as well).

There are no file or template changes at all and is fully phrased. This generates 1 extra query on the forum homepage only.


Installation Instructions

Import ms_membercount_ex_banned.xml into vB using the AdminCP Product Manager. If upgrading then set Allow Overwrite to Yes.
In vBulletin Options > Total Member Count Excluding Banned Members. You can select if you want to display the banned member count (this is disabled by default). You can also turn this hack on or off.

Note: If you want to change the word Banned to a different word or language, you will need to edit the banned phrase.

Uninstall Instructions

Uninstall the product in vB using the AdminCP Product Manager.



Screenshots
Shown in this order:

Without the hack installed
With the hack installed and active
With the hack installed and active along with banned member count display being enabled
AdminCP options



Version History

v3.7.004 - Saturday 31st May 2008
-- Final Release
-- Changed: Partial code rewrite
-- Fixed: SQL query yet again

v3.7.003 - Thursday 29th May 2008
-- Fixed: SQL query again

v3.7.002 - Thursday 22nd May 2008
-- Changed: Version numbering
-- Fixed: SQL query
-- Added: AdminCP option

v1.0.0 - Tuesday 11th March 2008
-- Initial Release


Show Your Appreciation

Although not required, if you have enjoyed the benefits of this hack, and would like show your appreciation for my efforts, then please feel free to click on the Support Developer link and donate any amount you feel is appropriate.

Barakat
03-11-2008, 02:21 AM
works good ... thanks.

Mosh
03-11-2008, 02:57 AM
works good ... thanks.
Hi Barakat,

I noticed your forum is in Arabic, all you need to do is edit the banned phrase and change it to Arabic instead :)

Barakat
03-11-2008, 02:20 PM
done thanks again ....

Mosh
05-22-2008, 04:21 AM
Update: v3.7.002


Version numbering changed
Extra AdminCP option added
SQL Query changed

mattswanson
05-22-2008, 12:18 PM
I'm getting a negative number for total members (-132). At last count I had 138 banned users and 6690 members. Any ideas on why the math is coming out wrong?

www.kpcnews.net/fence_post - I've turned it off right now while I try to figure out what is going on.

Mosh
05-22-2008, 01:00 PM
I'm getting a negative number for total members (-132). At last count I had 138 banned users and 6690 members. Any ideas on why the math is coming out wrong?

www.kpcnews.net/fence_post - I've turned it off right now while I try to figure out what is going on.
Try this this one instead, when importing set Allow Overwrite to Yes.

Let me know if this works.

EDIT: Removed attachment

Idawg
05-26-2008, 07:32 PM
I keep getting a database error when I run it

Mosh
05-26-2008, 10:47 PM
I keep getting a database error when I run it
What database error?????? Please elaborate

MDK-Indy
05-27-2008, 04:02 AM
I keep getting a database error when I run it

Me to...

Datenbankfehler in vBulletin 3.7.0:

Invalid SQL:

SELECT COUNT(userban.userid) AS count
FROM vbuserban;

MySQL-Fehler : Unknown column 'userban.userid' in 'field list'
Fehler-Nr. : 1054
Fehler-Zeit : Tuesday, 27.05.2008 @ 07:01:00
Datum : Tuesday, 27.05.2008 @ 07:01:00
Skript : http://xxx/index.php
Referrer : http://xxx/member.php?u=1
IP-Adresse : xxx.xxx.xxx.xxx
Benutzername : Indy
Klassenname : vB_Database
MySQL-Version : 5.0.32-Debian_7etch5

lostguy
05-27-2008, 10:57 AM
Yes i got this damn error too URHHH..what a script create error for my board !

Mosh
05-29-2008, 12:22 AM
I keep getting a database error when I run it

Me to...

Datenbankfehler in vBulletin 3.7.0:

Invalid SQL:

SELECT COUNT(userban.userid) AS count
FROM vbuserban;

MySQL-Fehler : Unknown column 'userban.userid' in 'field list'
Fehler-Nr. : 1054
Fehler-Zeit : Tuesday, 27.05.2008 @ 07:01:00
Datum : Tuesday, 27.05.2008 @ 07:01:00
Skript : http://xxx/index.php
Referrer : http://xxx/member.php?u=1
IP-Adresse : xxx.xxx.xxx.xxx
Benutzername : Indy
Klassenname : vB_Database
MySQL-Version : 5.0.32-Debian_7etch5

Yes i got this damn error too URHHH..what a script create error for my board !

Update: v3.7.003


Updated SQL Query again


This should work now :)

MDK-Indy
05-29-2008, 01:28 AM
Salü,

work, but with false value.

My Forum have 28 Banned User, the hack display 1 banned User.

The registered User display changes from 1.383 to 0.383.

See the Picture.

Greetings Indy

(sorry for my english, i from germany)

Mosh
05-29-2008, 01:50 AM
Sal?,

work, but with false value.

My Forum have 28 Banned User, the hack display 1 banned User.

The registered User display changes from 1.383 to 0.383.

See the Picture.

Greetings Indy

(sorry for my english, i from germany)
NOTE: Code posted has now been removed, as the hack is fixed and works as intended in v3.7.004.

MDK-Indy
05-29-2008, 03:07 AM
Salü,

dont work.

The pluginchanges have not any effect.

greeting Indy

Mosh
05-29-2008, 12:21 PM
Sal?,

dont work.

The pluginchanges have not any effect.

greeting Indy
I will have a look again at this at the weekend, and will try to get it working, as it works fine on my testbed I am at a loss as to why it is not working :confused:

Mosh
05-30-2008, 01:18 PM
Update: v3.7.004


Re-wrote part of the code that calculates the new member total minus the banned members


This should hopefully work now...... please, please, please let it work :)

Mosh
05-31-2008, 10:21 AM
This is installed on a live forum and I can confirm it works correctly now :)

NeitherSparky
08-18-2008, 03:19 AM
This is exactly what I was looking for...I *think* it's working correctly, although according to my math it's off by two. However, I suck at math, lol. I probably messed up somewhere.

We were getting very close to 1,000 members on the front page, and I knew people would get all excited when it got to 1,000, and I'd have to explain that 80+ members are actually banned and don't count. Now I don't have to do that. Thank you very much!! :)

Mosh
08-18-2008, 11:42 AM
NOTE: This hack is obsolete and has now been discontinued, as it has now been integrated into my Banned Members Log hack - this means that while it will remain available for download and use, there will be no further updates, nor will support be provided as the thread is no longer monitored.