I really hope someone can help (it's a small problem but takes a while to explain).
I have "Topics Only Visible to OP" MOD installed. It's a MOD which allows a forum to be set to private, meaning only the topic author and selected groups can view the threads within certain forums.
MOD is here: "Topics Only Visible to OP (Original Poster)"
The problem I have is, with "Board3 Portal" installed, in "Latest news" module the users who do not have permissions to view those private forums, can still see topic titles (which I don't want).
And here's an example of how the MOD hides information normally visible on index/viewforum pages:
includes/functions_display.php
Find:
Code: Select all
'LAST_POSTER_FULL' =>
Code: Select all
'LAST_POSTER_FULL' =>
Code: Select all
($row['forum_op_only_view'] && !$auth->acl_get('f_op_only_view', $forum_id)) ? '--' :
Code: Select all
'LAST_POSTER_FULL' => get_username_string('full', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']),
Code: Select all
'LAST_POSTER_FULL' => ($row['forum_op_only_view'] && !$auth->acl_get('f_op_only_view', $forum_id)) ? '--' : get_username_string('full', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']),
And with this line the <!-- IF forumrow.LAST_POST_TIME --> in the forumlist_body.html template file evaluate to false, thus showing No posts for users who do not have sufficient permissions:
Code: Select all
($row['forum_op_only_view'] && !$auth->acl_get('f_op_only_view', $forum_id)) ? '0' : $last_post_time,
How can I Adapt all this to the portal?!
In functions.php I just could find this and try some stuff but without sucess :/:
Code: Select all
// fetch post for news & announce
function phpbb_fetch_posts($module_id, $forum_from, $permissions, $number_of_posts, $text_length, $time, $type, $start = 0, $invert = false)
{
global $db, $phpbb_root_path, $auth, $user, $bbcode_bitfield, $bbcode, $portal_config, $config;
$posts = array();
$post_time = ($time == 0) ? '' : 'AND t.topic_time > ' . (time() - $time * 86400);
$forum_from = (strpos($forum_from, ',') !== FALSE) ? explode(',', $forum_from) : (($forum_from != '') ? array($forum_from) : array());
$str_where = '';
$topic_icons = array(0);
$have_icons = 0;
if ($permissions == true)
{
$disallow_access = array_unique(array_keys($auth->acl_getf('!f_read', true)));
}
else
{
$disallow_access = array();
}
if ($invert == true)
{
$disallow_access = array_merge($disallow_access, $forum_from);
$forum_from = array();
}