Ver código fonte

- Remove the admin oprion to format number

Signed-off-by: John Rayes <[email protected]>
John Rayes 12 anos atrás
pai
commit
ce7d0ef11f

+ 0 - 1
Sources/Load.php

@@ -1653,7 +1653,6 @@ function loadTheme($id_theme = 0, $initialize = true)
 	// Allow overriding the board wide time/number formats.
 	if (empty($user_settings['time_format']) && !empty($txt['time_format']))
 		$user_info['time_format'] = $txt['time_format'];
-	$txt['number_format'] = empty($txt['number_format']) ? empty($modSettings['number_format']) ? '' : $modSettings['number_format'] : $txt['number_format'];
 
 	if (isset($settings['use_default_images']) && $settings['use_default_images'] == 'always')
 	{

+ 0 - 1
Sources/ManageSettings.php

@@ -478,7 +478,6 @@ function ModifyBasicSettings($return_config = false)
 		'',
 			// Number formatting, timezones.
 			array('text', 'time_format'),
-			array('select', 'number_format', array('1234.00' => '1234.00', '1,234.00' => '1,234.00', '1.234,00' => '1.234,00', '1 234,00' => '1 234,00', '1234,00' => '1234,00')),
 			array('float', 'time_offset', 'subtext' => $txt['setting_time_offset_note'], 6, 'postinput' => $txt['hours']),
 			'default_timezone' => array('select', 'default_timezone', array()),
 		'',

+ 2 - 5
Sources/Subs.php

@@ -601,11 +601,11 @@ function constructPageIndex($base_url, &$start, $max_value, $num_per_page, $flex
 }
 
 /**
- * - formats a number to display in the style of the admins' choosing.
+ * - Formats a number.
  * - uses the format of number_format to decide how to format the number.
  *   for example, it might display "1 234,50".
  * - caches the formatting data from the setting for optimization.
- * 
+ *
  * @param float $number
  * @param bool $override_decimal_count = false
  */
@@ -614,9 +614,6 @@ function comma_format($number, $override_decimal_count = false)
 	global $txt;
 	static $thousands_separator = null, $decimal_separator = null, $decimal_count = null;
 
-	// @todo Should, perhaps, this just be handled in the language files, and not a mod setting?
-	// (French uses 1 234,00 for example... what about a multilingual forum?)
-
 	// Cache these values...
 	if ($decimal_separator === null)
 	{

+ 1 - 6
Themes/default/languages/Help.english.php

@@ -108,11 +108,6 @@ $helptxt['securitysettings'] = '<strong>Security and Moderation</strong><br />
 $helptxt['modsettings'] = '<strong>Modification Settings</strong><br />
 	This section should contain any settings added by modifications installed on your forum.';
 
-$helptxt['number_format'] = '<strong>Number Format</strong><br />
-	You can use this setting to format the way in which numbers on your forum will be displayed to the user. The format of this setting is:<br />
-	<div style="margin-left: 2ex;">1,234.00</div><br />
-	Where \',\' is the character used to split up groups of thousands, \'.\' is the character used as the decimal point and the number of zeros dictate the accuracy of rounding.';
-
 $helptxt['time_format'] = '<strong>Time Format</strong><br />
 	You have the power to adjust how the time and date look for yourself. There are a lot of little letters, but it\'s quite simple.
 	The conventions follow PHP\'s strftime function and are described as below (more details can be found at <a href="http://www.php.net/manual/function.strftime.php" target="_blank" class="new_win">php.net</a>).<br />
@@ -282,7 +277,7 @@ $helptxt['databaseSession_loose'] = 'Turning this on will decrease the bandwidth
 $helptxt['databaseSession_lifetime'] = 'This is the number of seconds for sessions to last after they haven\'t been accessed.  If a session is not accessed for too long, it is said to have &quot;timed out&quot;.  Anything higher than 2400 is recommended.';
 $helptxt['cache_enable'] = 'SMF performs caching at a variety of levels. The higher the level of caching enabled the more CPU time will be spent retrieving cached information. If caching is available on your machine it is recommended that you try caching at level 1 first.';
 $helptxt['cache_memcached'] = 'If you are using memcached you need to provide the server details. This should be entered as a comma separated list as shown in the example below:<br /><br/>	&quot;server1,server2,server3:port,server4&quot;<br /><br />Note that if no port is specified SMF will use port 11211. SMF will attempt to perform rough/random load balancing across the specified servers.';
-$helptxt['cache_cachedir'] = 'This setting This is only for the smf file based cache system. It specifies the path to the cache directory.  It is recommended that you place this in /tmp/ if you are going to use this, although it will work in any directory';  
+$helptxt['cache_cachedir'] = 'This setting This is only for the smf file based cache system. It specifies the path to the cache directory.  It is recommended that you place this in /tmp/ if you are going to use this, although it will work in any directory';
 $helptxt['enableErrorLogging'] = 'This will log any errors, like a failed login, so you can see what went wrong.';
 $helptxt['enableErrorQueryLogging'] = 'This will include the full query sent to the database in the error log.  Requires error logging to be turned on.<br /><br /><strong>Note:  This will affect the ability to filter the error log by the error message.</strong>';
 $helptxt['allow_disableAnnounce'] = 'This will allow users to opt out of notification of topics you announce by checking the &quot;announce topic&quot; checkbox when posting.';

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

@@ -22,7 +22,6 @@ $txt['titlesEnable'] = 'Enable custom titles';
 $txt['enable_buddylist'] = 'Enable buddy/ignore lists';
 $txt['default_personal_text'] = 'Default personal text';
 $txt['default_personal_text_note'] = 'Personal text to assign to newly registered members.';
-$txt['number_format'] = 'Default number format';
 $txt['time_format'] = 'Default time format';
 $txt['setting_time_offset'] = 'Overall time offset';
 $txt['setting_time_offset_note'] = '(added to the member specific option)';

+ 0 - 1
other/install_2-1_mysql.sql

@@ -1743,7 +1743,6 @@ VALUES ('smfVersion', '{$smf_version}'),
 	('autoFixDatabase', '1'),
 	('allow_guestAccess', '1'),
 	('time_format', '{$default_time_format}'),
-	('number_format', '1234.00'),
 	('enableBBC', '1'),
 	('max_messageLength', '20000'),
 	('signature_settings', '1,300,0,0,0,0,0,0:'),

+ 0 - 1
other/install_2-1_postgresql.sql

@@ -2232,7 +2232,6 @@ INSERT INTO {$db_prefix}settings (variable, value) VALUES ('edit_disable_time',
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('autoFixDatabase', '1');
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('allow_guestAccess', '1');
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('time_format', '{$default_time_format}');
-INSERT INTO {$db_prefix}settings (variable, value) VALUES ('number_format', '1234.00');
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('enableBBC', '1');
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('max_messageLength', '20000');
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('signature_settings', '1,300,0,0,0,0,0,0:');

+ 0 - 1
other/install_2-1_sqlite.sql

@@ -1885,7 +1885,6 @@ INSERT INTO {$db_prefix}settings (variable, value) VALUES ('edit_disable_time',
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('autoFixDatabase', '1');
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('allow_guestAccess', '1');
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('time_format', '{$default_time_format}');
-INSERT INTO {$db_prefix}settings (variable, value) VALUES ('number_format', '1234.00');
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('enableBBC', '1');
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('max_messageLength', '20000');
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('signature_settings', '1,300,0,0,0,0,0,0:');