T O P I C R E V I E W |
Astralis |
Posted - 30 August 2005 : 07:45:33 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?< |
15 L A T E S T R E P L I E S (Newest First) |
pharic |
Posted - 12 May 2006 : 09:57:08 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< |
Shaggy |
Posted - 11 May 2006 : 08:48:03 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.
< |
AnonJr |
Posted - 11 May 2006 : 08:34:10 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:strsql = "SELECT * FROM FORUM_ALLOWED_MEMBERS WHERE FORUM_ID = 5" To:strsql = "SELECT MEMBER_ID FROM FORUM_ALLOWED_MEMBERS WHERE FORUM_ID = 5" Best of luck.< |
pharic |
Posted - 10 May 2006 : 20:50:24 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.< |
AnonJr |
Posted - 10 May 2006 : 10:50:39 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. =/< |
pharic |
Posted - 10 May 2006 : 10:28:54 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!< |
AnonJr |
Posted - 10 May 2006 : 08:22:07 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.< |
pharic |
Posted - 10 May 2006 : 05:16:59 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?< |
AnonJr |
Posted - 03 May 2006 : 11:12:56 To the best of my knowledge, you'll need the UserGroups MOD and some custom coding.< |
pharic |
Posted - 03 May 2006 : 10:32:51 Hi
I'm also trying to get this mod to work, I think it's all going ok so far but I have one question:
How can I allow only members of one particular group access to certain pages. I have a general forum and a members only forum. I don't want to allow members of the general forum access to the members area.
If anyone can help I would be very grateful
pharic< |
gnixon14 |
Posted - 18 October 2005 : 10:46:50 Yous guys is all geniuses...I think it works. I'll let ya know.< |
Shaggy |
Posted - 18 October 2005 : 07:22:37 All you need is to set the forum cookies to website, include the chkUser function somewhwre in your files and "borrow" the line that assigns the value of mlev from inc_header.asp. If someone is logged in, mlev will have a value greater than 0.
< |
AnonJr |
Posted - 17 October 2005 : 15:25:22 Almost forgot about that one... I think it would work alright. Not sure though.< |
Roger Fredriksson |
Posted - 17 October 2005 : 15:14:19 Try inc_header_short.asp instead.< |
gnixon14 |
Posted - 17 October 2005 : 14:55:36 Oh if only I was that good with code. I reckon I have to actually do some cypherin' now...< |