From abc8384bf2b70825983dc3f2ddaed6b8de82ae1f Mon Sep 17 00:00:00 2001 From: hanakin Date: Tue, 18 Jan 2011 22:39:50 -0500 Subject: [ticket/10001] Created new Template variable to house class names based on $folder_img value, Modified prosilver template files to utilize class for forum & topic images through out template via the newly created Template variable, Created the new styles within colours.css to handle the displaying of the forum & topic images * Created new Template variable to house class names based on $folder_img value in functions_display.php. * Created new Template variable to house class names based on $folder_img value in mcp_forums.php. * Created new Template variable to house class names based on $folder_img value in ucp_main.php. * Created new Template variable to house class names based on $folder_img value in search.php. * Created new Template variable to house class names based on $folder_img value in ucp_pm_viewfolder.php. * Created new Template variable to house class names based on $folder_img value in search.php. * Created new Template variable to house class names based on $folder_img value in viewforum.php. * Modified forumlist_body.html to utilize class for forum & topic images through out template via the newly created Template variable * Modified mcp_forum.html to utilize class for forum & topic images through out template via the newly created Template variable * Modified search_results.html to utilize class for forum & topic images through out template via the newly created Template variable * Modified ucp_main_bookmarks.html to utilize class for forum & topic images through out template via the newly created Template variable * Modified ucp_main_subscribed.html to utilize class for forum & topic images through out template via the newly created Template variable * Modified ucp_main_front.html to utilize class for forum & topic images through out template via the newly created Template variable * Modified ucp_pm_viewfolder.html to utilize class for forum & topic images through out template via the newly created Template variable * Modified viewforum_body.html to utilize class for forum & topic images through out template via the newly created Template variable * Created the new styles within colours.css to handle the displaying of the forum & topic images - NOTES: This changes are the first step in the revamp of prosilver initiative, this provides the ground work to handle the images via sprites to reduce the amount of HTTP requests by the server PHPBB3-10001 --- phpBB/includes/functions_display.php | 1 + phpBB/includes/mcp/mcp_forum.php | 1 + phpBB/includes/ucp/ucp_main.php | 3 +++ phpBB/includes/ucp/ucp_pm_viewfolder.php | 1 + 4 files changed, 6 insertions(+) (limited to 'phpBB/includes') diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php index acaef49fe8..56bc2eabd2 100644 --- a/phpBB/includes/functions_display.php +++ b/phpBB/includes/functions_display.php @@ -463,6 +463,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod 'FORUM_DESC' => generate_text_for_display($row['forum_desc'], $row['forum_desc_uid'], $row['forum_desc_bitfield'], $row['forum_desc_options']), 'TOPICS' => $row['forum_topics'], $l_post_click_count => $post_click_count, + 'FORUM_IMG_STYLE' => $folder_image, 'FORUM_FOLDER_IMG' => $user->img($folder_image, $folder_alt), 'FORUM_FOLDER_IMG_SRC' => $user->img($folder_image, $folder_alt, false, '', 'src'), 'FORUM_FOLDER_IMG_ALT' => isset($user->lang[$folder_alt]) ? $user->lang[$folder_alt] : '', diff --git a/phpBB/includes/mcp/mcp_forum.php b/phpBB/includes/mcp/mcp_forum.php index b70601b479..9bcfae9264 100644 --- a/phpBB/includes/mcp/mcp_forum.php +++ b/phpBB/includes/mcp/mcp_forum.php @@ -221,6 +221,7 @@ function mcp_forum_view($id, $mode, $action, $forum_info) $topic_row = array( 'ATTACH_ICON_IMG' => ($auth->acl_get('u_download') && $auth->acl_get('f_download', $row['forum_id']) && $row['topic_attachment']) ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : '', + 'TOPIC_IMG_STYLE' => $folder_img, 'TOPIC_FOLDER_IMG' => $user->img($folder_img, $folder_alt), 'TOPIC_FOLDER_IMG_SRC' => $user->img($folder_img, $folder_alt, false, '', 'src'), 'TOPIC_ICON_IMG' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['img'] : '', diff --git a/phpBB/includes/ucp/ucp_main.php b/phpBB/includes/ucp/ucp_main.php index a6f71669ce..f05ae54d7d 100644 --- a/phpBB/includes/ucp/ucp_main.php +++ b/phpBB/includes/ucp/ucp_main.php @@ -148,6 +148,7 @@ class ucp_main 'TOPIC_TITLE' => censor_text($row['topic_title']), 'TOPIC_TYPE' => $topic_type, + 'TOPIC_IMG_STYLE' => $folder_img, 'TOPIC_FOLDER_IMG' => $user->img($folder_img, $folder_alt), 'TOPIC_FOLDER_IMG_SRC' => $user->img($folder_img, $folder_alt, false, '', 'src'), 'ATTACH_ICON_IMG' => ($auth->acl_get('u_download') && $auth->acl_get('f_download', $forum_id) && $row['topic_attachment']) ? $user->img('icon_topic_attach', '') : '', @@ -334,6 +335,7 @@ class ucp_main $template->assign_block_vars('forumrow', array( 'FORUM_ID' => $forum_id, + 'FORUM_IMG_STYLE' => $folder_image, 'FORUM_FOLDER_IMG' => $user->img($folder_image, $folder_alt), 'FORUM_FOLDER_IMG_SRC' => $user->img($folder_image, $folder_alt, false, '', 'src'), 'FORUM_IMAGE' => ($row['forum_image']) ? '' . $user->lang[$folder_alt] . '' : '', @@ -811,6 +813,7 @@ class ucp_main 'TOPIC_TYPE' => $topic_type, 'FORUM_NAME' => $row['forum_name'], + 'TOPIC_IMG_STYLE' => $folder_img, 'TOPIC_FOLDER_IMG' => $user->img($folder_img, $folder_alt), 'TOPIC_FOLDER_IMG_SRC' => $user->img($folder_img, $folder_alt, false, '', 'src'), 'TOPIC_FOLDER_IMG_ALT' => $user->lang[$folder_alt], diff --git a/phpBB/includes/ucp/ucp_pm_viewfolder.php b/phpBB/includes/ucp/ucp_pm_viewfolder.php index 6b7172ca2b..df5097cdc6 100644 --- a/phpBB/includes/ucp/ucp_pm_viewfolder.php +++ b/phpBB/includes/ucp/ucp_pm_viewfolder.php @@ -165,6 +165,7 @@ function view_folder($id, $mode, $folder_id, $folder) 'PM_ICON_IMG' => (!empty($icons[$row['icon_id']])) ? '' : '', 'PM_ICON_URL' => (!empty($icons[$row['icon_id']])) ? $config['icons_path'] . '/' . $icons[$row['icon_id']]['img'] : '', 'FOLDER_IMG' => $user->img($folder_img, $folder_alt), + 'FOLDER_IMG_STYLE' => $folder_img, 'FOLDER_IMG_SRC' => $user->img($folder_img, $folder_alt, false, '', 'src'), 'PM_IMG' => ($row_indicator) ? $user->img('pm_' . $row_indicator, '') : '', 'ATTACH_ICON_IMG' => ($auth->acl_get('u_pm_download') && $row['message_attachment'] && $config['allow_pm_attach']) ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : '', -- cgit v1.2.1