Author |
Topic |
PeeWee.Inc
Senior Member
United Kingdom
1893 Posts |
Posted - 29 June 2003 : 11:17:37
|
Can someone help me strip the inc_header.asp file and move the login code? |
De Priofundus Calmo Ad Te Damine |
|
Nikkol
Forum Moderator
USA
6907 Posts |
|
PeeWee.Inc
Senior Member
United Kingdom
1893 Posts |
Posted - 29 June 2003 : 11:36:59
|
I wanna remove all the nav links, the login code, title image and anything that is shown on any page.
Could this be done with just useing inc_header_short.asp
I would also like to put the login code into a small inc_login_site.asp file
|
De Priofundus Calmo Ad Te Damine |
|
|
Nikkol
Forum Moderator
USA
6907 Posts |
Posted - 29 June 2003 : 11:39:53
|
first part, yes, just use inc_header_short.asp I believe. No harm in trying it.
second part, so you just need to know what to move? are you planning on using it somewhere besides the header? |
Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~ |
|
|
PeeWee.Inc
Senior Member
United Kingdom
1893 Posts |
Posted - 29 June 2003 : 11:43:26
|
yeah, just used the inc_header_short.asp and it worked a treat I would have never thought of it.
I'm goin to want to include the login to the right-hand side of the page.
Kinda like what has been done here: http://www.internet-clubhouse.com/forum/default.asp |
De Priofundus Calmo Ad Te Damine |
|
|
Nikkol
Forum Moderator
USA
6907 Posts |
Posted - 29 June 2003 : 11:51:25
|
That's a pretty site. Anywho, are you just goint to set up the header so that you have a general layout like:
[ header stuff ]
---------------------
| m | |
| e | forum stuff |
| n | |
| u | |
---------------------
[ footer stuff ] |
Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~ |
Edited by - Nikkol on 29 June 2003 11:51:54 |
|
|
PeeWee.Inc
Senior Member
United Kingdom
1893 Posts |
Posted - 29 June 2003 : 12:04:23
|
pretty much
[ header stuff ]
---------------------
| m | | m |
| e | forum stuff | e |
NAV -----------> | n | | n | <---------- login
| u | | u |
-------------------------
[ footer stuff ]
|
De Priofundus Calmo Ad Te Damine |
|
|
Nikkol
Forum Moderator
USA
6907 Posts |
|
Nikkol
Forum Moderator
USA
6907 Posts |
|
PeeWee.Inc
Senior Member
United Kingdom
1893 Posts |
Posted - 29 June 2003 : 12:21:30
|
it should all work with the Site Integration MOD, i can move the nav to the left hand side, more some stuff around and so on, i just cant work out what code it is i have to remove from inc_header.asp to take the login out and use in a new file.
|
De Priofundus Calmo Ad Te Damine |
|
|
Nikkol
Forum Moderator
USA
6907 Posts |
Posted - 29 June 2003 : 12:26:58
|
well, the login/logout forms are this code:if (mlev = 0) then
if not(Instr(Request.ServerVariables("Path_Info"), "register.asp") > 0) and _
not(Instr(Request.ServerVariables("Path_Info"), "policy.asp") > 0) and _
not(Instr(Request.ServerVariables("Path_Info"), "pop_profile.asp") > 0) and _
not(Instr(Request.ServerVariables("Path_Info"), "search.asp") > 0) and _
not(Instr(Request.ServerVariables("Path_Info"), "login.asp") > 0) and _
not(Instr(Request.ServerVariables("Path_Info"), "password.asp") > 0) and _
not(Instr(Request.ServerVariables("Path_Info"), "faq.asp") > 0) then
Response.Write " <form action=""" & Request.ServerVariables("URL") & """ method=""post"" id=""form1"" name=""form1"">" & vbNewLine & _
" <input type=""hidden"" name=""Method_Type"" value=""login"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td align=""center"">" & vbNewLine & _
" <table>" & vbNewLine & _
" <tr>" & vbNewLine
if (strAuthType = "db") then
Response.Write " <td><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><b>Username:</b></font><br />" & vbNewLine & _
" <input type=""text"" name=""Name"" size=""10"" maxLength=""25"" value=""""></td>" & vbNewLine & _
" <td><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><b>Password:</b></font><br />" & vbNewLine & _
" <input type=""password"" name=""Password"" size=""10"" maxLength=""25"" value=""""></td>" & vbNewLine & _
" <td valign=""bottom"">" & vbNewLine
if strGfxButtons = "1" then
Response.Write " <input src=""" & strImageUrl & "button_login.gif"" type=""image"" border=""0"" value=""Login"" id=""submit1"" name=""Login"">" & vbNewLine
else
Response.Write " <input type=""submit"" value=""Login"" id=""submit1"" name=""submit1"">" & vbNewLine
end if
Response.Write " </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td colspan=""3"" align=""left""><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>" & vbNewLine & _
" <input type=""checkbox"" name=""SavePassWord"" value=""true"" tabindex=""-1"" CHECKED><b> Save Password</b></font></td>" & vbNewLine
else
if (strAuthType = "nt") then
Response.Write " <td><font face=""" & strDefaultFontFace & """ size=""1"" color=""" & strHiLiteFontColor & """>Please <a href=""policy.asp"" tabindex=""-1"">register</a> to post in these Forums</font></td>" & vbNewLine
end if
end if
Response.Write " </tr>" & vbNewLine
if (lcase(strEmail) = "1") then
Response.Write " <tr>" & vbNewLine & _
" <td colspan=""3"" align=""left""><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>" & vbNewLine & _
" <a href=""password.asp""" & dWStatus("Choose a new password if you have forgotten your current one...") & " tabindex=""-1"">Forgot your "
if strAuthType = "nt" then Response.Write("Admin ")
Response.Write "Password?</a>" & vbNewLine
if (lcase(strNoCookies) = "1") then
Response.Write " |" & vbNewLine & _
" <a href=""admin_home.asp""" & dWStatus("Access the Forum Admin Functions...") & " tabindex=""-1"">Admin Options</a>" & vbNewLine
end if
Response.Write " <br /><br /></font></td>" & vbNewLine & _
" </tr>" & vbNewLine
end if
Response.Write " </table>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </form>" & vbNewLine
end if
else
Response.Write " <form action=""" & Request.ServerVariables("URL") & """ method=""post"" id=""form2"" name=""form2"">" & vbNewLine & _
" <input type=""hidden"" name=""Method_Type"" value=""logout"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td align=""center"">" & vbNewLine & _
" <table>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>You are logged on as<br />"
if strAuthType="nt" then
Response.Write "<b>" & Session(strCookieURL & "username") & " (" & Session(strCookieURL & "userid") & ")</b></font></td>" & vbNewLine & _
" <td> "
else
if strAuthType = "db" then
Response.Write "<b>" & ChkString(strDBNTUserName, "display") & "</b></font></td>" & vbNewLine & _
" <td>"
if strGfxButtons = "1" then
Response.Write "<input src=""" & strImageUrl & "button_logout.gif"" type=""image"" border=""0"" value=""Logout"" id=""submit1"" name=""Logout"" tabindex=""-1"">"
else
Response.Write "<input type=""submit"" value=""Logout"" id=""submit1"" name=""submit1"" tabindex=""-1"">"
end if
end if
end if
Response.Write "</td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine
if (mlev = 4) or (lcase(strNoCookies) = "1") then
Response.Write " <tr>" & vbNewLine & _
" <td align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><a href=""admin_home.asp""" & dWStatus("Access the Forum Admin Functions...") & " tabindex=""-1"">Admin Options</a>"
if mLev = 4 and (strEmailVal = "1" and strRestrictReg = "1" and strEmail = "1" and User_Count > 0) then Response.Write(" | <a href=""admin_accounts_pending.asp""" & dWStatus("(" & User_Count & ") Member(s) awaiting approval") & " tabindex=""-1"">(" & User_Count & ") Member(s) awaiting approval</a>")
Response.Write "<br /><br /></font></td>" & vbNewLine & _
" </tr>" & vbNewLine
end if
Response.Write " </form>" & vbNewLine
end if But there is also code to check if the person logged in correctly or if they logged out. This code you'll want to display in the middle part of the page:select case Request.Form("Method_Type")
case "login"
Response.Write " </table>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
"</table>" & vbNewLine
if strLoginStatus = 0 then
Response.Write "<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """>Your username and/or password were incorrect.</font></p>" & vbNewLine & _
"<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """>Please either try again or register for an account.</font></p>" & vbNewLine
else
Response.Write "<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """>You logged on successfully!</font></p>" & vbNewLine & _
"<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """>Thank you for your participation.</font></p>" & vbNewLine
end if
Response.Write "<meta http-equiv=""Refresh"" content=""2; URL=" & Request.ServerVariables("HTTP_REFERER") & """>" & vbNewLine & _
"<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""" & Request.ServerVariables("HTTP_REFERER") & """>Back To Forum</font></a></p>" & vbNewLine & _
"<table align=""center"" border=""0"" cellPadding=""0"" cellSpacing=""0"" width=""95%"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td>" & vbNewLine
WriteFooter
Response.End
case "logout"
Response.Write " </table>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
"</table>" & vbNewLine & _
"<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """>You logged out successfully!</font></p>" & vbNewLine & _
"<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """>Thank you for your participation.</font></p>" & vbNewLine & _
"<meta http-equiv=""Refresh"" content=""2; URL=default.asp"">" & vbNewLine & _
"<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""default.asp"">Back To Forum</font></a></p>" & vbNewLine & _
"<table align=""center"" border=""0"" cellPadding=""0"" cellSpacing=""0"" width=""95%"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td>" & vbNewLine
WriteFooter
Response.End
end select You'll have to tweak it though so that you get rid of the table tags etc. to make it work with your layout. |
Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~ |
|
|
PeeWee.Inc
Senior Member
United Kingdom
1893 Posts |
Posted - 29 June 2003 : 12:42:33
|
cheers Nikkol your a star
So, i can coment that all out and use it in other files (aslong as inc_header is included on the page) right?
I have a thing bout deleting code, i dont like doin it no more. |
De Priofundus Calmo Ad Te Damine |
|
|
PeeWee.Inc
Senior Member
United Kingdom
1893 Posts |
Posted - 29 June 2003 : 13:01:35
|
Will i need any includes on this fine it's self or not? |
De Priofundus Calmo Ad Te Damine |
|
|
Nikkol
Forum Moderator
USA
6907 Posts |
Posted - 29 June 2003 : 13:03:51
|
Ya, I don't like deleting code either. But in this case, just make sure you keep a backup of your original inc_header.asp and then there is no worries. You'll want to make sure that you you include both bits of code on whatever page you put the login if you want to displey the messages "you have logged out successfully" etc. |
Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~ |
|
|
PeeWee.Inc
Senior Member
United Kingdom
1893 Posts |
|
Nikkol
Forum Moderator
USA
6907 Posts |
|
Topic |
|