Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 SQL Log system
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Nero1
Starting Member

9 Posts

Posted - 29 January 2003 :  12:39:13  Show Profile
Hi

I have got a free SQL log system from http://www.metasun.com.
The system is great as a MOD for Snitz.
And it’s almost working.

Only one page doesn’t work in Snitz(pop_profile.asp).
And I cant figure out why??

Download from metasun or get an prepared version from her
http://www.erect.no/log/metalog.zip

All you have to do;
Put the files in a folder. e.g. /log/
Open Config.asp(In log folder), and set up your information. (SQL server/user/pass)
Include the file track.asp in e.g. inc_header.asp
(<!--#Include File="../log/track.asp"-->)
And of course, run the dbs...

And of you go..

Please test and replay... HELP!!!

Edited by - Nero1 on 29 January 2003 14:39:26

Etymon
Advanced Member

United States
2385 Posts

Posted - 29 January 2003 :  17:28:13  Show Profile  Visit Etymon's Homepage
Just be aware of the readme file and it's language ...

quote:

1. LICENSE.
Metasun Software hereby grants you a nonexclusive license to install and use the Software in machine-readable form on any number of computers owned and operated by you. You are permitted to reverse-engineer or otherwise modify the code-level operation of this Software however you see fit. You may copy the Software for backup purposes, provided that you leave intact and reproduce all copyright and other proprietary notices that are on or in the original copy of the Software.



Thanks for the post Nero.

Cheers,

Etymon
Go to Top of Page

jkmcgrath
Junior Member

USA
145 Posts

Posted - 30 January 2003 :  21:04:00  Show Profile  Visit jkmcgrath's Homepage
Nero Hi,

Did you test this? I did as you say and it your script didnt create a DB.

Thanks,
John

Delta Force Seals
Go to Top of Page

Nero1
Starting Member

9 Posts

Posted - 31 January 2003 :  08:21:54  Show Profile
quote:
Originally posted by jkmcgrath

Nero Hi,

Did you test this? I did as you say and it your script didnt create a DB.

Thanks,
John



Hi
Cut & Paste into Alternativ Mod setup

Make sure there is no emty space behind the lines..

Pagelog
[CREATE]
PageLog
pl_id
pl_datetime#date#NULL#
pl_referrer#varchar(255)#NULL#
pl_ipaddress#varchar(50)#NULL#
pl_scriptname#varchar(255)#NULL#
pl_useragent#varchar(255)#NULL#
pl_querystring#varchar(255)#NULL#
pl_sessionid#varchar(50)#NULL#
pl_remotehost#varchar(255)#NULL#
pl_referrerdomain#varchar(150)#NULL#
pl_referrerurl#varchar(255)#NULL#
pl_keywords#varchar(100)#NULL#
pl_language#varchar(50)#NULL#
pl_languageactual#varchar(50)#NULL#
pl_os#varchar(50)#NULL#
pl_browser#varchar(50)#NULL#
pl_browsertype#varchar(50)#NULL#
pl_screenarea#varchar(11)#NULL#
[END]
Go to Top of Page

Nero1
Starting Member

9 Posts

Posted - 31 January 2003 :  08:26:26  Show Profile
If you have problem with the dbs file, open it and remove emty spaces behind all lines...
Go to Top of Page

jkmcgrath
Junior Member

USA
145 Posts

Posted - 31 January 2003 :  10:44:14  Show Profile  Visit jkmcgrath's Homepage
I will give that a shot thanks!

John

Delta Force Seals
Go to Top of Page

wizard
Junior Member

208 Posts

Posted - 01 February 2003 :  04:58:21  Show Profile  Visit wizard's Homepage
Mine here works fine. I did not use the sql log system but their traffic system.

I added the referrer script in inc_footer as inc_header will give an error on some pages. So far it works fine.
Go to Top of Page

jkmcgrath
Junior Member

USA
145 Posts

Posted - 15 April 2003 :  22:24:19  Show Profile  Visit jkmcgrath's Homepage
yup I got mine to work as installing it as a standalone and not as a mod. VERY nice!

Delta Force Seals
Go to Top of Page

perofoslo
Starting Member

Norway
1 Posts

Posted - 20 April 2003 :  17:04:04  Show Profile
Work "out-of-the-box" fine!
One problem; With firewalls like MS-ISA, all users get the same IP address (site). Anybody ported this to use session variables?
Should be easy to implement with USERID or USERNAME?
Go to Top of Page

DOMV2
Starting Member

2 Posts

Posted - 01 May 2003 :  09:59:43  Show Profile
The installation went pretty smooth with no major hang up. I had the same need to capture the User Name in my log as well. It may not be the best way but here is what I did to get the username logged into my SQL Server. I am not an ASP coder so this was a stretch for me and if you see something wrong with how I got it working, let me know.

I created a new column in my SQL database "pagelog" table called pl_userid to hold the username. (I did this so as not to confuse it with the Meta Tracker UserName)

I made the following changes to track.asp and class.asp



track.asp

Under define Variables added strUserID to keep it seperate from the UserName used in the track code.

' DEFINE VARIABLES
Dim objTrack, strUrl, intType, strScreenarea, strUserID

Between "GET URL FOR LOGGING..." and "CHECK WHAT TYPE OF LOGGING..." I added "GET USER ID/NAME..."

' GET URL FOR LOGGING / REDIRECTION OR REFERRER
strUrl = Request.Querystring("r")

' GET USER ID/NAME
strUserID = Request.Cookies(strUniqueID & "User")("Name")

' CHECK WHAT TYPE OF LOGGING METHODIS BEING USED
' 0 - ASP EXECUTE METHOD (DEFAULT IF NO URL SPECIFIED)
' 1 - REDIRECT FILE METHOD -- FOR .EXE, .ZIP, ETC. (DEFAULT IF URL SPECIFIED)
' 2 - JAVASCRIPT METHOD -- FOR .HTML AND OTHER NON-ASP BASED FILES


class.asp

Added a new column name pl_userid and transfer strUserID into the log.

' INSERT STATS INTO DATABASE
strSql ="INSERT INTO PageLog " &_
"(pl_datetime, pl_referrer, pl_ipaddress, pl_scriptname, " &_
"pl_useragent, pl_querystring, pl_sessionid, pl_remotehost, " &_
"pl_language, pl_browser, pl_browsertype, pl_os, " &_
"pl_referrerdomain, pl_referrerurl, pl_languageactual, " &_
"pl_keywords, pl_screenarea, pl_userid) " &_
"VALUES (" & strDateTime & ", " &_
FormatDatabaseString(strReferrer, 255) & ", " &_
FormatDatabaseString(strIPAddress, 15) & ", " &_
FormatDatabaseString(strScriptName, 255) & ", " &_
FormatDatabaseString(strUserAgent, 255) & ", " &_
FormatDatabaseString(strQuerystring, 255) & ", " &_
FormatDatabaseString(strSessionID, 50) & ", " &_
FormatDatabaseString(strRemoteHost, 255) & ", " &_
FormatDatabaseString(strAcceptLanguage, 20) & ", " &_
FormatDatabaseString(strBrowser, 50) & ", " &_
FormatDatabaseString(strBrowserType, 10) & ", " &_
FormatDatabaseString(strOS, 20) & ", " &_
FormatDatabaseString(strDomain, 150) & ", " &_
FormatDatabaseString(strUrl, 255) & ", " &_
FormatDatabaseString(strLanguageActual, 50) & ", " &_
FormatDatabaseString(strKeywords, 100) & ", " &_
FormatDatabaseString(strScreenArea, 11) & ", " &_
FormatDatabaseString(strUserID, 150) & ")"
objConn.Execute(strSql)
' CLEANUP DATABASE CONNECTION OBJECT
Call CloseDatabaseConnection()

End If

I included the whole block of code around each mod for clarity.

The next task is getting it into the reporting but I am going to have to wait for some help getting that step implemented till I figure out how that section of code works. Otherwise I am just going to pull my data in Crystal Reports.

Go to Top of Page

DOMV2
Starting Member

2 Posts

Posted - 01 May 2003 :  11:20:07  Show Profile
What did you add in the inc_footer instead of the header? My Profile page is not loading after the change to the header, but all other pages seem to be ok so far.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.28 seconds. Powered By: Snitz Forums 2000 Version 3.4.07