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 Boardstatistic Version 2 (https://vborg.vbsupport.ru/showthread.php?t=66783)

eXtremeTim 12-16-2004 06:05 PM

You really should learn to use left joins. Im using them right now to start to clean up the amt of queries in the arcade addon first since it was using 92. So far I have cut 92 down to 52. thats 4 queries per game you have listed that have now been cut out. :) I now have gotten the arcade addon page down to 16 queries no matter how many games you list be it 1 or a 100. Trust me I tested it. Im going to go through and see about doing the rest of this hack and see what I can get it down to.

If the author doesnt mind. I will post my current modified file for everyone.


This is when listing 10 games on the page.

When using inner joins it generates the page in the following time.
Page generated in 0.18413091 seconds (41.08% PHP - 58.92% MySQL) with 16 queries

Now using left joins it generates the page in the following time.
Page generated in 0.28608704 seconds (26.56% PHP - 73.44% MySQL) with 16 queries

Only problem with the inner join is that you can only use the conditionals when running mysql 3.23.17

I can release both versions thats no problem.


High Stress Load Test
Original Code set to display 1000 games:
Page generated in 2.45838499 seconds (26.88% PHP - 73.12% MySQL) with 3164 queries

Optimized Code Using inner join's displaying 1000 games:
Page generated in 0.50021791 seconds (78.25% PHP - 21.75% MySQL) with 16 queries

Optimized Code Using left join's displaying 1000 games:
Page generated in 0.67386508 seconds (68.22% PHP - 31.78% MySQL) with 16 queries

PcFreak 12-17-2004 02:10 AM

Quote:

Originally Posted by eXtremeTim
You really should learn to use left joins.

Jepp.
Can you post or quote the optimized code, please?
Or better..., you release both versions with the code you used.

I am still learning php ;)

PcFreak

eXtremeTim 12-17-2004 09:22 PM

Heres the fixed version of the statistics file. Use the inner join version first and if it does not work for you then please use the left join. There shouldn't be any problems with table prefix's in the code but if there are let me know so that I can fix them. You can see my demo here of this file working. I will see about what I can do to the other pages latter on. http://www.extremechatforums.com/forums/statistik.php

Takamine334 12-18-2004 01:57 AM

Quote:

Originally Posted by PcFreak
Code:

Step 7)
=========
Now let's activate the statistics and count of visitors

Open Template "phpinclude_start" in your AdminCP

====================================================================
add the following code at the end of the template in the last line!:
====================================================================

//## vB Statistics by PcFreak Start ##

include("./statistik_counter.php");

// ## vB Statistics by PcFreak End ##

;)
PcFreak

:up:

Mark.B 12-18-2004 12:12 PM

Quote:

Originally Posted by eXtremeTim
Heres the fixed version of the statistics file. Use the inner join version first and if it does not work for you then please use the left join. There shouldn't be any problems with table prefix's in the code but if there are let me know so that I can fix them. You can see my demo here of this file working. I will see about what I can do to the other pages latter on. http://www.extremechatforums.com/forums/statistik.php

Using these I am finding the game's mini-image doesn't show up, it isn't pulling the right info as the image properties don't show a gif name. (As opposed to it being a filepath error).

eXtremeTim 12-18-2004 01:06 PM

Oh yes I fogot I made a template change also. Let me get the template for you as well. When I changed the query's it changed the variable for the miniimage.

eXtremeTim 12-18-2004 01:08 PM

Replace statistic_arcade_bit with the following html

HTML Code:

<tr>
        <td class="$bgclass"><div align="center"><img src="images/arcade/$letzte_spiele[miniimage]" alt="$spielname" width="20" height="20" border="0" /></div></td>
        <td class="$bgclass"><div align="center"><a href="arcade.php?do=play&amp;gameid=$spielid">$spielname</a></div></td>
        <td class="$bgclass"><div align="center"><a href="member.php?u=$spielerid">$spielername</a></div></td>
        <td class="$bgclass"><div align="center">$spiel_beendet</div></td>
        <td class="$bgclass"><div align="center">$spielkommentar</div></td>
        <td class="$bgclass"><div align="center">$spieleergebnis</div></td>
        <td class="$bgclass"><div align="center"><strong><a href="member.php?u=$highscorerid">$highsorename</a></strong><br />
          with <strong>$highscore</strong> Points</div></td>
</tr>


PcFreak 12-20-2004 06:06 AM

95% of my new vBulletin Boardstatistic Version 3 is finished.

Here some futures:

The new Boardstatistc Version 3
Detect vistor countries: 257
Detect Browserlanguages: 119
Detect Referer and Shortreferer (Domains)
Detect 17 different searchengines and log the keywords
Detect 291 Spider, Crawler and Searchrobots (work with the database of robots)
Detect Browser Plug Ins, resolutions, color depth, java and much more.
Show you all about the board (Topposters, most popular thread, threads without answers and many, many more)
Show all about the database (for example: show the attachment traffic and more)
More than 20 PopUps witch show more information
Found more about countries with Wikipedia (I have include a search function to the Wikimedia database)
Detect more then 50 different browser, more then 40 different os?s, WebService, and more then 20 WAP Browser
Make a systemcheck with the new Statistic (Show you all, what we can detect about your system)
a Live Demo your found here:




Now my little problem:
English is not my mother language. It?s very hard for me to translate this statistic in English.
The statistic is work with phrases. (will be imported in xml format).
All phrases are finished (not the phrases for the admincp).
Is there anybody whose want help me to translate them from german into other languages?

Would be really nicely


PcFreak

Smitty 12-20-2004 06:22 AM

Now you're gettng me excited! Will all the icons you have in your demo be part of it?

Great job!

PcFreak 12-20-2004 07:12 AM

Quote:

Originally Posted by Smitty
Now you're gettng me excited! Will all the icons you have in your demo be part of it?

Great job!

Surely.
All icons are freeware.
I found the most of them here: http://www.iconarchive.com/

PcFreak


All times are GMT. The time now is 04:59 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.01556 seconds
  • Memory Usage 1,757KB
  • 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
  • (1)bbcode_html_printable
  • (4)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