PDA

View Full Version : Show Thread Enhancements - AdminFuel - Contribution MOD


rockinaway
09-29-2009, 10:00 PM
My second modification, and I quite like it :)

This modification simply adds a percentage contribution that a user has made to your forum. It is calculated using the post counts.

Installation:

- Upload contribution_install.xml to install product

NOTE: Template edits are now done automatically during installation

Updating

If you are using versions that existed before 1.2, then you MUST remove the following from anywhere in your postbit template (or even posbit_legacy)

$contribution

This is because template edits are now automatic :)

Demo
AdminFuel (http://www.adminfuel.com)

Future Versions
I aim to add graphical representations in later versions :)

Updates:
v1.2
More precision with 2 decimal numbers
No manual template edits!

v1.1 - backward compatibility to 3.7

Remember, mark and nominate :)

Veer
09-30-2009, 08:27 PM
I like the idea, and I think you should count some other things too, like threads, album/pictures, social groups etc.

Anyway, Thanks for the nice mod :)

ChopSuey
09-30-2009, 08:50 PM
/installed & Nominated Nice one

ChopSuey
09-30-2009, 09:11 PM
Maybe should find
<div>
$vbphrase[posts]: $post[posts]
</div>
Replace with
<div>
$vbphrase[posts]: $post[posts]
<br>$contribution
</div>
So they don't stick together. ;)

rockinaway
10-01-2009, 02:43 PM
Yup, it's totally up to you, I just did a quite example :)

sphinx
10-01-2009, 07:15 PM
yeah added the br here but a simple mistake to correct,nice little mod thanks clicks install and nominated

OcR Envy
10-02-2009, 12:19 PM
Works fine with 3.7.x

you should update the product file to the lower dependency.

tlwwolfseye
10-02-2009, 01:22 PM
I just installed that Mod, and besides me not seeing it in the Forum working, though I did the template edit, nore do I see any options to it (if there are some), but I also now have an additional thing popping up in my Browser, since I am using NO SCRIPT.

Since I installed that, NO SCRIPT shows me a Script that wants to be enabled which would lead to "Coolchaser.com". Does this Mod link back to anything because that only happend after I installed it.

Its either that Mod here or its the "WHO DOWNLOADED THIS ATTACHMENT (https://vborg.vbsupport.ru/showthread.php?t=217271)" Mod that causes it. After I deinstalled both, that Script was gone. So one of these 2 Mods links back to something, wants to start a Script to another Website which is not my idea of having a Mod.

rockinaway
10-02-2009, 02:04 PM
Works fine with 3.7.x

you should update the product file to the lower dependency.

All versions? Thanks for telling me, will update in next version :)

And this modification is virtually the base code from tutorials here and just edited. There are no options in the ACP yet and so it should NOT be linking back to anything.

tlwwolfseye
10-02-2009, 02:16 PM
All versions?
And this modification is virtually the base code from tutorials here and just edited. There are no options in the ACP yet and so it should NOT be linking back to anything.

Ok, then it has to be the "WHO DOWNLOADED THIS ATTACHMENT" Mod. Its a shame.

Tanapangarap
10-12-2009, 07:19 AM
Do you know where I may find something like this compatible with 3.7.3?

rockinaway
10-12-2009, 02:34 PM
It should work with 3.7.3 already :)

Tanapangarap
10-12-2009, 09:44 PM
It should work with 3.7.3 already :)
Then the result I get is most odd. When I attempt to upload the product, I get this message:

The following dependencies were not met:

1. This product is not compatible with version 3.7.3 of vBulletin. (Compatible starting with 3.8.0 / Incompatible with 3.8.99 and greater)

ShawneyJ
10-13-2009, 01:53 AM
thank you ;)

rockinaway
10-13-2009, 06:38 PM
Then the result I get is most odd. When I attempt to upload the product, I get this message:

Should work now. Download the new zip :)

And thanks.

Tanapangarap
10-13-2009, 07:43 PM
Should work now. Download the new zip :)

And thanks.
Thank you.

I have a question about how to customize it, though:

If I add "$contribution" directly after "$vbphrase[posts]: $post[posts]" to get "$vbphrase[posts]: $post[posts] $contribution", it shows up as follows, using my account info as an example:

Posts: 1,966 Contribution: 5%

That said, I was wondering how to get it like this:

Posts: 1,966 (5%)

Regards,

Kevin

chick
10-13-2009, 08:43 PM
admin fuel when I went to your site to look my avg detected a triple threat but I still looked and have no idea what I'm suppose to look at or what this mod does?

rockinaway
10-14-2009, 02:27 PM
Thank you.

I have a question about how to customize it, though:

If I add "$contribution" directly after "$vbphrase[posts]: $post[posts]" to get "$vbphrase[posts]: $post[posts] $contribution", it shows up as follows, using my account info as an example:



That said, I was wondering how to get it like this:



Regards,

Kevin

You will have to edit the plugin. So find the 'Contribution' plugin and you just need to edit the following line:

$contribution = $vbphrase['rkw_contribution'] .' '. $calculation .'%';

Change it to:

$contribution = '('. $calculation .'%)';

Should work :)

admin fuel when I went to your site to look my avg detected a triple threat but I still looked and have no idea what I'm suppose to look at or what this mod does?

Not sure what threats you are getting - my members have not reported anything. This modification calculates the percentage of posts made by the member compared to the forum total. It is shown in the postbit template.

Tanapangarap
10-14-2009, 04:28 PM
You will have to edit the plugin. So find the 'Contribution' plugin and you just need to edit the following line:

$contribution = $vbphrase['rkw_contribution'] .' '. $calculation .'%';

Change it to:

$contribution = '('. $calculation .'%)';

Should work :)
Awesome; it works perfectly. I am very happy to finally find a version of this feature that works on 3.7. Thank you again.

One more thing: have you considered making the percentage more precise? For example, instead of 5%, you might say 5.2% or 5.02%? I remember that's how the percentage was displayed by a phpBB2 modification(back when I used that software), and for an old vBulletin modification ("ZH - % Of Forum Posts (https://vborg.vbsupport.ru/showthread.php?t=133127&highlight=ZH+-+%25+Of+Forum+Posts)") that worked for 3.6. I think it is even more interesting like that. I have no knowledge of the coding involved, so if that would take more than a minor adjustment I don't want to bother you about it.

Regards,

Kevin

rockinaway
10-14-2009, 05:48 PM
I can definitely have a look at it and update in later versions :)

Tanapangarap
10-22-2009, 03:24 AM
By the way, I noticed Contribution displays in private messages, but doesn't work there.

Devanand
12-11-2009, 03:38 PM
You should try to update plugin as Tanapangarap said, because I now have people with 1 post and people with 1500 posts that have 1%

exel
12-11-2009, 03:57 PM
Installed, thanks.

rockinaway
02-27-2010, 04:09 PM
Updated to version 1.2, 2 main changes :)

Sorry for the delay.

Tanapangarap
02-27-2010, 07:00 PM
Rockinaway?

You may remember that I requested the added "precision with 2 decimal numbers" here and at your forum. I received an email today informing me of your update. Thank you for the update. :)

rockinaway
02-28-2010, 01:46 PM
I did indeed :) And such an update was done as by demand :). No problems!

Das UndergrounD
02-28-2010, 11:16 PM
as I go I get only two digits after the point?

rockinaway
03-01-2010, 02:31 PM
Yes. That is the current setting.

Das UndergrounD
03-01-2010, 06:46 PM
How can I change it, because in my forum looks like this: http://i45.tinypic.com/30xkk1t.jpg

rockinaway
03-02-2010, 02:43 PM
That is very strange. I'd just like to know if anyone else has had this problem.

In the installation file, there is a line:

$calculation = round((($post['posts']/$counter['posts']) * 100), 2);

The 2 is the number of decimal places that the value should be rounded to.

Das UndergrounD
03-02-2010, 09:07 PM
maybe it can be any configuration of the server, which also happens to me with another mod, you know I can do?