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
 Restricting View of Event Calendar
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

ian9001
Starting Member

22 Posts

Posted - 13 July 2006 :  16:49:34  Show Profile
I've installed the Events Calendar mod and very pleased with it. What I'd like to do now is to restrict the viewing of it to registered members only.

Has anyone done this or can someone give some pointers as to how I should go about doing this. Or is it an installed feature and I'm just being thick by not realising it?

Thanks in advance

Ian

Roger Fredriksson
Average Member

Sweden
556 Posts

Posted - 14 July 2006 :  18:24:36  Show Profile  Visit Roger Fredriksson's Homepage
logged in members are recognized by mlev>0 - do that solve your pb?

rf/www.avgifter.com
Go to Top of Page

ian9001
Starting Member

22 Posts

Posted - 15 July 2006 :  16:48:06  Show Profile
Doesn't I'm afraid, I knew that one already ;)

I suppose I should have been a bit more specific. Where should I be checking for "mlev" in order for the calendar not to be visible to guests?

Still finding my feet a bit with Snitz code, so sorry if what I'm asking is fairly obvious to some.

Ian
Go to Top of Page

Classicmotorcycling
Development Team Leader

Australia
2085 Posts

Posted - 15 July 2006 :  21:09:12  Show Profile
What you need to do in default.asp is change the <!--#INCLUDE FILE="cal_default.asp" --> to have the following:
if mlev > 0 then
	<!--#INCLUDE FILE="cal_default.asp" -->
end if
And in the top of cal.asp add the following:
if strDBNTUserName = "" then
	Err_Msg = "<li>You must be logged in to view the Members List</li>"

	Response.Write	"      <table width=""100%"" border=""0"">" & vbNewLine & _
			"        <tr>" & vbNewLine & _
			"          <td><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
			"          " & getCurrentIcon(strIconFolderOpen,"","") & " <a href=""default.asp"">All Forums</a><br />" & vbNewLine & _
			"          " & getCurrentIcon(strIconBar,"","") & getCurrentIcon(strIconFolderOpenTopic,"","") & " Member Information</font></td>" & vbNewLine & _
			"        </tr>" & vbNewLine & _
			"      </table>" & vbNewLine & _
			"      <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHiLiteFontColor & """>There Was A Problem!</font></p>" & vbNewLine & _
			"      <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHiLiteFontColor & """>You must be logged in to view this page</font></p>" & vbNewLine & _
			"      <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""JavaScript:history.go(-1)"">Back to Forum</a></font></p>" & vbNewLine & _
			"      <br />" & vbNewLine
	WriteFooter
	Response.End
end if
Also make sure that the area(s) that you select to add calendar events are only available to members. I hope that helps..

Cheers,

David Greening
Go to Top of Page

ian9001
Starting Member

22 Posts

Posted - 16 July 2006 :  07:16:23  Show Profile
Dave - much appreciated. It was the second bit of code that I was lost with, all makes sense now.

Ian
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.29 seconds. Powered By: Snitz Forums 2000 Version 3.4.07