Author |
Topic |
PeeWee.Inc
Senior Member
United Kingdom
1893 Posts |
Posted - 12 March 2003 : 14:49:45
|
A demo would be nice, but it dont look like we will get one |
De Priofundus Calmo Ad Te Damine |
|
|
dayve
Forum Moderator
USA
5820 Posts |
Posted - 12 March 2003 : 18:40:21
|
I just want to confirm or not if it is what I think it is meaning similar to the Who's Inside mod. |
|
|
|
DJBBIZ
Junior Member
214 Posts |
Posted - 12 March 2003 : 22:59:24
|
If you want to see a demo, go to one of my sites and see it just above the row with the page icons for printing, sending...and below the Navigation area:
tmi Financial Principles & Strategies-Test Topic
It pretty much works right out of the box except for where you may wish to position it and adding a color or image background to the <td> tag |
"The difference between good ideas and good results is performance" the management institute | tmiFinance | tmiCreative | ProfileOnDemand |
Edited by - DJBBIZ on 12 March 2003 23:02:32 |
|
|
n8pbm
Junior Member
USA
212 Posts |
Posted - 13 March 2003 : 10:04:12
|
Basically all I did was change the code to a response.writes and indented some of the if - then statements. Here is is anyway:
showem=1
If showem=1 Then
qs="TOPIC_ID="&Topic_ID
strSql = "SELECT COUNT(AU_IP) AS CNT FROM " & strTablePrefix & "ACTIVE_USERS WHERE MEMBER_ID = 0 AND AU_lastpage = 'topic.asp' AND AU_QUERYSTRING LIKE '%"&qs&"%'"
set rs = my_conn.execute (strSql)
tng = rs("CNT")
rs.close
set rs = nothing
strSql = "SELECT COUNT(AU_IP) AS CNT FROM " & strTablePrefix & "ACTIVE_USERS WHERE MEMBER_ID > 0 AND AU_lastpage = 'topic.asp' AND AU_QUERYSTRING LIKE '%"&qs&"%'"
set rs = my_conn.execute (strSql)
tnu = rs("CNT")
rs.close
set rs = nothing
strSql = "SELECT ME.MEMBER_ID, ME.M_NAME, ME.M_AUHIDE, AU.AU_IP, AU.AU_LOGINTIME, AU.AU_LASTACTIVETIME, AU.AU_LASTPAGE, ME.M_ICQ, ME.M_YAHOO, ME.M_AIM, ME.M_LEVEL, AU.AU_QUERYSTRING, AU.AU_USER_AGENT " & _
"FROM " & strTablePrefix & "ACTIVE_USERS AU, " & strMemberTablePrefix & "MEMBERS ME " & _
"WHERE AU.MEMBER_ID = ME.MEMBER_ID AND AU_lastpage = 'topic.asp' AND AU_QUERYSTRING LIKE '%"&qs&"%'"
set trs = my_conn.execute (strSql)
Response.write "<tr>" & vbNewLine & _
"<td align=""right"" colspan=2 width=100% bgcolor=""" & strForumCellColor & """>" & vbNewLine & _
"<p align=""left"">" & vbNewLine & _
"<img border=""0"" src=""" & strImageURL & "icon_group.gif"" width=""15"" height=""15"" alt=""The following people are reading this Topic""><font face=""Arial"" size=""2"">" & vbNewLine
Do Until trs.EOF
if strUseExtendedProfile then
response.write "<a href=""pop_profile.asp?mode=display&id="& trs("MEMBER_ID") & """>"
else
response.write "<a href=""JavaScript:openWindow2('pop_profile.asp?mode=display&id=" & trs("MEMBER_ID") & "')"">"
end if
if trs("M_LEVEL") = 2 then 'If admin or mod, then lets hilight em.
response.write "<b><font color=""" & strAUModColor & """>"
elseif trs("M_LEVEL") = 3 then
response.write "<b><font color=""" & strAUAdminColor & """>"
end if
response.write trs("M_NAME")
if trs("M_LEVEL") = 2 or trs("M_LEVEL") = 3 then
response.write "</font></b>"
end if
response.write "</a>"
x=x+1
If tng=0 Then
If x<(tnu-1) Then Response.Write ", "
If x=(tnu-1) Then Response.Write " and "
Else
If x<tnu Then Response.Write ", "
End If
trs.MoveNext
Loop
If tng>0 Then
If tnu=0 Then
Response.Write tng&" Guest"
If tng>1 Then Response.Write "s"
Response.write "."
Else
Response.Write " and "&tng&" Guest"
If tng>1 Then Response.Write "s"
Response.write "."
End If
End If
Response.write "</font>" & vbNewLine & _
"</td>" & vbNewLine & _
"</tr>" & vbNewLine
trs.close
set trs = nothing
End If
I just placed it where I wanted it to show up. I do not have a demo online because it is running on my test site locally. |
Mike Great Lakes Pop Up Club Camping |
Edited by - n8pbm on 14 March 2003 10:48:34 |
|
|
PeeWee.Inc
Senior Member
United Kingdom
1893 Posts |
Posted - 13 March 2003 : 11:34:45
|
maybe make it so that if no users are inside that forum it will show "none"? |
De Priofundus Calmo Ad Te Damine |
|
|
DJBBIZ
Junior Member
214 Posts |
Posted - 14 March 2003 : 00:27:14
|
I added a variable for ForumCellColor and for strImageURL in the lines below:
Response.write "<tr>" & vbNewLine & _ "<td align=""right"" colspan=2 width=100% bgcolor=""" & strForumCellColor & """>" & vbNewLine & _ "<p align=""left"">" & vbNewLine & _ "<img border=""0"" src=""" & strImageURL & "icon_group.gif"" width=""15"" height=""15"" alt=""The following people are reading this Topic""><font face=""Arial"" size=""2"">" & vbNewLine
|
"The difference between good ideas and good results is performance" the management institute | tmiFinance | tmiCreative | ProfileOnDemand |
|
|
n8pbm
Junior Member
USA
212 Posts |
|
n8pbm
Junior Member
USA
212 Posts |
Posted - 14 March 2003 : 10:51:22
|
quote: Originally posted by PeeWee.Inc
maybe make it so that if no users are inside that forum it will show "none"?
But if you are viewing it then you are in the forum . Not sure when you would have None to display. |
Mike Great Lakes Pop Up Club Camping |
|
|
PeeWee.Inc
Senior Member
United Kingdom
1893 Posts |
Posted - 14 March 2003 : 10:56:57
|
Is a user is not logged in or what not. |
De Priofundus Calmo Ad Te Damine |
|
|
n8pbm
Junior Member
USA
212 Posts |
|
n8pbm
Junior Member
USA
212 Posts |
Posted - 17 March 2003 : 17:37:48
|
I played around with making this mod but for forums instead of topics. The below code is my start of it. It appears to work but needs a few tweaks. So please give me your suggestions. Thanks to WebGuy for the original code.
In forum.asp find this code (line 354 on mine but may not match yours)
Response.Write " <script language=""JavaScript"" type=""text/javascript"">" & vbNewLine & _
" <!----- " & vbNewLine & _
" function jumpTo(s) {if (s.selectedIndex != 0) location.href = s.options[s.selectedIndex].value;return 1;}" & vbNewLine & _
vbNewLine & _
" function setDays() {document.DaysFilter.submit(); return 0;}" & vbNewLine & _
" // -->" & vbNewLine & _
" </script>" & vbNewLine
Response.Write " <table border=""0"" width=""100%"">" & vbNewLine & _
Remove the red part and add this below it:
Dim strType
showem=1
If showem=1 Then
qs="FORUM_ID="&Forum_ID
strType="forum.asp"
strSql = "SELECT TOPIC_ID " & _
"FROM " & strTablePrefix & "TOPICS " & _
"WHERE FORUM_ID = " & forum_ID
set tra = my_conn.execute (strSql)
Do Until tra.EOF
If strType = "topic.asp" then
qs="TOPIC_ID="&tra("TOPIC_ID")
End If
strSql = "SELECT COUNT(AU_IP) AS CNT FROM " & strTablePrefix & "ACTIVE_USERS WHERE MEMBER_ID = 0 AND AU_lastpage = '" & strType & "' AND AU_QUERYSTRING LIKE '%"&qs&"%'"
set rs = my_conn.execute (strSql)
tng = rs("CNT")
rs.close
set rs = nothing
strSql = "SELECT COUNT(AU_IP) AS CNT FROM " & strTablePrefix & "ACTIVE_USERS WHERE MEMBER_ID > 0 AND AU_lastpage = '" & strType & "' AND AU_QUERYSTRING LIKE '%"&qs&"%'"
set rs = my_conn.execute (strSql)
tnu = rs("CNT")
rs.close
set rs = nothing
strSql = "SELECT ME.MEMBER_ID, ME.M_NAME, ME.M_AUHIDE, AU.AU_IP, AU.AU_LOGINTIME, AU.AU_LASTACTIVETIME, AU.AU_LASTPAGE, ME.M_ICQ, ME.M_YAHOO, ME.M_AIM, ME.M_LEVEL, AU.AU_QUERYSTRING, AU.AU_USER_AGENT " & _
"FROM " & strTablePrefix & "ACTIVE_USERS AU, " & strMemberTablePrefix & "MEMBERS ME " & _
"WHERE AU.MEMBER_ID = ME.MEMBER_ID AND AU_lastpage = '" & strType & "' AND AU_QUERYSTRING LIKE '%"&qs&"%'"
set trs = my_conn.execute (strSql)
If strType = "forum.asp" then
Response.write "<tr>" & vbNewLine & _
"<td align=""right"" colspan=2 width=100% bgcolor=""" & strForumCellColor & """>" & vbNewLine & _
"<p align=""left"">" & vbNewLine & _
"<img border=""0"" src=""" & strImageURL & "icon_group.gif"" width=""15"" height=""15"" alt=""The following people are reading this Forum""><font face=""Arial"" size=""2"">" & vbNewLine
End If
Do Until trs.EOF
if strUseExtendedProfile then
response.write "<a href=""pop_profile.asp?mode=display&id="& trs("MEMBER_ID") & """>"
else
response.write "<a href=""JavaScript:openWindow2('pop_profile.asp?mode=display&id=" & trs("MEMBER_ID") & "')"">"
end if
if trs("M_LEVEL") = 2 then 'If admin or mod, then lets hilight em.
response.write "<b><font color=""" & strAUModColor & """>"
elseif trs("M_LEVEL") = 3 then
response.write "<b><font color=""" & strAUAdminColor & """>"
end if
response.write trs("M_NAME")
if trs("M_LEVEL") = 2 or trs("M_LEVEL") = 3 then
response.write "</font></b>"
end if
response.write "</a>"
x=x+1
If tng=0 Then
If x<(tnu-1) Then Response.Write ", "
If x=(tnu-1) Then Response.Write " and "
Else
If x<tnu Then Response.Write ", "
End If
trs.MoveNext
Loop
If strType = "forum.asp" then
strType = "topic.asp"
If tra.EOF then
'do nothing
else
Response.Write ", "
end if
else
tra.MoveNext
end if
loop
If tng>0 Then
If tnu=0 Then
Response.Write tng&" Guest"
If tng>1 Then Response.Write "s"
Response.write "."
Else
Response.Write " and "&tng&" Guest"
If tng>1 Then Response.Write "s"
Response.write "."
End If
End If
Response.write "</font>" & vbNewLine & _
"</td>" & vbNewLine & _
"</tr>" & vbNewLine
trs.close
set trs = nothing
tra.close
set tra = nothing
End If
add response.write to the next line.
You should test this before going live with it. I am sure there are lots of room for improvement.
|
Mike Great Lakes Pop Up Club Camping |
|
|
Jace
Starting Member
24 Posts |
Posted - 25 March 2003 : 19:09:47
|
quote: Originally posted by dayve
this almost sounds familiar to the "Who's Inside" or "Big Brother" mod. Have a demo to look at?
Hi Dayve.. I need help.. I'm looking for a mod that permits to log all ip which connected to the forum (with the nick associated), from it's installation.. forevere. Do you know if this mod exists?
tnks a lot |
|
|
n8pbm
Junior Member
USA
212 Posts |
Posted - 05 August 2003 : 17:38:27
|
Anybody ever tested the above code? I know I had it running on a test system but never had the chance to really test it out. I may want to try to get this on my forum again. |
Mike Great Lakes Pop Up Club Camping |
|
|
Gargoyle
Junior Member
USA
280 Posts |
|
Topic |
|