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)
 Access to a forum based on my criteria
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

MikeC
Starting Member

1 Posts

Posted - 26 March 2007 :  13:58:18  Show Profile
Hi all,

I have a board set up and would like to make access to one of the forums based on my own criteria. Specifically, I would write a routine to check if the loggen users name exists in my paid members table. If so, they are granted access to the 1 additional forum.

I have looked at the settings like, making forums private, password protected, etc, and there doesn't seem to be an automatic way to accomplish this task.

I am thinking that I can do the database check when users successfully logon, and then set a session variable to grant or deny access to the one forum.

Assuming my logic is not flawed, where in the asp code (and which file) determines a successful login, and how would I go about modifying the code to grant or deny access to my paid members group based on the Session Variable?

AnonJr
Moderator

United States
5768 Posts

Posted - 26 March 2007 :  14:53:21  Show Profile  Visit AnonJr's Homepage
Probably the best place to look would be in inc_header.asp - that's where the bulk of the login logic is located.

An option to consider would be to use the UserGroups MOD and have a "PaidMemebers" group that you add accounts to when they pay. I posted some code earlier to check if a logged in member is a part of a given group, a quick search should turn it up. In the end it may be just as much work, but I think you'll find it will make it easier to add privs for paid members later on if you find a need to.
Go to Top of Page

PPSSWeb
Junior Member

312 Posts

Posted - 26 March 2007 :  15:20:03  Show Profile
I second the use of the UserGroup mod. Once it is up and running, you can use it to control access to just about any function. With some tweaking of course.
Go to Top of Page

gary b
Junior Member

USA
267 Posts

Posted - 26 March 2007 :  20:27:28  Show Profile  Visit gary b's Homepage
What about using M_Level field in FORUM_MEMBERS table?? It is already used to 'classify' users -- normal=1, Moderator=2, Admin=3. How about M_Level 4 = Paid user? My guess is that the code is already there to determine User level...

If M_Level = 4, Then Session("paid")="true".

All this from a newbie...

Go to Top of Page

JJenson
Advanced Member

USA
2121 Posts

Posted - 26 March 2007 :  21:08:44  Show Profile  Visit JJenson's Homepage
I actually think that it is used as a admin = 4 moderator = 3 normal user = 2 guest = 1. If I am not mistaken. But to use that field I would not think that would be a good way to go I would do the user group mod I think as they said it will be better down the road.
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 26 March 2007 :  21:33:26  Show Profile  Visit AnonJr's Homepage
There is a walk-through of sorts floating around on how to add an extra mLev - as 0-4 are currently being used by the software (0 = Guest, 1 = Member, 2 = Topic Author, 3 = Moderator, 4 = Admin ... I think, I'm a little rusty on this part). I think it was used to add a "Super Moderator" or something to that effect.

You may be able to go from there and use it to different purposes, but I think you'll find the UserGroup MOD a better long-term solution as it comes in handy with a lot of other common and semi-common customizations people do.

Good luck with which ever way you go.
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 27 March 2007 :  04:34:12  Show Profile
This is the topic Anon is referring to. However, it would be overkill for your situation; the Usergroups mod with the changes Anon suggested would do the trick just fine. You could also add some code to the script that processes your payments to automatically add members to the group once they've paid.

An alternative method that would require no changes to the forum files would be to restrict the forum to allowed members, grab all existing paid members and add them to the allowed members list then add some code to the script that process your payments as I suggested above.


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