Print Page | Close Window

No Guest access wanted at all!

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums Modifications
Forum Description: Mod's and Add-on's for Web Wiz Forums.
URL: https://forums.webwiz.net/forum_posts.asp?TID=20575
Printed Date: 29 March 2026 at 9:49am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: No Guest access wanted at all!
Posted By: Storm
Subject: No Guest access wanted at all!
Date Posted: 06 July 2006 at 5:27pm
Hi There,
We have just purchased the WebWiz forum software, and am trying to set it up in a very restrictive way.
 
Basically, the way we want it is unless you are issued with a username and password by us, you have no access AT ALL to the forum.
 
I guess that means removing/turning off the guest account, but I seem to be unable to do this. It appears that the most restrictive settings still allow guests to search the forums, see topic headings, last registered users etc.
 
We need to present a login box as the first page, no matter who you are, and if you don't have a username and password, then you can get no further.
 
We don't want google or yahoo to be able to crawl the site either.
 
Help!



Replies:
Posted By: Scotty32
Date Posted: 06 July 2006 at 11:39pm
simplest way to do it is, in the common.asp file add a line like:

if lngLoggedInUserID = 2 and blnShowThisPage then
   close db
   response.redirect("login_user.asp")
end if

then in the login_user.asp, login_user_test.asp and register page (and register_confirm.asp), and any other pages you find that guest NEED to view (eg sign up and login as i mentioned) add the line anywhere above the include for the common.asp file.:

blnShowThisPage = True


you'll also need to add Dim blnShowThisPage to the common.asp file

now you've blocked off your forum to members only.


-------------
S2H.co.uk - http://www.s2h.co.uk/wwf/" rel="nofollow - WebWiz Mods and Skins

For support on my mods + skins, please use http://www.s2h.co.uk/forum/" rel="nofollow - my forum .


Posted By: Storm
Date Posted: 07 July 2006 at 9:08am
Hi Scotty,

Thanks for the reply. Is there anywhere in particular that the lines need to be placed in the common.asp?

Thanks.


Posted By: Scotty32
Date Posted: 07 July 2006 at 9:45am
i'll fix you up with a common.asp file later - but theres to many files to just add the "blnShowThisPage" to

if you want to do it your self, just enter it near the bottom,
not sure if theres a "banned user" part or if i just entered that my self.


-------------
S2H.co.uk - http://www.s2h.co.uk/wwf/" rel="nofollow - WebWiz Mods and Skins

For support on my mods + skins, please use http://www.s2h.co.uk/forum/" rel="nofollow - my forum .


Posted By: Storm
Date Posted: 07 July 2006 at 10:17am
Thanks!

BTW - I have registrations turned off, so is it just the login_user.asp file that needs the blnShowThisPage line?

John


Posted By: Scotty32
Date Posted: 07 July 2006 at 1:35pm
yeah, in that case its just login_user.asp and login_user_test.asp


-------------
S2H.co.uk - http://www.s2h.co.uk/wwf/" rel="nofollow - WebWiz Mods and Skins

For support on my mods + skins, please use http://www.s2h.co.uk/forum/" rel="nofollow - my forum .


Posted By: Storm
Date Posted: 07 July 2006 at 2:31pm
Hi Scotty,

I have stuck:

If lngLoggedInUserID = 2 And blnShowThisPage Then
   close db
   response.redirect("login_user.asp")
End If

in the common.asp file, within the Read in Logged-in User Data section, and:

Dim blnShowThisPage a little before this, but it doesn't appear to make any difference to the way anything works...

Not sure if I am doing something wrong....

Any unregistered users can still browse around the default page, and access things like the Active User list etc.

Also, in the login_user.asp file, if I put:

blnShowThisPage = True

before the:

<!--#include file="common.asp" -->

line, the forum just displays it within the web page... does it need to be encapsulated within <% quotes?

Sorry if these are silly comments, but I'm new to this asp stuff!!!

Thanks very much for your help so far.

John


Posted By: Storm
Date Posted: 07 July 2006 at 2:32pm
Hi Scotty,

I have stuck:

If lngLoggedInUserID = 2 And blnShowThisPage Then
   close db
   response.redirect("login_user.asp")
End If

in the common.asp file, within the Read in Logged-in User Data section, and:

Dim blnShowThisPage a little before this, but it doesn't appear to make any difference to the way anything works...

Not sure if I am doing something wrong....

Any unregistered users can still browse around the default page, and access things like the Active User list etc.

Also, in the login_user.asp file, if I put:

blnShowThisPage = True

before the:

<!--#include file="common.asp" -->

line, the forum just displays it within the web page... does it need to be encapsulated within <% quotes?

Sorry if these are silly comments, but I'm new to this asp stuff!!!

Thanks very much for your help so far.

John


Posted By: Scotty32
Date Posted: 07 July 2006 at 11:26pm
sorry, yes, you encase the Showthispage part like

<% @ Language=VBScript %>
<% Option Explicit %>
<% blnShowThisPage = True %>
<!--#include file="common.asp" -->


add for the stopping users from viewing pages add:

If lngLoggedInUserID = 2 And not blnShowThisPage Then
   Call closeDatabase()
   response.redirect("login_user.asp")
End If


after the following line like so:
(it doesnt need to be encased in <% and %> since its already inside them)


'Call the sub procedure to read in the details for this user
Call getUserData("UID")

If lngLoggedInUserID = 2 And not blnShowThisPage Then
  
Call closeDatabase()
   response.redirect("login_user.asp")
End If


'Make sure the main admin account remains active and full access rights and in the admin group
If lngLoggedInUserID = 1 Then
    intGroupID = 1
    blnActiveMember = True
    blnBanned = False
End If


hopefully this will be ok  and work.


-------------
S2H.co.uk - http://www.s2h.co.uk/wwf/" rel="nofollow - WebWiz Mods and Skins

For support on my mods + skins, please use http://www.s2h.co.uk/forum/" rel="nofollow - my forum .


Posted By: aks427
Date Posted: 08 July 2006 at 12:59am
Wouldn't it be like this?
 
If lngLoggedInUserID = 2 And NOT blnShowThisPage Then
   Call closeDatabase()
   response.redirect("login_user.asp")
End If
 
Also, you'll probably need to Dim blnShowThisPage.


Posted By: Scotty32
Date Posted: 08 July 2006 at 10:15am
ooops didnt notice that thanks.

and yeah, i told them to dim it future up.


-------------
S2H.co.uk - http://www.s2h.co.uk/wwf/" rel="nofollow - WebWiz Mods and Skins

For support on my mods + skins, please use http://www.s2h.co.uk/forum/" rel="nofollow - my forum .


Posted By: Storm
Date Posted: 10 July 2006 at 9:01am
Excellent, that works a treat! Thanks very much guys, you've been brilliant!

John



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net