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

Spinball 12-21-2004 01:37 PM

Quote:

Originally Posted by PcFreak
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

I was about to install version 2 but I'll wait, I think.
I'm happy to help with an English translation though I don't speak German. I am an English computer programmer, though, so I have experience of finding the shortest but most appropriate phrases. Your best guess at an English version and the ability to see where the text goes would be all that I need.

kall 12-21-2004 06:23 PM

Quote:

Originally Posted by PcFreak
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?
PcFreak

I also offer to help in this...I have a very basic understanding of german from the 2 fun years spent at school trying to learn it. :)

(I'm going away for a week or so next week though, so time would be of the essence.)

PcFreak 12-22-2004 08:55 PM

The new Statistic Version is finished.
We will begin to translate them soon.
Now we make few beta tests.
Hope i can release the new version this year.

PcFreak

Morrus 12-26-2004 11:43 AM

Is there a way for the referrers page to miss out referrers from your own domain? I have no interest in referrers from pages of my own website, only external referrers. At present, the list looks like this:

Quote:

http://www.enworld.org/forums/forumdisplay.php?f=2 (6 visits)
http://www.enworld.org/forums/index.php (3 visits)
http://www.enworld.org/forums/index.php? (2 visits)
http://www.xopy.com/friendslinks.php (2 visits)
http://www.enworld.org/forums/showthread.php?t=109893 (1 visits)
http://enworld.cyberstreet.com/showt...7b72&p=1927301 (1 visits)
http://www.enworld.org/forums/news.php (1 visits)
http://www.enworld.org/forums/forumd...0&daysprune=-1 (1 visits)
http://www.enworld.org/forums/showth...=111543&page=3 (1 visits)
http://homepages.ihug.com.au/%7Ejclu...tmediaeval.htm (1 visits)
http://www.enworld.org/forums/showthread.php?t=111727 (1 visits)
http://www.enworld.org/forums/showth...24#post1929124 (1 visits)
http://www.enworld.org/forums/newthr...newthread&f=68 (1 visits)
http://www.enworld.org/forums/showthread.php?t=108552 (1 visits)
http://www.google.fr/search?hl=fr&q=...on+shoes&meta= (1 visits)
http://www.enworld.org/forums/showth...5&page=7&pp=20 (1 visits)
http://www.enworld.org/forums/showthread.php?t=101983 (1 visits)
http://www.enworld.org/forums/ (1 visits)
http://www.enworld.org/forums/showthread.php?t=11166 (1 visits)
http://www.enworld.org/forums/showth...2&page=3&pp=20 (1 visits)
http://www.enworld.org/forums/newrep...eply&p=1929160 (1 visits)
http://www.enworld.org/ (1 visits)
http://www.enworld.org/forums/showth...7&page=2&pp=20 (1 visits)
http://www.google.com/search?hl=en&q...ite+%2BBusiest (1 visits)
http://www.rpgnow.com/
As you can see, in all that there are only 4 entries of interest, and you have to search pretty hard to find them amongst all the internal referrals!

PcFreak 12-26-2004 12:22 PM

In the admin cp under statistic settings is this point:

Quote:

Enter here your Domain.
This indication is very important. Otherwise direct accesses to the board (e.g. over favorite bookmarks etc.) are stored, as an external Link in Referers.
Use in the following format: my-domain.com without \"http://\" and without \"www.\" - only: my-domain.com"
There you can input your domain.

PcFreak

TLSNetwork 12-28-2004 09:19 AM

Just a quick question on this , Installed everything and its working fine , on install it only insalled templates into the style id1 , How do i get the templates into my other themes as well , sorry but very new to vb.

Morrus 12-28-2004 05:02 PM

Quote:

Originally Posted by PcFreak
In the admin cp under statistic settings is this point:



There you can input your domain.

PcFreak

Thanks. I hadn't noticed that got cleared when stats were reset.

I have noticed that it's impossible to reset your stats and then enter the domain in that box without a few entries from your own domain creeping in during the few seconds it takes between the two steps. No big deal.

PcFreak 12-29-2004 12:31 PM

Quote:

Originally Posted by Morrus
Thanks. I hadn't noticed that got cleared when stats were reset.

I have noticed that it's impossible to reset your stats and then enter the domain in that box without a few entries from your own domain creeping in during the few seconds it takes between the two steps. No big deal.

disabel the statistic_logging if you make a reset

In the phpinclude_start template found

Code:

include("./statistik_counter.php");
replace with
Code:

//include("./statistik_counter.php");
after the statistic reset replace the code again with:

Code:

include("./statistik_counter.php");
Thats all ;)

PcFreak

Spinball 12-29-2004 05:58 PM

Are we still on for a pre-2005 release?
I would like to start gathering stats from the start of the year.

Onkel_Tom 12-30-2004 06:55 AM

PcFreak and I are still working on the new version 3 of vB Statistic. We don't want to offer a version which is buggy like the version 2 so we testing and optimizing the code each day and if all goes well we can offer the new version 3 beginning upcoming year.

Smitty 12-30-2004 08:46 AM

Great! We look forward to it and appreciate your work!

Spinball 12-30-2004 10:31 AM

Excellent. It will be the first install of yor hack on my boards.
I love statistics.:)

eXtremeTim 01-02-2005 06:34 AM

I can not get other spiders to be picked up in the spiders list. I have added them to the functions_statistik.php file

using the following
PHP Code:

    if(ereg("googlebot"$agent)) $c_bot  "googlebot";                                                //googlebot
    
elseif(ereg("Googlebot"$agent)) $c_bot  "googlebot";                                            //Googlebot
    
elseif(ereg("BecomeBot"$agent)) $c_bot  "BecomeBot";
    elseif(
ereg("Mediapartners-Google"$agent)) $c_bot "Mediapartners-Google";
        elseif(
ereg("msnbot"$agent)) $c_bot  "msnbot"

Where else must I edit something?

PcFreak 01-02-2005 06:55 AM

Hello eXtremeTim.

Better is, you wait few days.
We will release Version 3 of the vBstatistic the next days.
The new version detect more then 290 differnt spiders correctly.

If you add new spiders in Version2 you must make inserts for them in the database, too.

for exampel
you add this spider:
PHP Code:

elseif(ereg("Mediapartners-Google"$agent)) $c_bot "Mediapartners-Google"

The new insert for this spider:
PHP Code:

        INSERT INTO statistik_spider VALUES (95'Mediapartners-Google''images/statistik/spider/new.gif''images/statistik/bar1.gif''0'

Greets
PcFreak

eXtremeTim 01-02-2005 07:03 AM

Didnt even think about that. :-/ Will v3 have the option for adding spiders?

PcFreak 01-02-2005 07:44 AM

Quote:

Originally Posted by eXtremeTim
Will v3 have the option for adding spiders?

No. The spiders are hardcodet and up-to-date.

But new spider updates are planned.
The user must exchange just one php file.
The new install routine detect the Statistic version and update the statistic tables automatically.

I think this is the best way.

PcFreak

lanoix 01-02-2005 03:41 PM

I installed it but had to translate it in french for my forum... Thank you for this hack, it works perfectly :)

Onkel_Tom 01-02-2005 03:45 PM

Quote:

Originally Posted by lanoix
I installed it but had to translate it in french for my forum... Thank you for this hack, it works perfectly :)

It would be great if you can translate our Phrases from the new version 3.0 to french. If you are interested please send me a PM with your eMail Address and I will sent you the phrases file in english to be translated in french.
So we can offer also the french language for the new version and you will get a credit on the translation page ;)

kadafi_alive 01-04-2005 12:08 PM

Anyone know how to put it on the forum? Like a link?

Smitty 01-04-2005 12:20 PM

Quote:

Originally Posted by kadafi_alive
Anyone know how to put it on the forum? Like a link?

As I remember, I edited my forumhome template. It's not very obvious, but if you click the 'graph' graphic in the 'What's Going On' block on my site it takes you to the statistics.

kadafi_alive 01-04-2005 08:07 PM

Help, how do I uninstall this hack.

I know how to modify the templates again and such but how do I reverse the mysql queries that I ran.

Any speedy reply is greatly appreciated.

PcFreak 01-05-2005 06:45 AM

@kadafi_alive
Use the uninstall_statistik_english.php from Onkel_Tom.

Download here:
https://vborg.vbsupport.ru/showpost....47&postcount=2

PcFreak

bandit022 01-06-2005 03:26 PM

i installed this a few hours ago, and double checked that i followed every step.

it is working fine with the exception of counting the number of hits, number of visitors, and no stats are showing up on the "countries of visitors", "searchbots/spiders", and "browsers/operating systems" pages.

how can i fix this?

BamaStangGuy 01-06-2005 06:04 PM

Quote:

Originally Posted by bandit022
i installed this a few hours ago, and double checked that i followed every step.

it is working fine with the exception of counting the number of hits, number of visitors, and no stats are showing up on the "countries of visitors", "searchbots/spiders", and "browsers/operating systems" pages.

how can i fix this?

You forgot to add the info in phpinclude

bandit022 01-07-2005 09:12 AM

Quote:

Originally Posted by BrentWilson
You forgot to add the info in phpinclude

no, i added it. but i'm not sure if i've added it in the right place.

here is my phpinclude template. does it look right where it's added?

Code:

// Example of how to include a seperate file:
// ob_start();
// require("yourheader.html");
// $header = ob_get_contents();
// ob_end_clean();
//vBanner made by Thain, aka Rufus69.
$file ="images.txt";
$banner = file("$file");
$b = rand(0, sizeof($banner)-1);
if ($bbuserinfo[usergroupid] == 13) {
  header("HTTP/1.0 404 Not Found");
  header("Status: 404 Not Found");
  exit;
}

$statscache = unserialize($datastore['statscache']);

<?php
    if (@include(getenv('DOCUMENT_ROOT').'/adserver/phpadsnew.inc.php')) {
        if (!isset($phpAds_context)) $phpAds_context = array();
        $phpAds_raw = view_raw ('zone:1', 0, '_blank', '', '0', $phpAds_context);
        $bannerad = $phpAds_raw['html'];
    }

?>

include("./statistik_counter.php");


BamaStangGuy 01-08-2005 12:27 AM

take your <?php ?> out

you dont need those as phpinclude doesnt need you to define it being php

That should fix it

bandit022 01-08-2005 04:13 AM

Quote:

Originally Posted by BrentWilson
take your <?php ?> out

you dont need those as phpinclude doesnt need you to define it being php

That should fix it

works like a champ now.

thanks man. :up:

TheVirus 01-08-2005 10:24 PM

Quote:

Originally Posted by PcFreak
No. The spiders are hardcodet and up-to-date.

But new spider updates are planned.
The user must exchange just one php file.
The new install routine detect the Statistic version and update the statistic tables automatically.

I think this is the best way.

PcFreak

I noticed on your site you have an english version of the new update. When can we expect to get our hands on the new release?

PcFreak 01-08-2005 11:00 PM

Quote:

Originally Posted by TheVirus
I noticed on your site you have an english version of the new update. When can we expect to get our hands on the new release?

Its not a update. ;)
Its a completely new version and i think, one of the largest Hacks that was ever written (more as 7000 Lines of code)

The Statistic Version 3 will release in the next days.
We want to publish this modification at the same time in german and english.

That is the reason why the At-lantis forum is open now.

PcFreak

rikku3978 01-09-2005 12:05 AM

Thank you for releasing this hack publically. I'll install it. ^-^;


All times are GMT. The time now is 03:42 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.03439 seconds
  • Memory Usage 1,880KB
  • 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
  • (5)bbcode_code_printable
  • (1)bbcode_html_printable
  • (3)bbcode_php_printable
  • (18)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
  • (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