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)

Mijae 03-27-2004 01:43 PM

It still says 155 threads is 15500% :P

Boofo 03-27-2004 01:49 PM

Ok, try taking this completely out and let me know what it does.

PHP Code:

$statscache['topthreadspercent'] = vb_number_format($statscache['topthreadspercent'], 2) . '%'


Mijae 03-27-2004 02:36 PM

Did nothing...

What I noticed tho is that the part that says "There has been X posts since your last visit" part dissapeared.

Edit: I edited index.php again, and readded the template, but the above part still won't show up. I dont know whats wrong.

Owen 03-27-2004 02:46 PM

the percentages in your forumdisplay hack seem to be fine, whats different about these?

Boofo 03-27-2004 02:50 PM

Quote:

Originally Posted by Mijae
Did nothing...

What I noticed tho is that the part that says "There has been X posts since your last visit" part dissapeared.

Edit: I edited index.php again, and readded the template, but the above part still won't show up. I dont know whats wrong.

This code for the percentages has nothing to do with that. That will only show up if there have been new posts since your last visit to the board. Check the code in the index.php file to make sure you didn't do anything there when testing the percentage code.

Boofo 03-27-2004 02:54 PM

Quote:

Originally Posted by Owen
the percentages in your forumdisplay hack seem to be fine, whats different about these?

Believe it or not, they are the same code. ;)

Ok, if you want to try something, i "may" have stumbled on to a fix. let's cross our fingers and try this again. ;)

Replace:

PHP Code:

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

with:

PHP Code:

$statscache['topthreadspercent'] = vb_number_format(($topstarter[count] / $totalthreads) * 1002) . '%'

and take out:

PHP Code:

    if (($statscache['topthreadspercent'] % 10) == 0)
        
$statscache['topthreadspercent'] = vb_number_format($statscache['topthreadspercent']) . '%';
    else
        
$statscache['topthreadspercent'] = vb_number_format($statscache['topthreadspercent'], 2) . '%'

You will have to set the update time to 0 and refresh the stats. Do it once or twice and see if that fixes our problem. Let me know as soon as possible so i can either bang my head against the wall or post the rest of the fixes. ;)

Mijae 03-27-2004 03:04 PM

Nope, it refuses to change :-\ Still says 15500% :(

Mijae 03-27-2004 03:06 PM

Also, the stuff that dissapeared wont come back, I've rehacked several times now and it still wont show up!

Boofo 03-27-2004 03:13 PM

Did you write this before or after the pm you just sent me?

Mijae 03-27-2004 03:20 PM

Quote:

Originally Posted by Boofo
Did you write this before or after the pm you just sent me?

Before.

maggie 03-27-2004 07:22 PM

Thanks, Boofo! :D

Boofo 03-27-2004 07:36 PM

You're very welcome there, young lady. ;)

calvinnguyen 03-27-2004 07:47 PM

where I can inster Query to run it when execute SQL queries from Admin CP can't run it. I don't know why I didn't have option to run it when I own my server.

Boofo 03-27-2004 07:56 PM

Have you tried to run the first query from the admin CP? It will run just fine there. ;)

djohn 03-28-2004 09:02 AM

How can I add the "There have been X visits to this page since ***" to my stats?
Also, is there a way to get back the cell on the left with the stats.gif image? I tried doing it myself, but the tables got all messed up.

djohn 03-28-2004 09:10 AM

There's also a bug in the way that opera displaye the stats tables. See the screenshot.
The top tables is Currently Active Users, the middle one is the stats table after installing your hack, and the bottom one is the Latest Threads hack table.

Boofo 03-28-2004 09:16 AM

Ok, try changing the colspan for the hack to 5 and see if that fixes it.

djohn 03-28-2004 09:20 AM

In fact, the tables got a little bit more messed up (both IE and Opera). See another screenshot. Some line appeared at the bottom of the stats block, that wasn't there before, also, how can i decrease the width between the title of the stats block, and the actual stats block?

See screenshot

djohn 03-28-2004 09:22 AM

Nope, didn't fix it.

Boofo 03-28-2004 09:24 AM

Quote:

Originally Posted by djohn
How can I add the "There have been X visits to this page since ***" to my stats?
Also, is there a way to get back the cell on the left with the stats.gif image? I tried doing it myself, but the tables got all messed up.

The x visits to my page is another hack that I made that I just added to my version of this hack. That was the only screenshot I could take at the time and that hack was included by mistake. ;)

I will see about adding the left column back in for those who want it in the next day or so. Will that work?

Boofo 03-28-2004 09:27 AM

Quote:

Originally Posted by djohn
In fact, the tables got a little bit more messed up (both IE and Opera). See another screenshot. Some line appeared at the bottom of the stats block, that wasn't there before, also, how can i decrease the width between the title of the stats block, and the actual stats block?

See screenshot

This picture here looks like it is supposed to except for the line (as you call it) which can be fixed very easily.

Owen 03-28-2004 09:45 AM

Its probably just a <tr><td></td></tr> with the class of the td being thead.

How is the fix for the percentages doing? And that visits to this page since?

Boofo 03-28-2004 09:51 AM

I think that last picture looks like it is supposed to, don't you?

The percentages is still a mystery at this point. I am waiting to hear from someone on a possible reason why it is messing up on larger boards. I will let you know as soon as I know. ;)

For this:

Quote:

And that visits to this page since?
Post #180 of this thread explains that. I messed up the screen shot with another hack. ;)

djohn 03-28-2004 09:52 AM

Right, i've removed the picture for now, how can i fix that "line" (don't know what you guys'd call it, but it's still a line to me :D) though?

Update: the "line" is gone after removing
Code:

        <if condition="$birthdays == '' AND $upcomingevents == ''">
        <tr><td class="thead" style="line-height: 0; padding: 0; margin: 0;" colspan="6"><img src="$vboptions[cleargifurl]" alt="" width="1" height="12" /></td></tr>
        </if>

from the template, but I guess it's not right to do, because it seems to me that this chunk of code does something ;). Should I edit it somehow to fix my "line problem", and put it back into template?

djohn 03-28-2004 09:57 AM

Yeah, the last one is fine exept for the "line"
The picture in this post: https://vborg.vbsupport.ru/showpost....&postcount=176 is the way that Opera displays the right side of the stats blocks. Look closely at the very right side of the tables.

Boofo 03-28-2004 09:58 AM

Nope, you did it right. Since you have the threads hack below that one, you don't need that piece of code now. All that did was add a pretty blue line along the bottom to close it off nicely when you don't have anything else below this hack.

See? You're a hacker now. Good job! ;)

Owen 03-28-2004 09:58 AM

Quote:

Originally Posted by Boofo
I think that last picture looks like it is supposed to, don't you?

The percentages is still a mystery at this point. I am waiting to hear from someone on a possible reason why it is messing up on larger boards. I will let you know as soon as I know. ;)

For this:



Post #180 of this thread explains that. I messed up the screen shot with another hack. ;)

I know that, but I requested it... It's something I would like to have if possible.

Boofo 03-28-2004 10:00 AM

All I can say is make the colspan for this hack the same as the others in your template and see if that fixes it.

Boofo 03-28-2004 10:03 AM

Quote:

Originally Posted by Owen
I know that, but I requested it... It's something I would like to have if possible.

And I'd like to have ... no, I won't go there. ;)

If you want to add another table and 2 extra queries (1 to update the cache and 1 to update the table) on your forumhome during the cache update, I'd be more than happy to give you what you need for that. ;)

Owen 03-28-2004 10:22 AM

hmmm. Is that a lot of extra load on the server?

Boofo 03-28-2004 10:38 AM

Not really since the queries only run when updating the cache. It all depends on how you are about queries, I guess. They don't bother me as much as some others since my board doesn't have a lot of traffic yet. On vB2 I was running around 36 queries at all times on my forumhome where with vB3 I run around 13 from the cache and 26 on a cache update. That sounds like a lot but it is still better than it used to be. I'm not a query conscious as most people are, I guess. ;)

Owen 03-28-2004 10:49 AM

I think I'll get that microstats thing to count my queries first then...

Boofo 03-28-2004 11:10 AM

That's why I didn't include it in the hack and why I said the screenshot was a mistake. ;)

Owen 03-28-2004 11:17 AM

oh I dont have that many queries going, so go ahead gimme the code please!

djohn 03-28-2004 12:08 PM

Quote:

See? You're a hacker now. Good job!
[high]* djohn is proud of himself
[/high]
Quote:

All I can say is make the colspan for this hack the same as the others in your template and see if that fixes it.
I tried changing the colspan to different values (from 6 to 5) in all colspan's within your hack, in apparently, it made absolutely no difference whatsoever in Opera or IE... :ermm:

Boofo 03-28-2004 01:24 PM

No, I meant change the hack colspans for this hack to the same thing as the other ones are for that area of the template. ;)

Boofo 03-28-2004 01:49 PM

Ok, guys, let's try this code and see if it fixes our percentage problems.

Change the line that has this in it:

PHP Code:

$stats['activepercent'

to the following:

PHP Code:

if($stats['activepercent'] > 100

$statscache['activepercent'] = vb_number_format(($numbermembers $newuserid) * 100 1000) . '%'

else 

$statscache['activepercent'] = vb_number_format(($numbermembers $newuserid) * 1002) . '%'


and let me know if this takes care of it.

Owen 03-28-2004 02:04 PM

I can't find $stats['activepercent'] in my code or in the txt installation file...

djohn 03-28-2004 02:06 PM

wow, j00 rock!
got it all fixed!

Now, i have a racther liking-type question. If you look, the legend (Last updated at 04:04 PM - March 28th, 2004) is quite fate from the "line"m where it says "Forumname Statistics". Is there a way to squish them closer together?

Boofo 03-28-2004 02:10 PM

What is fixed?

And no, there's no way to do that. Look at the advanced search box and you will see that is how the panels work in vB3. Sorry. ;)


All times are GMT. The time now is 06:30 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.02205 seconds
  • Memory Usage 1,837KB
  • 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
  • (6)bbcode_php_printable
  • (10)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
  • (40)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