Skip to content

Commit

Permalink
Add option "Article view Link title" in General
Browse files Browse the repository at this point in the history
Ability to override the core Joomla option "Link titles" for single
article view.
  • Loading branch information
khanhlh committed May 29, 2014
1 parent 9c3ffc1 commit 9c8c7a9
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 2 deletions.
Expand Up @@ -15,7 +15,6 @@

// Create shortcuts to some parameters.
$params = $this->item->params;
$params->set('link_titles', false);
$images = json_decode($this->item->images);
$urls = json_decode($this->item->urls);
$canEdit = $params->get('access-edit');
Expand All @@ -27,6 +26,13 @@
$botInfo = ($aInfo1 && $info == 1) || ($aInfo2 && $info != 0);
$icons = !empty($this->print) || $canEdit || $params->get('show_print_icon') || $params->get('show_email_icon');

// override link_titles option if set in template
$app = JFactory::getApplication();
$tmpl = $app->getTemplate(true);
if ($tmpl->params->get('link_titles') !== NULL) {
$params->set('link_titles', $tmpl->params->get('link_titles'));
}

JHtml::_('behavior.caption');
JHtml::_('bootstrap.tooltip');
?>
Expand Down
13 changes: 13 additions & 0 deletions source/plg_system_t3/base-bs3/params/template.xml
Expand Up @@ -107,6 +107,19 @@
label="T3_GENERAL_ASSETS_MINIFYJS_EXCLUDE_LABEL"
description="T3_GENERAL_ASSETS_MINIFYJS_EXCLUDE_DESC"/>


<field type="t3depend" function="@legend" label="T3_GENERAL_JCORE_LABEL"
description="T3_GENERAL_JCORE_DESC"/>

<field name="link_titles" type="list" global="1"
description="T3_GENERAL_JCORE_LINKED_TITLES_DESC"
label="T3_GENERAL_JCORE_LINKED_TITLES_LABEL"
>
<option value="">JGLOBAL_USE_GLOBAL</option>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>

</fieldset>

<fieldset name="theme_params" label="T3_THEME_LABEL" description="T3_THEME_DESC">
Expand Down
Expand Up @@ -15,7 +15,6 @@

// Create shortcuts to some parameters.
$params = $this->item->params;
$params->set('link_titles', false);
$images = json_decode($this->item->images);
$urls = json_decode($this->item->urls);
$user = JFactory::getUser();
Expand All @@ -26,6 +25,13 @@
$botInfo = ($aInfo1 && $info == 1) || ($aInfo2 && $info != 0);
$icons = !empty($this->print) || $params->get('access-edit') || $params->get('show_print_icon') || $params->get('show_email_icon');

// override link_titles option if set in template
$app = JFactory::getApplication();
$tmpl = $app->getTemplate(true);
if ($tmpl->params->get('link_titles') !== NULL) {
$params->set('link_titles', $tmpl->params->get('link_titles'));
}

JHtml::_('behavior.caption');
JHtml::_('bootstrap.tooltip');
?>
Expand Down
13 changes: 13 additions & 0 deletions source/plg_system_t3/base/params/template.xml
Expand Up @@ -92,6 +92,19 @@
label="T3_GENERAL_ASSETS_MINIFYJS_EXCLUDE_LABEL"
description="T3_GENERAL_ASSETS_MINIFYJS_EXCLUDE_DESC"/>


<field type="t3depend" function="@legend" label="T3_GENERAL_JCORE_LABEL"
description="T3_GENERAL_JCORE_DESC"/>

<field name="link_titles" type="list" global="1"
description="T3_GENERAL_JCORE_LINKED_TITLES_DESC"
label="T3_GENERAL_JCORE_LINKED_TITLES_LABEL"
>
<option value="">JGLOBAL_USE_GLOBAL</option>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>

</fieldset>

<fieldset name="theme_params" label="T3_THEME_LABEL" description="T3_THEME_DESC">
Expand Down
8 changes: 8 additions & 0 deletions source/plg_system_t3/language/en-GB/en-GB.plg_system_t3.ini
Expand Up @@ -81,6 +81,14 @@ T3_GENERAL_ASSETS_FOLDER_DESC = "When Development Mode or Optimize CSS is
T3_GENERAL_REMOVE_T3LOGO_LABEL = "Show T3 Logo"
T3_GENERAL_REMOVE_T3LOGO_DESC = "T3 logo in footer. We recommend you do this so that we can help spread T3 to the word"


; JOOMLA CORE ENHANCEMENT
T3_GENERAL_JCORE_LABEL = "Core Joomla!"
T3_GENERAL_JCORE_DESC = "Enhance Core Joomla! options"
T3_GENERAL_JCORE_LINKED_TITLES_LABEL= "Article view Link title"
T3_GENERAL_JCORE_LINKED_TITLES_DESC = "Override setting for Link title in Article view"


; THEME
T3_THEME_LABEL = "Theme"
T3_THEME_DESC = "The visual settings below are for themes of your selected style. You can always use the ThemeMagic tool located on the top-right panel for further advanced settings."
Expand Down

0 comments on commit 9c8c7a9

Please sign in to comment.