Przeglądaj źródła

Merge branch 'release-2.1' of https://github.com/SimpleMachines/SMF2.1

emanuele 12 lat temu
rodzic
commit
281b3ad039

+ 1 - 1
Sources/Avatar.php

@@ -19,7 +19,7 @@ if (!defined('SMF'))
 
 function showAvatar()
 {
-	global $smcFunc, $modSettings, $sourcedir, $maintenance;
+	global $smcFunc, $modSettings, $maintenance;
 
 	// We need a valid ID
 	if(empty($_GET['attach']) || (string)$_GET['attach'] != (string)(int)$_GET['attach'])

+ 1 - 1
Sources/Calendar.php

@@ -337,7 +337,7 @@ function CalendarPost()
  */
 function iCalDownload()
 {
-	global $smcFunc, $sourcedir, $forum_version, $context, $modSettings, $webmaster_email, $mbname;
+	global $smcFunc, $sourcedir, $forum_version, $modSettings, $webmaster_email, $mbname;
 
 	// You can't export if the calendar export feature is off.
 	if (empty($modSettings['cal_export']))

+ 1 - 1
Sources/DbExtra-mysql.php

@@ -174,7 +174,7 @@ function smf_db_backup_table($table, $backup_table)
  */
 function smf_db_optimize_table($table)
 {
-	global $smcFunc, $db_name, $db_prefix;
+	global $smcFunc, $db_prefix;
 
 	$table = str_replace('{db_prefix}', $db_prefix, $table);
 

+ 1 - 1
Sources/DbPackages-mysql.php

@@ -207,7 +207,7 @@ function smf_db_drop_table($table_name, $parameters = array(), $error = 'fatal')
  */
 function smf_db_add_column($table_name, $column_info, $parameters = array(), $if_exists = 'update', $error = 'fatal')
 {
-	global $smcFunc, $db_package_log, $txt, $db_prefix;
+	global $smcFunc, $db_package_log, $db_prefix;
 
 	$table_name = str_replace('{db_prefix}', $db_prefix, $table_name);
 

+ 4 - 1
Sources/Display.php

@@ -1164,7 +1164,10 @@ function Display()
 		$context['mod_buttons'][] = array('text' => 'restore_topic', 'image' => '', 'lang' => true, 'url' => $scripturl . '?action=restoretopic;topics=' . $context['current_topic'] . ';' . $context['session_var'] . '=' . $context['session_id']);
 
 	// Allow adding new mod buttons easily.
-	call_integration_hook('integrate_display_buttons');
+	// Note: $context['normal_buttons'] and $context['mod_buttons'] are added for backward compatibility with 2.0, but are deprecated and should not be used
+	call_integration_hook('integrate_display_buttons', array(&$context['normal_buttons']));
+	// Note: integrate_mod_buttons is no more necessary and deprecated, but is kept for backward compatibility with 2.0
+	call_integration_hook('integrate_mod_buttons', array(&$context['mod_buttons']));
 }
 
 /**

+ 2 - 1
Sources/MessageIndex.php

@@ -661,7 +661,8 @@ function MessageIndex()
 	);
 
 	// Allow adding new buttons easily.
-	call_integration_hook('integrate_messageindex_buttons');
+	// Note: $context['normal_buttons'] is added for backward compatibility with 2.0, but is deprecated and should not be used
+	call_integration_hook('integrate_messageindex_buttons', array(&$context['normal_buttons']));
 }
 
 /**

+ 2 - 1
Sources/Subs-Editor.php

@@ -1656,7 +1656,8 @@ function create_control_richedit($editorOptions)
 		);
 
 		// Allow mods to modify BBC buttons.
-		call_integration_hook('integrate_bbc_buttons');
+		// Note: pass the array here is not necessary and is deprecated, but it is ketp for backward compatibility with 2.0
+		call_integration_hook('integrate_bbc_buttons', array(&$context['bbc_tags']));
 
 		// Show the toggle?
 		if (empty($modSettings['disable_wysiwyg']))

+ 2 - 2
Themes/default/ManageLanguages.template.php

@@ -244,12 +244,12 @@ function template_modify_language_entries()
 					', $txt['edit_languages'], '
 				</h3>
 			</div>
-			<div class="information">
+			<div id="editlang_desc" class="information">
 				', $txt['edit_language_entries_primary'], '
 			</div>';
 
 	// Not writable?
-	if ($context['lang_file_not_writable_message'])
+	if (!empty($context['lang_file_not_writable_message']))
 	{
 		// Oops, show an error for ya.
 		echo '

+ 12 - 7
Themes/default/css/index.css

@@ -998,7 +998,7 @@ img.sort {
 	font-weight: bold;
 	border: 1px solid #f49a3a;
 	box-shadow: 0 5px 5px rgba(255,255,255,0.2) inset;
-	text-shadow: 0 0 1px rgba(0,0,0,0.4);
+	text-shadow: 1px 1px 3px rgba(0, 0, 0, 1);
 }
 /* Level 1 hover effects. */
 .dropmenu li a:hover, .dropmenu li:hover a, .dropmenu li a:focus {
@@ -1008,6 +1008,7 @@ img.sort {
 	cursor: pointer;
 	text-decoration: none;
 	box-shadow: 0 4px 4px rgba(255,255,255,0.1) inset;
+	text-shadow: 1px 1px 3px rgba(255, 255, 255, 1);
 }
 /* Level 1 active button. */
 .dropmenu li a.active:hover, .dropmenu li:hover a.active {
@@ -1304,9 +1305,7 @@ img.sort {
 	font-weight: bold;
 	border-radius: 3px;
 	border: 1px solid #558080;
-	border-left: 1px solid #bbb;
-	border-top: 1px solid #354f64;
-	box-shadow: -1px -1px 2px rgba(0,0,0,0.1), -1px -2px 3px rgba(255,255,255,0.3) inset, 1px 2px 3px rgba(0,0,0,0.1) inset;
+	text-shadow: 1px 1px 3px rgba(0, 0, 0, 1);
 }
 .buttonlist ul li a.active:hover {
 	color: #ffc187;
@@ -1419,7 +1418,7 @@ h1.forumtitle {
 }
 h1.forumtitle a {
 	color: #a85400;
-	text-shadow: -1px -1px 0 rgba(0,0,0,0.5), 1px 1px 0 #fff;
+	text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5), 1px 1px 0 #fff;
 }
 /* Float these items to the right */
 #siteslogan, img#smflogo {
@@ -1478,16 +1477,17 @@ ul li.greeting {
 #inner_wrap a.avatar {
 	float: left;
 	margin: 0 10px 5px 0;
-	width: 40px;
 }
 /* No more huge avatars up top. YAY! */
 #inner_wrap a.avatar img {
 	height: 100%;
 	width: 100%;
+	max-width: 40px;
+	max-height: 40px;
 }
 /* News section. */
 #inner_wrap .news {
-	width: 50%;
+	max-width: 50%;
 	max-width: 27em;
 	float: right;
 	overflow: auto;
@@ -4039,6 +4039,11 @@ span.hidelink {
 	border: none;
 	box-shadow: none;
 }
+
+div#editlang_desc {
+	margin-bottom: 8px;
+}
+
 /* Some caution required here, as Post.template.php topic summary shares #recent with recent posts. */
 #recent .core_posts {
 	padding: 8px 0;

+ 46 - 5
Themes/default/css/rtl.css

@@ -46,6 +46,37 @@
 	padding-left: 0;
 }
 
+a#bot {
+	float: left;
+}
+
+img.icon {
+	margin: 0 0 0 5px !important;
+}
+
+a.collapse img {
+	margin: -8px 0 0 -4px;
+}
+
+#menu_nav {
+	padding: 0;
+}
+
+.button_submit, .button_reset, .button_link {
+	margin: 0;
+}
+
+/* BoardIndex Styling for RTL */
+td.lastpost {
+	border-left: 1px solid #ddd;
+	border-right: 0px !important;
+}
+
+.table_list td.icon {
+	border-left: 0px !important;
+	border-right: 1px solid #ddd;
+}
+
 /* Lists with settings use these a lot.
 ------------------------------------------------------- */
 dl.settings {
@@ -167,8 +198,7 @@ li#collapse_button {
 	margin: 0 0 0 0.2em;
 }
 .buttonlist ul li a {
-	margin-left: 0;
-	margin-right: 12px;
+	margin: 0;
 }
 .buttonlist ul li a span {
 	left: 8px;
@@ -260,7 +290,7 @@ form#ic_login ul li {
 	text-align: left;
 }
 img#upshrink_ic, img#newsupshrink {
-	float: right;
+	float: left;
 }
 
 /* Styles for the message (topic) index.
@@ -354,9 +384,10 @@ span.percent {
 	margin: 0 0 0 0.5em;
 }
 
-.keyinfo {
-	float: right;
+#display_jump_to select {
+	margin: 0;
 }
+
 .modifybutton {
 	clear: left;
 	float: left;
@@ -897,4 +928,14 @@ span.search_weight {
 }
 ul.moderation_notes li {
 	padding: 4px 4px 4px 0;
+}
+
+#inner_wrap a.avatar {
+	float: right;
+	width: 46px;
+}
+
+.unread_links {
+	float: left !important;
+	padding-left: 0;
 }

+ 3 - 3
Themes/default/languages/index.english.php

@@ -206,7 +206,7 @@ $txt['error_invalid_characters_username'] = 'Invalid character used in Username.
 $txt['welcome_guest'] = 'Welcome, <strong>%1$s</strong>. Please <a href="%2$s">login</a>.';
 
 //$txt['welcome_guest_register'] = 'Welcome, <strong>%1$s</strong>. Please <a href="' . $scripturl . '?action=login">login</a> or <a href="' . $scripturl . '?action=register">register</a>.';
-$txt['welcome_guest_register'] = 'Welcome to <strong>'. $context['forum_name']. '</strong>. Please <a href="' . $scripturl . '?action=login">login</a> or <a href="' . $scripturl . '?action=register">register</a>.';
+$txt['welcome_guest_register'] = 'Welcome to <strong>' . $context['forum_name'] . '</strong>. Please <a href="' . $scripturl . '?action=login">login</a> or <a href="' . $scripturl . '?action=register">register</a>.';
 
 $txt['please_login'] = 'Please <a href="' . $scripturl . '?action=login">login</a>.';
 $txt['login_or_register'] = 'Please <a href="' . $scripturl . '?action=login">login</a> or <a href="' . $scripturl . '?action=register">register</a>.';
@@ -501,7 +501,7 @@ $txt['status'] = 'Status';
 $txt['go_up'] = 'Go Up';
 $txt['go_down'] = 'Go Down';
 
-$forum_copyright = '<a href="' . $scripturl . '?action=credits" title="Simple Machines Forum" target="_blank" class="new_win">%1$s</a> |
+$forum_copyright = '<a href="' . $scripturl . '?action=credits" title="Simple Machines Forum" class="new_win">%1$s</a> |
  <a href="http://www.simplemachines.org/about/smf/license.php" title="License" target="_blank" class="new_win">SMF &copy; 2012</a>, <a href="http://www.simplemachines.org" title="Simple Machines" target="_blank" class="new_win">Simple Machines</a>';
 
 $txt['birthdays'] = 'Birthdays:';
@@ -831,4 +831,4 @@ $txt['debug_tokens'] = 'Tokens: ';
 $txt['debug_browser'] = 'Browser ID: ';
 $txt['debug_hooks'] = 'Hooks called: ';
 
-?>
+?>