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)
 IP viewing
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

KoRnholio
Starting Member

30 Posts

Posted - 07 January 2001 :  21:44:13  Show Profile
Does anyone have a mod that puts the user's IP on each post, only viewable by admins? Would it be that hard? I don't even know what the IP variable is :)

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 07 January 2001 :  21:49:32  Show Profile
When you are viewing the posts, and you are logged in as Admin ( or you are the moderator of that forum ) you will have an icon that looks like this <img src="icon_ip.gif" border=0> on each post click on it to view that user's IP address.
Go to Top of Page

KoRnholio
Starting Member

30 Posts

Posted - 07 January 2001 :  21:52:22  Show Profile
I know, but I mean actually on each post(like below their name). So you don't have to click on anything. Look at an ezboard.com forum to see what I'm talking about.

Go to Top of Page

KoRnholio
Starting Member

30 Posts

Posted - 07 January 2001 :  21:55:06  Show Profile
Er wait, you'd have to be an admin of one. Nevermind.

Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 07 January 2001 :  22:09:48  Show Profile
something like this?

<img src="http://www11.ewebcity.com/dssdbs/files/ip.png" border=0>

The way I have it setup, only Admins and Moderators will see it.
Go to Top of Page

KoRnholio
Starting Member

30 Posts

Posted - 07 January 2001 :  22:27:01  Show Profile
Yeah, like that.

Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 07 January 2001 :  22:41:01  Show Profile
This is for v3.1 SR4

Here's what I did:

In <b>topic.asp</b>

do a search for: <b>sub DisplayIP()</b>

Insert the following immediately above that line:

<font size=1><pre id=code><font face=courier size=2 id=code>sub NewDisplayIP()
usr = (chkForumModerator(Request.QueryString("FORUM_ID"), STRdbntUserName))
if (chkUser((STRdbntUserName), (Request.Cookies(strUniqueID & "User")("Pword"))) = 4) then
usr = 1
end if
if usr then
if Request.QueryString("TOPIC_ID") <> "" then

'## Forum_SQL
strSql = "SELECT " & strTablePrefix & "TOPICS.T_IP, " & strTablePrefix & "TOPICS.T_SUBJECT "
strSql = strSql & " FROM " & strTablePrefix & "TOPICS "
strSql = strSql & " WHERE TOPIC_ID = " & Request.QueryString("TOPIC_ID")

rsIP = my_Conn.Execute(strSql)

IP = rsIP("T_IP")
Title = rsIP("T_Subject")
else
if Request.QueryString("REPLY_ID") <> "" then
'## Forum_SQL
strSql = "SELECT " & strTablePrefix & "REPLY.R_IP "
strSql = strSql & " FROM " & strTablePrefix & "REPLY "
strSql = strSql & " WHERE REPLY_ID = " & Request.QueryString("REPLY_ID")

rsIP = my_Conn.Execute(strSql)

IP = rsIP("R_IP")
end if
end if
set rsIP = nothing
%>
<br><font color="<% =strForumFontColor %>" face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>">(<% =ip %>)</font>
<%
end If
end sub</font id=code></pre id=code></font id=size1>

Now do a search for this line: (there will be 2 instances of it)

<font size=1><pre id=code><font face=courier size=2 id=code><% if strShowRank = 1 or strShowRank = 3 then %></font id=code></pre id=code></font id=size1>

Insert the following immediately above that line:

<font size=1><pre id=code><font face=courier size=2 id=code><% NewDisplayIP %></font id=code></pre id=code></font id=size1>

Edited by - Richard Kinser on 07 January 2001 22:43:45
Go to Top of Page

Hopper
Junior Member

192 Posts

Posted - 08 January 2001 :  10:56:38  Show Profile  Send Hopper an ICQ Message
That didnt work for me.. it showed the same IP for every post in the thread. Heres what I did.

in Topic.asp, under " '## Forum_SQL - Get all topicsFrom DB" I changed :

strSql = strSql & strTablePrefix & "REPLY.R_DATE "
to:
strSql = strSql & strTablePrefix & "REPLY.R_DATE, "
strSql = strSql & strTablePrefix & "REPLY.R_IP AS IP"


Then in " '## Forum_SQL - Get Origional Posting"

I changed:

strSql = strSql & strTablePrefix & "TOPICS.TOPIC_ID, " & strTablePrefix & "TOPICS.T_MESSAGE "
to:
strSql = strSql & strTablePrefix & "TOPICS.TOPIC_ID, " & strTablePrefix & "TOPICS.T_MESSAGE, "
strSql = strSql & strTablePrefix & "TOPICS.T_IP AS IP"

Then i added the sub:

sub DisplayNewIP()
if (chkUser((STRdbntUserName), (Request.Cookies(strUniqueID & "User")("Pword"))) = 4) then
usr = 1
end if
if usr then
%>
<br><font color="<% =strForumFontColor %>" face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>">(<% =rs("IP") %>)</font>
<%
end if
End Sub

and placed "<% DisplayNewIP %>" where you said.

This works for me.


Go to Top of Page

rick7165
Senior Member

USA
1094 Posts

Posted - 21 January 2001 :  05:46:49  Show Profile  Visit rick7165's Homepage
Hopper... I just added your IP mod.. It works, but I found a bug "I Think" If you go into the topic.. The IP will show up, BUT if you hit refresh within that topic you get this error:

Microsoft JET Database Engine error '80040e14'
The SELECT statement includes a reserved word or an argument name that is misspelled or missing, or the punctuation is incorrect.

/topic.asp, line 354


Line 354 > rs.open strSql, my_Conn, 3

This error shows up above the Topic Header and only shows up if you hit refresh.

Rick

My Demo Site
www.eastpasco.com
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.12 seconds. Powered By: Snitz Forums 2000 Version 3.4.07