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)

paulmjno 12-22-2004 05:46 AM

Quote:

Originally Posted by Lethal
can you add this to a VBAdvanced module block? like the quick stats block but have all of these stats instead?

Amen.

Boofo 12-22-2004 06:11 AM

Quote:

Originally Posted by paulmjno
Amen.

Why the Amen? Have you installed this hack?

Gemma 12-22-2004 08:46 AM

Anyone know how I would go about add Total Games and Most Played Game stats from the ibproarcade for vb hack?

Boofo 12-22-2004 09:53 AM

Quote:

Originally Posted by darkworld
Anyone know how I would go about add Total Games and Most Played Game stats from the ibproarcade for vb hack?

The updated version I am getting ready to release has just what you are looking for in it. It also has the Champion of the most played game and their score. Click the install button and when I get the text file all put together and tested, I will send out the update email for it. In the meantime, I have that running on my site if you want to check it out. ;)

TwinsX2Dad 12-22-2004 03:11 PM

Will it include the same for v3arcade?

Quote:

Originally Posted by weitalia
Frzzy thanx so much,this semms to be perfect!!
I just make little change,for not loose the VB Number feature ;)
In root/index.php find:
PHP Code:

$totalthreads vb_number_format($totalthreads);
$totalposts vb_number_format($totalposts); 

Above it add:
PHP Code:

$totalt $totalthreads;
$totalp $totalposts

Go forward in index.php and find:
PHP Code:

$statscache['topstarterid'] = intval ($topstarter[postuserid]);
$statscache['topstartercount'] = intval ($topstarter[count]); 

Under it add:
PHP Code:

$statscache['topposterpercent'] = round(($topposter[posts] / ($totalt $totalp)) / 102);
$statscache['topthreadspercent'] = round(($topstarter[count] / $totalt) / 102); 

This works perfect to me,and all thanx goes to Frzzy!

;)

Caused a zero percentage, in the Top Poster, for me. The 'Most Viewed Profile' also doesn't work, showing '0 Views'

Brent H 12-22-2004 06:54 PM

Great hack, but I'm getting this:

Threads: 291 (5 Today), Posts: 2,756 (27 Today), Thread Views: 25,485
Total Registrations: 78, Active Registrations: 61
There has been 1 new post since your last visit, TheHeggy.
Top Poster: TheHeggy (488 Posts = 166.55%)
Top Thread Starter: TheHeggy (101 Threads = 34.71%)
Top Referrer: TheHeggy (8 Referrals)
Most Viewed Profile: TheHeggy (0 Views)
A warm welcome goes out to our newest member, Test Account.

What can be done to correct this?

Boofo 12-22-2004 07:45 PM

There has been a fix for that in this thread already. ;)

Boofo 12-22-2004 07:49 PM

Quote:

Originally Posted by TwinsX2Dad
Will it include the same for v3arcade?

I'm sure we can include that also. I used to run v3Arcade and had the query there. ;)

Quote:

Caused a zero percentage, in the Top Poster, for me. The 'Most Viewed Profile' also doesn't work, showing '0 Views'
You need to run the query for the most viewed profile and do the member.php edit and look at a couple of profiles other than your own and it will start showing up. ;)

Moncal 03-07-2005 05:00 AM

This hack has almost every thing I need. Thanks a lot. I had a problem with the percentage of top poster only. And I couldn't figure it out even after reading this thread. I finally fixed it by rewriting the statement, now it is off by about 4 tenths of a percent and I really couldn't care less. :)

PHP Code:

$statscache['topposterpercent'] =  round(($topposter[posts] / ($totalposts)/10), 2); 


Boofo 03-07-2005 05:15 AM

Quote:

Originally Posted by Moncal
This hack has almost every thing I need. Thanks a lot. I had a problem with the percentage of top poster only. And I couldn't figure it out even after reading this thread. I finally fixed it by rewriting the statement, now it is off by about 4 tenths of a percent and I really couldn't care less. :)

PHP Code:

$statscache['topposterpercent'] = round(($topposter[posts] / ($totalposts)/10), 2); 


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. ;)

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 :)

Mijae 04-06-2005 11:45 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. ;)

Still waiting for the next release :P

Brandon Sheley 05-28-2005 05:20 AM

installed. had a few bugs, but with some searching i was able to figure things out :) thank you for the mod

red_baron2000 05-29-2005 05:18 PM

on forum stats it show on my forum i have 1002 total registred members so far so good ..but then it show also 700 active members and 302 not active! my questions are :

1) how do i know who those innactive members are?
2) how does the hack assig"innactive to a member?" is there some settings in the acp or php files?
3) is it possible to desable this feature if yes then how?

thank you very much for the help .

Boofo 05-29-2005 05:24 PM

Quote:

Originally Posted by red_baron2000
on forum stats it show on my forum i have 1002 total registred members so far so good ..but then it show also 700 active members and 302 not active! my questions are :

1) how do i know who those innactive members are?
2) how does the hack assig"innactive to a member?" is there some settings in the acp or php files?
3) is it possible to desable this feature if yes then how?


thank you very much for the help .

The inactive members are members you have deleted from your site for whatever reason. The active members are the actual members you have.

red_baron2000 05-29-2005 09:44 PM

is there a way to desactivate it? it is somehow confusing? thank you :)

Boofo 05-30-2005 05:09 AM

Quote:

Originally Posted by red_baron2000
is there a way to desactivate it? it is somehow confusing? thank you :)

It's not confusing at all.

Just don't enter the code for that in the template if you don't want it to show.

Vindicare 08-07-2005 04:19 PM

Any chance of a 3.5 release for this?

I was a great fan of this hack, but it doesn't (seem to) work with 3.5 anymore.

Boofo 08-07-2005 04:22 PM

Quote:

Originally Posted by Vindicare
Any chance of a 3.5 release for this?

I was a great fan of this hack, but it doesn't (seem to) work with 3.5 anymore.

Yes, there is a version being worked on now. ;)

iiyoN 08-16-2005 01:04 PM

Hi , I installed the hack and got the percentages right
Code:

$statscache['topposterpercent'] = round(100 *($topposter[posts] / $totalp), 2);
$statscache['topthreadspercent'] = round(100 * ($topstarter[count] / $totalthreads), 2);

worked fine for me.

but one small thing is weird .. i changed into debug mode , added new setting - but only 3 blank options appeared , so i wasn't able to fill in all things mentioned in the install text.
thus I have a problem in the vbulletin options. The "forum home stats cache update" setting shows up without info - can't change the update time.

would be nice if anyone could tell me if this could be solved.
it's just a minor thing cause everything else works fine.
Update time is set to 10 by default and the date and time showing up in the stats is correct.

regards
iiyoN

loonytune15 08-30-2005 04:04 PM

g'day was wondering if the update for this hack was ready yet? Or was it released elsewhere and i missed it?

dreck 10-09-2005 11:43 PM

Quote:

Originally Posted by Boofo
Yes, there is a version being worked on now. ;)

Cool, you are the man!

Thanks, dreck

weitalia 12-29-2005 06:47 PM

Quote:

Originally Posted by Boofo
Yes, there is a version being worked on now. ;)

So we'll wait ;) Great man!

;)

Thug 12-30-2005 12:32 AM

hi i want to uninstall this hack ive done all template edits n php ones,but how do i remove the queries


All times are GMT. The time now is 01:36 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.03258 seconds
  • Memory Usage 1,873KB
  • 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
  • (1)bbcode_code_printable
  • (2)bbcode_html_printable
  • (13)bbcode_php_printable
  • (18)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (33)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