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
 Working with Avatars and Login
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Medic397
New Member

80 Posts

Posted - 15 November 2003 :  17:40:13  Show Profile  Visit Medic397's Homepage  Send Medic397 an AOL message  Send Medic397 a Yahoo! Message
Don't know if this is the correct forum!

What I am trying to do is create a welcome panel on my forums. I wanted to include the avatar and such functions that they could edit their profile and stuff from there, but once you login I have no clue on how to get this stuff visible any help would be appreciated!

This is what I have so far www.coruscantonline.net/forum/default.txt

and here is a link to the forums so that you can visualize it.
www.coruscantonline.net/forum

Thanks in advance.

I know that it has something to do with being able to access the forum SQL in FORUM_MEMBERS, but I don't know how to tie it all to together with the login session.

Medic397
New Member

80 Posts

Posted - 16 November 2003 :  04:58:38  Show Profile  Visit Medic397's Homepage  Send Medic397 an AOL message  Send Medic397 a Yahoo! Message
Any Idea on how to accomplish this. When you log in it refers you back to the default page. I want the person to be able to see his/her avatar at the top of the default page along with some other information such as Private Messages stuff and so forth. I know that you have to access the Forum Members table, but don't know how to tie it in with the Login Session. Any help would be greatly appreciated.
Go to Top of Page

laser
Advanced Member

Australia
3859 Posts

Posted - 16 November 2003 :  05:02:26  Show Profile
Grab the user details from the cookie - I think that's what you want to do. Then use the cookie data to get the proper record from the MEMBERS table and display the avatar.
Go to Top of Page

Medic397
New Member

80 Posts

Posted - 16 November 2003 :  11:41:44  Show Profile  Visit Medic397's Homepage  Send Medic397 an AOL message  Send Medic397 a Yahoo! Message
ok now I am really stupid when it comes to cookies how do you pull the users details from the cookies.
Go to Top of Page

Medic397
New Member

80 Posts

Posted - 16 November 2003 :  13:14:42  Show Profile  Visit Medic397's Homepage  Send Medic397 an AOL message  Send Medic397 a Yahoo! Message
Ok I have included inc_func_common.asp in my default page and this is the following code I am trying to work with. Everything works except from the Forum SQL down:

if (mlev = 0) then
if strLoginStatus = 0 then
Response.Write " <table border=""0"" width=""100%"" cellspacing=""0"" cellpadding=""4"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td align=""left"" bgcolor=""" & strheadCellColor & """ nowrap valign=""middle"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""#FFFFFF""><b>Welcome Panel</b></font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" <table border=""0"" width=""100%"" cellspacing=""0"" cellpadding=""4"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td width=""70"" align=""center"" bgcolor=""" & strCategoryCellColor & """ nowrap valign=""middle"">" & vbNewLine & _
" <a href=""policy.asp""><img border=""0"" src=""images/register.gif"" alt=""Please Register""></a></td>" & vbNewLine & _
" <td width=""290"" align=""center"" bgcolor=""" & strCategoryCellColor & """ nowrap valign=""top"">" & vbNewLine & _
" <font face=""" & strFooterFontFace & """ size=""" & strdefaultFontSize & """ color=""#000000""><b>It appears that you are not a registered user or that you have not yet logged in.</b><br><br>Please either log in now with your account or <a href=""policy.asp"">click here to register</a> as a new user. It's free!</font></td>" & vbNewLine & _
" <td width=""260"" align=""center"" bgcolor=""" & strCategoryCellColor & """ nowrap valign=""top"">" & vbNewLine
%>
<!--#include file="inc_login2.asp"-->
<%

End If

else

'## Forum_SQL
strSql = "SELECT " & strMemberTablePrefix & "MEMBERS.MEMBER_ID"
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_NAME"
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_USERNAME"
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_EMAIL"
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_FIRSTNAME"
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_LASTNAME"
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_LEVEL"
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_TITLE"
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_PASSWORD"
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_AIM"
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_ICQ"
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_MSN"
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_YAHOO"
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_COUNTRY"
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_POSTS"
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_CITY"
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_STATE"
' strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_HIDE_EMAIL"
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_RECEIVE_EMAIL"
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_DATE"
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_PHOTO_URL"
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_AVATAR_URL"
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_HOMEPAGE"
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_LINK1"
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_LINK2"
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_AGE"
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_DOB"
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_MARSTATUS"
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_SEX"
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_VIEW_SIG"
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_SIG_DEFAULT"
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_OCCUPATION"
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_HOBBIES"
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_LNEWS"
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_QUOTE"
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_BIO"
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_SIG"
if strUseActiveUsers = "1" then
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_AUHIDE"
end if
if strUseNewsLetter = "1" and strShowNLSignUp = "1" then
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_NEWSLETTER"
end if
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS"
strSql = strSql & " WHERE M_UserName = '" & ChkString(Session(strCookieURL & "username"), "SQLString") & "'"
if strAuthType = "db" then
strSql = strSql & " AND M_PASSWORD = '" & ChkString(strEncodedPassword,"SQLString") & "'"
end if

set rs = my_Conn.Execute(strSql)
Response.Write " <table bgcolor=""" & strHeadCellColor & """ border=""0"" width=""100%"" cellspacing=""0"" cellpadding=""4"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td width=""400"" align=""left"" bgcolor=""" & strheadCellColor & """ nowrap valign=""middle"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""#FFFFFF""><b>Welcome Panel</b></font></td>" & vbNewLine & _
" <form action=""" & Request.ServerVariables("URL") & """ method=""post"" id=""form2"" name=""form2""><td width=""100"" align=""center"" bgcolor=""" & strHeadCellColor & """ nowrap valign=""middle"">" & vbNewLine & _
" <input type=""hidden"" name=""Method_Type"" value=""logout"">" & vbNewLine & _
" <input type=""submit"" value=""Logout"" id=""submit1"" name=""submit1"" tabindex=""-1"">" & vbNewLine & _
" </td></form>" & vbNewLine & _
" <td width=""120"" align=""center"" valign=""middle"" bgcolor=""" & strHeadCellColor & """>" & vbNewLine
if mLev = 4 or mLev=3 then
Response.Write " <a href=""/admin_home.asp""><font color=""#FFFFFF"" face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>News Admin</font></a>" & vbNewLine
else
Response.Write " "& vbNewLine
End If
Response.Write " </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" <table border=""0"" width=""100%"" cellspacing=""0"" cellpadding=""4"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td width=""70"" align=""center"" bgcolor=""" & strCategoryCellColor & """ nowrap valign=""middle"">" & vbNewLine & _
" <a href=""pop_profile.asp?mode=Modify&ID=""""&name=" & ChkString(strDBNTUserName, "display") & """><img border=""0"" src=""" & M_AVATAR_URL & """ alt=""Edit Your Profile""></a></td>" & vbNewLine & _
" <td width=""290"" align=""center"" bgcolor=""" & strCategoryCellColor & """ nowrap valign=""top"">" & vbNewLine & _
" </td>" & vbNewLine & _
" <td width=""260"" align=""center"" bgcolor=""" & strCategoryCellColor & """ nowrap valign=""top"">" & vbNewLine
Response.Write " </td>" & vbNewLine
End if
Response.Write " </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
Go to Top of Page

laser
Advanced Member

Australia
3859 Posts

Posted - 16 November 2003 :  15:09:13  Show Profile
You probably don't need that mcuh SQL, but doesn't work ?

Do you have a test user ?

The code looks fine here, but obviously there is an error in the output.
Go to Top of Page

Medic397
New Member

80 Posts

Posted - 16 November 2003 :  15:22:27  Show Profile  Visit Medic397's Homepage  Send Medic397 an AOL message  Send Medic397 a Yahoo! Message
I don't know if it is an error in the output or me putting in the wrong tags.

I have tried

" & M_AVATAR_URL & "

and

" & rs("M_AVATAR_URL") & "

and have not gotten any results with either
Go to Top of Page

laser
Advanced Member

Australia
3859 Posts

Posted - 16 November 2003 :  15:36:11  Show Profile
Test user ?

Actually the proper usage is rs("M_AVATAR_URL"), so it should work
Go to Top of Page

Medic397
New Member

80 Posts

Posted - 16 November 2003 :  15:37:08  Show Profile  Visit Medic397's Homepage  Send Medic397 an AOL message  Send Medic397 a Yahoo! Message
working on the test user and right now I killed my topic page
Go to Top of Page

Medic397
New Member

80 Posts

Posted - 16 November 2003 :  15:48:29  Show Profile  Visit Medic397's Homepage  Send Medic397 an AOL message  Send Medic397 a Yahoo! Message
ok the test user is

Name: test
Pw: test
Go to Top of Page

laser
Advanced Member

Australia
3859 Posts

Posted - 16 November 2003 :  15:57:56  Show Profile
Your default.asp and default.txt are completely different

eidt : Can you jump on to Yahoo ? it might be easier that way.

Edited by - laser on 16 November 2003 15:58:51
Go to Top of Page

Medic397
New Member

80 Posts

Posted - 17 November 2003 :  09:34:03  Show Profile  Visit Medic397's Homepage  Send Medic397 an AOL message  Send Medic397 a Yahoo! Message
I just wanted to thank you again laser for all the time you spent with me on yahoo getting that part of the site working. Thanks again.
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.36 seconds. Powered By: Snitz Forums 2000 Version 3.4.07