diff options
-rw-r--r-- | phpBB/language/en/common.php | 2 | ||||
-rw-r--r-- | phpBB/styles/prosilver/template/viewtopic_body.html | 6 | ||||
-rw-r--r-- | phpBB/viewtopic.php | 8 |
3 files changed, 15 insertions, 1 deletions
diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php index 33d39c3e99..61749046c4 100644 --- a/phpBB/language/en/common.php +++ b/phpBB/language/en/common.php @@ -161,6 +161,8 @@ $lang = array_merge($lang, array( 'DISPLAY_MESSAGES' => 'Display messages from previous', 'DISPLAY_POSTS' => 'Display posts from previous', 'DISPLAY_TOPICS' => 'Display topics from previous', + 'DOWNLOAD_ALL' => 'Download all', + 'DOWNLOAD_ALL_ATTACH' => 'Download all attachments', 'DOWNLOADED' => 'Downloaded', 'DOWNLOADING_FILE' => 'Downloading file', 'DOWNLOAD_COUNTS' => array( diff --git a/phpBB/styles/prosilver/template/viewtopic_body.html b/phpBB/styles/prosilver/template/viewtopic_body.html index cfbf0969d9..d27d653907 100644 --- a/phpBB/styles/prosilver/template/viewtopic_body.html +++ b/phpBB/styles/prosilver/template/viewtopic_body.html @@ -45,6 +45,10 @@ </div> <!-- ENDIF --> + <!-- IF S_HAS_ATTACHMENTS --> + <span>[ <a href="{U_DL_ALL_LINK}">{L_DOWNLOAD_ALL_ATTACH}</a> ]</span> + <!-- ENDIF --> + <!-- IF .pagination or TOTAL_POSTS --> <div class="pagination"> <!-- IF U_VIEW_UNREAD_POST and not S_IS_BOT --><a href="{U_VIEW_UNREAD_POST}">{L_VIEW_UNREAD_POST}</a> • <!-- ENDIF -->{TOTAL_POSTS} • @@ -157,7 +161,7 @@ <!-- IF postrow.S_HAS_ATTACHMENTS --> <dl class="attachbox"> - <dt>{L_ATTACHMENTS}</dt> + <dt>{L_ATTACHMENTS}<!-- IF postrow.S_MULTIPLE_ATTACH --> [ <a href="{postrow.U_DL_ALL_LINK}">{L_DOWNLOAD_ALL}</a> ]<!-- ENDIF --></dt> <!-- BEGIN attachment --> <dd>{postrow.attachment.DISPLAY_ATTACHMENT}</dd> <!-- END attachment --> diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index b6df14d42d..fce1be7784 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -1314,6 +1314,11 @@ if (sizeof($attach_list)) } } +$template->assign_vars(array( + 'S_HAS_ATTACHMENTS' => !empty($attachments), + 'U_DL_ALL_LINK' => append_sid("{$phpbb_root_path}download/file.$phpEx", "topic_id=$topic_id"), +)); + // Instantiate BBCode if need be if ($bbcode_bitfield !== '') { @@ -1556,6 +1561,7 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) 'POSTER_ID' => $poster_id, 'S_HAS_ATTACHMENTS' => (!empty($attachments[$row['post_id']])) ? true : false, + 'S_MULTIPLE_ATTACH' => !empty($attachments[$row['post_id']]) && sizeof($attachments[$row['post_id']]) > 1, 'S_POST_UNAPPROVED' => ($row['post_approved']) ? false : true, 'S_POST_REPORTED' => ($row['post_reported'] && $auth->acl_get('m_report', $forum_id)) ? true : false, 'S_DISPLAY_NOTICE' => $display_notice && $row['post_attachment'], @@ -1567,6 +1573,8 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) 'S_IGNORE_POST' => ($row['hide_post']) ? true : false, 'L_IGNORE_POST' => ($row['hide_post']) ? sprintf($user->lang['POST_BY_FOE'], get_username_string('full', $poster_id, $row['username'], $row['user_colour'], $row['post_username']), '<a href="' . $viewtopic_url . "&p={$row['post_id']}&view=show#p{$row['post_id']}" . '">', '</a>') : '', + + 'U_DL_ALL_LINK' => append_sid("{$phpbb_root_path}download/file.$phpEx", 'post_id=' . $row['post_id']), ); if (isset($cp_row['row']) && sizeof($cp_row['row'])) |