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)

Zelda-King 02-28-2004 08:52 AM

Quote:

Originally Posted by Sadie Frost
Is this interacting with total posts on the profile for anyone else? If I comment out this hack's code in member.php, it works fine, otherwise I get like post counts of 5 for members with thousands.

I can confirm this. I have one guy with nearly 2000 posts and in his profile it says he has only 1.

I can also confirm the fix fixes the post count leaving just the percentage iffy.

ChuanSE 03-01-2004 05:45 AM

are those thousand posts also posted in hidden or restricted area's?

This hack works fine on my board tho...

RapCheck 03-27-2004 04:45 PM

alright I just installed this and everything went fine

though I'm having similar problems to other people

for most users, it seems those with 1000s+ posts their post count is cut off it seems to the first number for those with 1000s and the second number for those with 10000s (user with 13,000 is shown with post count of 13, user with 6,000 is shown with 6 posts) which in turn shows an insane % such as 60000% and so on. also seems users with 100s of posts everything shows up fine.

I've gone through this thread and not sure on what fixes if any work to solve these problems. Would be a great hack if this was cleared up...

RapCheck 04-04-2004 10:32 PM

up...

are the problems with this hack not going to be fixed?

Kevorkian 04-05-2004 07:22 AM

Quote:

Originally Posted by RapCheck
up...

are the problems with this hack not going to be fixed?

with a total of 1929 posts contributing to 64300% of their total posts. lol ^^ i think there are some bugs
i have this problem not only on administrator but also smod and normal user

buro9 04-05-2004 10:08 AM

Quote:

Originally Posted by Kevorkian
with a total of 1929 posts contributing to 64300% of their total posts. lol ^^ i think there are some bugs
i have this problem not only on administrator but also smod and normal user

Yes, I wish all the fixes would be rolled up into the installer too... come on hacker! Do your stuff.

Anyhow, your numbers are being formatted with commas... strip them out and it'll be fine :)

It only happens with users who have more than 1,000 posts yeah? ;)

Kevorkian 04-06-2004 06:51 PM

yeah the problem is this but i can't find the error ;___;

buro9 04-06-2004 07:21 PM

Ah well, break vbulletin.org procedures to publish someone's code when he should be supporting, sigh.

Here is the solution :)

You've got some code in member.php that is part of this hack... just below:
PHP Code:

{
  
$show['lastpost'] = true;
  
$userinfo['lastposttitle'] = '';
  
$userinfo['lastposturl'] = '#';
  
$userinfo['lastpostdate'] = $vbphrase['never'];
  
$userinfo['lastposttime'] = '';


And just above:
PHP Code:

// reputation
fetch_reputation_image($userinfo); 

Well, that code should ideally look like this:
PHP Code:

// HACK : START : USER ACTIVENESS
  
$show[useractiveness] = ;
  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] = ;
  }
// HACK : END : USER ACTIVENESS 

As that does the math properly and also explodes and implodes the number in the math to get round any formatting ;)

It's a great hack, and all of the solutions are in this thread... the author just hasn't kept track of it and rolled the bug fixes back into the installer to help everyone who has recently installed it.

Anyhow, that should solve it.

RapCheck 04-06-2004 07:44 PM

great! that fixed it. thanks

Natch 04-11-2004 08:59 AM

Thank you thank you thank you!


All times are GMT. The time now is 01:06 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.01959 seconds
  • Memory Usage 1,763KB
  • 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
  • (3)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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