Welcome visitor
Login - Register - I Forgot My Password - Search - Members
Main Page » Can I hide my forum from the public?

Can I hide my forum from the public?

Hi,

Firstly let me say that iyziForum is the best piece of ASP code I've used in years - everything works perfectly and it's so easy to install! Thanks for making it available.

However, I still have one question. My forum is specifically designed to be used by private members of an organisation, but I do not want the general public to be able to see what members have posted. Is is possible to make someone login before they can see posts?

I don't mind making changes to the code but I can't easily find where to make them!

Re: Can I hide my forum from the public?

I'm glad that you liked iyzi Forum :)

I have come across a few iyzi Forum users who implemented that feature for their own forum. I don't know how they implemented it but here is what I would do:

When a user logins, a variable called "MemberMemberID" is created to be used throughout the forum. So you can check whether the user currently browsing the forum is a member or not by using this variable via a code like this:

If MemberMemberID = "" Then
Response.Write "<script type=""text/javascript"">"
Response.Write "Error('" & Replace(LanErrorNotLoggedIn, "'", "\'") & "');"
Response.Write "</script></body></html>"
Response.End
End If

Not that I didn't test this code so it might not work. Be sure to place this code after

<!--#INCLUDE FILE="inc_connection.asp"-->		
<!--#INCLUDE FILE="inc_language.asp"-->
<!--#INCLUDE FILE="inc_general_functions.asp"-->
<!--#INCLUDE FILE="inc_date_functions.asp"-->

lines of whatever file you want (probably "topic.asp" file in your case) because the "MemberMemberID" variable is created in "inc_connection.asp". You can look at "post.asp" line 70 where I took the code piece above, to get a better idea where to put it.

There is already a "LanErrorNotLoggedIn" language pattern you can use, which says "You should first log in." by default. But you can change it if you want a more descriptive one.

You can use this "MemberMemberID" variable anywhere you want, like in "default.asp" to even hide the topic subjects.

Be sure to use the latest version of iyzi Forum (Beta 3.02) so that your forum is secure ;)
Main Page » Can I hide my forum from the public?
Search - Members
iyzi Forum | Email
iyzi Forum v1.0 Beta 3.01