vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   vb3 User Forum Activeness Hack v1.4 (https://vborg.vbsupport.ru/showthread.php?t=60100)

Curzon564 12-11-2004 08:12 PM

I also had the % problem. It seems that this happens always if your board uses . instead of , (e.g. 1.500 posts instead of 1,500 posts).

To fix this problem do the following:

Replace the original code with this modified version of buro9's Code:

Code:

// HACK : START : USER ACTIVENESS
  $show[useractiveness] = 0 ;
  if ($userinfo[posts]) {
    $forumids = implode("', '", get_noaccess_forumids());
    $tfarray = $DB_site->query_first(
    "SELECT COUNT(*) AS aposts," . TABLE_PREFIX . "forum.title AS aftitle, " . TABLE_PREFIX . "thread.forumid AS aforumid
      FROM " . TABLE_PREFIX . "thread
      LEFT JOIN " . TABLE_PREFIX . "post ON " . TABLE_PREFIX . "post.threadid = " . TABLE_PREFIX . "thread.threadid
      LEFT JOIN " . TABLE_PREFIX . "forum ON " . TABLE_PREFIX . "forum.forumid = " . TABLE_PREFIX . "thread.forumid
      LEFT JOIN " . TABLE_PREFIX . "deletionlog ON ( " . TABLE_PREFIX . "deletionlog.primaryid = " . TABLE_PREFIX . "thread.threadid AND type = 'thread' )
      WHERE " . TABLE_PREFIX . "forum.forumid NOT IN ( '$forumids' )
        AND " . TABLE_PREFIX . "thread.visible=1
        AND " . TABLE_PREFIX . "deletionlog.primaryid IS NULL
        AND " . TABLE_PREFIX . "post.userid = $userinfo[userid]
      GROUP BY " . TABLE_PREFIX . "forum.forumid ORDER BY 1 DESC LIMIT 1");
    $_activeposts = $tfarray['aposts'];
    $_activeurl = "<a href=\"forumdisplay.php?$session[sessionurl]f=".$tfarray['aforumid']."\">".$tfarray['aftitle']."</a>";
    $_activeperc = round(((implode('',explode('.',$_activeposts)) / implode('',explode('.',$userinfo['posts'])) ) * 100), 2)."%" ;
    $show[useractiveness] = 1 ;
  }
// HACK : END : USER ACTIVENESS

The only thing replaced in this modified version are 2 . instead of , in the $_activeperc line.

As this isn't my code, credits belong to buro9 for his work.

@buro9
I hope you don't mind me modifying your code.

Zachariah 01-04-2005 11:31 PM

@buro9 - post 78 -

Great fix. But, last post changed to never vs. were the member posted (all users)


Quote:

PostsTotal Posts: 1,881 (1.43 posts per day)
Last Post:

Never

Find all posts by Zack
Find all threads started by Zack

Forum Activeness Statistics
Zack is most active in the forum General with a total of 813 posts contributing to 43.22% of their total posts.

Zachariah 01-05-2005 01:53 PM

I killed:

Code:

// reputation
fetch_reputation_image($userinfo);

From: buro9 - post 78 -

doing this got back Last Post
:rambo:

themovieinsider 01-07-2005 04:56 PM

works great

Impulse 01-11-2005 01:27 PM

Hmm, I've installed this hack and run into a problem. The hack works perfectly fine on IE, I think... but I myself use firefox and don't see the changes made by the hack.

I've deleted my cookies and such, but still nothing...

help?

MajorFm.com 01-15-2005 12:51 PM

Hack worked perfectly, i had to do the percentage fix aswell... might be a idea to change the original zip...

Thanks...!

MajorFm.com 01-15-2005 12:58 PM

Is there a problem somewhere, i have just noticed...

http://img138.exs.cx/img138/6041/activehack4ht.jpg

According to that, i got 4.1%

But explain this...

The total posts in the forum is 6608 and the total i have posted there according to your hack is 410

6608 Divide 410 = 16.12

Shouldn't it be 16.1%

Please advise...

MajorFm.com 01-15-2005 01:48 PM

Oh my bad, i get it, doh...

The percentage is not the contribution to the forum, its the percentage of the users total posts... am i right?

MajorFm.com 01-15-2005 01:57 PM

Im confused again... the percentages just don't seem right!

PostsTotal Posts: 856 (8.29 posts per day)
Find all posts by Martina
Find all threads started by Martina
Forum Activeness StatisticsMartina is most active in the forum You what... with a total of 543 posts contributing to 0.01% of their total posts.

MajorFm.com 01-29-2005 03:35 PM

I still get a unreal percentage...

ElecTriK ShocKs is most active in the forum You what... with a total of 784 posts contributing to 78400% of their total posts.


All times are GMT. The time now is 09:26 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.01197 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
  • (2)bbcode_code_printable
  • (1)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