Simple Machines Community Forum

SMF Support => SMF 1.1.x Support => Topic started by: Conquester777 on June 16, 2004, 03:50:46 AM

Title: passworded boards
Post by: Conquester777 on June 16, 2004, 03:50:46 AM
i must be really dumb because this must be possible but i cant find it.

how do i password boards.

i want to only allow some people access to a specific board.
Title: Re: passworded boards
Post by: Killer Possum on June 16, 2004, 03:52:13 AM
There are no passworded boards, however, you can put those people in a certain group and only allow that group to access a board. Then no one else but that group can see or access the board.
Title: Re: passworded boards
Post by: Oldiesmann on June 16, 2004, 10:37:12 AM
I think someone was going to make a mod for this...
Title: Re: passworded boards
Post by: Conquester777 on June 19, 2004, 01:02:53 AM
Quote from: Killer Possum on June 16, 2004, 03:52:13 AM
There are no passworded boards, however, you can put those people in a certain group and only allow that group to access a board. Then no one else but that group can see or access the board.
oh okay, I suppose I'll hafta do that.


why wouldn't there be passworded boards.... gez
Title: Re: passworded boards
Post by: -Garion- on June 19, 2004, 02:36:52 AM
Mainly because if access to a board is restricted to only members who belong to a certain membergroup, other people won't see it anyways; in essence that board will be invisible, and even if they do manage to get the URL, they still won't be able to get in.  Therefore, it is not necessary in most cases to have need of a password protected board, because the people you want to see the board will have been given access by the admin anyways.
Title: Re: passworded boards
Post by: nave on June 19, 2004, 01:39:49 PM
i really do prefer the member group option to the passworded boards for the simple reason that i found when i had a proboards board, people were giving out the password to other members who could then get in, and i also had to continualy deal with members who forgot the password and would be pm'ing me for it.
Title: Re: passworded boards
Post by: -Garion- on June 19, 2004, 03:37:20 PM
Lol I feel exactly the same way, it's always a hassle to update member's on new passwords and such.
Title: Re: passworded boards
Post by: andrej on June 21, 2004, 05:27:05 AM
well, i'm not really after password-protected boards but what i would like ist to be able to have a board *visible* to all users but only *accessible* to a certain membergroup. the reason why i would want anything like that is that i want people to apply for membership in certain groups, i.e. if they see that there is a board they would like to have access to but still they don't..  :P etc. etc.

am i overlooking something? is there a way to do that?

andrej
Title: Re: passworded boards
Post by: Oldiesmann on June 25, 2004, 11:05:04 AM
In Sources/Boardindex.php

Find
WHERE $user_info[query_see_board]
AND b.ID_CAT = c.ID_CAT
AND b.childLevel <= 1


Replace
WHERE b.ID_CAT = c.ID_CAT
AND b.childLevel <= 1


That will make every single board visible to all users, regardless of whether or not they have access to it. If you want to do it only for selective boards, try this:

Find
// Find all boards and categories, as well as related information.
// !!! This query uses a file sort.


Replace
$showids = array(1,2,...); //Put the ids of the boards you want to make visible here
// Find all boards and categories, as well as related information.
// !!! This query uses a file sort.


Find
WHERE $user_info[query_see_board]
AND b.ID_CAT = c.ID_CAT
AND b.childLevel <= 1


Replace
WHERE $user_info[query_see_board] || " . inarray(b.ID_BOARD,$showids) . "
AND b.ID_CAT = c.ID_CAT
AND b.childLevel <= 1


I'm not sure if that last thing will work or not, but I think it will...
Title: Re: passworded boards
Post by: ms_ukyankee on July 31, 2004, 12:00:57 PM
A bit late but, I needed to display a board just to show that it was available as a support group. I tried the above code and it almost worked, but not quite. I have fixed this so it will work, took me all afternoon to get it right, but it was fun. ;) It would be nice to have it as a feature/admin option in board settings though instead of hacking the source.

In BoardIndex.php
Find:
// Find all boards and categories, as well as related information.
// !!! This query uses a file sort.


Replace:
$showthesetoo="";
$showids = array('29','27'); //Put the ids of the boards you want to make visible here, separate with comma
for ($i = 0; $i < count($showids); $i++) {
if (count($showids) > 1 && ($i+1) <= count($showids)) {
$showthesetoo.=" OR b.ID_BOARD=".$showids[$i];
}
else {
$showthesetoo=" OR b.ID_BOARD=".$showids[$i];
}
}

// Find all boards and categories, as well as related information.
// !!! This query uses a file sort.



Find:
WHERE $user_info[query_see_board] AND b.ID_CAT = c.ID_CAT
AND b.childLevel <= 1


Replace:
WHERE ($user_info[query_see_board] ".$showthesetoo."
)
AND b.ID_CAT = c.ID_CAT
AND b.childLevel <= 1
Title: Re: passworded boards
Post by: Elijah Bliss on December 03, 2004, 04:51:52 PM
Quote from: leah on July 31, 2004, 12:00:57 PM
A bit late but, I needed to display a board just to show that it was available as a support group. I tried the above code and it almost worked, but not quite. I have fixed this so it will work, took me all afternoon to get it right, but it was fun. ;) It would be nice to have it as a feature/admin option in board settings though instead of hacking the source.

In BoardIndex.php
Find:
// Find all boards and categories, as well as related information.
// !!! This query uses a file sort.


Replace:
$showthesetoo="";
$showids = array('29','27'); //Put the ids of the boards you want to make visible here, separate with comma
for ($i = 0; $i < count($showids); $i++) {
if (count($showids) > 1 && ($i+1) <= count($showids)) {
$showthesetoo.=" OR b.ID_BOARD=".$showids[$i];
}
else {
$showthesetoo=" OR b.ID_BOARD=".$showids[$i];
}
}

// Find all boards and categories, as well as related information.
// !!! This query uses a file sort.



Find:
WHERE $user_info[query_see_board] AND b.ID_CAT = c.ID_CAT
AND b.childLevel <= 1


Replace:
WHERE ($user_info[query_see_board] ".$showthesetoo."
)
AND b.ID_CAT = c.ID_CAT
AND b.childLevel <= 1


I can't get this to work, is this RC2 compatible? And I do agree that this should be a built in feature at some point.
Title: Re: passworded boards
Post by: babjusi on January 25, 2007, 04:50:16 AM
Quote from: Conquester777 on June 16, 2004, 03:50:46 AM
i must be really dumb because this must be possible but i cant find it.

how do i password boards.

i want to only allow some people access to a specific board.

I think that here is the mod that you are looking for:
http://custom.simplemachines.org/mods/index.php?mod=237