The Forum has been Updated
The code has been upgraded to the latest .NET core version. Please check instructions in the Community Announcements about migrating your account.
I'm trying to get the universal login mod to work. I tried it in the past and could never get it to work and thought I'd revisit it but I still cannot get it to work.
Has anyone ever had this mod operational? If so, what modifications did you make to get it to work?<
Has anyone ever had this mod operational? If so, what modifications did you make to get it to work?<
Posted
I'm still trying to let onlymembers edit my other pages.
I could write the code to check the FORUM_ALLOWED_MEMBERS table and check if their MEMBER_ID matches the FORUM_ID but this must already be done somewhere else
Does anyone know the variable that allows some members to see some forums and others not to be able to see them?<
Does anyone know the variable that allows some members to see some forums and others not to be able to see them?<
Posted
With the UserGroups MOD you can assign users to a particular group, and then set that groups permissions for a given forum. If you wanted to extend the permissions beyond the forum itself, with a little custom coding you could check for the cookie and see if they are a member of a group that has those permissions. This has been used as a solution to similar problems at other sites.<
Posted
Thanks again AnonJr but it still seems a really complicated way of doing it. I already have a working forum with an allowed members list on the members forum, so it's hidden to others. I just want to add something to the "If mLev>0" like "And IsMember=Yes". I guess I can code if I have to, I just don't want to!<
Posted
It is more complex up front, but IMHO its a better solution for the long run since it allows for a little more flexibility. My experience has been that a quick solution for a simple issue almost always grows and expands and if you're not careful can quickly get unmanageable. I try to be as forward-thinking as I can... I'm not always successful at it, but it helps. =/<
Posted
Thanks again,
I finally got round to sitting down to do some code. I did this at the end of my custom inc_header:
strsql = "SELECT * FROM FORUM_ALLOWED_MEMBERS WHERE FORUM_ID = 5"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open strsql, conn, 1, 2
IsStaff = "No"
Do While (Not rs.Eof)
memID = rs("MEMBER_ID")
If MemberID = memID then
IsStaff = "Yes"
End If
rs.MoveNext
Loop
rs.Close
Set rs = Nothing
conn.Close
Set conn = Nothing
It seems to work (!) but I'm wondering if I'm going to run into trouble if something unexpected happens, I can see what you're saying about it not being forward thinking and it looks pretty rough I admit but it took me only 5 minutes even with my limited skill and brain power.<
I finally got round to sitting down to do some code. I did this at the end of my custom inc_header:
strsql = "SELECT * FROM FORUM_ALLOWED_MEMBERS WHERE FORUM_ID = 5"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open strsql, conn, 1, 2
IsStaff = "No"
Do While (Not rs.Eof)
memID = rs("MEMBER_ID")
If MemberID = memID then
IsStaff = "Yes"
End If
rs.MoveNext
Loop
rs.Close
Set rs = Nothing
conn.Close
Set conn = Nothing
It seems to work (!) but I'm wondering if I'm going to run into trouble if something unexpected happens, I can see what you're saying about it not being forward thinking and it looks pretty rough I admit but it took me only 5 minutes even with my limited skill and brain power.<
Posted
On first glance, it should work fine ... as long as you don't want to expand this to other FORUM_ID's...
Like I said earlier, its easy to do a quick hack like this - and it works. However, if you ever need to expand on this its going to get more and more labyrinthine each iteration until you go back and set in a more flexible system. Just a friendly piece of advice from someone who's been down that road before.
Also, as a side note, to make your code a little more efficient instead of selecting everything, just grab the MEMBER_ID since that's all you need. It will reduce your Database's workload.
[edit] Guess I should have included what I meant... Change:
To:
Best of luck.<
Like I said earlier, its easy to do a quick hack like this - and it works. However, if you ever need to expand on this its going to get more and more labyrinthine each iteration until you go back and set in a more flexible system. Just a friendly piece of advice from someone who's been down that road before.
Also, as a side note, to make your code a little more efficient instead of selecting everything, just grab the MEMBER_ID since that's all you need. It will reduce your Database's workload.
[edit] Guess I should have included what I meant... Change:
Code:
strsql = "SELECT * FROM FORUM_ALLOWED_MEMBERS WHERE FORUM_ID = 5"Code:
strsql = "SELECT MEMBER_ID FROM FORUM_ALLOWED_MEMBERS WHERE FORUM_ID = 5"
Last edited by AnonJr on 11 May 2006, 08:38
Posted
How are staff members distinguished from other members in your MEMBERS table? You could try doing it the way I did, as explained in this topic.
<
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.”
<
Search is your friend
“I was having a mildly paranoid day, mostly due to thefact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Posted
Thanks guys
Yes, you're right about swapping MEMBER_ID for *, thanks.
Thanks Shaggy, the table I'm using is FORUM_ALLOWED_MEMBERS, all it contains is staff member ID's and forum IDs. As long as the user has access to the members forum, they can change the other members' pages on the site
Cheers for your help. I've just gotta get the header working in vcalendar now!
Pharic<
Yes, you're right about swapping MEMBER_ID for *, thanks.
Thanks Shaggy, the table I'm using is FORUM_ALLOWED_MEMBERS, all it contains is staff member ID's and forum IDs. As long as the user has access to the members forum, they can change the other members' pages on the site
Cheers for your help. I've just gotta get the header working in vcalendar now!
Pharic<
Email Member
Message Member
Post Moderation
FileUpload
If you're having problems uploading, try choosing a smaller image.
Preview post
Send Topic
Loading...