FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » FUDforum Suggestions » Private Forums?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Private Forums? [message #1019 is a reply to message #1015] Wed, 20 March 2002 02:40 Go to previous messageGo to previous message
Luterin is currently offline  Luterin   Sweden
Messages: 17
Registered: March 2002
Location: Malmö/Sweden
Karma:
Junior Member
First of all, gotta say thanks for the excellent code. Easy to follow and play around with.

I did fix the private forums with a nice little hack.

I modified 2 tables:
alter table fud_forum add private enum('Y','N') NOT NULL DEFAULT 'N';
alter table fud_users add private_access enum('Y','N') NOT NULL DEFAULT 'N';

Then I just added the following line to "thread.php" just in the beginning before the code checks if the thread needs a registerd user to be able to view it.

(right after this line: cache_buster(); )

if ($frm->private=='Y' && !($usr->private_access=='Y')) error_dialog('This is a Private Forum', 'This is a Private Forum, only invited users may view these forums.' , '');

All that needs to be done is to modify the admin interface to include the private flags for users and threads, so I dont have to go into MySQL everytime I wanna change it. Smile

This does ofcourse only work pretty easy so either a user can see all private forums, or not. It don't have any usergroup handling, but it works fine and shouldn't take any resources to mention since the $frm and $usr is already read anyway.

If it's interesting I can do the changes to the admin interface and post the changes aswell, otherwise I just leave it as it is for now untill I'm bored enough to dig around in the admin code.

Edit: Just corrected a minor typo in the code.

[Updated on: Wed, 20 March 2002 03:01]

Report message to a moderator

[Message index]
 
Read Message icon6.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: multiple domain names
Next Topic: Use <th> instead of <td class="TableHeading">
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 30 06:12:59 GMT 2024

Total time taken to generate the page: 0.03799 seconds