vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Posts Per Day in POSTBIT (https://vborg.vbsupport.ru/showthread.php?t=299905)

maupassant 07-12-2013 07:38 PM

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 ?

maupassant 07-12-2013 11:39 PM

1 Attachment(s)
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.

CAG CheechDogg 07-13-2013 05:48 AM

Great thanks kh99 and Simon.

And maupassant , just create the plugin and activate it, you will see it take effect right away.

kh99 07-13-2013 06:44 AM

Quote:

Originally Posted by maupassant (Post 2433425)
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.

CAG CheechDogg 07-13-2013 06:49 AM

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.

maupassant 07-13-2013 05:54 PM

1 Attachment(s)
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.

maupassant 07-13-2013 06:03 PM

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.

Simon Lloyd 07-13-2013 06:37 PM

Quote:

Originally Posted by maupassant (Post 2433515)
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???

maupassant 07-13-2013 07:03 PM

53,004 posts in both pictures.

Simon Lloyd 07-13-2013 07:25 PM

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!!!


All times are GMT. The time now is 06:58 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.01415 seconds
  • Memory Usage 1,740KB
  • 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_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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