LoonyPandora wrote on Jun 30
th, 2003 at 7:52pm:
That's an easy one - you have specified that guests cannot view any boards (look at the main board index page as a guest, you will see no boards there) - thus the news script rightly says you don't have permission to access it.
solution: goto your admin centre, and make the board / category you want your news to be on visible to guests. Easy 8)
I have a better solution. By adding just two lines to the security.pl (in YaBB 1.4), you can make an exception - so users cannot see the "hidden" board from the forum (although they will be able to see from the "news" page).
This is for users who:
* Want to use the news script 2
* Want to hide a board from all users except "Admin" (from the forum view)
* Disallow guests from accessing the forum, except:
* Allow guest and member access to news script 2 content on page outside YaBB
Please note that this mod required more boards / category options version 2 and news script version 2 to be installed - and this was done on e YaBB 1.4 forum, not the more recent YaBB 2.1. Also note that the news board should have set the mbco2 options to allow the administrator user only to access the message board.
<edit file>
Sources/Security.pl
</edit file>
<search for>
if ($view_users{$curboard} eq "" && $view_groups{$curboard} eq "") {$access = "granted";}
</search for>
<add after>
#Rob mod - makes users able to access news even if guest access is off.
if ($curboard eq "Index_cat" && $username eq "Guest" && $action eq "news") {$access = "granted";}
if ($action eq "news" && (-e("$memberdir/$username.dat"))) {$access = "granted";} # Allow members to access news also!
</add after>
That should do it.
IMPORTANT NOTE:You must modify the above. Change "Index_cat" to the id of your board to access (not the board's name, but the actual ID).
Works like a charm.
--Rob