Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions administrator/language/en-GB/com_tags.ini
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@ COM_TAGS_TAG_FIELD_MODE_NESTED="Nested"
COM_TAGS_TAG_LIST_DESCRIPTION_DESC="Optional description to show at the top of the list. For example, this can be used when you have a layout that includes more than one tag."
COM_TAGS_TAG_LIST_DESCRIPTION_LABEL="Layout Description"
COM_TAGS_TAG_LIST_FIELD_ITEM_DESCRIPTION_LABEL="Item Body"
COM_TAGS_TAG_LIST_MEDIA_ALT_EMPTY_DESC="Decorative Image - no description required"
COM_TAGS_TAG_LIST_MEDIA_ALT_EMPTY_LABEL="No Description"
COM_TAGS_TAG_LIST_MEDIA_ALT_LABEL="Image Description (Alt Text)"
COM_TAGS_TAG_LIST_MEDIA_LABEL="Image"
COM_TAGS_TAG_LIST_SHOW_DATE_LABEL="Date"
COM_TAGS_TAG_LIST_SHOW_HEADINGS_LABEL="Table Headings"
Expand Down
5 changes: 4 additions & 1 deletion components/com_tags/tmpl/tag/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@
<?php // If there are multiple tags and a description or image has been supplied use that. ?>
<?php if ($this->params->get('tag_list_show_tag_description', 1) || $this->params->get('show_description_image', 1)) : ?>
<?php if ($this->params->get('show_description_image', 1) == 1 && $this->params->get('tag_list_image')) : ?>
<img src="<?php echo htmlspecialchars($this->params->get('tag_list_image'), ENT_QUOTES, 'UTF-8'); ?>" />
<?php $alt = empty($this->params->get('tag_list_image_alt')) && empty($this->params->get('tag_list_image_alt_empty'))
? ''
: 'alt="' . htmlspecialchars($this->params->get('tag_list_image_alt'), ENT_COMPAT, 'UTF-8') . '"'; ?>
<img src="<?php echo htmlspecialchars($this->params->get('tag_list_image'), ENT_QUOTES, 'UTF-8'); ?>" <?php echo $alt; ?>>
<?php endif; ?>
<?php if ($this->params->get('tag_list_description', '') > '') : ?>
<?php echo HTMLHelper::_('content.prepare', $this->params->get('tag_list_description'), '', 'com_tags.tag'); ?>
Expand Down
14 changes: 14 additions & 0 deletions components/com_tags/tmpl/tag/default.xml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,20 @@
label="COM_TAGS_TAG_LIST_MEDIA_LABEL"
/>

<field
name="tag_list_image_alt"
type="text"
label="COM_TAGS_TAG_LIST_MEDIA_ALT_LABEL"
size="20"
/>

<field
name="tag_list_image_alt_empty"
type="checkbox"
label="COM_TAGS_TAG_LIST_MEDIA_ALT_EMPTY_LABEL"
description="COM_TAGS_TAG_LIST_MEDIA_ALT_EMPTY_DESC"
/>

<field
name="tag_list_description"
type="textarea"
Expand Down
5 changes: 4 additions & 1 deletion components/com_tags/tmpl/tag/list.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@
<?php // If there are multiple tags and a description or image has been supplied use that. ?>
<?php if ($this->params->get('tag_list_show_tag_description', 1) || $this->params->get('show_description_image', 1)) : ?>
<?php if ($this->params->get('show_description_image', 1) == 1 && $this->params->get('tag_list_image')) : ?>
<img src="<?php echo htmlspecialchars($this->params->get('tag_list_image'), ENT_QUOTES, 'UTF-8'); ?>">
<?php $alt = empty($this->params->get('tag_list_image_alt')) && empty($this->params->get('tag_list_image_alt_empty'))
? ''
: 'alt="' . htmlspecialchars($this->params->get('tag_list_image_alt'), ENT_COMPAT, 'UTF-8') . '"'; ?>
<img src="<?php echo htmlspecialchars($this->params->get('tag_list_image'), ENT_QUOTES, 'UTF-8'); ?>" <?php echo $alt; ?>>
<?php endif; ?>
<?php if ($this->params->get('tag_list_description', '') > '') : ?>
<?php echo HTMLHelper::_('content.prepare', $this->params->get('tag_list_description'), '', 'com_tags.tag'); ?>
Expand Down
14 changes: 14 additions & 0 deletions components/com_tags/tmpl/tag/list.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,20 @@
label="COM_TAGS_TAG_LIST_MEDIA_LABEL"
/>

<field
name="tag_list_image_alt"
type="text"
label="COM_TAGS_TAG_LIST_MEDIA_ALT_LABEL"
size="20"
/>

<field
name="tag_list_image_alt_empty"
type="checkbox"
label="COM_TAGS_TAG_LIST_MEDIA_ALT_EMPTY_LABEL"
description="COM_TAGS_TAG_LIST_MEDIA_ALT_EMPTY_DESC"
/>

<field
name="tag_list_description"
type="textarea"
Expand Down
5 changes: 4 additions & 1 deletion components/com_tags/tmpl/tags/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,11 @@
</h1>
<?php endif; ?>
<?php if ($this->params->get('all_tags_show_description_image') && !empty($descriptionImage)) : ?>
<?php $alt = empty($this->params->get('all_tags_description_image_alt')) && empty($this->params->get('all_tags_description_image_alt_empty'))
? ''
: 'alt="' . htmlspecialchars($this->params->get('all_tags_description_image_alt'), ENT_COMPAT, 'UTF-8') . '"'; ?>
<div class="com-tags__image">
<img src="<?php echo htmlspecialchars($descriptionImage, ENT_QUOTES, 'UTF-8'); ?>" />
<img src="<?php echo htmlspecialchars($descriptionImage, ENT_QUOTES, 'UTF-8'); ?>" <?php echo $alt; ?>>
</div>
<?php endif; ?>
<?php if (!empty($description)) : ?>
Expand Down
13 changes: 13 additions & 0 deletions components/com_tags/tmpl/tags/default.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,19 @@
label="COM_TAGS_ALL_TAGS_MEDIA_LABEL"
/>

<field
name="all_tags_description_image_alt"
type="text"
label="COM_TAGS_TAG_LIST_MEDIA_ALT_LABEL"
size="20"
/>

<field
name="all_tags_description_image_alt_empty"
type="checkbox"
label="COM_TAGS_TAG_LIST_MEDIA_ALT_EMPTY_LABEL"
description="COM_TAGS_TAG_LIST_MEDIA_ALT_EMPTY_DESC"
/>
<field
name="all_tags_orderby"
type="list"
Expand Down