Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #11  
Old 07-12-2013, 07:38 PM
maupassant maupassant is offline
 
Join Date: Feb 2009
Posts: 59
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

O.K. I have never added a new plugin before, but I think I understand what I need to do, except for one thing : "Execution Order : Use this field to enter the order in which code at the same hook will be executed". I notice a 5 already displayed by default. Do I leave the 5 there or do I change it for another number ?
Reply With Quote
  #12  
Old 07-12-2013, 11:39 PM
maupassant maupassant is offline
 
Join Date: Feb 2009
Posts: 59
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

O.k. I tried with "5".

Here are screenshots without the plugin and with the plugin. So not only do we not see the Posts Per Day but we are also losing the thanks given via the Post Thank You hack.
Attached Images
File Type: png Without pugin.png (60.7 KB, 0 views)
File Type: png With plugin.png (49.0 KB, 0 views)
Reply With Quote
  #13  
Old 07-13-2013, 05:48 AM
CAG CheechDogg's Avatar
CAG CheechDogg CAG CheechDogg is offline
 
Join Date: Feb 2012
Location: Riverside, California USA
Posts: 1,080
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great thanks kh99 and Simon.

And maupassant , just create the plugin and activate it, you will see it take effect right away.
Reply With Quote
  #14  
Old 07-13-2013, 06:44 AM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by maupassant View Post
O.k. I tried with "5".

Here are screenshots without the plugin and with the plugin. So not only do we not see the Posts Per Day but we are also losing the thanks given via the Post Thank You hack.
That means there is something wrong with the plugin you're creating. I just tried the code again and it seems to work, so make sure what you're putting in the "Plugin PHP Code" box is exactly what I posted above.

Normally you would just leave the execution order at 5 as Cheech Dogg said, but in this case if you want the posts per day to come before the thanks, you could try a number lower than 5.
Reply With Quote
  #15  
Old 07-13-2013, 06:49 AM
CAG CheechDogg's Avatar
CAG CheechDogg CAG CheechDogg is offline
 
Join Date: Feb 2012
Location: Riverside, California USA
Posts: 1,080
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I tried it with 1 through 5 and it displayed on all of them of course in different order.

Make sure the plugin is activated , by default the plugin is checked to not be active.

--------------- Added [DATE]1373702023[/DATE] at [TIME]1373702023[/TIME] ---------------

kh99 can I ask you here how I would display the total amount of new threads created every 24 hours in the forum stats?

I can start a new thread for that but it's in the stats family like this question and the OP might benefit from this stat display too.

Thank you ahead of time.
Reply With Quote
  #16  
Old 07-13-2013, 05:54 PM
maupassant maupassant is offline
 
Join Date: Feb 2009
Posts: 59
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oh, this is so weird. I tried it again kh99, and now it works, but the calculation of the PPD is way wrong. See here my own stats. My real PPD average is 32.84 and it says 0.03 in POSTBIT.
Attached Images
File Type: png Screenshot_1.png (32.5 KB, 0 views)
File Type: png Screenshot_2.png (68.8 KB, 0 views)
Reply With Quote
  #17  
Old 07-13-2013, 06:03 PM
maupassant maupassant is offline
 
Join Date: Feb 2009
Posts: 59
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'd like to try Simon LLoyd's plugin, but could someone please re-upload it with the correction he suggested (because I don't understand what he says I have to correct). Thanks to all, BTW.
Reply With Quote
  #18  
Old 07-13-2013, 06:37 PM
Simon Lloyd's Avatar
Simon Lloyd Simon Lloyd is offline
 
Join Date: Aug 2008
Location: Manchester
Posts: 3,481
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by maupassant View Post
Oh, this is so weird. I tried it again kh99, and now it works, but the calculation of the PPD is way wrong. See here my own stats. My real PPD average is 32.84 and it says 0.03 in POSTBIT.
One of those states you have 35k posts and the other 15k???
Reply With Quote
  #19  
Old 07-13-2013, 07:03 PM
maupassant maupassant is offline
 
Join Date: Feb 2009
Posts: 59
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

53,004 posts in both pictures.
Reply With Quote
  #20  
Old 07-13-2013, 07:25 PM
Simon Lloyd's Avatar
Simon Lloyd Simon Lloyd is offline
 
Join Date: Aug 2008
Location: Manchester
Posts: 3,481
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

My apologies

here's mine with the round incorporated
PHP Code:
$postdays $vbulletin->db->query_read("SELECT joindate,posts FROM " TABLE_PREFIX "user WHERE userid = $post[userid]");
{
$mpostdays $vbulletin->db->fetch_array($postdays);
        
$jd time()-$mpostdays['joindate'];
$mpsts round($jd/$mpostdays['posts']/86400);

You'll have to use KH99s use of hook to add it to the template or add $mpsts where you want the value to display. Remember I haven't tested this!!!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:51 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.04339 seconds
  • Memory Usage 2,291KB
  • Queries Executed 14 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (4)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • postbit_attachment
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete