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)
 A Mod for Active Users Mod V4
 New Topic  Topic Locked
 Printer Friendly
Previous Page
Author Previous Topic Topic Next Topic
Page: of 2

PeeWee.Inc
Senior Member

United Kingdom
1893 Posts

Posted - 12 March 2003 :  14:49:45  Show Profile  Visit PeeWee.Inc's Homepage
A demo would be nice, but it dont look like we will get one

De Priofundus Calmo Ad Te Damine
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 12 March 2003 :  18:40:21  Show Profile  Visit dayve's Homepage
I just want to confirm or not if it is what I think it is meaning similar to the Who's Inside mod.

Go to Top of Page

DJBBIZ
Junior Member

214 Posts

Posted - 12 March 2003 :  22:59:24  Show Profile  Visit DJBBIZ's Homepage
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
Go to Top of Page

n8pbm
Junior Member

USA
212 Posts

Posted - 13 March 2003 :  10:04:12  Show Profile  Visit n8pbm's Homepage
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
Go to Top of Page

PeeWee.Inc
Senior Member

United Kingdom
1893 Posts

Posted - 13 March 2003 :  11:34:45  Show Profile  Visit PeeWee.Inc's Homepage
maybe make it so that if no users are inside that forum it will show "none"?

De Priofundus Calmo Ad Te Damine
Go to Top of Page

DJBBIZ
Junior Member

214 Posts

Posted - 14 March 2003 :  00:27:14  Show Profile  Visit DJBBIZ's Homepage
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
Go to Top of Page

n8pbm
Junior Member

USA
212 Posts

Posted - 14 March 2003 :  10:49:42  Show Profile  Visit n8pbm's Homepage
Thanks DJBBIZ, I added that to my post above. I missed that one.

Mike
Great Lakes Pop Up Club Camping
Go to Top of Page

n8pbm
Junior Member

USA
212 Posts

Posted - 14 March 2003 :  10:51:22  Show Profile  Visit n8pbm's Homepage
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
Go to Top of Page

PeeWee.Inc
Senior Member

United Kingdom
1893 Posts

Posted - 14 March 2003 :  10:56:57  Show Profile  Visit PeeWee.Inc's Homepage
Is a user is not logged in or what not.

De Priofundus Calmo Ad Te Damine
Go to Top of Page

n8pbm
Junior Member

USA
212 Posts

Posted - 15 March 2003 :  15:47:22  Show Profile  Visit n8pbm's Homepage
If you are not logged on but viewing the topic then it will have Guest.

Mike
Great Lakes Pop Up Club Camping
Go to Top of Page

n8pbm
Junior Member

USA
212 Posts

Posted - 17 March 2003 :  17:37:48  Show Profile  Visit n8pbm's Homepage
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
Go to Top of Page

Jace
Starting Member

24 Posts

Posted - 25 March 2003 :  19:09:47  Show Profile
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
Go to Top of Page

n8pbm
Junior Member

USA
212 Posts

Posted - 05 August 2003 :  17:38:27  Show Profile  Visit n8pbm's Homepage
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
Go to Top of Page

Gargoyle
Junior Member

USA
280 Posts

Posted - 10 August 2003 :  00:38:51  Show Profile  Visit Gargoyle's Homepage
I can't get the first one to show Guest ??

Here is a link to my Snitz powered Drag Racing site.
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Previous Page
 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.27 seconds. Powered By: Snitz Forums 2000 Version 3.4.07