PDA

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


Mosh
11 Mar 2008, 04:05
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
11 Mar 2008, 04:21
works good ... thanks.

Mosh
11 Mar 2008, 04:57
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
11 Mar 2008, 16:20
done thanks again ....

Mosh
22 May 2008, 06:21
Update: v3.7.002


Version numbering changed
Extra AdminCP option added
SQL Query changed

mattswanson
22 May 2008, 14:18
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
22 May 2008, 15:00
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
26 May 2008, 21:32
I keep getting a database error when I run it

Mosh
27 May 2008, 00:47
I keep getting a database error when I run it
What database error?????? Please elaborate

MDK-Indy
27 May 2008, 06:02
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
27 May 2008, 12:57
Yes i got this damn error too URHHH..what a script create error for my board !

Mosh
29 May 2008, 02:22
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
29 May 2008, 03:28
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
29 May 2008, 03:50
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
29 May 2008, 05:07
Salü,

dont work.

The pluginchanges have not any effect.

greeting Indy

Mosh
29 May 2008, 14:21
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
30 May 2008, 15:18
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
31 May 2008, 12:21
This is installed on a live forum and I can confirm it works correctly now :)

NeitherSparky
18 Aug 2008, 05:19
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
18 Aug 2008, 13:42
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.