PDA

View Full Version : Access masks by profile fields?


Mr. Santa
12-28-2002, 03:06 PM
Hey everyone :)

I was wondering if it's possible to let users access certain forums according to their custom profile fields. The thing is, I added a custom profile field only editable by admins to put them in a race and show their race in the postbit under their avatar (example here (http://www.rivendel.info/forums/showthread.php?threadid=1746)).
Now I would like to have certain forums only accessible by a certain race, so say a dwarven cave or an elven forest....
Does anyone have an idea on how to do this?

Thanks in advance :)

Greetz,

Chris M
12-28-2002, 05:03 PM
I have found that the best way to do this would be via a Script that they choose what race they want to be after registering...

You then put in a $DB_site->query to update their usergroup to a different one, and a query to insert their Race name into a new user field...

That would then mean that the usergroups could be given different permissions to see different forums;)

:)

Satan

Mr. Santa
12-28-2002, 06:45 PM
Hey hellsatan, thanks for your suggestion...
However, I can't use the usergroups, since I already use those for a level system. You see, within each race you can have a different level, ranging from apprentice to sentinel... Otherwise I'll have to make a usergroup for each level within each race, so human apprentice, dwarf apprentice, human man at arms, dwarf man at arms, etc... But that will amount up to 40 usergroups in total, and that's a bit too much to handle in my opinion, especially when you have to set the access masks for 40 usergroups in each and every forum..

So I really think it needs to be access by custom profile fields, I just hope that someone has an idea on how to handle this...

Edit: btw, you also mentioned that the users could choose their race, but I don't think that's necessary since the admins appoint everyone in a race... That way we can keep it balanced between the different races...

Thanks & greetz,

Mr. Santa
01-01-2003, 04:41 PM
4 days have passed, I hope it is ok to bump?

Can anyhone help me with this?

Greetz,