diff --git a/phpBB/adm/style/acp_icons.html b/phpBB/adm/style/acp_icons.html
index f18dad0ef6..e723129e37 100644
--- a/phpBB/adm/style/acp_icons.html
+++ b/phpBB/adm/style/acp_icons.html
@@ -89,6 +89,9 @@
-  |
+  |
[{items.IMG}] |
|
@@ -110,6 +113,9 @@
|
|
+
+ |
+
diff --git a/phpBB/includes/acp/acp_icons.php b/phpBB/includes/acp/acp_icons.php
index 5d1756de45..57a36bb9f3 100644
--- a/phpBB/includes/acp/acp_icons.php
+++ b/phpBB/includes/acp/acp_icons.php
@@ -248,7 +248,7 @@ class acp_icons
$data = $_images;
}
- $colspan = (($mode == 'smilies') ? 7 : 5);
+ $colspan = (($mode == 'smilies') ? 7 : 6);
$colspan += ($icon_id) ? 1 : 0;
$colspan += ($action == 'add') ? 2 : 0;
@@ -292,6 +292,8 @@ class acp_icons
'ID' => (isset($img_row[$fields . '_id'])) ? $img_row[$fields . '_id'] : 0,
'WIDTH' => (!empty($img_row[$fields .'_width'])) ? $img_row[$fields .'_width'] : $img_row['width'],
'HEIGHT' => (!empty($img_row[$fields .'_height'])) ? $img_row[$fields .'_height'] : $img_row['height'],
+ 'TEXT_ALT' => ($mode == 'icons' && !empty($img_row['icons_alt'])) ? $img_row['icons_alt'] : $img,
+ 'ALT' => ($mode == 'icons' && !empty($img_row['icons_alt'])) ? $img_row['icons_alt'] : '',
'POSTING_CHECKED' => (!empty($img_row['display_on_posting']) || $action == 'add') ? ' checked="checked"' : '',
));
}
@@ -336,6 +338,7 @@ class acp_icons
$image_add = (isset($_POST['add_img'])) ? $request->variable('add_img', array('' => 0)) : array();
$image_emotion = $request->variable('emotion', array('' => ''), true);
$image_code = $request->variable('code', array('' => ''), true);
+ $image_alt = ($request->is_set_post('alt')) ? $request->variable('alt', array('' => ''), true) : array();
$image_display_on_posting = (isset($_POST['display_on_posting'])) ? $request->variable('display_on_posting', array('' => 0)) : array();
// Ok, add the relevant bits if we are adding new codes to existing emoticons...
@@ -438,6 +441,13 @@ class acp_icons
);
}
+ if ($mode == 'icons')
+ {
+ $img_sql = array_merge($img_sql, array(
+ 'icons_alt' => $image_alt[$image])
+ );
+ }
+
// Image_order holds the 'new' order value
if (!empty($image_order[$image]))
{
@@ -921,7 +931,7 @@ class acp_icons
while ($row = $db->sql_fetchrow($result))
{
- $alt_text = ($mode == 'smilies') ? $row['code'] : '';
+ $alt_text = ($mode == 'smilies') ? $row['code'] : (($mode == 'icons' && !empty($row['icons_alt'])) ? $row['icons_alt'] : $row['icons_url']);
$template->assign_block_vars('items', array(
'S_SPACER' => (!$spacer && !$row['display_on_posting']) ? true : false,
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index 8b17dba534..19756d97b4 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -311,10 +311,10 @@ function posting_gen_topic_icons($mode, $icon_id)
{
$template->assign_block_vars('topic_icon', array(
'ICON_ID' => $id,
- 'ICON_NAME' => $data['img'],
'ICON_IMG' => $root_path . $config['icons_path'] . '/' . $data['img'],
'ICON_WIDTH' => $data['width'],
'ICON_HEIGHT' => $data['height'],
+ 'ICON_ALT' => $data['alt'],
'S_CHECKED' => ($id == $icon_id) ? true : false,
'S_ICON_CHECKED' => ($id == $icon_id) ? ' checked="checked"' : '')
diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php
index 0390dbb2ac..1f359cc232 100644
--- a/phpBB/language/en/common.php
+++ b/phpBB/language/en/common.php
@@ -83,6 +83,7 @@ $lang = array_merge($lang, array(
'ALL_POSTS' => 'All posts',
'ALL_TIMES' => 'All times are %1$s',
'ALL_TOPICS' => 'All Topics',
+ 'ALT_TEXT' => 'Alternative text',
'AND' => 'And',
'ARE_WATCHING_FORUM' => 'You have subscribed to be notified of new posts in this forum.',
'ARE_WATCHING_TOPIC' => 'You have subscribed to be notified of new posts in this topic.',
diff --git a/phpBB/phpbb/cache/service.php b/phpBB/phpbb/cache/service.php
index 56727c2ad5..a022c00bc6 100644
--- a/phpBB/phpbb/cache/service.php
+++ b/phpBB/phpbb/cache/service.php
@@ -141,6 +141,7 @@ class service
$icons[$row['icons_id']]['img'] = $row['icons_url'];
$icons[$row['icons_id']]['width'] = (int) $row['icons_width'];
$icons[$row['icons_id']]['height'] = (int) $row['icons_height'];
+ $icons[$row['icons_id']]['alt'] = ($row['icons_alt']) ? $row['icons_alt'] : '';
$icons[$row['icons_id']]['display'] = (bool) $row['display_on_posting'];
}
$this->db->sql_freeresult($result);
diff --git a/phpBB/phpbb/db/migration/data/v320/icons_alt.php b/phpBB/phpbb/db/migration/data/v320/icons_alt.php
new file mode 100644
index 0000000000..7071ae78db
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v320/icons_alt.php
@@ -0,0 +1,44 @@
+
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
+
+namespace phpbb\db\migration\data\v320;
+
+class icons_alt extends \phpbb\db\migration\migration
+{
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v310\dev');
+ }
+
+ public function update_schema()
+ {
+ return array(
+ 'add_columns' => array(
+ $this->table_prefix . 'icons' => array(
+ 'icons_alt' => array('VCHAR', '', 'after' => 'icons_height'),
+ ),
+ ),
+ );
+ }
+
+ public function revert_schema()
+ {
+ return array(
+ 'drop_columns' => array(
+ $this->table_prefix . 'icons' => array(
+ 'icons_alt',
+ ),
+ ),
+ );
+ }
+}
diff --git a/phpBB/styles/prosilver/template/posting_editor.html b/phpBB/styles/prosilver/template/posting_editor.html
index 60d7b6c428..9376ae8be7 100644
--- a/phpBB/styles/prosilver/template/posting_editor.html
+++ b/phpBB/styles/prosilver/template/posting_editor.html
@@ -6,7 +6,7 @@
-
+
diff --git a/phpBB/styles/prosilver/template/viewtopic_body.html b/phpBB/styles/prosilver/template/viewtopic_body.html
index cebf2c1ff6..5642c0a5cb 100644
--- a/phpBB/styles/prosilver/template/viewtopic_body.html
+++ b/phpBB/styles/prosilver/template/viewtopic_body.html
@@ -222,7 +222,7 @@
style="display: none;">
-
+
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index 27ed898d99..8be23def00 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -1891,6 +1891,7 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
'POST_ICON_IMG' => ($topic_data['enable_icons'] && !empty($row['icon_id'])) ? $icons[$row['icon_id']]['img'] : '',
'POST_ICON_IMG_WIDTH' => ($topic_data['enable_icons'] && !empty($row['icon_id'])) ? $icons[$row['icon_id']]['width'] : '',
'POST_ICON_IMG_HEIGHT' => ($topic_data['enable_icons'] && !empty($row['icon_id'])) ? $icons[$row['icon_id']]['height'] : '',
+ 'POST_ICON_IMG_ALT' => ($topic_data['enable_icons'] && !empty($row['icon_id'])) ? $icons[$row['icon_id']]['alt'] : '',
'ONLINE_IMG' => ($poster_id == ANONYMOUS || !$config['load_onlinetrack']) ? '' : (($user_cache[$poster_id]['online']) ? $user->img('icon_user_online', 'ONLINE') : $user->img('icon_user_offline', 'OFFLINE')),
'S_ONLINE' => ($poster_id == ANONYMOUS || !$config['load_onlinetrack']) ? false : (($user_cache[$poster_id]['online']) ? true : false),
|