PDA

View Full Version : Hit Counter Plus 2003


wolfe
06-12-2003, 10:00 PM
// #######################################

What It Does:

This Hack allows you to add a hit counter to your footer template and it will be on all pages where it will record a recorded hit counter for everyone and when you click on the hit counter it will display a list of the hits:

GLOBAL.PHP FIX: Here (https://vborg.vbsupport.ru/showthread.php?postid=411167#post411167)



Viewing Hit Statistics

For Admins Only:

The id of the hit.
The hit User Id.
The hit username.
The date of the hit.
The time of the hit.
Pm the hit maker.
The Script the hit was made.
The Action being used while it was made.
The Ipaddress of the hit maker.
The Resolved Ipaddress of the hit maker

For Everony Else:

The id of the hit.
The hit User Id.
The hit username.
The date of the hit.
The time of the hit.
Pm the hit maker

Viewing Hit Statistics Extra

For Admins Only:

Sort By The Script the hit was made.
Sort By The Action being used while it was made.
Sort By The Ipaddress of the hit maker.
Sort By The Resolved Ipaddress of the hit maker

Plus all of below :D

For Everony Else:

Sort By The id of the hit.
Sort By The hit User Id.
Sort By The hit username.
Sort By The date of the hit.
Sort By The time of the hit.
Pm the hit maker

page nav and stats

I have included the page nav and it will show 15 stats perpage and it will show you what page you are currently on, how many pages total and the total ammount of hits in a little stats box.



hope you all like it :D

// #######################################

wolfe
06-13-2003, 11:39 AM
View Statistics as Administrator

wolfe
06-13-2003, 11:40 AM
View Statistics as Everyone else

wolfe
06-13-2003, 11:40 AM
Hit Counter On All Pages

Boofo
06-13-2003, 11:42 AM
Interesting. How many queries does it add to each page? I have a hit counter on my forumhome but it is a simple one. Can you advance this counter just by refreshing? And can you set a number for the counter so I don't lose all that I have now? ;)

wolfe
06-13-2003, 11:45 AM
d00d really its a id hit counter so each hit has an id so really if you want i would try to make a consept where it adds them one by one like importing posts :D

snakes1100
06-13-2003, 11:49 AM
Im wondering as boofo is, how many queries does it add, has anybody tried it out on a live site yet?

Maybe ill install laterz today on the dev site, ill report back if i do boofo.

wolfe
06-13-2003, 11:50 AM
really it should only add one maybe 2 query(s) because all it is doing is inserting new in to database and loading the hits :D

paratek
06-13-2003, 12:31 PM
Paratek smacks the install.....nice hack

paratek
06-13-2003, 01:02 PM
Sorry, have to click the uninstall. Your hack stops the Signature Gallery Hack from all-The-vb from working. With your additions to the global.php, when i click on the sig.php of his hack, it comes up blank. Once i remove your global.php code, it works. If you can fix it....i'll reinstall

paratek

wolfe
06-13-2003, 01:03 PM
ok d00d looking into it now :D sorry for the bugs but theres always bugs on first releases ;)

paratek
06-13-2003, 01:35 PM
Not a problem...i love the hack. I am hoping it is just a little snag

wolfe
06-13-2003, 03:12 PM
fixed the problem but i am adding a search hits page so give me 5 mins :D

wolfe
06-13-2003, 03:27 PM
going woprk back @ 22:00 (GMT) nearly finished :D

Davey
06-13-2003, 06:34 PM
Um this is almost what I'm after.
It would be great if you could add these features:
Guest logging w/ IP etc., only admins can view the log in the admincp, options to turn it off, etc.
And I only wanted the stats for index.php hits, not every file.

Yapluka
06-13-2003, 10:05 PM
I do like this nice hack, but the "sort by..." is lost when you go to next page...
Would be nice to be able to except some files (like sig.php, for example), too.

Anyway, thanks for that !

wolfe
06-13-2003, 10:07 PM
well i am fixing bugs and hopefully making it a vb 2.*.* & vb 3.0.0 hack :D

gmarik
06-14-2003, 05:35 AM
/me thinks: nice

Maybe you could make an add-in: click analyzer... like the most clicked links and so on, the admin knows what to improove.

csidlernet
06-14-2003, 06:07 AM
This is much better then my normal stats.

Yapluka
06-14-2003, 01:12 PM
Yesterday at 04:02 PM paratek said this in Post #10 (https://vborg.vbsupport.ru/showthread.php?postid=408507#post408507)
Sorry, have to click the uninstall. Your hack stops the Signature Gallery Hack from all-The-vb from working. With your additions to the global.php, when i click on the sig.php of his hack, it comes up blank. Once i remove your global.php code, it works. If you can fix it....i'll reinstall

paratek


Same with private message : blank page :ermm:

*UFA*3M
06-14-2003, 03:48 PM
Is this gonna make my database really big?

wolfe
06-15-2003, 03:57 AM
nearly finished the vB 3.0.0 update so it will be releasd very soon just fixing the pagenav :D


here's a screen :D

zajako
06-15-2003, 08:03 AM
i made something like this but it was admin only i called it vBTracker, never released it htough.

It basicaly tied into your whos online info and recorded everything the user did as they did iot and admisn could pull up a log on what that person did.

was going to add a thing that detected how often someoen 404ed, and then pm the admin if they did it often, to prevent hackers.

but the biggest problem is this is a DB hog, it uses a lot of space in the db though it adds only 1 query a page ;)

morrow
06-18-2003, 01:03 PM
Nice hack, but like, '*UFA*3M ' mentioned... This appears to add to the database with each reload. Is there a way to cap this at say 200 - 300 then just add to the top?

wolfe
06-18-2003, 01:04 PM
what do you mean d00d ? by add to the top

because i might make it so if its the same ipaddress then just update but that won't really be a hit counter

DPoole
06-18-2003, 02:25 PM
i dont really get this or why anyone would want to know how many times showthread.php o rany other page had been hit etc
Even worse is that it will do it for each members so really in my view is collecting a lot of useless info as what can you do with it ???

If you have web space then surely u get stats with that.
Not calling the hack in any way but what is its usefulness!

morrow
06-18-2003, 04:59 PM
Today at 10:04 AM wolfe said this in Post #25 (https://vborg.vbsupport.ru/showthread.php?postid=410322#post410322)
what do you mean d00d ? by add to the top

because i might make it so if its the same ipaddress then just update but that won't really be a hit counter Lemme rephrase... Say I enter my site and the hit counter hits 200... Then maybe the oldest hits can be dropped off and new hits can be added to the top. It's a really nice hack but, Since I've installed it, I've got over 700 hits. I'll assume my database is going to keep growing.

morrow
06-20-2003, 01:29 AM
More bad news. After installing this hack, people started to complain about their PM's no longer working. Once I removed the lines out of my Global.php file, the PM's started working again.

wolfe
06-20-2003, 08:20 PM
heres the fix for that

in global.php remove all the old code you added from this hack and do the following

Find:


// parse css, header & footer ##################


and below it add:


$viewcounter=$DB_site->query_first('SELECT COUNT(*) AS hits FROM counterplus');
$totalhits=number_format($viewcounter['hits']);

eval("\$hitbit .= \"".gettemplate('hitcounterplus_counter')."\";");


then find:


checkipban();


and above add


if ($script='') {
$script=basename($PHP_SELF);
}

if ($bbuserinfo['userid']!=0) {
$DB_site->query("INSERT INTO counterplus (viewid,userid,username,dateline,script,action,ipa ddress) VALUES (NULL,'$bbuserinfo[userid]','$bbuserinfo[username]',".time().",'".addslashes($script)."','$action','$REMOTE_ADDR')");

}


that should sort it out :D

wolfe
06-21-2003, 12:01 AM
06-18-03 at 06:59 PM morrow said this in Post #27 (https://vborg.vbsupport.ru/showthread.php?postid=410415#post410415)
Lemme rephrase... Say I enter my site and the hit counter hits 200... Then maybe the oldest hits can be dropped off and new hits can be added to the top. It's a really nice hack but, Since I've installed it, I've got over 700 hits. I'll assume my database is going to keep growing.


right d00d try the fix and i will work on the cap like you requested

csidlernet
06-21-2003, 09:02 AM
sweet hack
/me hits install

subu1
06-21-2003, 01:36 PM
sorry where can i see the box, i have instell but i can't see it.

I have 2.2.8

thxx subu

subu1
06-22-2003, 08:13 AM
Where is the stats box :cry: :cry: :cry: :cry: :cry:

I want to work this beautifull Hack

can everybody help me , please

thxxxxxxxxxxxxxxxxxxxx :rambo:

wolfe
06-22-2003, 08:14 AM
if you have followed all instructions in the txt file d00d it should be in your footer template :D

subu1
06-22-2003, 09:26 AM
yes i have, here is my footer template, it's a german Board

</td>
</tr>
</table>
<a href="#top"><img src="https://vborg.vbsupport.ru/vbimages/icon_go_up.gif" border="0" alt="Nach oben springen"></a>
<!-- /content area table -->
$search_the_internet
$hitbit

<p align="center">
<normalfont><b>&lt; <a href="http://www.eselsreiter.netcheckershosting.de/board/contact.php">Kontakt</a> - <a href="$homeurl">$hometitle</a> - <a href="refer.php?s=$session[sessionhash]">Empfehlungs E-Mail</a>
<!-- - <a href="$privacyurl">Datenschutzerkl?rung</a> --> &gt;</b></normalfont>
</p>
<center>
<p align="center"><smallfont>
<!-- Do not remove this copyright notice -->
Powered by: vBulletin Version $templateversion<br>
Copyright &copy;2000 - 2002, Jelsoft Enterprises Limited.<br>
<b><font color="crimson">&copy 2002 - 2003 Esel?s Reiter TEAM</font></b>
<!-- Do not remove this copyright notice -->
$copyrighttext
<center>
</smallfont></p>
<smallfont>{getmicrostats}</font>
</center>

:(

wolfe
06-22-2003, 09:28 AM
ok d00d make sure you have followed these steps in this posts

https://vborg.vbsupport.ru/showthread.php?postid=411167#post411167

and you have a template called hitcounterplus_counter

subu1
06-22-2003, 10:06 AM
ups, i don't have this template "hitcounterplus_counter"

sorryyyy, i am verry stupid, i don't now why forgot it.

its work now, i see the box stats, but if i click that i dont see userid, hit id etc. but i see a lot of stats boxes, not more?

can you help me again :)

attachment:

wolfe
06-22-2003, 11:15 AM
make sure your hitcounterplus template looks like this


{htmldoctype}
<html>
<head>
<title>$bbtitle - Hit Counter Plus Statistics</title>
$headinclude
</head>
<body>
$header

<table cellpadding="2" cellspacing="0" border="0" width="100%" align="center">
<tr>
<td width="100%"><img src="{imagesfolder}/vb_bullet.gif" alt="" border="0" align="absmiddle"><normalfont><b><a href="index.php?s=$session[sessionhash]">$bbtitle</a> &gt; Hit Counter Plus Statistics</b></normalfont></td>
</tr>
</table>

<br>

<table cellpadding="{tableouterborderwidth}" cellspacing="0" border="0" bgcolor="{tablebordercolor}" {tableouterextra} width="{contenttablewidth}" align="center"><tr><td>
<table cellpadding="4" cellspacing="{tableinnerborderwidth}" border="0" {tableinnerextra} width="100%">
<tr>
<td bgcolor="{categorybackcolor}" align="center" colspan="$colspan"><smallfont color="{categoryfontcolor}"><b>You are currently viewing Page Number (<i>$pagenumber</i> / <i>$totalpages</i>) | There has been a total overall number of <i>$totalhit</i> hits since this hack was installed.</b></smallfont></td>
</tr>
</table>
</td></tr></table>

<br>
<smallfont>$pagenav</smallfont>
<table cellpadding="{tableouterborderwidth}" cellspacing="0" border="0" bgcolor="{tablebordercolor}" {tableouterextra} width="{contenttablewidth}" align="center"><tr><td>
<table cellpadding="4" cellspacing="{tableinnerborderwidth}" border="0" {tableinnerextra} width="100%">
<tr>
<td bgcolor="{categorybackcolor}" align="center" colspan="$colspan"><normalfont color="{categoryfontcolor}"><b>$bbtitle Hit Counter Plus Statistics</b></normalfont></td>
</tr>
<tr>
<td bgcolor="{tableheadbgcolor}" align="center"><a href="$sorturl&sortorder=desc&sortfield=viewid"><smallfont color="{tableheadtextcolor}"><b>Hit ID $sortarrow[viewid]</b></smallfont></a></td>
<td bgcolor="{tableheadbgcolor}" align="center"><a href="$sorturl&sortorder=desc&sortfield=userid"><smallfont color="{tableheadtextcolor}"><b>User ID $sortarrow[userid]</b></smallfont></a></td>
<td bgcolor="{tableheadbgcolor}" align="center"><a href="$sorturl&sortorder=desc&sortfield=username"><smallfont color="{tableheadtextcolor}"><b>Username $sortarrow[username]</b></smallfont></a></td>
<td bgcolor="{tableheadbgcolor}" align="center"><a href="$sorturl&sortorder=desc&sortfield=dateline"><smallfont color="{tableheadtextcolor}"><b>Date Viewed $sortarrow[dateline]</b></smallfont></a></td>
<td bgcolor="{tableheadbgcolor}" align="center"><a href="$sorturl&sortorder=desc&sortfield=dateline"><smallfont color="{tableheadtextcolor}"><b>Time Viewed $sortarrow[dateline]</b></smallfont></a></td>
<td bgcolor="{tableheadbgcolor}" align="center" nowrap><smallfont color="{tableheadtextcolor}"><b>Private Message</b></smallfont></td>
$scripthead
$actionhead
$iphead
$resoliphead
</tr>

$counterplusbits

<tr>
<td bgcolor="{categorybackcolor}" align="center" colspan="$colspan"><smallfont color="{categoryfontcolor}"><b>These are the stats of all the hits on the forumhome page since this hack was installed</b></smallfont></td>
</tr>
</table>
</td></tr></table>

$footer
</body>
</html>


and the hitcounterplusbit template looks like this


<tr>
<td bgcolor="{firstaltcolor}" align="center"><smallfont><b>$viewid</b></smallfont></td>
<td bgcolor="{secondaltcolor}" align="center"><smallfont><b>$userid</b></smallfont></td>
<td bgcolor="{firstaltcolor}" align="center"><smallfont><b>$username</b></smallfont></td>
<td bgcolor="{secondaltcolor}" align="center"><smallfont><b>$viewdate</b></smallfont></td>
<td bgcolor="{firstaltcolor}" align="center"><smallfont><b>$viewtime</b></smallfont></td>
<td bgcolor="{secondaltcolor}" align="center"><smallfont><b>$pm</b></smallfont></td>
$scriptbit
$actionbit
$ipbit
$resolipbit
</tr>

subu1
06-22-2003, 12:22 PM
wowwwwww, it works, thank you :-)))))))))

i love your Hack :classic: :classic: :classic:

subu1
06-22-2003, 12:27 PM
ups a little bug , i miss Script and aktion.

edit: if i click script i have script , but not in aktion