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

Home » FUDforum » FUDforum Suggestions » Private Forums?
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
icon6.gif  Private Forums? [message #799] Fri, 01 March 2002 00:41 Go to next message
Lord_Moz is currently offline  Lord_Moz   United States
Messages: 1
Registered: March 2002
Karma: 0
Junior Member
I would really really love to have private staff only forums... is that at all possible? or in the works?

I read the thread earlier about hidden forums, and such, but I really want it listed with the others, but only for staff members.

Thanks for your help!
Wink
Re: Private Forums? [message #800 is a reply to message #799] Fri, 01 March 2002 00:45 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Lord_Moz wrote on Thu, 28 February 2002 7:41 PM

I would really really love to have private staff only forums... is that at all possible? or in the works?

I read the thread earlier about hidden forums, and such, but I really want it listed with the others, but only for staff members.

Thanks for your help!
Wink


Well, there currently is no "private forums" per say.

You can create a forum where only the registered users may post. You may also set a password allowing only the registered users who have that password to make posts.
You can make the forum in such a way that only the registered members can actually read it.

This is about it for now.


FUDforum Core Developer
Re: Private Forums? [message #821 is a reply to message #799] Sat, 02 March 2002 01:09 Go to previous messageGo to next message
hackie is currently offline  hackie   Canada
Messages: 177
Registered: January 2002
Karma: 0
Senior Member
Core Developer

Lord_Moz wrote on Fri, 01 March 2002 9:41 AM

I would really really love to have private staff only forums... is that at all possible? or in the works?

I read the thread earlier about hidden forums, and such, but I really want it listed with the others, but only for staff members.

Thanks for your help!
Wink


Once we get up to version 2.0 Real Soon Now [tm] (the one with templates) we will probably add groups and a very advanced permission control system.. but for now there is no easy way of doing what you want with FUD.. sorry Smile )


cc intelligence.c -o intelligence
$ ./intelligence
Segmentation fault
Add my voice [message #946 is a reply to message #821] Wed, 13 March 2002 18:26 Go to previous messageGo to next message
thedryad is currently offline  thedryad   Canada
Messages: 5
Registered: March 2002
Location: Fredericton, NB
Karma: 0
Junior Member
I just wanted to add my voice to supporting private forums. (Such as staff only)

I am also willing to lend a hand if necessary.

Susan Douglas
Re: Private Forums? [message #1013 is a reply to message #946] Tue, 19 March 2002 23:02 Go to previous messageGo to next message
Luterin is currently offline  Luterin   Sweden
Messages: 17
Registered: March 2002
Location: Malmö/Sweden
Karma: 0
Junior Member

I am also desperatly searching for private forums, so I'm just curious when this feature is expected to be avail?

I know the best way is ofcourse to do a real group based system, but if your system takes to long (in a hurry as usual) I was thinking if you mind if I do some hacks?

Thinking about just adding a flag to each forum (fud_forum) that flags it as private (Y/N) then setting a flag on each user in fud_users to see if the user is allowed to read private forums.

And if I'm in a real good mood I could add the feature to the admin interface aswell, so I dont have to do it the "hard way" with mysql all the time.

I haven't looked in your code yet, but it shouldn't be much of a problem to do this "hack" in I guess. (Btw, I work with Php/Mysql for a living aswell)
Re: Private Forums? [message #1015 is a reply to message #1013] Tue, 19 March 2002 23:10 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Our work is primary aimed at making the 1.9 release which will be the beta of the 2.0, which will support templating... 90% of our time goes toward that goal.
The other 10% is bug solving in the prior releases.

I don't imagine the user group system needed for implementing a proper permission system becoming available until about 1 month from now or so.

If you need it now, go ahead and hack away at a solution Smile

My suggestion would be to create a table forum_perms with 4 fields:

id (auto_increment)
user_id INT
forum_id INT
access ENUM('Y','N');

And then run a query on this table whenever a user tries to access a certain forum.

This I believe is a better system then what you suggest since your system would require an entry inside the fud_users table for each forum, which is BAD if you have many forums.

If you want to optimize your code, you could add "strict ENUM('Y','N') to the fud_forum table. And only perform the additional check inside forum_perms table is strict field is set to Y. This would save a query on most pages, since I suspect you may only have 1 or 2 private forums while all other forums will not be private.


FUDforum Core Developer
Re: Private Forums? [message #1019 is a reply to message #1015] Wed, 20 March 2002 02:40 Go to previous messageGo to next message
Luterin is currently offline  Luterin   Sweden
Messages: 17
Registered: March 2002
Location: Malmö/Sweden
Karma: 0
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

Re: Private Forums? [message #1021 is a reply to message #1019] Wed, 20 March 2002 03:04 Go to previous messageGo to next message
Luterin is currently offline  Luterin   Sweden
Messages: 17
Registered: March 2002
Location: Malmö/Sweden
Karma: 0
Junior Member

Bah, who needs sleep anyway.... Modified the admin code to support private forums.

users_adm.inc:
function set_private_access()
{
Q("UPDATE fud_users SET private_access='Y' where id=".$this->id);
}

function clear_private_access()
{
Q("UPDATE fud_users SET private_access='N' where id=".$this->id);
}

admuser.php:
Add this case:
case 'private':
if ( $usr->private_access == 'Y' )
$usr->clear_private_access();
else
$usr->set_private_access();

header("Location: admuser.php?".$_RSID."&usr_login=".urlencode($usr->lo gin));
exit();
break;

Add this row before the simillar block row:
<tr bgcolor="#f1f1f1"><td>Private Access:</td></td><?php echo $usr->private_access; ?> &lt;<a href="admuser.php?act=private&
usr_id=<?php echo $usr->id.'&'.$_RSID; ?>">Toggle</a>&gt;</td></tr>

Wonder if I can stay away from the admin thread code..

Re: Private Forums? [message #1023 is a reply to message #1021] Wed, 20 March 2002 03:06 Go to previous messageGo to next message
Luterin is currently offline  Luterin   Sweden
Messages: 17
Registered: March 2002
Location: Malmö/Sweden
Karma: 0
Junior Member

Hmm, should I add a "var $private_access=NULL;" to users.inc?

Shouldn't matter since the table never is unset, but I guess some wierd memory leak or something might screw things up?
Re: Private Forums? [message #1024 is a reply to message #1023] Wed, 20 March 2002 03:08 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
It is a good idea to add the variable, it is "the proper way".

FUDforum Core Developer
Re: Private Forums? [message #1026 is a reply to message #1024] Wed, 20 March 2002 03:46 Go to previous messageGo to next message
Luterin is currently offline  Luterin   Sweden
Messages: 17
Registered: March 2002
Location: Malmö/Sweden
Karma: 0
Junior Member

Ok, added some to make it "the proper way":

users.inc:
var $private_access=NULL;
forum.inc:
var $private=NULL;

And ofcourse I couldn't quit a half finished job, so here is the modifications to the admin interface.

admforum.php: (Added this at the end of the form, before the submit button)
<tr bgcolor="#bff8ff">
<td>Private</td>
<td><?php draw_select('frm_private', "No\nYes", "N\nY", empty($frm_private)?'':$frm_private); ?></td>
</tr>

forum_adm.inc: (Added at the end of the SQL statements in the following fuctions)
function add():
,'".$this->private."'
function sync():
,private='".YN($this->private)."'


So, now it's all there, to get a simple but effective way to make forums private.

Feel free to use this code, or ask/mail me if you got any questions.

Hope I didn't mess any of the code up while pasting it here, it's 5AM here now, so a bit tired, hehe. Smile
Re: Private Forums? [message #1027 is a reply to message #1026] Wed, 20 March 2002 03:49 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Thanks for the code Smile

If we decide to use I'll definately give you a shout...


FUDforum Core Developer
Re: Private Forums? [message #1029 is a reply to message #799] Wed, 20 March 2002 04:04 Go to previous messageGo to next message
Luterin is currently offline  Luterin   Sweden
Messages: 17
Registered: March 2002
Location: Malmö/Sweden
Karma: 0
Junior Member

I wrote it up a bit better and posted it under "Code Hacks" where it should belong (I hope?).

I'll keep poking around in the code and use the board to see if there is any other things that I or others want to have implemented.

Can't help it, but poking around in someones code when its extremely well written like this is a pure pleasure. Smile

If you get any ideas of something you would like me to check out or something, just toss me a mail, I actually enjoy doing this, hehe.

Oh well, not to shabby to implement a new feature only a bunch of hours after I first installed it. Smile

Again, nice code and nice system, was really a pleasure to dig around in.
Re: Private Forums? [message #1037 is a reply to message #799] Wed, 20 March 2002 12:34 Go to previous messageGo to next message
Luterin is currently offline  Luterin   Sweden
Messages: 17
Registered: March 2002
Location: Malmö/Sweden
Karma: 0
Junior Member

Found a little bug where people could "sneak in" and read messages in a private
area,

* msg.php
* Before the line which checks if the user is registerd, add this line.
* The line is "if (!isset($usr) && $frm->anon_viewing=='N') ..........."

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.' , '');

Re: Private Forums? [message #1040 is a reply to message #799] Wed, 20 March 2002 12:51 Go to previous messageGo to next message
Luterin is currently offline  Luterin   Sweden
Messages: 17
Registered: March 2002
Location: Malmö/Sweden
Karma: 0
Junior Member

I'm "discontinuing" the posts in this mail, go to the code hack section of the board and you will see updates here.

Found another "bug" ofcourse. Smile
Re: Private Forums? [message #1370 is a reply to message #1019] Wed, 10 April 2002 13:55 Go to previous messageGo to next message
smike is currently offline  smike   Germany
Messages: 182
Registered: April 2002
Location: Munich/Germany
Karma: 0
Senior Member
Do you/or the FUDforum-team make a difference between seeing, reading and writing to a forum at the new Version with group-management?
If you develop this new feature, it would be nice to remember this difference.
Bye, Mike

Re: Private Forums? [message #1373 is a reply to message #1370] Wed, 10 April 2002 14:51 Go to previous message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Yeah, the group managment allowed VERY fine grained control.

You can control of people can:

Read, Create Threads, Post Replies, Create Polls, Vote on Polls, Attach Files, Use Smilies, Rate Threads, Use image tags in their messages, edit messages, delete messages, move threads, split threads, make sticky and.or announcment messages.

So, once this system is in place you'll can control exactly what people can & cannot do.


FUDforum Core Developer
  Switch to threaded view of this topic Create a new topic Submit Reply
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: Fri Nov 29 22:25:50 GMT 2024

Total time taken to generate the page: 0.02418 seconds