News:

Wondering if this will always be free?  See why free is better.

Main Menu

Allowing guests to see all Boards but not entering

Started by trenchteam, September 05, 2004, 11:19:01 PM

Previous topic - Next topic

thetzfreak

Can someone give me some code for my problem?

Thanks.

Sting

Quote from: .diplomat on December 04, 2004, 07:12:15 PM
anyway that could be done but also block them from seeing the last post that was in that board...so instead if it saying:

Date
In: Wow, what a game!!!!
By: Diplomat

they see something like

Date
Protected Board

has anyone come up with a solution for this? I would like this as well.

Jay T

Quote from: Sting on November 04, 2005, 05:14:47 AM
Quote from: .diplomat on December 04, 2004, 07:12:15 PM
anyway that could be done but also block them from seeing the last post that was in that board...so instead if it saying:

Date
In: Wow, what a game!!!!
By: Diplomat

they see something like

Date
Protected Board

has anyone come up with a solution for this? I would like this as well.

I would love to have this mod but not till this can be done.

Sting

I'm not even gonna try coding this, but the logistics to it would basically be

check the access of the specific board; if the user does not have access then display Protected Board

and since earlier someone posted a way to pick specific boards to allow guests to view, etc, you could basically do this similarly.

HWB

I have tried each thing that has been listed here and none of it seems to work for me. I want guests to be able to view forums on the board but not be able to read them. If they click on the board, I would like it to tell them they must register to view. Can someone please help me.

thetzfreak

QuoteI saw one reply on how to make all the boards visible, but to make the threads unreadable. Can someone please post code on how to make the threads unviewable for only one board?

More explanation: I want guests to be able to view this particular board and to go inside the particular board and see all the different threads in the particular board, but when they click on any of the threads, they will be asked to login/register.
how do i do this?

Sting

Quote from: thetzfreak on November 10, 2005, 10:44:27 PM
QuoteI saw one reply on how to make all the boards visible, but to make the threads unreadable. Can someone please post code on how to make the threads unviewable for only one board?

More explanation: I want guests to be able to view this particular board and to go inside the particular board and see all the different threads in the particular board, but when they click on any of the threads, they will be asked to login/register.
how do i do this?

Ok, the below was posted in an earlier reply and seems to explain it the best




Quote from: Jay T on September 03, 2005, 01:34:10 PM
For all boards


For specific boards. You have to change the (12, 13) to the specific boards on your forums you want this to work on. (12, 13) are just an example

Quote from: [Unknown] on July 27, 2005, 10:44:52 PM
You want to replace this:

WHERE $user_info[query_see_board]" . (empty($modSettings['countChildPosts']) ? "
AND b.childLevel <= 1" : ''), __FILE__, __LINE__);


With:

WHERE ($user_info[query_see_board]" . ($user_info['is_guest'] ? " OR b.ID_BOARD IN (12, 13)" : '') .')' . (empty($modSettings['countChildPosts']) ? "
AND b.childLevel <= 1" : ''), __FILE__, __LINE__);


-[Unknown]


And this does work for all guests and groups not assigned to those boards. I am using it on my boards.




genois

could there be additional code so that
there is a permission set in the admin panel...

like the board is viewable to who.. (eg: all, member, specfic group)
so that i wont have to change the codes again and again
when i have more boards added... or when i have more groups..

thetzfreak

Sting, I just tried it, and it doesn't seem to have any affect at all. Guests can still go into those boards. I also tried the code to make it for every board, but still no effect. Guests still have all access to all threads.

-Freak

Sting

Have you gone into the permissions and set it so guests can't see boards there? With this + the code shown previously, guests will see the board but won't be able to enter them.

thetzfreak

Alright I did that... but now when I click on the board, it's asking me to login :(

bloc

If you rather not do this hack in source files, try this idea:

http://www.simplemachines.org/community/index.php?topic=55739.msg390801#msg390801

Beware that this apply to boards that all can see..which you rather restrict threads to non-guests. So don't set permissions on it, allow all access. Think of it as a extra roadblock before the entrance... ;)

Carlos Gandra

Quote from: [Unknown] on January 15, 2005, 04:00:02 AM
Sources/BoardIndex.php, find:

WHERE $user_info[query_see_board]

Replace with:

WHERE ($user_info[query_see_board]" . ($user_info['is_guest'] ? " OR b.ID_BOARD IN (##, ##, ##)" : '') . ")

Where ##, ##, ## is a list of board IDs.

How do I modify files?

-[Unknown]

Today I've found a problem with this code. The private boards (wich ID we don't put on that code and ungrouped members aren't allowed to access), still invisible but... with the link of this private board, anyone registed member could enter and read :-X

One of my ungrouped members have put the link of the private board on the browser and he could access him without appear the message "board doesn't exist". He couldn't reply, but could read...

Do you have a solution or the best to protect private boards is remove this code :'(?

Thanks in advance

Carlos Gandra
Mundo dos Animais

Sheepy

I'm doing a 'see but don't read' mod controlled by group permission.  Sorry my flu is delaying the progress.

Sheepy

It's done.  http://mods.simplemachines.org/index.php?mod=231
It won't stop guests from seeing what topics are there, but it will prevents them from actually reading the topics, if you deny them the permission.

Saku

in BoardIndex.php
i changed
WHERE $user_info[query_see_board]" . (empty($modSettings['countChildPosts']) ? "
         AND b.childLevel <= 1" : ''), __FILE__, __LINE__);

with

WHERE  b.childLevel <= 1", __FILE__, __LINE__);

and i'm using SMF 1.1RC1

sadiqbaig


no its not showing ne error ,
also allowing guests to view board

can sum1 tell me how to do this for  SMF 1.1 RC1

MacGig


L.G.S

FREE and LIVE World Cup + Premier League football streams:

www.gamesandgoals.com


CountryLady

Sure would love to have this for 1.1 Gold...pretty please...?

Advertisement: