vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   User Forum Activeness Hack v1.0 (https://vborg.vbsupport.ru/showthread.php?t=43116)

wolfe 09-04-2002 10:02 PM

not working properly not showing in Getinfo template :(

wolfe 09-04-2002 10:03 PM

i mean it is now showing anything to do with activity in the getinfo template below Posts :(

PsYc 09-18-2002 08:13 AM

i found an error according to your hack

if a member has 0 Posts, but he or she posts in a forum which doesn't count any posts you get a division by zero

Warning: Division by zero in /is/htdocs/62144/www.yourdomain.com/board/vb/member.php on line 1620

on that line i got this:

$f_posts = floor(($t_post[ppforum] / $userinfo[posts]) * 100);

but i think it has to do with the full code in there

hope you'll find a clue for this

g-force2k2 09-18-2002 01:12 PM

wolfe make sure you have the $forumactive variable in the getinfo template...

PsYc open the getinfo template find:

PHP Code:

    $f_posts floor(($t_post[ppforum] / $userinfo[posts]) * 100); 

replace it with:

PHP Code:

    if($t_posts[ppforum] > 0) {
             
$f_posts floor(($t_post[ppforum] / $userinfo[posts]) * 100);
            } else {
               
$f_posts 0;
            } 

that should do the trick... regards...

g-force2k2

dong 09-18-2002 01:15 PM

nice hack :)

maybe it would be nice if it would also calculate most active forum of thread starts of a user

g-force2k2 09-18-2002 01:27 PM

dong haven't tested it yet... but give it a shot :p regards...

g-force2k2

dong 09-18-2002 01:45 PM

nice :)

but some typo ORDER BY ppforum should be ORDER BY tforum


and the procentage stays on 0
cos (($t_thread[tforum] / $userinfo[posts]) * 100) is not right i think
maybe (($t_thread[tforum] / $userinfo[threads]) * 100) is better

g-force2k2 09-18-2002 01:53 PM

oh yea whoops :p

the first change is correct.. but you have to add in this query too ;)

PHP Code:

$threads $DB_site->query_first("
  SELECT COUNT(threadid) AS total
  FROM thread
  WHERE postuserid='
$bbuserinfo[userid]'");
$userinfo[threads] = $threads[total]; 

regards ;) just add this query above the others...

g-force2k2

dong 09-18-2002 02:06 PM

jup
and this line:
PHP Code:

if(!$t_post[tforum]) { 

should be:
PHP Code:

if(!$t_thread[tforum]) { 

nice addon :D
thx

dong 09-18-2002 03:10 PM

Quote:

Originally posted by g-force2k2

PHP Code:

$threads $DB_site->query_first("
  SELECT COUNT(threadid) AS total
  FROM thread
  WHERE postuserid='
$bbuserinfo[userid]'");
$userinfo[threads] = $threads[total]; 


it should be:
PHP Code:

$threads $DB_site->query_first("
  SELECT COUNT(threadid) AS total
  FROM thread
  WHERE postuserid='
$userinfo[userid]'");
$userinfo[threads] = $threads[total]; 

otherwise it uses the total threads of the user that is checking the profile ;)


All times are GMT. The time now is 04:50 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.01147 seconds
  • Memory Usage 1,748KB
  • 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
  • (7)bbcode_php_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