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: General / Classic ASP versions(v3.4.XX)
 Making a Template Page
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

leatherlips
Senior Member

USA
1838 Posts

Posted - 03 February 2009 :  16:28:47  Show Profile  Visit leatherlips's Homepage
I am trying to make a template page for my forum. I would then use this page to include unique content for my site. Here is what I am looking for:

The template page would need the following:

The Header

My Content Here

The Footer


My question is, what files are absolutely required to be included in the template?

I am actually wanting two different templates, one that is for members only and one that is for members of a private forum. I'm not sure how to have the template check for those things. <

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD

Edited by - leatherlips on 03 February 2009 16:29:13

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 03 February 2009 :  17:29:37  Show Profile
You should include:
  • config.asp
  • inc_sha256.asp
  • inc_header.asp
  • inc_func_member.asp


  • At the end of the file, include:

  • inc_footer.asp
<
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 05 February 2009 :  14:49:39  Show Profile  Visit leatherlips's Homepage
Thanks. I got the template page working the way I want it. It only lets members only view it. I still need help in making another page that is for members of a private forum only.

Here is what I have for members only. What needs to be changed to make it viewable for members of a private forum only?

%>
<!--#INCLUDE FILE="config.asp"-->
<!--#INCLUDE FILE="inc_sha256.asp"-->
<!--#INCLUDE FILE="inc_header.asp" -->
<!--#INCLUDE FILE="inc_func_member.asp" -->
<%

Response.Write " <table width=""100%"" border=""0"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & getCurrentIcon(strIconFolderOpen,"","") & " <a href=""default.asp"">All Forums</a><br />" & vbNewLine & _
" " & getCurrentIcon(strIconBar,"","") & getCurrentIcon(strIconFolderOpen,"","") & " Member's Only</font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine

if mLev = 0 then
Err_Msg = "Error Message Here..." & _
" If you are a registered member and already have a valid userID and password, please wait 20 seconds to be re-directed to the login page." & _
" Otherwise click on the register link below to obtain your very own UserID and Password. Registration is Free." & vbNewLine

Response.Write "<p align=""center"" style=""margin-top:20px; margin-bottom:15px;""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHiLiteFontColor & """>There Is A Problem!</font></p>" & vbNewLine & _
"<table align=""center"" border=""0"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """><ul>" & Err_Msg & "</ul></font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine

scriptname = split(request.servervariables("SCRIPT_NAME"),"/")
if Request.QueryString <> "" then
Response.Write " <br /><a href=""login.asp?target=" & lcase(scriptname(ubound(scriptname))) & "?" & Request.QueryString & """><acronym title=""Login Here or Wait to re-directed to the Login Page..."">Login Here</acronym></a> or Wait for Automatic Redirection to Login Page<br />" & vbNewLine & _
"<meta http-equiv=""Refresh"" content=""20; URL=login.asp?target=" & lcase(scriptname(ubound(scriptname))) & "?" & Request.QueryString & """>" & vbNewLine
else
Response.Write " <br /><a href=""login.asp?target=" & lcase(scriptname(ubound(scriptname))) & """><acronym title=""Login Here or Wait to re-directed to the Login Page..."">Login Here</acronym></a> or Wait for Automatic Redirection to Login Page<br />" & vbNewLine & _
"<meta http-equiv=""Refresh"" content=""20; URL=login.asp?target=" & lcase(scriptname(ubound(scriptname))) & """>" & vbNewLine
end if

Response.Write " <br /><a href=""policy.asp""" & dWStatus("Register to post to our forum...") & " tabindex=""-1""><acronym title=""Register to post to our forum..."">Register Here</acronym></a> if You Don't Have a UserID and Password<br />" & vbNewline & _
" <br /><a href=""JavaScript:history.go(-1)"">Cancel</a> and Return to Previous Page<br />" & vbNewline & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
"</table><br /><br />" & vbNewLine

WriteFooter
Response.End
end if
<

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD

Edited by - leatherlips on 05 February 2009 14:49:55
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 05 February 2009 :  20:55:33  Show Profile  Visit leatherlips's Homepage
What file has the code that checks to see if a member is in a private forum? Perhaps if I looked at that I could figure it out.<

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 06 February 2009 :  08:45:30  Show Profile  Visit AnonJr's Homepage
Its either inc_func_common.asp or inc_func_secure.asp - I was just looking at that a couple of days ago... I need a memory upgrade. =/<
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 06 February 2009 :  10:50:26  Show Profile
You'll need to include inc_func_secure.asp and then call the function chkForumAccess on your new page passing the following variable in this order through it: the id of the private forum, the member's id, a boolean value.

The last variable, if set to true, tells the function to write Snitz's default error message (see function doNotAllowed) if the member is not allowed access that forum. Set it to false if you want to write your own error message.

For example (assuming the id of your private forum is 1):
dim isAllowed
isAllowed=chkForumAccess(1,MemberID,false)
if isAllowed then
	write page content
else
	write error message
end if
<

Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 06 February 2009 :  12:10:14  Show Profile  Visit leatherlips's Homepage
Thanks! I think I have it working!<

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 06 February 2009 :  12:28:03  Show Profile
You're welcome, buddy

<

Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 06 February 2009 :  15:00:33  Show Profile  Visit leatherlips's Homepage
I'm almost done...

If someone goes to my members only page without first being logged in, they will see the error message. However, I also want to get rid of the login at the top of the page in the header. How is this achieved?<

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 06 February 2009 :  15:42:13  Show Profile  Visit AnonJr's Homepage
On the error, you may want to do a custom error, like what Shaggy posted, and just post your own error with a link/redirect to the login page which (if I remember right) should grab the referrer and send them back to that page after they log in.

As to the login at the top of the page, that's going to be a bit harder.<
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 06 February 2009 :  15:57:12  Show Profile  Visit leatherlips's Homepage
I do have a custom error. You can see it here:

http://www.mangionemagic.com/forum/member_videos.asp

I've noticed on other pages, such as the FAQ page, the login at the top isn't there. Also, on the post.asp page it isn't there if you aren't logged in and try to post a topic. That's how I'd like my new page to function. I've looked at my post.asp page but can't see what makes it work that way.

Here is my post.asp page if you try to post without being logged in:

http://www.mangionemagic.com/forum/post.asp?method=Topic&FORUM_ID=2

This is what I want my new page to look like on the error message.<

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD

Edited by - leatherlips on 07 February 2009 09:03:57
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 06 February 2009 :  16:18:47  Show Profile  Visit AnonJr's Homepage
Ah, like FAQ - that part is in inc_header.asp: Search for "faq.asp" in the code, the second instance should look something like this:

if (mlev = 0) then
	if not(Instr(Request.ServerVariables("Path_Info"), "register.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) and _
	not(Instr(Request.ServerVariables("Path_Info"), "post.asp") > 0) then


Change it to look like:

if (mlev = 0) then
	if not(Instr(Request.ServerVariables("Path_Info"), "register.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) and _
	not(Instr(Request.ServerVariables("Path_Info"), "yourpagehere.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "post.asp") > 0) then
<
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 06 February 2009 :  17:30:05  Show Profile  Visit leatherlips's Homepage
Perfect! Thank you AnonJr, Carefree and Shaggy for all of your help!<

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD

Edited by - leatherlips on 06 February 2009 17:30:30
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.28 seconds. Powered By: Snitz Forums 2000 Version 3.4.07