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 Statistic Version 1.01 (https://vborg.vbsupport.ru/showthread.php?t=65924)

PcFreak 06-06-2004 10:00 PM

vb3 Statistic Version 1.01
 
vb3 Statistic

Many people had ask me when i release this hack?

The problem is, my english is bad and its hard for me, write a installations text.
So everyone feel free to help me with the instructions.

A live demo you found:
http://at-lantis.de/statistik.php

OK. Now we come to the hack.

Please make a backup of your database, before installing this hack

This hack will show you an extra side with some Stats.

- show Summary stats
- show the Browser/Os System of the users
- show the countrys (countrys by Hoster and Countries by browserlanguage)
- show the last 10 threads
- show the last 20 top referers
- show spiders and crawlers
- Forum book of records (new)
- Statistic for the last ten days (new)

and many, many other interesting counts

Files to edit
Just one template

New files
4 new php files
6 templates
a lot (but very small) images

Database changes
six new tables

I will try to give support for this hack

BIG UPDATE ( to version 1.01)

Upload a new zipfile 11. June 2004
Reason
I have fix some bugs

The images Bhutan will show now. (If you install the old version you must change in table _statistik_laender under id 31 the flagge_link for Bhutan from images/statistik/flaggen/butan.gif to images/statistik/flaggen/bhutan.gif manuelly)
some templates are optimzed (Thank you obsidian and Zelda King)
I have modified the code for the last 10 threads (thanks go to Mystics from vBulletin Germany)
Now theads just show from the forum ids for all forums user is allowed to view.
fix some other little bugs
PcFreak

New

Statistic Version 2.0 is finish.
I will release the new version later this day.
I give no more support for the Version 1.01.

13th_Disciple 06-07-2004 10:31 AM

holy crap!

/me clicks install!

Natch 06-07-2004 10:41 AM

Quote:

Originally Posted by 13th_Disciple
holy crap!

[high]* 13th_Disciple clicks install![/high]

I concur!

[high]* Natch also click's install ...[/high]

Giveit2u43 06-07-2004 10:56 AM

looks amazing... thanks a lot, this blows my own little stats hack out of the water...

paratek 06-07-2004 11:58 AM

Amazing....installs no problem, hopefully someone will take on the translation to English

Logik 06-07-2004 12:43 PM

When this is made to english, i will install

chet 06-07-2004 12:59 PM

Ditto

Chet

PcFreak 06-07-2004 01:12 PM

I will translate the templates and countrynames, later this day.
I promise it

Give me just some hours to do this.

Thank you PcFreak

Princeton 06-07-2004 01:25 PM

Good job :up:

Can you get browser window (size) statistics?

Beermonster 06-07-2004 01:25 PM

I have seen something simular to this on another forum, only not as much info, I will install this when it's in English, thanks :)

PcFreak 06-07-2004 01:34 PM

Quote:

Originally Posted by princeton
Good job :up:

Can you get browser window (size) statistics?

And a plugin statistic, too. :rolleyes:

It?s possible. But just with java.
But the most user have java not activated.

PcFreak

Beermonster 06-07-2004 01:35 PM

OK I couldn't wait :)

MindTrix 06-07-2004 03:23 PM

I got some free time so i would give a translation a shot if you would like? Also the file is not in the first post to be downloaded, was that intentional until the english translation?

nexialys 06-07-2004 04:35 PM

don't translate hardcoded, put everything in language phrases, so we can all share and translate to our own languages, please!

Natch 06-07-2004 05:30 PM

Also it's a great hack, but you should code according to Web standards - those tempaltes will not validate :(

Intex 06-07-2004 05:33 PM

Great hack PCFreak - I'll wait for the English version too.

Natch 06-07-2004 05:42 PM

One other suggestion: is ther any chance that there can be an importer for the stats from Bane's vBStats ?

Beermonster 06-07-2004 05:46 PM

I've converted the templates to English, and also the countries names in the php file (well most of them :) ) although the countries names aren't showing right on my forum, but that could be because it hasn't updated yet.

Thanks for the hack pcfreak, hope you don't mind me translating it, sometimes when you convert German to English it kinda looses it's meaning, hopefully I've got the meaning right :)

13th_Disciple 06-07-2004 06:10 PM

Quote:

Originally Posted by Natch
Also it's a great hack, but you should code according to Web standards - those tempaltes will not validate :(

picky.. :p

get back to work on vBwar..

btw, just kidding on that web standards bit.. i don't want folks biting my head off for being like Microsoft.. :(

PcFreak 06-07-2004 06:47 PM

Quote:

Originally Posted by Beermonster
I've converted the templates to English, and also the countries names in the php file (well most of them :) ) although the countries names aren't showing right on my forum, but that could be because it hasn't updated yet.

Thanks for the hack pcfreak, hope you don't mind me translating it, sometimes when you convert German to English it kinda looses it's meaning, hopefully I've got the meaning right :)

Thank you very mutch Beermonster
PcFreak

insanctus 06-07-2004 06:51 PM

Looks interesting, I will click install and try her out.

bigreefer 06-07-2004 07:09 PM

Sorry but i Have many SQL Errors.

one example
Code:

SQL-Befehl : 

CREATE TABLE _statistik_zaehler(

Zaehler_f?r varchar( 80 ) NOT NULL default '',
Summe int( 10 ) NOT NULL default '0',
PRIMARY KEY ( Zaehler_f?r )
) TYPE = MYISAM COMMENT = 'Zaehler f?r Hits, Besucher, ect...'

MySQL meldet:


#1064 - You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near '?r varchar(80) NOT NULL default '',
          Summe int(10) NOT NULL

don?t use ? ? ? :)

I have change it to "ue" but if I go to http//www.mydomain.de/statistik.php
It shwow me this

Code:

Datenbankfehler in vBulletin 3.0.1:

Ungueltige SQL-Abfrage:
                        UPDATE  _statistik_zaehler
                        SET Summe = Summe+1
                        WHERE Zaehler_f?r  = 'Anzahl_der_Besucher'
               
mysql error: Unknown column 'Zaehler_f?r' in 'where clause'

mysql error number: 1054

Datum: 07.06.2004 22:21:13
Skript: http://www.celebritymarkt.de/statistik.php
Referer:
Benutzername: Snatch
IP-Adresse: 213.23.58.187

I have change Zaehler_f?r to Zaehler_fuer in all files. No it runs and Big clicks install :)

bigreefer 06-07-2004 07:32 PM

I have one more problem,

the statistik line is too long, is there a way to make this short ?
I must scroll very mutch, thas not so good :disappointed:

PcFreak 06-07-2004 07:47 PM

@bigreefer

you have forgot this spell " ;" after ect...'; <-

PHP Code:

CREATE TABLE _statistik_zaehler (
          
Zaehler_f?r varchar(80NOT NULL default '',
          
Summe int(10NOT NULL default '0',
          
PRIMARY KEY  (Zaehler_f?r)
        ) 
TYPE=MyISAM COMMENT='Zaehler f?r Hits, Besucher, ect...'

The other problem.
Search in statistik.php for
PHP Code:

    $alle_avantars    =    number_format($alle_avantars['avantar']);                                    //Alle Benutzer mit Avantar 

replace it with
PHP Code:

    $alle_avantars    =    intval($alle_avantars['avantar']);                                    //Alle Benutzer mit Avantar 

and found
PHP Code:

    $alle_profilpics    =    number_format($alle_profilpics['profilpic']);                            //Alle Benutzer mit Profilbild 

replace it with
PHP Code:

    $alle_profilpics    =    intval($alle_profilpics['profilpic']);                            //Alle Benutzer mit Profilbild 

I hope this will help.

PcFreak

PcFreak 06-07-2004 08:28 PM

Some database don´t work with Umlauds (Ä,Ö, Ü) ect.
I had change a little bit code and the querys witch has use umlauts (Zaehler_für is now Zaehler_fuer)
Sorry for this mistake (zip.file is update)

Logikos 06-07-2004 08:32 PM

/me installs!!!

Thanks!!!

Vivi Ornitier 06-07-2004 09:42 PM

where's sms.php????

Vivi Ornitier 06-07-2004 09:44 PM

actually now that i look at the statistik.php code, those changes were already made but it is still stretching the tables.

PcFreak 06-07-2004 10:25 PM

Quote:

Originally Posted by Vivi Ornitier
actually now that i look at the statistik.php code, those changes were already made but it is still stretching the tables.

Whitch table is stretching ?
I think i can hlep. :o

PcFreak

PS; Sorry, i mean statistik.php

templates911 06-08-2004 12:23 AM

Is there any way this would work with vB 3.0? I havn't upgraded yet and dont plan to until more changes are made that what was in the last upgrade.

Vivi Ornitier 06-08-2004 12:55 AM

templates911: I'm runnin it on vb3.0.0 and it's fine besides the table stretching

PcFreak: It's the same tables in those screenshots, it's the avatar tables.

http://forums.squareultima.com/statistik.php

PcFreak 06-08-2004 01:46 AM

I have fix this problem
Udate the zip.file very soon
PcFreak

58sniper 06-08-2004 02:37 AM

Okay, one problem I had was the referer links were fairly long, and were pushing the 'referer summary' box off the screen to the right. Here's how I fixed it:

in statistik.php, find
Code:

$referer_summe        = $top_referer['Zaehler'];
and paste this underneath:
Code:

$referer_short = substr($referer_adresse,0,50);
and then, in the statistik_referer template, replace the entire thing with
Code:

<tr>
<td class="alt2" valign="top">
&nbsp;<a href="$referer_adresse">$referer_short</a>&nbsp;($referer_summe Visitor(s))
</td>
</tr>

Also, the font surrounding the copyright doesn't match everything else. In the statistik_hauptseite template, I changed

Code:

<font face="Times New Roman">? by PcFreak</font>
to

Code:

? by PcFreak
although I don't see the reason for the copyright to appear so many times...

see my example (I've cleaned up some other things as well - just to suite my taste)

one thing that I'm still working on is the location that's reported in online.php. Currently, if you're viewing statistik.php, online.php reports "LOCATION UNKNOWN" with a link to statistik.php.

PcFreak 06-08-2004 02:58 AM

To show the statistic in online.php

Open the file includes/functions_online.php
find
PHP Code:

        default:
            if (
$permissions['wolpermissions'] & CANWHOSONLINEBAD)
            { 

above add
PHP Code:

// ##### Statistik Start #####
        
case 'statistik':
            
$userinfo['action'] = 'View the statistic and think about Winston Churchill';
            
$userinfo['where'] = "<a href=\"statistik.php\">$vboptions[bbtitle] Statistik</a>";
            break;
// ##### Statistik Ende ##### 

find
PHP Code:

    default:
        
$userinfo['activity'] = 'unknown';
    }

    return 
$userinfo

above add
PHP Code:

// ##### Statistik Start #####
    
case 'statistik.php':
        
$userinfo['activity'] = 'statistik';
        break;
// ##### Statistik Ende ##### 

Thats all

@58sniper

Your Stats looks nice.
I have no problem with the copyright. One ?PcFreak on you side is enough. (make me a little bit proud :cool: )

Thank you for this mod

PcFreak

58sniper 06-08-2004 03:29 AM

Thanks. I've made that change (among others), and it's working fine.

Great hack!

Also, something else that some might like:


in the navbar template (in some themes, this could be in the header template instead):

find
Code:

<if condition="$show['admincplink']"><a href="$admincpdir/index.php?$session[sessionurl]">$vbphrase[admin]</a> -</if>
and replace with

Code:

<if condition="$show['admincplink']"><a href="$admincpdir/index.php?$session[sessionurl]">$vbphrase[admin]</a> - <a href="$vboptions[bburl]/statistik.php?$session[sessionurl]">Statistics</a> -</if>
that will put a link to the statistics down at the bottom along with the link for your admincp. Just a thought.

gmarik 06-08-2004 06:15 AM

Rather simple. Add most visitors @ hour ...

PcFreak 06-08-2004 12:26 PM

Do not referer you own domain.
In statsitik_counter find
PHP Code:

// Der User hat einen Link auf dem Board angeklickt, dann wird nichts eingetragen.                    
    
if (strpos(strtolower($DER_REFERER), 'at-lantis.de') === false)
    { 

Replace 'at-lantis.de' with your own domain. Example: 'my-domain.net'

So your own links are not showing in the top referer part.

PcFreak

Mijae 06-08-2004 03:30 PM

A question before I install this...how many queries does this generate? On statistik.php? How many queries does it add to other forum parts, if any?

PcFreak 06-08-2004 04:05 PM

Quote:

Originally Posted by Mijae
A question before I install this...how many queries does this generate? On statistik.php? How many queries does it add to other forum parts, if any?

On my statistics site (i have some futures more) the hack (the statistik.php) generate 35 queries. But most of them just select counters.

Here is the time for my statistik.php

Page generated in 0,42463 seconds with 35 queries,
spending 0.0515158176422 doing MySQL queries and -0.0515158176422 doing PHP things.



There are no other queries to other forum parts

PcFreak

snyx 06-08-2004 06:25 PM

Quote:

Originally Posted by PcFreak
I hope this will help.

PcFreak

anyway to dump the browser stats and add "max user online, top reffers, top viewed threads, top replied threads" plus other board based stats?

this was the ultimate stat page, anyway to mod one like this..
https://vborg.vbsupport.ru/showthread.php?t=41421


All times are GMT. The time now is 04:49 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.01449 seconds
  • Memory Usage 1,854KB
  • 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
  • (9)bbcode_code_printable
  • (10)bbcode_php_printable
  • (7)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
  • (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