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
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

Webguy
New Member

Australia
65 Posts

Posted - 05 March 2003 :  23:31:52  Show Profile  Send Webguy an ICQ Message
Hi all, nothing ground breaking, but, saw this on another forums and figured it was easy to do. This adds the list of active users and guests currently reading the topic you are viewing to the top of the title bar, under the paging bit.

Changes are made to your Topics.asp page, This is for Active Users Mod V4 and I am running Snitz 3.3.03 but I'm pretty sure it should be fine in all other versions.

Load up topic.asp and search through the code around line 320-330 somewhere, till you find the bits that say...

<% if maxpages > 1 then %>
<table border=0 align="right">
<tr>
<td valign="top"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b>Page: </b></font></td>
<td valign="top"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><% Call DropDownPaging() %></font></td>
</tr>
</table>
<% else %>
<td align=right> </td>
 
<% end if %>
</td>
</tr>

and just after that is ...

</table>
<table border="0" width="100%" cellspacing="0" cellpadding="0" align="center">
<tr>
etc

Now, BEFORE the </table> tag and AFTER the </tr> tag, insert the following code...

<%
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)

%>
<tr>
<td align="right" colspan=2 width=100%>
<p align="left">
<img border="0" src="icon_group.gif" width="15" height="15" alt="The following people are reading this Topic"><font face="Arial" size="2">
:
<%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%>
</font>
</td>
</tr>
<%
trs.close
set trs = nothing
End If%>

Now, the code is not pretty, but it works and does the job. I suggest you save topic.asp out as say topic-new.asp to test it out. It could probably be optimized a bit, but, maybe I'll look at that later.

Hope you enjoy it, I have made other mods to active user V4 enabled forums, but, they are more complex to rip the code out of. This one was easy to explain.

It could easily be adapted as well to work in the forum.asp page as well showing how many people are in a particular forum. Another time perhaps?


Made some changes to the queries, as it was picking up people on the post.asp page replying to this topic. Tomorrow I will work on expanding the addon mod to show that a person listing is replying to that topic. so it may list it like Webguy(Replying), Ralph, and so on.

"Special bulletin: There is still no news from New Zealand. If they ever have any, we'll be sure to let you know."

Edited by - Webguy on 06 March 2003 04:28:04

dayve
Forum Moderator

USA
5820 Posts

Posted - 06 March 2003 :  10:33:40  Show Profile  Visit dayve's Homepage
this almost sounds familiar to the "Who's Inside" or "Big Brother" mod. Have a demo to look at?

Go to Top of Page

spyordie007
Junior Member

USA
408 Posts

Posted - 06 March 2003 :  11:57:03  Show Profile  Visit spyordie007's Homepage  Send spyordie007 an AOL message
quote:
Originally posted by dayve

this almost sounds familiar to the "Who's Inside" or "Big Brother" mod. Have a demo to look at?


you make it sound like a bad thing, they could always (at least I'm assuming) set themselves as "anonymous" in their profile.

-Spy

Power - The only narcotic controlled by the SEC, not the FDA.

Prosperity without pollution! The American Hydrogen Association - http://www.ahanw.org
Questions about Hydrogen? Post them on our forum - http://www.ahanw.org/forum
Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 06 March 2003 :  12:06:36  Show Profile
quote:
Originally posted by spyordie007

quote:
Originally posted by dayve

this almost sounds familiar to the "Who's Inside" or "Big Brother" mod. Have a demo to look at?


you make it sound like a bad thing, they could always (at least I'm assuming) set themselves as "anonymous" in their profile.

-Spy



spyordie007, you could say so probably because you have no clue to what dayve meant.


Edited by - GauravBhabu on 06 March 2003 12:07:02
Go to Top of Page

spyordie007
Junior Member

USA
408 Posts

Posted - 06 March 2003 :  12:33:15  Show Profile  Visit spyordie007's Homepage  Send spyordie007 an AOL message
quote:
Originally posted by GauravBhabu

spyordie007, you could say so probably because you have no clue to what dayve meant.


Okay yes admin and or mods could easily see them if they setup active users as such, or better yet they could directly access the web-servers logs.

My point was mearly that if a user didnt want people to see they were viewing a particular thread they could set themselves up to not be shown on the active users panel (so they would show up as anonymous).

I have not personally used the "who's on" or "big brother" mods but I do have the "active users" mod and I do know that the server admin could always get that information and much more from their logs (if they keep them).

Calm down 'eh!

Power - The only narcotic controlled by the SEC, not the FDA.

Prosperity without pollution! The American Hydrogen Association - http://www.ahanw.org
Questions about Hydrogen? Post them on our forum - http://www.ahanw.org/forum
Go to Top of Page

Webguy
New Member

Australia
65 Posts

Posted - 06 March 2003 :  18:48:53  Show Profile  Send Webguy an ICQ Message
I'll say this, I have not taken into account, in this addon mod any of the "be anonymous" stuff as I don't use/allow that bit on my site.

"Special bulletin: There is still no news from New Zealand. If they ever have any, we'll be sure to let you know."
Go to Top of Page

Webguy
New Member

Australia
65 Posts

Posted - 06 March 2003 :  18:50:09  Show Profile  Send Webguy an ICQ Message
I guess the Anon stuff could be put back in.

"Special bulletin: There is still no news from New Zealand. If they ever have any, we'll be sure to let you know."
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 06 March 2003 :  19:13:33  Show Profile  Visit dayve's Homepage
quote:
Originally posted by spyordie007

quote:
Originally posted by dayve

this almost sounds familiar to the "Who's Inside" or "Big Brother" mod. Have a demo to look at?


you make it sound like a bad thing, they could always (at least I'm assuming) set themselves as "anonymous" in their profile.

-Spy



hmmm, how do you figure I made it sound like a bad thing? I always love how people interpret things on the internet from plain text. anyway, as I was asking earlier, do you have a demo?

Go to Top of Page

spyordie007
Junior Member

USA
408 Posts

Posted - 07 March 2003 :  14:14:26  Show Profile  Visit spyordie007's Homepage  Send spyordie007 an AOL message
quote:
Originally posted by dayve

hmmm, how do you figure I made it sound like a bad thing? I always love how people interpret things on the internet from plain text. anyway, as I was asking earlier, do you have a demo?


I couldnt agree more, my comment was actually designed to be sarcastic. But than again how were you supposed to know that without careful analysis of "what I meant to say" with the words that I used...

BTW, Webguy I would also like to see a demo of this.

-Spy

Power - The only narcotic controlled by the SEC, not the FDA.

Prosperity without pollution! The American Hydrogen Association - http://www.ahanw.org
Questions about Hydrogen? Post them on our forum - http://www.ahanw.org/forum
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 07 March 2003 :  17:35:22  Show Profile  Visit dayve's Homepage
*still lost* I don't see how it related so sarcasm didn't make sense here.

Go to Top of Page

n8pbm
Junior Member

USA
212 Posts

Posted - 08 March 2003 :  13:27:47  Show Profile  Visit n8pbm's Homepage
I tried this out on my test forum. However I would like to do this for each forum instead of each topic. Is there a mod for who is in each forum?

Nice mod by the way, I changed the code slightly to fit with 3.4.

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

Webguy
New Member

Australia
65 Posts

Posted - 09 March 2003 :  07:11:30  Show Profile  Send Webguy an ICQ Message
Yeah, it could be modded to do that, however, without a bunch of logic, you would only know what forum they were in if they were actually on the forum page. Then it's easy.

"Special bulletin: There is still no news from New Zealand. If they ever have any, we'll be sure to let you know."
Go to Top of Page

jaydee_z
New Member

85 Posts

Posted - 11 March 2003 :  22:52:44  Show Profile
Yea this will be great ifr you get it to show who is viewing each forum instead of each topic. I seen this same code or mod on a VB board. and have been wanting to get it.

www.audiounix.tk

Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 11 March 2003 :  23:02:08  Show Profile  Visit dayve's Homepage
again, have a link?

Go to Top of Page

spyordie007
Junior Member

USA
408 Posts

Posted - 12 March 2003 :  13:38:24  Show Profile  Visit spyordie007's Homepage  Send spyordie007 an AOL message
quote:
I changed the code slightly to fit with 3.4

Could you please post post your changes so that if any of us want to do this we dont have to reinvent the wheel?
quote:
again, have a link?

ditto

Power - The only narcotic controlled by the SEC, not the FDA.

Prosperity without pollution! The American Hydrogen Association - http://www.ahanw.org
Questions about Hydrogen? Post them on our forum - http://www.ahanw.org/forum
Go to Top of Page

wii
Free ASP Hosts Moderator

Denmark
2632 Posts

Posted - 12 March 2003 :  14:03:07  Show Profile
A demo please ?
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next 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.26 seconds. Powered By: Snitz Forums 2000 Version 3.4.07