News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

SSI use board that doesn't allow guests.

Started by andrewfer000, February 27, 2020, 12:49:29 PM

Previous topic - Next topic

andrewfer000

I am working with someone who uses SMF for everything and I would like to use ssi_boardNews on a private page. I get this error when I select the board.

You cannot specify a board that doesn't allow guests. Please check the board ID before trying again.

How can I let ssi_boardNews output the private boards if possible?

vbgamer45

You would need to modify SSI.php
And change this query
-1 is guests group id

// Make sure guests can see this board.
$request = $smcFunc['db_query']('', '
SELECT id_board
FROM {db_prefix}boards
WHERE ' . ($board === null ? '' : 'id_board = {int:current_board}
AND ') . 'FIND_IN_SET(-1, member_groups) != 0
LIMIT 1',
array(
'current_board' => $board,
)
);
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

andrewfer000

#2
Thank You. I fixed by changing it to my group id. Is this secure? Also is there a better way to do it?

Edit: i think it is more secure now since I made a separate SSI.php for the page. It seems to work without issue but how can I get it so I can have it output boards from many different groups?

Advertisement: