Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 How not to show deleted members in MemberSpotlight
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Chris Yew
Junior Member

134 Posts

Posted - 05 February 2003 :  21:56:05  Show Profile
Hi,
I have implemented the Member Spotlight by Atomic in my Snitz forum ver.3.4.03 and it's working well now. The only problem I faced is that there were some deleted members but the Member Spotlight will still display them as the mod is in relation with the forum's members database. As we know, though the members were deleted, the Members ID will still remained in the database. As such, the Member Spotlight will still show n/a (M_Name).

Can anyone help so that those members that have been deleted will not be displayed at all. Below is the script from the member_spotlight.asp;

<%
Response.write "<table width=""150"" border=""0"" cellspacing=""0"" cellpadding=""0"" bgcolor=" & strHeadCellColor & ">" & vbCrLf & _
" <tr>" & vbCrLf & _
" <td align=""left"" valign=""top"">" & vbCrLf & _
" <table BORDER=""0"" bordercolor=""" & strHeadCellColor & """ cellspacing=""1"" cellpadding=""0"" width=""100%"">" & vbCrLf & _
" <tr>" & vbCrLf & _
" <td valign=""top"">" & vbCrLf & _
" <table border=""0"" cellspacing=""0"" cellpadding=""0"" width=""100%"">" & vbCrLf & _
" <tr>" & vbCrLf & _
" <td align=""center"" bgcolor=" & strHeadCellColor & ">" & vbCrLf & _
" <table width=""100%"" cellpadding=""2"">" & vbCrLf & _
" <tr>" & vbCrLf & _
" <td valign=""top"" align=""center""><font face=""" & strDefaultFontFace & """ color=""" & strHeadFontColor & """ size=""" & strHeaderFontSize & """>Betta Spotlight</font></td>" & vbCrLf & _
" </tr>" & vbCrLf & _
" </table>" & vbCrLf & _
" </td>" & vbCrLf & _
" </tr>" & vbCrLf & _
" <tr>" & vbCrLf & _
" <td bgcolor=""" & strForumCellColor & """>" & vbCrLf & _
" <table border=""0"" width=""100%"" cellspacing=""0"" cellpadding=""2"">"


'START MEMBER IN SPOTLITE SCRIPT
function MemInSpot
set rsMemInSpot = Server.CreateObject("ADODB.Recordset")
strSql = "SELECT " & strTablePrefix & "MEMBERS.MEMBER_ID, " & strTablePrefix & "MEMBERS.M_LINK2, " & strTablePrefix & "MEMBERS.M_NAME, "
strSql = strSql & strTablePrefix & "MEMBERS.M_FIRSTNAME, " & strTablePrefix & "MEMBERS.M_LASTNAME, " & strTablePrefix & "MEMBERS.M_AGE"
strSql = strSql & " FROM " & strTablePrefix & "MEMBERS"
strSql = strSql & " WHERE FORUM_MEMBERS.M_LINK2 <> ''"
rsMemInSpot.Open strSql, my_Conn,3,,adCmdText
Dim intRnd
Randomize Timer
intRnd = (Int(RND * rsMemInSpot.RecordCount))
rsMemInSpot.Move intRnd
strMemInSpot = rsMemInSpot("M_LINK2")
Response.Write " <tr><td align=center bgcolor=""" & strForumCellColor & """>" & vbCrLf & _
" <a href=""" & strForumURL & "pop_profile.asp?mode=display&id="& rsMemInSpot("member_id") & """><font face=""" & strDefaultFontFace & """ color=""" & strDefaultFontColor & """ size=""" & strDefaultFontSize & """><b>" & rsMemInSpot("M_NAME") & "</b></font></A><br>" & vbCrLf
if Trim(rsMemInSpot("M_LINK2")) <> "" and lcase(rsMemInSpot("M_LINK2")) <> "http://" then
if lcase(left(strMemInSpot,7)) = "http://" then
Response.write " <a href=" & ChkString(rsMemInSpot("M_LINK2"), "display")& ">" & vbCrLf & _
" <img src=" & ChkString(rsMemInSpot("M_LINK2"), "display") & vbCrLf
elseif lcase(left(strMemInSpot,7)) <> "http://" then
Response.write " <a href=" & strForumURL & "images/" & ChkString(rsMemInSpot("M_LINK2"), "display")& ">" & vbCrLf & _
" <img src=" & strForumURL & "images/" & ChkString(rsMemInSpot("M_LINK2"), "display")& vbCrLf
end if
Response.write " alt=" & ChkString(rsMemInSpot("M_NAME"),"display")& vbCrLf & _
" width=""160"" height=""120"" border=""0"" hspace=""0"" vspace=""4""></a><br>" & vbCrLf
else
Response.Write getCurrentIcon(strIconPhotoNone,"No Photo Available","hspace=""0"" vspace=""4""") & "<br>" & vbCrLf _
end if
Response.Write " <a href=""" & strForumURL & "photo_album_cat.asp?sqldtl=" & rsMemInSpot("member_id") & """><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ >" & rsMemInSpot("M_NAME") & "#039;s Album</font></A><br>" & vbCrLf
Response.Write " </td></tr>"
rsMemInSpot.Close
Set rsMemInSpot = Nothing
end function
'END MEMBER IN SPOTLITE SCRIPT

call MemInSpot


Response.Write " </td>" & vbCrLf & _
" </tr>" & vbCrLf & _
" </table>" & vbCrLf & _
" </td>" & vbCrLf & _
" </tr>" & vbCrLf & _
"</table>" & vbCrLf & _
"</td>" & vbCrLf & _
"</tr>" & vbCrLf & _
"</table>" & vbCrLf & _
"</td>" & vbCrLf & _
"</tr>" & vbCrLf & _
"</table>"
%>

Thank you.

Chris Yew

Chris Yew
Junior Member

134 Posts

Posted - 07 February 2003 :  00:26:36  Show Profile
Guess I may be a bit impatience, but really hope that all you experts can help on this. Thank you.

My forum site is at;
http://www.bettaclub.org.sg/forum/

Chris Yew

Edited by - Chris Yew on 07 February 2003 00:27:47
Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 07 February 2003 :  00:45:20  Show Profile
I've never used this MOD, but it should just be a matter of adding the following:
strSql = strSql & " AND FORUM_MEMBERS.M_STATUS = " & 1
right below the following:
strSql = strSql & " FROM " & strTablePrefix & "MEMBERS"
strSql = strSql & " WHERE FORUM_MEMBERS.M_LINK2 <> ''"
so it looks like this:
strSql = strSql & " FROM " & strTablePrefix & "MEMBERS"
strSql = strSql & " WHERE FORUM_MEMBERS.M_LINK2 <> ''"
strSql = strSql & " AND FORUM_MEMBERS.M_STATUS = " & 1

Go to Top of Page

Chris Yew
Junior Member

134 Posts

Posted - 07 February 2003 :  07:40:52  Show Profile
Hi Richard,
That's great, it works! Thank you.

Chris Yew
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.26 seconds. Powered By: Snitz Forums 2000 Version 3.4.07