diff options
-rw-r--r-- | phpBB/language/en/viewforum.php | 1 | ||||
-rw-r--r-- | phpBB/styles/subSilver/template/viewforum_body.html | 31 | ||||
-rw-r--r-- | phpBB/viewforum.php | 9 |
3 files changed, 39 insertions, 2 deletions
diff --git a/phpBB/language/en/viewforum.php b/phpBB/language/en/viewforum.php index f995aa4d78..8c7c6a78d9 100644 --- a/phpBB/language/en/viewforum.php +++ b/phpBB/language/en/viewforum.php @@ -46,6 +46,7 @@ $lang = array_merge($lang, array( 'NEW_POSTS_LOCKED' => 'New posts [ Locked ]', 'NO_NEW_POSTS_HOT' => 'No new posts [ Popular ]', 'NO_NEW_POSTS_LOCKED' => 'No new posts [ Locked ]', + 'NO_READ_ACCESS' => 'You do not have the required permissions to read topics within this forum.', 'POST_FORUM_LOCKED' => 'Forum is locked', diff --git a/phpBB/styles/subSilver/template/viewforum_body.html b/phpBB/styles/subSilver/template/viewforum_body.html index fcc7aae70a..d357f45279 100644 --- a/phpBB/styles/subSilver/template/viewforum_body.html +++ b/phpBB/styles/subSilver/template/viewforum_body.html @@ -87,7 +87,7 @@ <br clear="all" /> <!-- ENDIF --> -<!-- IF S_IS_POSTABLE --> +<!-- IF S_IS_POSTABLE or S_NO_READ_ACCESS --> <div id="pageheader"> <h2><a class="titles" href="{U_VIEW_FORUM}">{FORUM_NAME}</a></h2> @@ -104,6 +104,35 @@ <div id="pagecontent"> +<!-- IF S_NO_READ_ACCESS --> + <table class="tablebg" width="100%" cellspacing="1"> + <tr> + <td class="row1" height="30" align="center" valign="middle"><span class="gen">{L_NO_READ_ACCESS}</span></td> + </tr> + </table> + + <!-- IF not S_USER_LOGGED_IN --> + + <br /><br /> + + <form method="post" action="{S_LOGIN_ACTION}"> + + <table class="tablebg" width="100%" cellspacing="1"> + <tr> + <td class="cat"><h4><a href="{U_LOGIN_LOGOUT}">{L_LOGIN_LOGOUT}</a></h4></td> + </tr> + <tr> + <td class="row1" align="center"><span class="genmed">{L_USERNAME}:</span> <input class="post" type="text" name="username" size="10" /> <span class="genmed">{L_PASSWORD}:</span> <input class="post" type="password" name="password" size="10" /> <span class="gensmall">{L_LOG_ME_IN}</span> <input type="checkbox" class="radio" name="autologin" /> <input type="submit" class="btnmain" name="login" value="{L_LOGIN}" /></td> + </tr> + </table> + + </form> + + <!-- ENDIF --> + + <br clear="all" /> +<!-- ENDIF --> + <!-- IF S_IS_POSTABLE or TOTAL_TOPICS --> <table width="100%" cellspacing="1"> <tr> diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php index f421e42c9f..989a30b6c8 100644 --- a/phpBB/viewforum.php +++ b/phpBB/viewforum.php @@ -147,9 +147,16 @@ if (!($forum_data['forum_type'] == FORUM_POST || (($forum_data['forum_flags'] & page_footer(); } -// Ok, if someone has only list-access, we only display the forum list +// Ok, if someone has only list-access, we only display the forum list. +// We also make this circumstance available to the template in case we want to display a notice. ;) if (!$auth->acl_get('f_read', $forum_id)) { + $template->assign_vars(array( + 'S_NO_READ_ACCESS' => true, + 'S_AUTOLOGIN_ENABLED' => ($config['allow_autologin']) ? true : false, + 'S_LOGIN_ACTION' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login&redirect=' . urlencode(build_url(array('_f_')))) + )); + page_footer(); } |