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 Forumhome Stats Cache Serialize hack v2.2 (https://vborg.vbsupport.ru/showthread.php?t=61420)

Moncal 03-07-2005 10:03 PM

Quote:

Originally Posted by Boofo
I have an update that fixes all of the percentage problems and is accurate and also has a few more items in it. I just haven't gotten the text file together yet to update it. I will try to get that going here shortly. ;)

Okay, thanks.

Just our of curiosity, why does it only count the profile views after the hack has been installed. I mean, if I had 1000 profile views before I installed the hack it would only show up as 1 if someone viewed my profile. Or is this just because I updated vB and moved it to another directory so that the URL's changed?

Boofo 03-07-2005 10:37 PM

Quote:

Originally Posted by Moncal
Okay, thanks.

Just our of curiosity, why does it only count the profile views after the hack has been installed. I mean, if I had 1000 profile views before I installed the hack it would only show up as 1 if someone viewed my profile. Or is this just because I updated vB and moved it to another directory so that the URL's changed?

Because profile views aren't counted by default. They are only counted after you run the query and only for anyone other than who the profile belongs to. If it is your profile and you are viewing it, it doesn't get counted, only when someone else views it. ;)

Moncal 03-08-2005 10:27 AM

Quote:

Originally Posted by Boofo
Because profile views aren't counted by default. They are only counted after you run the query and only for anyone other than who the profile belongs to. If it is your profile and you are viewing it, it doesn't get counted, only when someone else views it. ;)

Okay, that makes sense. Thanks.

vakvak 03-19-2005 09:55 PM

PHP Code:

// add default special templates
        
$specialtemplates array_merge(array(
            
'options',
            
'cron',
            
'forumcache',
            
'usergroupcache',
            
'stylecache',
            
'statscache'
        
), $specialtemplates); 

Parse error: parse error, unexpected '}' in /home/pcteknik/public_html/forum/includes/init.php on line 644

help pls vb 3.0.7

vakvak 03-20-2005 02:46 PM

Installation overview:
Queries to run: (2) i to apply no problem
Files to edit: (2) i to apply no problem
--index.php
--member.php
Templates to edit: (1) i to apply no problem
--forumhome
Settings to add: (1)not to know ?
--forumhomecachetime
Parse error: parse error, unexpected '}' in /home/pcteknik/public_html/forum/includes/init.php on line 644

help pls vb 3.0.7

yinyang 03-20-2005 04:43 PM

Quote:

Originally Posted by Boofo
I have an update that fixes all of the percentage problems and is accurate and also has a few more items in it. I just haven't gotten the text file together yet to update it. I will try to get that going here shortly. ;)

any new update on when the new fix may be available?

jamiepryer@hotm 03-26-2005 04:41 PM

helpppppppppppppppppppppppp
not sure what i have done wrong, but need some serious help please!!

for starters i have the following error code on my forum:

Warning: Invalid argument supplied for foreach() in /includes/functions.php on line 2991

Warning: Invalid argument supplied for foreach() in /includes/functions.php on line 2991

Warning: Invalid argument supplied for foreach() in /includes/functions.php on line 2991

http://www.sussexcarz.com/forum/upload/


plus i cant seem to find this anywhere?

*****************************
Add stats to any page and header:
*****************************
In includes/init.php

Find:
*****************************

// add default special templates
$specialtemplates = array_merge(array(
'options',
'cron',
'forumcache',
'usergroupcache',
'stylecache'
), $specialtemplates);

jamiepryer@hotm 03-26-2005 06:18 PM

this is my forum:

http://www.sussexcarz.com/forum/upload/

dcarr 04-06-2005 02:07 AM

How could I have the second top poster rather than the top poster shown? As I am admin...I have way more posts than anyone else. I would like to show the actual member with the top posts. Any idea? Thanks.

red_baron2000 04-06-2005 11:35 PM

Quote:

Originally Posted by Boofo
Ok, for those of you who have John's Excellent vB3 Arcade hack installed, here's a treat!

This addon will add a line to your Forumhome Stats to Display the Most Played Game (with a link directly to that game), the highest scorer in that game (the Champion) and his score.

Here we go!

In index.php, find:

PHP Code:

    // <!-- TOP REPUTATION -->
    
$toprep $DB_site->query_first("
        SELECT userid, username, reputation
        FROM " 
TABLE_PREFIX "user
        ORDER BY reputation
        DESC LIMIT 1
        "
); 

BELOW it add:

PHP Code:

    // <!-- TOP ARCADE GAME -->
    
$mostactive $DB_site->query_first("
            SELECT COUNT(*) as total, gamesessions.gamename, games.title, games.gameid, MAX(gamesessions.score) as score, user.username, user.userid
            FROM "
.TABLE_PREFIX."gamesessions
            INNER JOIN " 
TABLE_PREFIX "games AS games ON(gamesessions.gamename = games.shortname)
            INNER JOIN " 
TABLE_PREFIX "user AS user ON(games.highscorerid = user.userid)
            WHERE gamesessions.valid=1
            GROUP BY gamesessions.gamename
            ORDER BY total
            DESC LIMIT 0,1
        "
); 

Find:

PHP Code:

    $statscache['lastupdate'] = intval (TIMENOW); 

ABOVE it add:

PHP Code:

    $statscache['mostactivetotal'] = intval ($mostactive[total]);
    
$statscache['mostactivegamen'] = $mostactive[gamename];
    
$statscache['mostactivetitle'] = $mostactive[title];
    
$statscache['mostactivegameid'] = intval ($mostactive[gameid]);
    
$statscache['mostactivescore'] = intval ($mostactive[score]);
    
$statscache['mostactiveun'] = $mostactive[username];
    
$statscache['mostactiveid'] = intval ($mostactive[userid]); 

Find:

PHP Code:

    $statscache['topreprep'] = vb_number_format($statscache['topreprep']); 

BELOW it add:

PHP Code:

    $statscache['mostactivetotal'] = vb_number_format($statscache['mostactivetotal']);
    
$statscache['mostactivescore'] = vb_number_format($statscache['mostactivescore']); 

Save and upload.

In the forumhome template, find:

HTML Code:

                                <if condition="$show['reputation']">
                                <tr>
                                        <td nowrap="nowrap"><span class="smallfont">Top Reputation: <a href="member.php?$session[sessionurl]u=$statscache[toprepid]">$statscache[toprepun]</a> (<b>$statscache[topreprep]</b> Reputation Points)</span></td>
                                </tr>
                                </if>

BELOW it add:

HTML Code:

                                <tr>
                                        <td nowrap="nowrap"><span class="smallfont">Most Active Arcade Game: <a href="$vboptions[bburl]/arcade.php?do=play&gameid=$statscache[mostactivegameid]">$statscache[mostactivetitle]</a> (<b>$statscache[mostactivetotal]</b> Total Plays -- Champion: <a href="member.php?$session[sessionurl]u=$statscache[mostactiveid]">$statscache[mostactiveun]</a> with <b>$statscache[mostactivescore]</b> Points)</span></td>
                                </tr>

Save the template.

NOTE: Don't forget to set the update time to 0 and refresh the page so the cache can get updated with the new stats. And don't forget to set it back to what you had it set at after updating the cache. ;)

You're done!
Enjoy!

any idea how to make it work also with ibproarcade? thank you :)


All times are GMT. The time now is 12:30 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.01524 seconds
  • Memory Usage 1,782KB
  • 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_html_printable
  • (7)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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