Author |
Topic |
|
Medic397
New Member
80 Posts |
Posted - 15 November 2003 : 17:40:13
|
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
|
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. |
|
|
laser
Advanced Member
Australia
3859 Posts |
Posted - 16 November 2003 : 05:02:26
|
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. |
|
|
Medic397
New Member
80 Posts |
Posted - 16 November 2003 : 11:41:44
|
ok now I am really stupid when it comes to cookies how do you pull the users details from the cookies. |
|
|
Medic397
New Member
80 Posts |
Posted - 16 November 2003 : 13:14:42
|
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 & _ |
|
|
laser
Advanced Member
Australia
3859 Posts |
Posted - 16 November 2003 : 15:09:13
|
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. |
|
|
Medic397
New Member
80 Posts |
Posted - 16 November 2003 : 15:22:27
|
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
|
|
|
laser
Advanced Member
Australia
3859 Posts |
Posted - 16 November 2003 : 15:36:11
|
Test user ?
Actually the proper usage is rs("M_AVATAR_URL"), so it should work |
|
|
Medic397
New Member
80 Posts |
Posted - 16 November 2003 : 15:37:08
|
working on the test user and right now I killed my topic page
|
|
|
Medic397
New Member
80 Posts |
Posted - 16 November 2003 : 15:48:29
|
ok the test user is
Name: test Pw: test |
|
|
laser
Advanced Member
Australia
3859 Posts |
Posted - 16 November 2003 : 15:57:56
|
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 |
|
|
Medic397
New Member
80 Posts |
Posted - 17 November 2003 : 09:34:03
|
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. |
|
|
|
Topic |
|