From 941d138650c1f500f68ff7a12e73d08c6a91aaf4 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Sat, 28 Nov 2015 11:34:55 +0100 Subject: [PATCH 1/2] [ticket/14317] Run the script again PHPBB3-14317 --- phpBB/language/en/help/bbcode.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/language/en/help/bbcode.php b/phpBB/language/en/help/bbcode.php index d3b36d8015..e9f3562646 100644 --- a/phpBB/language/en/help/bbcode.php +++ b/phpBB/language/en/help/bbcode.php @@ -35,13 +35,13 @@ $lang = array_merge($lang, array( 'HELP_BBCODE_IMAGES_ATTACHMENT_ANSWER' => 'Attachments can now be placed in any part of a post by using the new [attachment=][/attachment] BBCode, if the attachments functionality has been enabled by a board administrator and if you are given the appropriate permissions to create attachments. Within the posting screen is a drop-down box (respectively a button) for placing attachments inline.', 'HELP_BBCODE_IMAGES_ATTACHMENT_QUESTION' => 'Adding attachments into a post', - 'HELP_BBCODE_IMAGES_BASIC_ANSWER' => 'phpBB BBCode incorporates a tag for including images in your posts. Two very important things to remember when using this tag are: many users do not appreciate lots of images being shown in posts and secondly the image you display must already be available on the internet (it cannot exist only on your computer for example, unless you run a webserver!). To display an image you must surround the URL pointing to the image with [img][/img] tags. For example:

[img]http://www.phpbb.com/theme/images/logos/blue/160x52.png[/img]

As noted in the URL section above you can wrap an image in a [url][/url] tag if you wish, e.g.

[url=http://www.phpbb.com/][img]http://www.phpbb.com/theme/images/logos/blue/160x52.png[/img][/url]

would generate:

', + 'HELP_BBCODE_IMAGES_BASIC_ANSWER' => 'phpBB BBCode incorporates a tag for including images in your posts. Two very important things to remember when using this tag are: many users do not appreciate lots of images being shown in posts and secondly the image you display must already be available on the internet (it cannot exist only on your computer for example, unless you run a webserver!). To display an image you must surround the URL pointing to the image with [img][/img] tags. For example:

[img]https://www.phpbb.com/theme/images/logos/blue/160x52.png[/img]

As noted in the URL section above you can wrap an image in a [url][/url] tag if you wish, e.g.

[url=https://www.phpbb.com/][img]https://www.phpbb.com/theme/images/logos/blue/160x52.png[/img][/url]

would generate:

', 'HELP_BBCODE_IMAGES_BASIC_QUESTION' => 'Adding an image to a post', 'HELP_BBCODE_INTRO_BBCODE_ANSWER' => 'BBCode is a special implementation of HTML. Whether you can actually use BBCode in your posts on the forum is determined by the administrator. In addition you can disable BBCode on a per post basis via the posting form. BBCode itself is similar in style to HTML, tags are enclosed in square brackets [ and ] rather than < and > and it offers greater control over what and how something is displayed. Depending on the template you are using you may find adding BBCode to your posts is made much easier through a clickable interface above the message area on the posting form. Even with this you may find the following guide useful.', 'HELP_BBCODE_INTRO_BBCODE_QUESTION' => 'What is BBCode?', - 'HELP_BBCODE_LINKS_BASIC_ANSWER' => 'phpBB BBCode supports a number of ways of creating URIs (Uniform Resource Indicators) better known as URLs.As with all the BBCode tags you can wrap URLs around any of the other tags such as [img][/img] (see next entry), [b][/b], etc. As with the formatting tags it is up to you to ensure the correct open and close order is following, for example:

[url=http://www.phpbb.com/][img]http://www.phpbb.com/theme/images/logos/blue/160x52.png[/url][/img]

is not correct which may lead to your post being deleted so take care.', + 'HELP_BBCODE_LINKS_BASIC_ANSWER' => 'phpBB BBCode supports a number of ways of creating URIs (Uniform Resource Indicators) better known as URLs.As with all the BBCode tags you can wrap URLs around any of the other tags such as [img][/img] (see next entry), [b][/b], etc. As with the formatting tags it is up to you to ensure the correct open and close order is following, for example:

[url=https://www.phpbb.com/][img]https://www.phpbb.com/theme/images/logos/blue/160x52.png[/url][/img]

is not correct which may lead to your post being deleted so take care.', 'HELP_BBCODE_LINKS_BASIC_QUESTION' => 'Linking to another site', 'HELP_BBCODE_LISTS_ORDERER_ANSWER' => 'The second type of list, an ordered list, gives you control over what is output before each item. To create an ordered list you use [list=1][/list] to create a numbered list or alternatively [list=a][/list] for an alphabetical list. As with the unordered list, items are specified using [*]. For example:

[list=1]
[*]Go to the shops
[*]Buy a new computer
[*]Swear at computer when it crashes
[/list]

will generate the following:
  1. Go to the shops
  2. Buy a new computer
  3. Swear at computer when it crashes
Whereas for an alphabetical list you would use:

[list=a]
[*]The first possible answer
[*]The second possible answer
[*]The third possible answer
[/list]

giving
  1. The first possible answer
  2. The second possible answer
  3. The third possible answer
', From 0c66d4816a319c341f6361b8714929779fa6a049 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Sat, 28 Nov 2015 11:36:05 +0100 Subject: [PATCH 2/2] [ticket/14317] Make it easier to change the language iso tag PHPBB3-14317 --- phpBB/develop/lang_migrate_help_lang.php | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/phpBB/develop/lang_migrate_help_lang.php b/phpBB/develop/lang_migrate_help_lang.php index d5a2573ee0..81b71398e1 100644 --- a/phpBB/develop/lang_migrate_help_lang.php +++ b/phpBB/develop/lang_migrate_help_lang.php @@ -11,18 +11,13 @@ * */ -// -// Security message: -// -// This script is potentially dangerous. -// Remove or comment the next line (die(".... ) to enable this script. -// Do NOT FORGET to either remove this script or disable it after you have used it. -// -#die("Please read the first lines of this script for instructions on how to enable it"); +define('LANGUAGE_TO_MIGRATE', 'en'); + +# NO CHANGES BELOW THIS LINE define('IN_PHPBB', true); $phpEx = substr(strrchr(__FILE__, '.'), 1); -$phpbb_root_path='./../'; +$phpbb_root_path = './../'; include($phpbb_root_path . 'common.'.$phpEx); $help_bbcode = load_help('bbcode'); @@ -239,7 +234,7 @@ trigger_error('Successfully migrated help_bbcode and help_faq to help/bbcode and function load_help($help) { global $phpbb_root_path; - include($phpbb_root_path . 'language/en/help_' . $help . '.php'); + include($phpbb_root_path . 'language/' . LANGUAGE_TO_MIGRATE . '/help_' . $help . '.php'); return $help; } @@ -250,7 +245,7 @@ function load_help($help) function write_help($help, array $lang) { global $phpbb_root_path; - $fp = fopen($phpbb_root_path . 'language/en/help/' . $help . '.php', 'wb'); + $fp = fopen($phpbb_root_path . 'language/' . LANGUAGE_TO_MIGRATE . '/help/' . $help . '.php', 'wb'); fwrite($fp, get_language_file_header()); fwrite($fp, '$lang = array_merge($lang, array(' . "\n");