diff options
Diffstat (limited to 'phpBB/includes')
-rw-r--r-- | phpBB/includes/functions.php | 6 | ||||
-rw-r--r-- | phpBB/includes/functions_display.php | 2 | ||||
-rw-r--r-- | phpBB/includes/mcp/mcp_topic.php | 2 | ||||
-rw-r--r-- | phpBB/includes/template.php | 34 |
4 files changed, 39 insertions, 5 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 848e97d935..2c77d15aa9 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -1900,6 +1900,12 @@ function page_header($page_title = '') 'T_TEMPLATE_PATH' => "{$phpbb_root_path}styles/" . $user->theme['primary']['template_path'] . '/template', 'T_IMAGESET_PATH' => "{$phpbb_root_path}styles/" . $user->theme['primary']['imageset_path'] . '/imageset', 'T_IMAGESET_LANG_PATH' => "{$phpbb_root_path}styles/" . $user->theme['primary']['imageset_path'] . '/imageset/' . $user->data['user_lang'], + 'T_SMILIES_PATH' => "{$phpbb_root_path}{$config['smilies_path']}/", + 'T_AVATAR_PATH' => "{$phpbb_root_path}{$config['avatar_path']}/", + 'T_AVATAR_GALLERY_PATH' => "{$phpbb_root_path}{$config['avatar_gallery_path']}/", + 'T_ICONS_PATH' => "{$phpbb_root_path}{$config['icons_path']}/", + 'T_RANKS_PATH' => "{$phpbb_root_path}{$config['ranks_path']}/", + 'T_UPLOAD_PATH' => "{$phpbb_root_path}{$config['upload_path']}/", 'T_STYLESHEET_LINK' => (!$user->theme['primary']['theme_storedb']) ? "{$phpbb_root_path}styles/" . $user->theme['primary']['theme_path'] . '/theme/stylesheet.css' : "{$phpbb_root_path}style.$phpEx?sid=$user->session_id&id=" . $user->theme['primary']['theme_id'], 'T_STYLESHEET_NAME' => $user->theme['primary']['theme_name'], 'T_THEME_DATA' => (!$user->theme['primary']['theme_storedb']) ? '' : $user->theme['primary']['theme_data']) diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php index 190d07015e..1454391e9c 100644 --- a/phpBB/includes/functions_display.php +++ b/phpBB/includes/functions_display.php @@ -304,7 +304,7 @@ function display_forums($root_data = '', $display_moderators = TRUE) 'LAST_POST_IMG' => $user->img('icon_post_latest', 'VIEW_LATEST_POST'), 'FORUM_ID' => $row['forum_id'], - 'FORUM_FOLDER_IMG' => ($row['forum_image']) ? '<img src="' . $phpbb_root_path . $row['forum_image'] . '" alt="' . $folder_alt . '" border="0" />' : $user->img($folder_image, $folder_alt), + 'FORUM_FOLDER_IMG' => ($row['forum_image']) ? '<img src="' . $phpbb_root_path . $row['forum_image'] . '" alt="' . $folder_alt . '" />' : $user->img($folder_image, $folder_alt), 'FORUM_NAME' => $row['forum_name'], 'FORUM_DESC' => $row['forum_desc'], $l_post_click_count => $post_click_count, diff --git a/phpBB/includes/mcp/mcp_topic.php b/phpBB/includes/mcp/mcp_topic.php index 7d0a0d9cd4..31c79250f1 100644 --- a/phpBB/includes/mcp/mcp_topic.php +++ b/phpBB/includes/mcp/mcp_topic.php @@ -133,7 +133,7 @@ function mcp_topic_view($id, $mode, $action, $url) 'MESSAGE' => $message, 'POST_ID' => $row['post_id'], - 'POST_ICON_IMG' => ($row['post_time'] > $user->data['user_lastvisit'] && $user->data['is_registered']) ? $user->img('icon_post_new', $user->lang['NEW_POST']) : $user->img('icon_post', $user->lang['POST']), + 'MINI_POST_IMG' => ($row['post_time'] > $user->data['user_lastvisit'] && $user->data['is_registered']) ? $user->img('icon_post_new', $user->lang['NEW_POST']) : $user->img('icon_post', $user->lang['POST']), 'S_CHECKBOX' => $s_checkbox, 'S_POST_REPORTED' => ($row['post_reported']) ? true : false, diff --git a/phpBB/includes/template.php b/phpBB/includes/template.php index 3d9e0d605a..90f635f5a0 100644 --- a/phpBB/includes/template.php +++ b/phpBB/includes/template.php @@ -126,7 +126,6 @@ class template return true; } - // Load a compiled template if possible, if not, recompile it function _tpl_load(&$handle) { @@ -265,18 +264,47 @@ class template $str = &$str[sizeof($str) - 1]; } + $vararray['S_ROW_COUNT'] = sizeof($str[$blocks[$blockcount]]); + + // Assign S_FIRST_ROW + if (sizeof($str[$blocks[$blockcount]]) == 0) + { + $vararray['S_FIRST_ROW'] = true; + } + + // Now the tricky part, we always assign S_LAST_ROW and remove the entry before + // This is much more clever than going through the complete template data on display (phew) + $vararray['S_LAST_ROW'] = true; + if (sizeof($str[$blocks[$blockcount]]) > 0) + { + unset($str[$blocks[$blockcount]][sizeof($str[$blocks[$blockcount]]) - 1]['S_LAST_ROW']); + } + // Now we add the block that we're actually assigning to. // We're adding a new iteration to this block with the given // variable assignments. - $vararray['S_ROW_COUNT'] = sizeof($str[$blocks[$blockcount]]); $str[$blocks[$blockcount]][] = &$vararray; } else { // Top-level block. + $vararray['S_ROW_COUNT'] = sizeof($this->_tpldata[$blockname]); + + // Assign S_FIRST_ROW + if (sizeof($this->_tpldata[$blockname]) == 0) + { + $vararray['S_FIRST_ROW'] = true; + } + + // We always assign S_LAST_ROW and remove the entry before + $vararray['S_LAST_ROW'] = true; + if (sizeof($this->_tpldata[$blockname]) > 0) + { + unset($this->_tpldata[$blockname][sizeof($this->_tpldata[$blockname]) - 1]['S_LAST_ROW']); + } + // Add a new iteration to this block with the variable assignments // we were given. - $vararray['S_ROW_COUNT'] = sizeof($this->_tpldata[$blockname]); $this->_tpldata[$blockname][] = &$vararray; } |