vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Statistics Modifications - vbTrends - An Enhanced Statistics Box on Forum Home (https://vborg.vbsupport.ru/showthread.php?t=143001)

rayw 04-22-2007 05:47 AM

Installed and working great on my forum, i think! :)

rayw 04-22-2007 10:11 AM

There is an option in the admincp Set this to number of previous months you want included in trend data.

If I set this to 1, will it calculate the figures based on the previous months registrations, posts, threads etc? I'm assuming that by leaving it at 6 months it uses averages based on a 6 month period?

Can anyone confirm this for me please?

Thanks :)

kiFF 04-22-2007 04:26 PM

It's not working for me. I tried it with and without auto replace. If "auto replace" is off and I add edit the template, the statistics box is empty. And if I turn "auto replace" on and leave the template unedited, it just shows the default statistics.

Ronak 04-22-2007 04:29 PM

Awesome hack ;)

Digbijoy 04-25-2007 09:38 AM

will surely install when it is out of beta stage.

I hope by that time, more features get added.

nikki712 04-25-2007 11:58 PM

Edited: I got it fixed. Great hack!

rayw 04-26-2007 04:43 AM

Quote:

Originally Posted by rayw (Post 1233276)
There is an option in the admincp Set this to number of previous months you want included in trend data.

If I set this to 1, will it calculate the figures based on the previous months registrations, posts, threads etc? I'm assuming that by leaving it at 6 months it uses averages based on a 6 month period?

Is anyone able to answer this for me please?

Thanks! :)

FreshFroot 04-27-2007 11:36 PM

Quote:

Originally Posted by kiFF (Post 1233456)
It's not working for me. I tried it with and without auto replace. If "auto replace" is off and I add edit the template, the statistics box is empty. And if I turn "auto replace" on and leave the template unedited, it just shows the default statistics.

same here.. very odd... i don't get why? could another stats hack be causing a problem or something? This hack doesn't show anything at all..

NVM... guys if it doesn't work.. MAKE SURE it is FTPed properly. Since my admincp folder is different it missed 1 file.. but anyways, be SURE everything is FTPed right.. double check it for the people that it isn't working for.

hambil 04-30-2007 06:15 PM

Quote:

Originally Posted by rayw (Post 1235628)
Is anyone able to answer this for me please?

Thanks! :)

Yes, that is how it works. Month to date average for the past x months (not including the current month, since the current month is the comparison point).

wolfe 05-03-2007 07:10 PM

heres a alteration to show the newest members in the usergroup colour

FIND: plugin manager > [vbTrends] Run Main Trends Code
Code:

        $vbtrends_newmembers_bit = '';   
        while($member = $db->fetch_array($vbtrends_last_x_joins_result))
        {
              $newuserid = $member['userid'];
              $newusername = $member['username'];
              eval('$vbtrends_newmembers_bit .= "' . fetch_template('forumhome_vbtrends_newmember_bit') . '";');
        }
    }

REPLACE WITH:
Code:

        $vbtrends_newmembers_bit = '';   
        while($member = $db->fetch_array($vbtrends_last_x_joins_result))
        {
              $newuserid = $member['userid'];
                        fetch_musername($member);
              $newusername = $member['musername'];
              eval('$vbtrends_newmembers_bit .= "' . fetch_template('forumhome_vbtrends_newmember_bit') . '";');
        }
    }

THEN FIND: plugin manager > [vbTrends] Default Last X Joins Hook
Code:

    // Last x joins
    $vbtrends_last_x_joins_result = $db->query_read("
        SELECT *
        FROM " . TABLE_PREFIX . "user             
        ORDER BY joindate DESC
        LIMIT " . $vbulletin->options['vbtrends_newmembers']
    );

REPLACE WITH:
Code:

    // Last x joins
    $vbtrends_last_x_joins_result = $db->query_read("
        SELECT username, userid, joindate, IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid
        FROM " . TABLE_PREFIX . "user AS user             
        ORDER BY joindate DESC
        LIMIT " . $vbulletin->options['vbtrends_newmembers']
    );

result atttached

asked bwt it a while bk and no response so made it my self


All times are GMT. The time now is 12:51 AM.

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.01295 seconds
  • Memory Usage 1,745KB
  • 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
  • (4)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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