PDA

View Full Version : Profile Enhancements - ZH - % Of Forum Posts


Ziki
12-02-2006, 10:00 PM
This modification was brought to you by
KXDesign
http://www.kxdesign.com/


~Hack name
% Of Forum Posts Lite

~Hack description
Shows in profile how many % of the forum posts an user posted.

~Hack options

On/Off
Decimal places


~Hack info
File uploads: 0
Template edits: 0
Templates: 0
File edits: 0
Plugins: 1
SQL Queries: 0
Phrases: 5
Settings: 2

Install time: 3 sec
Install level: Easy

~Hack installation

Step 1: Import Product



~Hack screenshots
None


~Hack copyright
This may not be distributed,released or claimed as your work without author's permission.

Ziki
12-03-2006, 03:25 PM
Reserved

MrPHD
12-03-2006, 03:31 PM
Installed and Work Nice. Thanks

Ziki
12-03-2006, 03:32 PM
This was inspired by IPB forums and Zero's 3.5 hack :)

ktp101
12-03-2006, 04:00 PM
installed, thanks :)

Ziki
12-03-2006, 04:02 PM
Glad you like it :)

projectego
12-03-2006, 06:28 PM
Nice work. :)

bada_bing
12-03-2006, 09:22 PM
Couple questions.. Will this work for 3.5.x and is there any screen shots

Ziki
12-03-2006, 09:30 PM
There is a 3.5 version made by Zero Tolerance

mktrilogy
12-03-2006, 10:40 PM
is it possible that the percentage be the number of threads open to the number of threads replied? thats as to discourage leechers.

Bounce
12-03-2006, 11:50 PM
All the info on my forum is wrong

I have one user thats made Total Posts: 269 (0.77 posts per day) | (71% Of Total Forum Posts)

Yet another thats made Total Posts: 8,663 (5.44 posts per day) | (2% Of Total Forum Posts)

Isnae right me thinks lol

Any ideas ??

Distance
12-04-2006, 09:43 AM
Yeah i spoke to him on msn about this... apparently i have 80000% of the forum posts haha :p

Ziki
12-04-2006, 01:11 PM
Strange this will be fixed tonight :)

Distance
12-04-2006, 01:16 PM
What you said last night lol.. anyway looking forward to the next release :p

Ziki
12-04-2006, 01:24 PM
Last night it was 2.00 AM for me :)

Ziki
12-04-2006, 01:28 PM
1.0.1 released
There was one extra line which just broke the hack.Works okay now.

Guest210212002
12-04-2006, 02:19 PM
Not working correctly on my 3.6.3:


Total Posts: 7,515 (16.06 posts per day) | (0% Of Total Forum Posts)

Distance
12-04-2006, 02:38 PM
lol its gone the wrong way now.. i think you should change it to BETA release :p

da420
12-04-2006, 03:13 PM
1.0.1 released
There was one extra line which just broke the hack.Works okay now.

Now it's even more broken. I have 8,000some posts in an less than 90,000 posts forum, and it shows 0% in my profile. The previous one worked just fine.

Distance
12-04-2006, 03:34 PM
Total Posts: 1,121 (25.95 posts per day) | (0% Of Total Forum Posts)

Still dodgy

Ziki
12-04-2006, 05:10 PM
sorry,will be fixed in 20 minutes

Ziki
12-04-2006, 05:28 PM
1.0.2 released
Fixed for good and added new option :)

haris_led
12-04-2006, 05:48 PM
I have 322 posts, in a forum of 12.592 posts, and it says: 2.557,18% Of Total Forum Posts
Well, this is not ok :p

Ziki
12-04-2006, 07:04 PM
try this one and tell me if it works

haris_led
12-04-2006, 07:13 PM
now, another member that has 1.392 posts, has 0,01% Of Forums Total Posts lol :)

da420
12-04-2006, 07:20 PM
1.0.2 released
Fixed for good and added new option :)

Very good. Thanks. ;)

Ziki
12-04-2006, 07:26 PM
Will give it a fix tommorow.Too late night for me now :D

Barakat
12-05-2006, 04:06 AM
thanks again and again for ur simple and nice hacks

Distance
12-05-2006, 08:41 AM
lol this should be working with release 205.4 :p

It looks good.. maybe ask ZT for some support.. i have him on my msn

Ziki
12-05-2006, 11:08 AM
The one posted above is ZT's one.But as someone said it doesn't work either :-/.Will give it a look later cause my charger got broken and I am outta battery on my laptop :-/

Distance
12-05-2006, 05:04 PM
ZT's hack was for version 3.5.X

dilbert
12-06-2006, 09:41 PM
Hi Ziki, is this working now?

krazycivik
12-07-2006, 01:53 AM
nice hack.. anyways it can be displaid on the forums belove here avatr? like how many posts in a day they make :) % wise

Ziki
12-07-2006, 04:40 PM
This works on some boards and on some not.The people who have the problems please post your PHP version :)

Bounce
12-07-2006, 08:25 PM
please post your PHP version :)

PHP Version 4.4.4

haris_led
12-07-2006, 10:21 PM
same here, php version 4.4.4 :)

iran.gs
12-07-2006, 10:34 PM
waste of time it did not work

dilbert
12-08-2006, 12:40 AM
please post your PHP version :)
4.4.1

da420
12-08-2006, 03:40 AM
waste of time it did not work

Maybe post something a bit more constructive that the hack author can use? Like, oh, I dunno, your problem? This isn't very encouraging to coders when you are posting this line of BS in others hacks, especially when they are providing them for free, and taking their time to do what they can to get it working for everyone who wishes to use them.

Thanks Ziki, works well on my forum. Very nice little hack.

Ziki
12-08-2006, 09:59 AM
Is there somebody on 5.x.x php version?I use that one but on my site I use 4.4.4 too and works very well.Are there some other hacks using the same hook?If yes tell me some of them

dilbert
12-12-2006, 01:22 AM
Any update?

Ziki
12-12-2006, 01:36 PM
Is there somebody on 5.x.x php version?I use that one but on my site I use 4.4.4 too and works very well.Are there some other hacks using the same hook?If yes tell me some of them

Read previous post :).Need more info

Bounce
12-12-2006, 06:11 PM
What are we looking for ?

EDIT: If your meaning hook location "member_complete" I have no other hacks that I can see using this hook

Kayden
12-12-2006, 06:30 PM
Total Posts: 280 (3.69 posts per day) | (28,000.0% Of Total Forum Posts)
Way off.

Ziki
12-12-2006, 06:49 PM
What are we looking for ?

EDIT: If your meaning hook location "member_complete" I have no other hacks that I can see using this hook


and your php version?

Viper007Bond
12-12-2006, 10:01 PM
Imported, but it changed nothing. :(

http://forums.finalgear.com/member.php?u=3

Running PHP 4.4.0.


EDIT: Nevermind! Apologies, I forgot that I had to add the template to the exclusion list of the plugin based template caching that I have installed. ;)

EDIT #2: The number is off though. It seems to be close on my account, but is totally off on others. Example: http://forums.finalgear.com/member.php?u=7101

23/368969 = 6.2335860194216858326851307291398e-5 so that's where the 6.25% is coming from is my bet.

Bounce
12-13-2006, 12:38 AM
and your php version?

4.4.4 posted before

Ziki
12-13-2006, 06:16 AM
I found a fix!Will fix it very soon.

Ziki
12-13-2006, 06:47 AM
1.0.3 released

Fixed :)

Ziki
12-13-2006, 07:16 AM
1.0.4 released

Fixed a small typo

Viper007Bond
12-13-2006, 07:27 AM
Not working. :(

Posts: 369,143
Total Posts: 11,374 (9.65 posts per day) | (0.00% Of Total Forum Posts)
Total Posts: 23 (0.04 posts per day) | (0.01% Of Total Forum Posts)

Ziki
12-13-2006, 07:29 AM
Did you try version 1.0.4?Or 1.0.3?

haris_led
12-13-2006, 07:49 AM
not working on me either..
posts 12.969
for me: 339 posts, 2,6% Of Total Forum Posts
another user: 1.448 posts, 0,0% Of Total Forum Posts
another user: 937 posts, 7,2% Of Total Forum Posts
i have the latest version, 1.0.4 :(

Viper007Bond
12-13-2006, 07:51 AM
I tried 1.04.

I think the problem is that $userinfo['posts'] contains commas and such. It's number formatted.

Try this:

$unformattedpostcount = str_replace(array(',', '.', ' '), '', $userinfo['posts']);

EDIT: Yeah, that makes it work. :)

Ziki
12-13-2006, 09:03 AM
If anybody reports that working I will implement it.Thank you.

Ziki
12-13-2006, 09:20 AM
1.0.5 released

Fix provided by Viper007Bond.Hopefully it works now :D

ninjamaster
12-13-2006, 09:29 AM
thanks m8

Ziki
12-13-2006, 11:56 AM
So it works?

haris_led
12-13-2006, 02:58 PM
not for me

the same, nothing changed :(

Bounce
12-13-2006, 04:01 PM
Version 1.0.5 not for me

Total Posts: 2,147 (1.38 posts per day) | (0.00% Of Total Forum Posts)

Viper007Bond
12-13-2006, 10:20 PM
Well here's the code I'm using (I was testing and ended up coding my own for testing purposes):

cache_ordered_forums(1);
$viper_totalposts = 0;

if (is_array($vbulletin->forumcache))
{
foreach ($vbulletin->forumcache AS $forum)
{
$viper_totalposts += $forum['replycount'];
}
}

if ($viper_totalposts != 0)
{
$viper_postcount = str_replace(array(',', '.', ' '), '', $userinfo['posts']);

$viper_percent = vb_number_format(($viper_postcount / $viper_totalposts) * 100, 2);

$viper_postsperday = construct_phrase($vbphrase[x_posts_per_day], $postsperday);

$viper_searchfor = '(" . construct_phrase("$vbphrase[x_posts_per_day]", "$postsperday") . ")';
$viper_replacewith = '(" . construct_phrase("$vbphrase[x_posts_per_day]", "$postsperday") . ", $viper_percent% of total forum posts)';

$vbulletin->templatecache['MEMBERINFO'] = str_replace($viper_searchfor, $viper_replacewith, $vbulletin->templatecache['MEMBERINFO']);
}

It seems to work correctly.

Some examples (of ~370000 total posts):

http://forums.finalgear.com/member.php?u=3
http://forums.finalgear.com/member.php?u=7101
http://forums.finalgear.com/member.php?u=1125

haris_led
12-13-2006, 11:29 PM
Ziki, i noticed that if the user has more than 1000 posts, it shows 0.0%.
I changed my posts from admincp from 350->1000 and it shows 0.0.
Then changed to 999 and it is ok.
:)

Invalid ID
12-14-2006, 12:27 AM
Installed but can't see it working in postbit.

da420
12-14-2006, 12:54 AM
Installed but can't see it working in postbit.

Doesn't show in your post bit.

Viper007Bond
12-14-2006, 04:47 AM
Ziki, i noticed that if the user has more than 1000 posts, it shows 0.0%.
I changed my posts from admincp from 350->1000 and it shows 0.0.
Then changed to 999 and it is ok.
:)

The result of thousands dividers being added in. ;)

Ziki
12-14-2006, 06:59 AM
Oh.Thanks Viper now I know what I did wrong :)

Ziki
12-14-2006, 06:59 AM
1.0.6 released

Now the hacks is working for sure!

haris_led
12-14-2006, 09:43 AM
Oh yes, now it is working!!!!
Very nice and thanks for the hack :)

dilbert
12-15-2006, 10:29 AM
1.0.6 released

Now the hacks is working for sure!
Thank you.

Ziki
12-17-2006, 05:20 PM
Buenos mochas! (Or however it is said :D)

Bounce
12-20-2006, 06:25 PM
Well done looks like its working here as well

Total Posts: 8,910 (5.54 posts per day) | (2.29% Of Total Forum Posts)

Forum Posts: 388,567 looks about right LOL :)

Ziki
12-20-2006, 06:29 PM
So click install :)

Bounce
12-20-2006, 10:15 PM
So click install :)


Uninstalled as it wasn't working, re-installed ;) :)

Ziki
12-22-2006, 01:17 PM
doh nice one :D

jw00dy
02-08-2007, 06:41 AM
Cool little mod. Thank you!

Ziki
04-26-2007, 11:06 AM
You're welcome

Doctor Death
05-07-2007, 03:32 PM
This works well on my board on first install. Good job and I appreciate your efforts.

HarryBO
08-21-2007, 02:20 PM
Nice Hack, but where can I translate "% Of Total Forum Posts" in german?

Ziki
08-23-2007, 05:44 AM
Edit the plugin on the member_complete hook.It's the last bit of code.

albibak
10-27-2007, 01:07 PM
Ziki, is it possible to add this phrase, in a vb phrase?
I have a multi langage forum, and it's better to have the choice :)
Thanks in advance ;)

Brandon Sheley
10-27-2007, 02:06 PM
Isn't the default is vB ?
Please post a screen shot

thanks

albibak
10-27-2007, 02:11 PM
Loco.M, look in attachment ;)

albibak
10-28-2007, 03:11 PM
In accordance with Ziki, I post the version 1.0.7 :)
The hack is now fully phrased, with a french translation attached.

For the french translation, first import the product "zh_procent_1.0.7.xml", and then the langage "zh_procent_1.0.7._french.xml".

Enjoy

Ziki
12-13-2007, 12:12 PM
You can now translate this mod without asking

Tanapangarap
12-25-2007, 09:47 PM
To the author of the modification presented on the opening post:

Sir--

Thank you for the modification. However, I was wondering if you (or anyone reading this) could give me the privilege of knowing how to change this
Total Posts: 1,432 (1.12 posts per day) | (3.84% Of Total Forum Posts)
Find all posts by Hyperion
Find all threads started by Hyperion
to this
[code]Total Posts: 1,432
(1.12 posts per day) | (3.84% Of Total Forum Posts)
Find all posts by Hyperion
Find all threads started by Hyperion
To be sure it's clear, I'm wanting the "posts per day" and "% of total forum posts" information to lie directly under the total posts made by the user.

Please and thank you.

Regards,

Kevin

Mum
01-26-2008, 06:27 AM
Could you make this show in postbit?