diff --git a/config/modules.yml b/config/modules.yml index fef05082..5346884d 100644 --- a/config/modules.yml +++ b/config/modules.yml @@ -7,6 +7,7 @@ services: - @config - @template - @dbal.conn + - @pagination - @request - %core.php_ext% - %core.root_path% @@ -177,6 +178,7 @@ services: - @cache - @config - @dbal.conn + - @pagination - @request - @template - %core.root_path% diff --git a/modules/announcements.php b/modules/announcements.php index 0e524bd0..6ecd405c 100644 --- a/modules/announcements.php +++ b/modules/announcements.php @@ -56,6 +56,9 @@ class announcements extends module_base /** @var \phpbb\db\driver */ protected $db; + /** @var \phpbb\pagination */ + protected $pagination; + /** @var \phpbb\request\request */ protected $request; @@ -76,18 +79,20 @@ class announcements extends module_base * @param \phpbb\config\config $config phpBB config * @param \phpbb\template $template phpBB template * @param \phpbb\db\driver $db Database driver + * @param \phpbb\pagination $pagination phpBB pagination * @param \phpbb\request\request $request phpBB request * @param string $phpEx php file extension * @param string $phpbb_root_path phpBB root path * @param \phpbb\user $user phpBB user object */ - public function __construct($auth, $cache, $config, $template, $db, $request, $phpEx, $phpbb_root_path, $user) + public function __construct($auth, $cache, $config, $template, $db, $pagination, $request, $phpEx, $phpbb_root_path, $user) { $this->auth = $auth; $this->cache = $cache; $this->config = $config; $this->template = $template; $this->db = $db; + $this->pagination = $pagination; $this->request = $request; $this->php_ext = $phpEx; $this->phpbb_root_path = $phpbb_root_path; @@ -280,6 +285,7 @@ class announcements extends module_base 'REPLIES' => $fetch_news[$i]['topic_replies'], 'TOPIC_VIEWS' => $fetch_news[$i]['topic_views'], 'A_ID' => $i, + 'TOPIC_IMG_STYLE' => $folder_img, 'TOPIC_FOLDER_IMG' => $this->user->img($folder_img, $folder_alt), 'TOPIC_FOLDER_IMG_SRC' => $this->user->img($folder_img, $folder_alt, false, '', 'src'), 'TOPIC_FOLDER_IMG_ALT' => $this->user->lang[$folder_alt], @@ -302,7 +308,7 @@ class announcements extends module_base 'S_HAS_ATTACHMENTS' => (!empty($fetch_news[$i]['attachments'])) ? true : false, )); - phpbb_generate_template_pagination($this->template, $view_topic_url, 'announcements_center_row.pagination', 'start', $fetch_news[$i]['topic_replies'] + 1, $this->config['posts_per_page'], 1, true, true); + $this->pagination->generate_template_pagination($view_topic_url, 'announcements_center_row.pagination', 'start', $fetch_news[$i]['topic_replies'] + 1, $this->config['posts_per_page'], 1, true, true); if(!empty($fetch_news[$i]['attachments'])) @@ -319,7 +325,7 @@ class announcements extends module_base $this->template->assign_vars(array( 'AP_PAGINATION' => $pagination, 'TOTAL_ANNOUNCEMENTS' => ($total_announcements == 1) ? $this->user->lang['VIEW_LATEST_ANNOUNCEMENT'] : sprintf($this->user->lang['VIEW_LATEST_ANNOUNCEMENTS'], $total_announcements), - 'AP_PAGE_NUMBER' => phpbb_on_page($this->template, $this->user, '', $total_announcements, $this->config['board3_number_of_announcements_' . $module_id], $start)) + 'AP_PAGE_NUMBER' => $this->pagination->on_page('', $total_announcements, $this->config['board3_number_of_announcements_' . $module_id], $start)) ); } } @@ -378,7 +384,7 @@ class announcements extends module_base 'S_HAS_ATTACHMENTS' => (!empty($fetch_news[$i]['attachments'])) ? true : false, )); - phpbb_generate_template_pagination($this->template, $view_topic_url, 'announcements_center_row.pagination', 'start', $fetch_news[$i]['topic_replies'] + 1, $this->config['posts_per_page'], 1, true, true); + $this->pagination->generate_template_pagination($view_topic_url, 'announcements_center_row.pagination', 'start', $fetch_news[$i]['topic_replies'] + 1, $this->config['posts_per_page'], 1, true, true); if(!empty($fetch_news[$i]['attachments'])) { @@ -395,7 +401,7 @@ class announcements extends module_base $this->template->assign_vars(array( 'AP_PAGINATION' => $pagination, 'TOTAL_ANNOUNCEMENTS' => ($total_announcements == 1) ? $this->user->lang['VIEW_LATEST_ANNOUNCEMENT'] : sprintf($this->user->lang['VIEW_LATEST_ANNOUNCEMENTS'], $total_announcements), - 'AP_PAGE_NUMBER' => phpbb_on_page($this->template, $this->user, '', $total_announcements, $this->config['board3_number_of_announcements_' . $module_id], $start)) + 'AP_PAGE_NUMBER' => $this->pagination->on_page('', $total_announcements, $this->config['board3_number_of_announcements_' . $module_id], $start)) ); } } diff --git a/modules/forumlist.php b/modules/forumlist.php index ae050dd7..5f7d5aaa 100644 --- a/modules/forumlist.php +++ b/modules/forumlist.php @@ -90,7 +90,11 @@ class forumlist extends module_base */ public function get_template_center($module_id) { - display_forums('', $this->config['load_moderators'], false); + if (!function_exists('display_forums')) + { + include($this->phpbb_root_path . 'includes/functions_display.' . $this->php_ext); + } + \display_forums('', $this->config['load_moderators'], false); $this->template->assign_vars(array( 'FORUM_IMG' => $this->user->img('forum_read', 'NO_NEW_POSTS'), diff --git a/modules/news.php b/modules/news.php index 1a559e36..0aeeeee4 100644 --- a/modules/news.php +++ b/modules/news.php @@ -53,6 +53,9 @@ class news extends module_base /** @var \phpbb\db\driver */ protected $db; + /** @var \phpbb\pagination */ + protected $pagination; + /** @var \phpbb\request\request */ protected $request; @@ -75,18 +78,20 @@ class news extends module_base * @param \phpbb\cache $cache phpBB cache system * @param \phpbb\config\config $config phpBB config * @param \phpbb\db\driver $db phpBB db driver + * @param \phpbb\pagination $pagination phpBB pagination * @param \phpbb\request\request $request phpBB request * @param \phpbb\template $template phpBB template * @param string $phpbb_root_path phpBB root path * @param string $phpEx php file extension * @param \phpbb\user $user phpBB user object */ - public function __construct($auth, $cache, $config, $db, $request, $template, $phpbb_root_path, $phpEx, $user) + public function __construct($auth, $cache, $config, $db, $pagination, $request, $template, $phpbb_root_path, $phpEx, $user) { $this->auth = $auth; $this->cache = $cache; $this->config = $config; $this->db = $db; + $this->pagination = $pagination; $this->request = $request; $this->template = $template; $this->phpbb_root_path = $phpbb_root_path; @@ -255,7 +260,7 @@ class news extends module_base // Grab icons $icons = $this->cache->obtain_icons(); - phpbb_generate_template_pagination($this->template, $view_topic_url, 'pagination', 'np', $fetch_news[$i]['topic_replies'], $this->config['board3_number_of_news_' . $module_id], $start); + $this->pagination->generate_template_pagination($view_topic_url, 'pagination', 'np', $fetch_news[$i]['topic_replies'], $this->config['board3_number_of_news_' . $module_id], $start); $this->template->assign_block_vars('news_row', array( 'ATTACH_ICON_IMG' => ($fetch_news[$i]['attachment'] && $this->config['allow_attachments']) ? $this->user->img('icon_topic_attach', $this->user->lang['TOTAL_ATTACHMENTS']) : '', @@ -309,7 +314,7 @@ class news extends module_base $this->template->assign_vars(array( 'NP_PAGINATION' => $pagination, 'TOTAL_NEWS' => ($total_news == 1) ? sprintf($this->user->lang['VIEW_FORUM_TOPICS'][1], $total_news) : sprintf($this->user->lang['VIEW_FORUM_TOPICS'][2], $total_news), - 'NP_PAGE_NUMBER' => phpbb_on_page($this->template, $this->user, $view_topic_url, $total_news, $this->config['board3_number_of_news_' . $module_id], $start)) + 'NP_PAGE_NUMBER' => $this->pagination->on_page($view_topic_url, $total_news, $this->config['board3_number_of_news_' . $module_id], $start)) ); } } @@ -356,7 +361,7 @@ class news extends module_base 'S_HAS_ATTACHMENTS' => (!empty($fetch_news[$i]['attachments'])) ? true : false, )); - phpbb_generate_template_pagination($this->template, $view_topic_url, 'news_row.pagination', 'start', $fetch_news[$i]['topic_replies'] + 1, $this->config['posts_per_page'], 1, true, true); + $this->pagination->generate_template_pagination($view_topic_url, 'news_row.pagination', 'start', $fetch_news[$i]['topic_replies'] + 1, $this->config['posts_per_page'], 1, true, true); if(!empty($fetch_news[$i]['attachments'])) { @@ -373,7 +378,7 @@ class news extends module_base $this->template->assign_vars(array( 'NP_PAGINATION' => $pagination, 'TOTAL_NEWS' => ($total_news == 1) ? $this->user->lang['VIEW_FORUM_TOPIC'] : $this->user->lang('VIEW_FORUM_TOPICS', $total_news), - 'NP_PAGE_NUMBER' => phpbb_on_page($this->template, $this->user, '', $total_news, $this->config['board3_number_of_news_' . $module_id], $start)) + 'NP_PAGE_NUMBER' => $this->pagination->on_page('', $total_news, $this->config['board3_number_of_news_' . $module_id], $start)) ); } } diff --git a/styles/prosilver/template/event/overall_header_head_append.html b/styles/prosilver/template/event/overall_header_head_append.html index 86922c9a..37158abc 100755 --- a/styles/prosilver/template/event/overall_header_head_append.html +++ b/styles/prosilver/template/event/overall_header_head_append.html @@ -1 +1,4 @@ - + + + + diff --git a/styles/prosilver/template/portal/modules/announcements_center.html b/styles/prosilver/template/portal/modules/announcements_center.html index f3cd3902..9fa8fee8 100644 --- a/styles/prosilver/template/portal/modules/announcements_center.html +++ b/styles/prosilver/template/portal/modules/announcements_center.html @@ -8,7 +8,7 @@
-
-
+
+
+
-
-
+
+
+
-
-
+
+
+
-
-
+
+
+

