Pārlūkot izejas kodu

Merge pull request #164 from emanuele45/master

cosmetic changes
emanuele45 12 gadi atpakaļ
vecāks
revīzija
dfc7ad2de1

+ 8 - 8
Sources/ManageSettings.php

@@ -389,15 +389,15 @@ function ModifyCoreFeatures($return_config = false)
 	{
 		checkSession();
 
-	if (isset($_GET['xml']))
-	{
-		$tokenValidation = validateToken('admin-core', 'post', false);
+		if (isset($_GET['xml']))
+		{
+			$tokenValidation = validateToken('admin-core', 'post', false);
 
-		if (empty($tokenValidation))
-			return 'token_verify_fail';
-	}
-	else
-		validateToken('admin-core');
+			if (empty($tokenValidation))
+				return 'token_verify_fail';
+		}
+		else
+			validateToken('admin-core');
 
 		$setting_changes = array('admin_features' => array());
 

+ 2 - 1
Sources/Packages.php

@@ -1570,7 +1570,8 @@ function list_getPackages($start, $items_per_page, $sort, $params, $installed)
 	}
 
 	if (empty($packages))
-		$packages = array('modification' => array(), 'avatar' => array(), 'language' => array(), 'unknown' => array());
+		foreach ($context['modification_types'] as $type)
+			$packages[$type] = arra();
 
 	if ($dir = @opendir($boarddir . '/Packages'))
 	{

+ 5 - 5
Sources/Subs.php

@@ -3836,11 +3836,6 @@ function setupMenuContext()
 				'href' => $scripturl . '?action=profile',
 				'show' => $context['allow_edit_profile'],
 				'sub_buttons' => array(
-					'summary' => array(
-						'title' => $txt['summary'],
-						'href' => $scripturl . '?action=profile',
-						'show' => true,
-					),
 					'account' => array(
 						'title' => $txt['account'],
 						'href' => $scripturl . '?action=profile;area=account',
@@ -3852,6 +3847,11 @@ function setupMenuContext()
 						'show' => allowedTo(array('profile_extra_any', 'profile_extra_own')),
 						'is_last' => true,
 					),
+					'theme' => array(
+						'title' => $txt['theme'],
+						'href' => $scripturl . '?action=profile;area=theme',
+						'show' => allowedTo(array('profile_extra_any', 'profile_extra_own', 'profile_extra_any')),
+					),
 				),
 			),
 			'pm' => array(

+ 12 - 0
Sources/Xml.php

@@ -89,6 +89,18 @@ function EnableCoreFeatures()
 	// Just in case, maybe we don't need it
 	loadLanguage('Errors');
 
+	// We need (at least) this to ensure that mod files are included
+	if (!empty($modSettings['integrate_admin_include']))
+	{
+		$admin_includes = explode(',', $modSettings['integrate_admin_include']);
+		foreach ($admin_includes as $include)
+		{
+			$include = strtr(trim($include), array('$boarddir' => $boarddir, '$sourcedir' => $sourcedir, '$themedir' => $settings['theme_dir']));
+			if (file_exists($include))
+				require_once($include);
+		}
+	}
+
 	$errors = array();
 	$returns = array();
 	$tokens = array();

+ 6 - 5
Themes/default/Display.template.php

@@ -219,7 +219,7 @@ function template_main()
 
 		// [WIP] The new member info dropdown starts here. Note that conditionals have not been fully checked yet.
 			echo '
-									<ul class="smalltext" id="msg_', $message['id'], '_extra_info">';
+									<ul class="smalltext" id="msg_', $message['id'], '_extra_info"', $ignoring ? ' style="display:none;"' : '', '>';
 
 		// Don't show these things for guests.
 		if (!$message['member']['is_guest'])
@@ -442,7 +442,7 @@ function template_main()
 
 			echo '
 								</h5>
-								<div id="msg_', $message['id'], '_quick_mod"></div>
+								<div id="msg_', $message['id'], '_quick_mod"', $ignoring ? ' style="display:none;"' : '', '></div>
 							</div>';
 
 		// Ignoring this user? Hide the post.
@@ -463,14 +463,14 @@ function template_main()
 									', $txt['post_awaiting_approval'], '
 								</div>';
 		echo '
-								<div class="inner" id="msg_', $message['id'], '"', '>', $message['body'], '</div>
+								<div class="inner" id="msg_', $message['id'], '"', $ignoring ? ' style="display:none;"' : '', '>', $message['body'], '</div>
 							</div>';
 
 		// Assuming there are attachments...
 		if (!empty($message['attachment']))
 		{
 			echo '
-							<div id="msg_', $message['id'], '_footer" class="attachments">';
+							<div id="msg_', $message['id'], '_footer" class="attachments"', $ignoring ? ' style="display:none;"' : '', '>';
 
 			$last_approved_state = 1;
 			$attachments_per_line = 4;
@@ -647,7 +647,7 @@ function template_main()
 		// Show the member's signature?
 		if (!empty($message['member']['signature']) && empty($options['show_no_signatures']) && $context['signature_enabled'])
 			echo '
-							<div class="signature" id="msg_', $message['id'], '_signature">', $message['member']['signature'], '</div>';
+							<div class="signature" id="msg_', $message['id'], '_signature"', $ignoring ? ' style="display:none;"' : '', '>', $message['member']['signature'], '</div>';
 
 		echo '
 						</div>
@@ -861,6 +861,7 @@ function template_main()
 					});';
 
 	echo '
+					$(".quick_edit").css("display", "inline");
 					if (\'XMLHttpRequest\' in window)
 					{
 						var oQuickModify = new QuickModify({

+ 5 - 2
Themes/default/css/index.css

@@ -2223,7 +2223,7 @@ ul.quickbuttons li a.notify_button {
 	background: url(../images/theme/quickbuttons.png) no-repeat 0 -210px;
 }
 ul.quickbuttons li a.unapprove_button {
-	background: url(../images/theme/quickbuttons.png) no-repeat 0 -240px;
+	background: url(../images/theme/quickbuttons.png) no-repeat 4px -237px;
 }
 ul.quickbuttons li.inline_mod_check {
 	padding: 1px 1px 1px 1px;
@@ -2261,12 +2261,15 @@ ul.quickbuttons li.inline_mod_check {
 	position: relative;
 	color: #222;
 }
-.quickbuttons li.quick_edit img{
+.quickbuttons li.quick_edit img {
 	padding: 2px 7em 2px 3px;
 	position: absolute;
 	left: 0;
 	top: 0;
 }
+.quickbuttons li.quick_edit {
+	display: none;
+}
 ul.quickbuttons li.inline_mod_check {
 	padding: 3px 0 0 3px;
 	background: none;

+ 0 - 1
Themes/default/languages/Profile.english.php

@@ -170,7 +170,6 @@ $txt['change_authentication'] = 'From this section you can change how you login
 $txt['profileEdit'] = 'Modify Profile';
 $txt['account_info'] = 'These are your account settings. This page holds all critical information that identifies you on this forum. For security reasons, you will need to enter your (current) password to make changes to this information.';
 $txt['forumProfile_info'] = 'You can change your personal information on this page. This information will be displayed throughout ' . $context['forum_name_html_safe'] . '. If you aren\'t comfortable with sharing some information, simply skip it - nothing here is required.';
-$txt['theme'] = 'Look and Layout';
 $txt['theme_info'] = 'This section allows you to customize the look and layout of the forum.';
 $txt['notification'] = 'Notifications';
 $txt['notification_info'] = 'SMF allows you to be notified of replies to posts, newly posted topics, and forum announcements. You can change those settings here, or oversee the topics and boards you are currently receiving notifications for.';

+ 1 - 0
Themes/default/languages/index.english.php

@@ -737,6 +737,7 @@ $txt['visual_verification_request_new'] = 'Request another image';
 // Sub menu labels
 $txt['summary'] = 'Summary';
 $txt['account'] = 'Account Settings';
+$txt['theme'] = 'Look and Layout';
 $txt['forumprofile'] = 'Forum Profile';
 
 $txt['modSettings_title'] = 'Features and Options';

+ 4 - 4
Themes/default/scripts/jquery.sceditor.js

@@ -719,7 +719,7 @@
 				emoticon;
 
 			$.each(emoticons, function (key, url) {
-				// @todo Why did I (emanuele) add this?
+				// In SMF an empty entry means a new line
 				if (key == '')
 					emoticon = document.createElement('br');
 				else
@@ -1155,8 +1155,8 @@
 		base.getWysiwygEditorValue = function (filter) {
 			// Possible replacement:
 			// if(!$.sceditor.isWysiwygSupported())
-			if (!base.options.supportedWysiwyg)
-				return;
+			//if (!base.options.supportedWysiwyg)
+			//	return;
 
 			var	$body = $wysiwygEditor.contents().find("body"),
 				html;
@@ -1243,7 +1243,7 @@
 			var emoticons = $.extend({}, base.options.emoticons.more, base.options.emoticons.dropdown, base.options.emoticons.hidden);
 
 			$.each(emoticons, function (key, url) {
-				// @todo Why did I (emanuele) add this?
+				// In SMF an empty entry means a new line
 				if (key == '')
 					return;
 				// escape the key before using it as a regex

+ 1 - 1
other/install.php

@@ -76,7 +76,7 @@ $databases = array(
 		'always_has_db' => true,
 		'utf8_default' => true,
 		'utf8_required' => true,
-		'utf8_support' => true,
+		'utf8_support' => false,
 		'validate_prefix' => create_function('&$value', '
 			global $incontext, $txt;