Author |
Topic |
Morpheus73
Average Member
Denmark
597 Posts |
Posted - 18 February 2002 : 10:16:23
|
here you can take a look at my IsAllowedMember Code...
Somewhere I messed it up though - maybe Guravbhabu can help out? he´s a wizard at finding codeerrors...
function isAllowedMember(fForum_ID,fMemberID)
isAllowedMember = 0 on error resume next
strSql = "SELECT FORUM_ID, TOPIC_ID FROM " & strTablePrefix & "ALLOWED_MEMBERS " strSql = strSql & " WHERE " & strTablePrefix & "ALLOWED_MEMBERS.FORUM_ID = " & ChkString(fForum_ID, "SQLString") Set rsGetMemberName = Server.CreateObject("ADODB.Recordset") rsGetMemberName.open strSql, my_Conn CHECKtopicTOPIC = rsGetMemberName("TOPIC_ID") rsGetMemberName.close set rsGetMemberName = nothing strSql = "SELECT R_AUTHOR, TOPIC_ID FROM " & strTablePrefix & "REPLY " strSql = strSql & " WHERE " & strTablePrefix & "REPLY.TOPIC_ID =" & CHECKtopicTOPIC strSql = strSql & " AND " & strTablePrefix & "REPLY.R_AUTHOR = " & ChkString(fMemberID, "SQLString")
Set rsAllowedMember = Server.CreateObject("ADODB.Recordset") rsAllowedMember.open strSql, my_Conn
if (rsAllowedMember.EOF or rsAllowedMember.BOF) then isAllowedMember = 0 rsAllowedMember.close set rsAllowedMember = nothing else isAllowedMember = 1 rsAllowedMember.close set rsAllowedMember = nothing exit function end if
strSql = "SELECT MEMBER_ID, FORUM_ID FROM " & strTablePrefix & "ALLOWED_MEMBERS " strSql = strSql & " WHERE " & strTablePrefix & "ALLOWED_MEMBERS.FORUM_ID = " & ChkString(fForum_ID, "SQLString") strSql = strSql & " AND " & strTablePrefix & "ALLOWED_MEMBERS.MEMBER_ID = " & ChkString(fMemberID, "SQLString")
Set rsAllowedMember = Server.CreateObject("ADODB.Recordset") rsAllowedMember.open strSql, my_Conn
if (rsAllowedMember.EOF or rsAllowedMember.BOF) then isAllowedMember = 0 rsAllowedMember.close set rsAllowedMember = nothing exit function else isAllowedMember = 1 rsAllowedMember.close set rsAllowedMember = nothing end if end function
|
|
|
Nikkol
Forum Moderator
USA
6907 Posts |
Posted - 22 February 2002 : 23:24:36
|
Still working on adding USERGROUP capability and I need help from someone who knows the .asp files better than me.
First, is the only place a member delete in pop_delete.asp? Second, where exactly is the member deleted from the FORUM_ALLOWED_MEMBERS table?
Thanks for your help!
Nikkol |
|
|
Nathan
Help Moderator
USA
7664 Posts |
Posted - 22 February 2002 : 23:57:47
|
pop_delete should be the only place.
FORUM_ALLOWED_MEMBERS stores the allowed members list information. It matches user ID s to the forum IDs where they are on the allowed list.
Nathan Bales - Romans 15:13 --------------------------------- Snitz Exchange | Mod Resource |
|
|
Nikkol
Forum Moderator
USA
6907 Posts |
Posted - 23 February 2002 : 00:10:11
|
I couldn't find anywhere in pop_delete.asp where any action on ALLOWED_MEMBERS appeared. Maybe I'm just tired
Nikkol |
|
|
Nathan
Help Moderator
USA
7664 Posts |
Posted - 23 February 2002 : 00:39:31
|
A member would be deleted from there in post_info.asp.
Nathan Bales - Romans 15:13 --------------------------------- Snitz Exchange | Mod Resource |
|
|
Nikkol
Forum Moderator
USA
6907 Posts |
Posted - 23 February 2002 : 00:56:18
|
But only if the Forum was updated/changed, yes?
Nikkol |
|
|
Nathan
Help Moderator
USA
7664 Posts |
Posted - 23 February 2002 : 02:11:50
|
correct
Nathan Bales - Romans 15:13 --------------------------------- Snitz Exchange | Mod Resource |
|
|
Nikkol
Forum Moderator
USA
6907 Posts |
Posted - 23 February 2002 : 02:53:43
|
Next question, if I want to be able to assign UserGroups as admin or moderator status, I need a clue on what functions I will need to modify. I saw that chkUser returns the value referred in places as mlev. What other functions will I need to modify? It seems like this is going to be a bear. I know that I will also have to modify the admin_moderators page, but that should be cake compared to the rest. Suggestions on where to start?
Thanks Nathan, you're a gem! (<-- that's me sucking up)
Nikkol |
|
|
Washi
Starting Member
5 Posts |
Posted - 23 February 2002 : 03:06:29
|
Has anyone got working code along these lines that people could look at?, as the way im trying to implement group only webpages from snitz would work along the same lines, im also eventually going to add the same as Nikkol, or thats my aim, If i can ever get something coded and working lol
eg: atm in the database i have 2 new catagories to do with groups, eg. clans One for member levels in the clan and 1 for the actual clans
It would be much easier to have a starting point, Hope you get your one going Nikkol, sounds like your doing a lot better than me lol |
|
|
Nathan
Help Moderator
USA
7664 Posts |
Posted - 23 February 2002 : 03:08:52
|
To do usergroups properly/thoroughly you need to rethink the mLev structure
Currently it is somthing like this
Administrator Moderator User Guest
With usergroups, you would need levels like this.
Global Administrator (Takes care of admin on a global level and within groups) Global Moderator (Like global admin, only with moderation status) Group Administrator (Takes care of group spacific administration tasks) Group Moderator (Takes care of group spacific moderation tasks) User Guest
Nathan Bales - Romans 15:13 --------------------------------- Snitz Exchange | Mod Resource |
|
|
Nikkol
Forum Moderator
USA
6907 Posts |
Posted - 23 February 2002 : 10:31:18
|
Oh but ugh Nathan! That would mean changing the code everywhere mlev=3 or mlev=4 exists. Too much for me!
Washi - I have already modified my code to include groups. What it does is allow you to put forum members into groups. Then you can assign groups to the "Allowed Member List". Morpheus73 is looking at my code to incorporate it with his idea as well, so that topics can function as usergroups (see discussion above).
Nathan - once Morph and I have something to share, should I repost in the MOD discussions?
Nikkol |
|
|
Nathan
Help Moderator
USA
7664 Posts |
Posted - 23 February 2002 : 13:26:12
|
Yeah, thats why I never did the mod myself
Nathan Bales - Romans 15:13 --------------------------------- Snitz Exchange | Mod Resource |
|
|
Nikkol
Forum Moderator
USA
6907 Posts |
Posted - 23 February 2002 : 21:18:23
|
Next question What's the MOD_TYPE field in the FORUM_MODERATOR table for?
Nikkol |
|
|
Nathan
Help Moderator
USA
7664 Posts |
Posted - 23 February 2002 : 21:48:44
|
I do not know.
Nathan Bales - Romans 15:13 --------------------------------- Snitz Exchange | Mod Resource |
|
|
GauravBhabu
Advanced Member
4288 Posts |
Posted - 24 February 2002 : 00:00:35
|
It is not being used so far. I have some work done on its use with Mod EasyModeartion and also testing it with Groups Mod.
www.forumSquare.com - GauravBhabu - It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying. |
|
|
Topic |
|