vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Profile Enhancements - ZH - % Of Forum Posts (https://vborg.vbsupport.ru/showthread.php?t=133127)

dilbert 12-12-2006 01:22 AM

Any update?

Ziki 12-12-2006 01:36 PM

Quote:

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

Quote:

Total Posts: 280 (3.69 posts per day) | (28,000.0% Of Total Forum Posts)
Way off.

Ziki 12-12-2006 06:49 PM

Quote:

Originally Posted by hIBEES (Post 1137241)
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

Quote:

Originally Posted by Ziki (Post 1137265)
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. :(

Quote:

Posts: 369,143
Quote:

Total Posts: 11,374 (9.65 posts per day) | (0.00% Of Total Forum Posts)
Quote:

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:

Code:

$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):

PHP Code:

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) * 1002);

    
$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

Quote:

Originally Posted by Invalid ID (Post 1138160)
Installed but can't see it working in postbit.

Doesn't show in your post bit.

Viper007Bond 12-14-2006 04:47 AM

Quote:

Originally Posted by haris_led (Post 1138125)
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

Quote:

Originally Posted by Ziki (Post 1138315)
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

Quote:

Originally Posted by Ziki (Post 1142372)
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 ;)


All times are GMT. The time now is 01:08 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01272 seconds
  • Memory Usage 1,799KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)bbcode_php_printable
  • (11)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete