Skip to content
Closed
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
36 changes: 0 additions & 36 deletions administrator/components/com_content/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -279,42 +279,6 @@
hr="true"
/>

<field
name="show_icons"
type="radio"
label="JGLOBAL_SHOW_ICONS_LABEL"
description="JGLOBAL_SHOW_ICONS_DESC"
class="switcher"
default="1"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>

<field
name="show_print_icon"
type="radio"
label="JGLOBAL_SHOW_PRINT_ICON_LABEL"
description="JGLOBAL_SHOW_PRINT_ICON_DESC"
class="switcher"
default="1"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>

<field
name="show_email_icon"
type="radio"
label="JGLOBAL_SHOW_EMAIL_ICON_LABEL"
description="JGLOBAL_SHOW_EMAIL_ICON_DESC"
class="switcher"
default="1"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>

<field
name="show_hits"
type="radio"
Expand Down
54 changes: 0 additions & 54 deletions administrator/components/com_content/forms/article.xml
Original file line number Diff line number Diff line change
Expand Up @@ -431,39 +431,6 @@
<option value="1">JSHOW</option>
</field>

<field
name="show_icons"
type="list"
label="JGLOBAL_SHOW_ICONS_LABEL"
description="JGLOBAL_SHOW_ICONS_DESC"
useglobal="true"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>

<field
name="show_print_icon"
type="list"
label="JGLOBAL_SHOW_PRINT_ICON_LABEL"
description="JGLOBAL_SHOW_PRINT_ICON_DESC"
useglobal="true"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>

<field
name="show_email_icon"
type="list"
label="JGLOBAL_SHOW_EMAIL_ICON_LABEL"
description="JGLOBAL_SHOW_EMAIL_ICON_DESC"
useglobal="true"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>

<field
name="show_vote"
type="list"
Expand Down Expand Up @@ -652,27 +619,6 @@
label="JGLOBAL_SHOW_NAVIGATION_LABEL"
/>

<field
name="show_icons"
type="hidden"
label="JGLOBAL_SHOW_ICONS_LABEL"
description="JGLOBAL_SHOW_ICONS_DESC"
/>

<field
name="show_print_icon"
type="hidden"
label="JGLOBAL_SHOW_PRINT_ICON_LABEL"
description="JGLOBAL_SHOW_PRINT_ICON_DESC"
/>

<field
name="show_email_icon"
type="hidden"
label="JGLOBAL_SHOW_EMAIL_ICON_LABEL"
description="JGLOBAL_SHOW_EMAIL_ICON_DESC"
/>

<field
name="show_vote"
type="hidden"
Expand Down
6 changes: 0 additions & 6 deletions administrator/language/en-GB/en-GB.ini
Original file line number Diff line number Diff line change
Expand Up @@ -541,8 +541,6 @@ JGLOBAL_SHOW_CREATE_DATE_DESC="If set to Show, the date and time an Article was
JGLOBAL_SHOW_CREATE_DATE_LABEL="Create Date"
JGLOBAL_SHOW_DATE_DESC="Show or hide a date column in the list of articles, or select which date you wish to show."
JGLOBAL_SHOW_DATE_LABEL="Date"
JGLOBAL_SHOW_EMAIL_ICON_DESC="Show or hide the email link. This allows you to email an article."
JGLOBAL_SHOW_EMAIL_ICON_LABEL="Email"
JGLOBAL_SHOW_EMPTY_CATEGORIES_DESC="If Show, empty categories will display. A category is only empty if it has no items or subcategories."
JGLOBAL_SHOW_EMPTY_CATEGORIES_LABEL="Empty Categories"
JGLOBAL_SHOW_FEATURED_ARTICLES_DESC="Select to show, hide or only display featured articles."
Expand All @@ -555,8 +553,6 @@ JGLOBAL_SHOW_FULL_DESCRIPTION="Show full description ..."
JGLOBAL_SHOW_HEADINGS_DESC="Show or hide the headings in list layouts."
JGLOBAL_SHOW_HEADINGS_LABEL="Table Headings"
JGLOBAL_SHOW_HITS_LABEL="Hits"
JGLOBAL_SHOW_ICONS_DESC="Print and email will utilise icons or text."
JGLOBAL_SHOW_ICONS_LABEL="Icons"
JGLOBAL_SHOW_INTRO_DESC="If set to Show, the Intro Text of the article will show when you drill down to the article. If set to Hide, only the part of the article after the &quot;Read More&quot; break will show."
JGLOBAL_SHOW_INTRO_LABEL="Intro Text"
JGLOBAL_SHOW_MODIFY_DATE_DESC="If set to Show, the date and time an Article was last modified will be displayed."
Expand All @@ -565,8 +561,6 @@ JGLOBAL_SHOW_NAVIGATION_DESC="If set to Show, shows a navigation link (Next, Pre
JGLOBAL_SHOW_NAVIGATION_LABEL="Navigation"
JGLOBAL_SHOW_PARENT_CATEGORY_DESC="If set to Show, the title of the article&rsquo;s parent category will show."
JGLOBAL_SHOW_PARENT_CATEGORY_LABEL="Parent"
JGLOBAL_SHOW_PRINT_ICON_DESC="Show or hide the print. This allows you to print an article."
JGLOBAL_SHOW_PRINT_ICON_LABEL="Print"
JGLOBAL_SHOW_PUBLISH_DATE_DESC="If set to Show, the date and time an Article was published will be displayed. This is a global setting but can be changed at the Category, Menu and Article levels."
JGLOBAL_SHOW_PUBLISH_DATE_LABEL="Publish Date"
JGLOBAL_SHOW_READMORE_DESC="If set to Show, the Read more ...Link will show if Main text has been provided for the Article."
Expand Down
76 changes: 0 additions & 76 deletions components/com_content/helpers/icon.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,38 +53,6 @@ public static function create($category, $params, $attribs = array(), $legacy =
return $output;
}

/**
* Method to generate a link to the email item page for the given article
*
* @param object $article The article information
* @param Registry $params The item parameters
* @param array $attribs Optional attributes for the link
* @param boolean $legacy True to use legacy images, false to use icomoon based graphic
*
* @return string The HTML markup for the email item link
*/
public static function email($article, $params, $attribs = array(), $legacy = false)
{
JLoader::register('MailtoHelper', JPATH_SITE . '/components/com_mailto/helpers/mailto.php');

$uri = JUri::getInstance();
$base = $uri->toString(array('scheme', 'host', 'port'));
$template = JFactory::getApplication()->getTemplate();
$link = $base . JRoute::_(ContentHelperRoute::getArticleRoute($article->slug, $article->catid, $article->language), false);
$url = 'index.php?option=com_mailto&tmpl=component&template=' . $template . '&link=' . MailtoHelper::addLink($link);

$status = 'width=400,height=350,menubar=yes,resizable=yes';

$text = JLayoutHelper::render('joomla.content.icons.email', array('params' => $params, 'legacy' => $legacy));

$attribs['title'] = JText::_('JGLOBAL_EMAIL_TITLE');
$attribs['onclick'] = "window.open(this.href,'win2','" . $status . "'); return false;";
$attribs['rel'] = 'nofollow';
$attribs['class'] = 'dropdown-item';

return JHtml::_('link', JRoute::_($url), $text, $attribs);
}

/**
* Display an edit icon for the article.
*
Expand Down Expand Up @@ -165,48 +133,4 @@ public static function edit($article, $params, $attribs = array(), $legacy = fal

return $output;
}

/**
* Method to generate a popup link to print an article
*
* @param object $article The article information
* @param Registry $params The item parameters
* @param array $attribs Optional attributes for the link
* @param boolean $legacy True to use legacy images, false to use icomoon based graphic
*
* @return string The HTML markup for the popup link
*/
public static function print_popup($article, $params, $attribs = array(), $legacy = false)
{
$url = ContentHelperRoute::getArticleRoute($article->slug, $article->catid, $article->language);
$url .= '&tmpl=component&print=1&layout=default';

$status = 'status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=yes,width=640,height=480,directories=no,location=no';

$text = JLayoutHelper::render('joomla.content.icons.print_popup', array('params' => $params, 'legacy' => $legacy));

$attribs['title'] = JText::sprintf('JGLOBAL_PRINT_TITLE', htmlspecialchars($article->title, ENT_QUOTES, 'UTF-8'));
$attribs['onclick'] = "window.open(this.href,'win2','" . $status . "'); return false;";
$attribs['rel'] = 'nofollow';
$attribs['class'] = 'dropdown-item';

return JHtml::_('link', JRoute::_($url), $text, $attribs);
}

/**
* Method to generate a link to print an article
*
* @param object $article Not used, @deprecated for 4.0
* @param Registry $params The item parameters
* @param array $attribs Not used, @deprecated for 4.0
* @param boolean $legacy True to use legacy images, false to use icomoon based graphic
*
* @return string The HTML markup for the popup link
*/
public static function print_screen($article, $params, $attribs = array(), $legacy = false)
{
$text = JLayoutHelper::render('joomla.content.icons.print_screen', array('params' => $params, 'legacy' => $legacy));

return '<a href="#" onclick="window.print();return false;">' . $text . '</a>';
}
}
12 changes: 2 additions & 10 deletions components/com_content/tmpl/article/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,8 @@
<?php endif; ?>
</div>
<?php endif; ?>
<?php if (!$this->print) : ?>
<?php if ($canEdit || $params->get('show_print_icon') || $params->get('show_email_icon')) : ?>
<?php echo JLayoutHelper::render('joomla.content.icons', array('params' => $params, 'item' => $this->item, 'print' => false)); ?>
<?php endif; ?>
<?php else : ?>
<?php if ($useDefList) : ?>
<div id="pop-print" class="btn hidden-print">
<?php echo JHtml::_('icon.print_screen', $this->item, $params); ?>
</div>
<?php endif; ?>
<?php if ($canEdit) : ?>
<?php echo JLayoutHelper::render('joomla.content.icons', array('params' => $params, 'item' => $this->item)); ?>
<?php endif; ?>

<?php // Content is generated by content plugin event "onContentAfterTitle" ?>
Expand Down
36 changes: 0 additions & 36 deletions components/com_content/tmpl/article/default.xml
Original file line number Diff line number Diff line change
Expand Up @@ -223,42 +223,6 @@
<option value="0">JHIDE</option>
</field>

<field
name="show_icons"
type="list"
label="JGLOBAL_SHOW_ICONS_LABEL"
description="JGLOBAL_SHOW_ICONS_DESC"
useglobal="true"
class="chzn-color"
>
<option value="1">JSHOW</option>
<option value="0">JHIDE</option>
</field>

<field
name="show_print_icon"
type="list"
label="JGLOBAL_SHOW_PRINT_ICON_LABEL"
description="JGLOBAL_SHOW_PRINT_ICON_DESC"
useglobal="true"
class="chzn-color"
>
<option value="1">JSHOW</option>
<option value="0">JHIDE</option>
</field>

<field
name="show_email_icon"
type="list"
label="JGLOBAL_SHOW_EMAIL_ICON_LABEL"
description="JGLOBAL_SHOW_EMAIL_ICON_DESC"
useglobal="true"
class="chzn-color"
>
<option value="1">JSHOW</option>
<option value="0">JHIDE</option>
</field>

<field
name="show_hits"
type="list"
Expand Down
36 changes: 0 additions & 36 deletions components/com_content/tmpl/categories/default.xml
Original file line number Diff line number Diff line change
Expand Up @@ -632,42 +632,6 @@
<option value="1">JSHOW</option>
</field>

<field
name="show_icons"
type="list"
label="JGLOBAL_SHOW_ICONS_LABEL"
description="JGLOBAL_SHOW_ICONS_DESC"
useglobal="true"
class="chzn-color"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>

<field
name="show_print_icon"
type="list"
label="JGLOBAL_SHOW_PRINT_ICON_LABEL"
description="JGLOBAL_SHOW_PRINT_ICON_DESC"
useglobal="true"
class="chzn-color"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>

<field
name="show_email_icon"
type="list"
label="JGLOBAL_SHOW_EMAIL_ICON_LABEL"
description="JGLOBAL_SHOW_EMAIL_ICON_DESC"
useglobal="true"
class="chzn-color"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>

<field
name="show_hits"
type="list"
Expand Down
39 changes: 0 additions & 39 deletions components/com_content/tmpl/category/blog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -564,45 +564,6 @@
<option value="1">JSHOW</option>
</field>

<field
name="show_icons"
type="list"
label="JGLOBAL_SHOW_ICONS_LABEL"
description="JGLOBAL_SHOW_ICONS_DESC"
useglobal="true"
class="chzn-color"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>

<field
name="show_print_icon"
type="list"
label="JGLOBAL_SHOW_PRINT_ICON_LABEL"
description="JGLOBAL_SHOW_PRINT_ICON_DESC"
useglobal="true"
class="chzn-color"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>

<field
name="show_email_icon"
type="list"
label="JGLOBAL_SHOW_EMAIL_ICON_LABEL"
description="JGLOBAL_SHOW_EMAIL_ICON_DESC"
useglobal="true"
class="chzn-color"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>

<field
name="show_hits"
type="list"
Expand Down
4 changes: 2 additions & 2 deletions components/com_content/tmpl/category/blog_item.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@

<?php echo JLayoutHelper::render('joomla.content.blog_style_default_item_title', $this->item); ?>

<?php if ($canEdit || $params->get('show_print_icon') || $params->get('show_email_icon')) : ?>
<?php echo JLayoutHelper::render('joomla.content.icons', array('params' => $params, 'item' => $this->item, 'print' => false)); ?>
<?php if ($canEdit) : ?>
<?php echo JLayoutHelper::render('joomla.content.icons', array('params' => $params, 'item' => $this->item)); ?>
<?php endif; ?>

<?php // Todo Not that elegant would be nice to group the params ?>
Expand Down
Loading