Author |
Topic  |
|
KoRnholio
Starting Member
30 Posts |
Posted - 07 January 2001 : 21:44:13
|
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
|
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. |
 |
|
KoRnholio
Starting Member
30 Posts |
Posted - 07 January 2001 : 21:52:22
|
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.
|
 |
|
KoRnholio
Starting Member
30 Posts |
Posted - 07 January 2001 : 21:55:06
|
Er wait, you'd have to be an admin of one. Nevermind.
|
 |
|
RichardKinser
Snitz Forums Admin
    
USA
16655 Posts |
Posted - 07 January 2001 : 22:09:48
|
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. |
 |
|
KoRnholio
Starting Member
30 Posts |
Posted - 07 January 2001 : 22:27:01
|
Yeah, like that.
|
 |
|
RichardKinser
Snitz Forums Admin
    
USA
16655 Posts |
Posted - 07 January 2001 : 22:41:01
|
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 |
 |
|
Hopper
Junior Member
 
192 Posts |
Posted - 08 January 2001 : 10:56:38
|
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.
|
 |
|
rick7165
Senior Member
   
USA
1094 Posts |
Posted - 21 January 2001 : 05:46:49
|
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 |
 |
|
|
Topic  |
|