Created
February 22, 2013 16:30
-
-
Save Un1matr1x/5014667 to your computer and use it in GitHub Desktop.
Allow language keys for forum name/description
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/includes/functions_display.php b/includes/functions_display.php | |
| index 41aa440..7a6aa7f 100644 | |
| --- a/includes/functions_display.php | |
| +++ b/includes/functions_display.php | |
| @@ -317,8 +317,8 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod | |
| $template->assign_block_vars('forumrow', array( | |
| 'S_IS_CAT' => true, | |
| 'FORUM_ID' => $row['forum_id'], | |
| - 'FORUM_NAME' => $row['forum_name'], | |
| - 'FORUM_DESC' => generate_text_for_display($row['forum_desc'], $row['forum_desc_uid'], $row['forum_desc_bitfield'], $row['forum_desc_options']), | |
| + 'FORUM_NAME' => (isset($user->lang[$row['forum_name']])) ? $user->lang[$row['forum_name']] : $row['forum_name'], | |
| + 'FORUM_DESC' => (isset($user->lang[$row['forum_desc']])) ? $user->lang[$row['forum_desc']] : generate_text_for_display($row['forum_desc'], $row['forum_desc_uid'], $row['forum_desc_bitfield'], $row['forum_desc_options']), | |
| 'FORUM_FOLDER_IMG' => '', | |
| 'FORUM_FOLDER_IMG_SRC' => '', | |
| 'FORUM_IMAGE' => ($row['forum_image']) ? '<img src="' . $phpbb_root_path . $row['forum_image'] . '" alt="' . $user->lang['FORUM_CAT'] . '" />' : '', | |
| @@ -460,6 +460,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod | |
| } | |
| } | |
| + | |
| $template->assign_block_vars('forumrow', array( | |
| 'S_IS_CAT' => false, | |
| 'S_NO_CAT' => $catless && !$last_catless, | |
| @@ -472,8 +473,8 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod | |
| 'S_FEED_ENABLED' => ($config['feed_forum'] && !phpbb_optionget(FORUM_OPTION_FEED_EXCLUDE, $row['forum_options']) && $row['forum_type'] == FORUM_POST) ? true : false, | |
| 'FORUM_ID' => $row['forum_id'], | |
| - 'FORUM_NAME' => $row['forum_name'], | |
| - 'FORUM_DESC' => generate_text_for_display($row['forum_desc'], $row['forum_desc_uid'], $row['forum_desc_bitfield'], $row['forum_desc_options']), | |
| + 'FORUM_NAME' => (isset($user->lang[$row['forum_name']])) ? $user->lang[$row['forum_name']] : $row['forum_name'], | |
| + 'FORUM_DESC' => (isset($user->lang[$row['forum_desc']])) ? $user->lang[$row['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_FOLDER_IMG' => $user->img($folder_image, $folder_alt), |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment