Allowing guests to see all Boards but not entering

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

Previous topic - Next topic

dairin

so for SMF 1.0.7, which code is working ??
any1 care to share ??

L.G.S

Ban is just another word for deactivate anyway
FREE and LIVE World Cup + Premier League football streams:

www.gamesandgoals.com


Alan S

#162
Quote from: trenchteam on July 10, 2006, 07:30:18 AM
THIS WORKED FOR ME IN 1.1RC2.  Check my sig to view my sites. Im using it in BOTH!.

Quote from: bugsmi0 on June 24, 2006, 02:20:08 PM
what file is that in, I haven't found that code in any of the files


Sources/BoardIndex.php, find:





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


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

Change the above code to this:

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__);


Be sure to change those BOARD ID numbers to what you want GUESTs to VIEW but not access.

that code didnt work for me , i entered the id's off all my boards except 1 and then i logged out and tryed it and i could access every board on the forum


Edit - Never Mind Figured It Out
Quote from: Eliana Tamerin on August 23, 2008, 04:10:10 PM
SMF 7 is where it gets good. That has time travel. You can go back and post before the guy who flamed you. :P

mrandall131

Hey trenchteam, got a quick question for you.  Obviously, the code has been working for me since I first implemented it waaaaaaay back.  I changed my forum though, today, to move two of the boards I have this mod in for, to a child board.  They shows up on the main index as child boards, but when I go into the parent board, they disappear.  I thought that the second place that you enter the board numbers made it appear when if they are a child board?

If my explanation is fuzzy, you can check out http://northeastatvers.com/forum/index.php

Look for the Media Studio board, you'll see pictures and videos child boards.  Click on Media Studio and those boards disappear.

bugsmi0

is the Registered Links Mod an alternative to some of the hacks mentioned here ?

this mod is suppose to not let guest view any links, wonder if it can be used instead of the hacks

trenchteam

Quote from: mrandall131 on July 19, 2006, 07:50:15 AM
Hey trenchteam, got a quick question for you.  Obviously, the code has been working for me since I first implemented it waaaaaaay back.  I changed my forum though, today, to move two of the boards I have this mod in for, to a child board.  They shows up on the main index as child boards, but when I go into the parent board, they disappear.  I thought that the second place that you enter the board numbers made it appear when if they are a child board?

If my explanation is fuzzy, you can check out http://northeastatvers.com/forum/index.php

Look for the Media Studio board, you'll see pictures and videos child boards.  Click on Media Studio and those boards disappear.

I see it fine.

trenchteam

Quote from: bugsmi0 on July 21, 2006, 04:09:46 AM
is the Registered Links Mod an alternative to some of the hacks mentioned here ?

this mod is suppose to not let guest view any links, wonder if it can be used instead of the hacks

This allows Guests to view boards descriptions even though you set the board not to allow Guests to view posts.  When guests attempt to access the posts, they are redirected and told to register.

mrandall131

Quote from: sHoYoRoLL on July 21, 2006, 05:34:18 AM
Quote from: mrandall131 on July 19, 2006, 07:50:15 AM
Hey trenchteam, got a quick question for you.  Obviously, the code has been working for me since I first implemented it waaaaaaay back.  I changed my forum though, today, to move two of the boards I have this mod in for, to a child board.  They shows up on the main index as child boards, but when I go into the parent board, they disappear.  I thought that the second place that you enter the board numbers made it appear when if they are a child board?

If my explanation is fuzzy, you can check out http://northeastatvers.com/forum/index.php

Look for the Media Studio board, you'll see pictures and videos child boards.  Click on Media Studio and those boards disappear.

I see it fine.

Really?  After you click on the Media Studio board, you should see the pictures and videos child boards at the top of the thread listings, and I can't see them.....  Check out the snapshot below, see, no child boards.



I assume in the code snippet below, that the problem has to do with the b.childLevel arguement?  Can I just make that 2 and the boards will show up?

Quote from: Code
      WHERE ($user_info[query_see_board]" . ($user_info['is_guest'] ? " OR b.ID_BOARD IN (12, 13, 27)" : ' OR b.ID_BOARD IN
         (12, 13, 27)') . ')' . (empty($modsettings['countChildPosts']) ? " AND b.childLevel <= 1" : ''), '_FILE_', '_LINE_');

genois

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

Quote from: [Unknown] on September 05, 2004, 11:37:51 PM
Sources/BoardIndex.php, find:

WHERE $user_info[query_see_board]

Replace with:

WHERE ($user_info[query_see_board]" . ($user_info['is_guest'] ? " OR FIND_IN_SET('0', b.memberGroups)" : '') . ")

--> Tips and Tricks.

-[Unknown]

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.





it works for RC2

maritimesbob

Quote from: [Unknown] on September 05, 2004, 11:37:51 PM
Sources/BoardIndex.php, find:

WHERE $user_info[query_see_board]

Replace with:

WHERE ($user_info[query_see_board]" . ($user_info['is_guest'] ? " OR FIND_IN_SET('0', b.memberGroups)" : '') . ")


-[Unknown]

This is just what I needed for my SMF 1.1 RC2 board. One slight problem is, while guests can see all the forums now the forums they are permitted to see they can also reply to topics in them. That despite not having permission to do so in the guests permission settings. So basically, I have now have to deny guests access to all my forums.

What I was hoping to achieve, was so guests could access certain forums but denied access for others and of course, I don`t want guests having reply permissions.

meadwench

#170
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]


This sounds great, but how would you make this work for both guests *and* registered? I have a special group called 'patrons' that can see 3 boards that no one else can see. I'd like guests *and* registered to be able to see the board and topics, but not the posts.
Vicky Rowe
Health and Weight Loss Coach
http://www.hcgloss.com
SMF 2.0 RC3, Joomla 1.5.8

Jennifer

#171
Quote from: Alan S link=topic=16281.msg646512#msg646512
Edit - Never Mind Figured It Out

How? It's not working on mine; I'm running 1.3

meadwench

Yeah, I had it working on RC2, but when I upgraded to RC3, it stopped working. Has anyone worked out the new code for RC3 yet?
Vicky Rowe
Health and Weight Loss Coach
http://www.hcgloss.com
SMF 2.0 RC3, Joomla 1.5.8

bollywhat

Quote from: bugsmi0 on March 27, 2006, 11:49:38 AM
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, 27)" : ' OR b.ID_BOARD IN (12, 13, 27)') . ')' . (empty($modSettings['countChildPosts']) ? "
AND b.childLevel <= 1" : ''), __FILE__, __LINE__);


Just put your board number in both spots and you are all set, worked for me.

(This was from post 58)


I've got a question.  I don't have

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


in my boardindex.php!  I only have this:

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


So what should I change?

landshark

I'd also like to know if this hack is working in RC3? Has anyon been able to get it to work?

landshark

#175
Ok i am going to take the lack of response as a No it isn't working in RC3 yet. Is there anyone working on getting it to work?

codenaught

bollywhat, I'm not sure why your code looks like that. Are you using RC3 with any mods?

If you can tell me what you want to do, I can try to help you. That code you pointed to appeared to make it so that guests would see certain boards they could did not have access to on the board index. But the code seemed to make it so that any member would see it on the board index, not just guests.

ladyshark, have you even tried this? http://www.simplemachines.org/community/index.php?topic=16281.msg315008#msg315008

That should work on RC3.
Quote from: meadwench on September 15, 2006, 08:17:13 PM
Yeah, I had it working on RC2, but when I upgraded to RC3, it stopped working. Has anyone worked out the new code for RC3 yet?
This code is still in RC3: http://www.simplemachines.org/community/index.php?topic=16281.msg315008#msg315008

Dev Consultant
Former SMF Doc Coordinator

landshark

You know what they say when one "assumes", I just figured since someone said it wasn't working that it wasn't. I made the change as described and all seems to be working as i want.

thanks for the kick in the butt akabugeyes

d3v1an7

Hey guys,

Thx for the information so far - been very helpful...

I'm using the hack, which is working great - but I can't for the life of me seem to remove the 'Last Post' information on the board index.
There was talk of this earlier in the thread, but it was only just mentioned... Is there any working hack that will remove the last post info if they do not have access to the boards?

I'm just trying to get the forums like they were in phpBB - in every other case, they are much better, but this issue has been evading me all day.

Any info would be appreciated - Thanks!

5h4rk

Quote from: meadwench on August 04, 2006, 12:47:59 PM
This sounds great, but how would you make this work for both guests *and* registered? I have a special group called 'patrons' that can see 3 boards that no one else can see. I'd like guests *and* registered to be able to see the board and topics, but not the posts.

I want to do exactly the same thing! becasue I got a board that only Mod and Admin has access, and I want it to be viewed by Guest and Registered, but so far, guest can see all boards, and registered all boards except the one that I mentioned.

I'm working with RC3.

Advertisement: