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)

Pseudomizer 05-04-2004 09:01 PM

Hi Boofo,

i need a quick guidance in here. The field of "Most viewed Profile" is every time 0. Even if i go in my own profile with the IE and use another username with Opera and set the interval to update every 1 minute. Every time it is 0.

I searched this thread but no one had this problem before. :ermm:

Any ideas why ?

Cheers,

*clicked install even if it is installed only on the testboard yet*

Boofo 05-05-2004 01:53 AM

If you are view your own profile, it won't add views to it. I did that so someone couldn't rack up the profileviews on their own account by continually refreshing it. ;)

Try viewing someone else's profile a few times and it will show up (as long as you have the query added to the member.php, that is). ;)

Pseudomizer 05-05-2004 07:58 AM

Quote:

Originally Posted by Boofo
If you are view your own profile, it won't add views to it. I did that so someone couldn't rack up the profileviews on their own account by continually refreshing it. ;)

Try viewing someone else's profile a few times and it will show up (as long as you have the query added to the member.php, that is). ;)

Good job to prevent someone pushing up the number of views for their own profile. Now i tested with multiple users and it works.

I heading now for the install on the live board. Good job with this hack.

Cheers,

Astovidatu 05-05-2004 02:36 PM

Yea, nice job!
But i think theres an error: "Top Poster: Astovidatu (756 Posts = 142,93%)" <- hows taht possible?

Pseudomizer 05-05-2004 03:17 PM

Quote:

Originally Posted by Astovidatu
Yea, nice job!
But i think theres an error: "Top Poster: Astovidatu (756 Posts = 142,93%)" <- hows taht possible?

Perhaps you missed that part here

Just an idea.

Cheers,

Astovidatu 05-06-2004 07:39 AM

Quote:

Originally Posted by Pseudomizer
Perhaps you missed that part here

Just an idea.

Cheers,

Yep indeed, thanks. Dut now it looks like this:
Top Poster: Astovidatu (756 Posts = 0,14%)

Thats not possible either by a sum of 3000 Posts total.

Boofo 05-06-2004 07:49 AM

Quote:

Originally Posted by Astovidatu
Thanks, but now it looks like this:
Top Poster: Astovidatu (756 Posts = 142.93)
Top Thread Starter: Astovidatu (121 Threads = 23)

The same just without percentage sign.

My code:
Code:

        $statscache['newthreads'] = intval ($newestthreads[count]) ;
        $statscache['newposts'] = intval ($newestposts[count]);
        $statscache['newusers'] = intval ($newestusers[count]);
        $statscache['getthreadviews'] = intval ($getthreadviews[tviews]);
        $statscache['topposter'] = $topposter[username];
        $statscache['topposterid'] = intval ($topposter[userid]);
        $statscache['toppostercount'] = intval ($topposter[posts]);
        if($statscache['topposterpercent'] > 100)
{
$statscache['topposterpercent'] = vb_number_format(($topposter[posts] / ($totalthreads + $totalposts)) * 100 / 1000, 2 ) . '%';
}
else
{
$statscache['topposterpercent'] = vb_number_format(($topposter[posts] / ($totalthreads + $totalposts)) * 100, 2) . '%';
}
        $statscache['topstarter'] = $topstarter[postusername];
        $statscache['topstarterid'] = intval ($topstarter[postuserid]);
        $statscache['topstartercount'] = intval ($topstarter[count]);
if($statscache['topthreadspercent'] > 100)
{
$statscache['topthreadspercent'] = vb_number_format(($topstarter[count] / $totalthreads) * 100 / 1000, 2 ) . '%';
}
else
{
$statscache['topthreadspercent'] = vb_number_format(($topstarter[count] / $totalthreads) * 100, 2) . '%';
}
        $statscache['getfileviewsun'] = $getfileviews[username];
        $statscache['getfileviewsid'] = intval ($getfileviews[userid]);
        $statscache['getfileviews'] = intval ($getfileviews[profileviews]);
        $statscache['ref2'] = $ref[username];
        $statscache['topreferrerid'] = intval ($ref[userid]);
        $statscache['ref'] = intval ($ref[referrals]);
        $statscache['toprepun'] = $toprep[username];
        $statscache['toprepid'] = intval ($toprep[userid]);
        $statscache['topreprep'] = intval ($toprep[reputation]);
        $statscache['lastupdate'] = intval (TIMENOW);

and I deleted the 2 if - else statements you told.

I have a fix for all of the percentages that I am working on getting into the install file now. You might want to click the install button so when update the hack in the next few days, that you will be notified.

ImportPassion 05-08-2004 09:42 PM

Little problem here

Most Viewed Profile: 007 (0 Views)

Oh, just noticed this too...
Last updated at 07:00 PM - December 31st, 1969

After first update.

Shouldn't this default to N/A or something?

Boofo 05-09-2004 07:39 AM

Quote:

Originally Posted by 7thgenCivic.Com
Little problem here

Most Viewed Profile: 007 (0 Views)

Oh, just noticed this too...
Last updated at 07:00 PM - December 31st, 1969

After first update.

Shouldn't this default to N/A or something?

You need to set the updatetime to 0 and run it a couple of times when you first install it. The profileviews will only update when you view someone's profile and NOT your own. I don't have it counting views when the person is looking at their own profile. Look at someone else's profile a couple of times and it will show up.

ImportPassion 05-09-2004 10:58 AM

ok, i will check it out. but that profile is not mine.


All times are GMT. The time now is 10:58 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.01555 seconds
  • Memory Usage 1,749KB
  • 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
  • (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