Skip to content

Commit

Permalink
Added Nofollow option
Browse files Browse the repository at this point in the history
  • Loading branch information
C-Lodder committed Jul 29, 2015
1 parent 079bfe6 commit 0177918
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 5 deletions.
2 changes: 2 additions & 0 deletions mod_social_slider/language/de-DE/de-DE.mod_social_slider.ini
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ JJ_SOCIAL_SLIDER_TAB_NEW="Neuer Tab"
JJ_SOCIAL_SLIDER_TAB_SAME="Gleicher Tab"
JJ_SOCIAL_SLIDER_SORTING="Sortierung"
JJ_SOCIAL_SLIDER_SORTING_DESC="Die Reihenfolge der Slider kann durch ziehen und loslassen (Drag and Drop) geändert werden"
JJ_SOCIAL_SLIDER_NOFOLLOW="Nofollow"
JJ_SOCIAL_SLIDER_NOFOLLOW_DESC="Instruct some search engines not to follow thr Social Slider links."

JJ_SOCIAL_SLIDER_VIA_FACEBOOK="Bei Facebook teilen"
JJ_SOCIAL_SLIDER_VIA_TWITTER="Bei Twitter teilen"
Expand Down
2 changes: 2 additions & 0 deletions mod_social_slider/language/en-GB/en-GB.mod_social_slider.ini
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ JJ_SOCIAL_SLIDER_TAB_NEW="New tab"
JJ_SOCIAL_SLIDER_TAB_SAME="Same tab"
JJ_SOCIAL_SLIDER_SORTING="Order"
JJ_SOCIAL_SLIDER_SORTING_DESC="You can change the order by dragging each box"
JJ_SOCIAL_SLIDER_NOFOLLOW="Nofollow"
JJ_SOCIAL_SLIDER_NOFOLLOW_DESC="Instruct some search engines not to follow thr Social Slider links."

JJ_SOCIAL_SLIDER_VIA_FACEBOOK="Follow via Facebook"
JJ_SOCIAL_SLIDER_VIA_TWITTER="Follow via Twitter"
Expand Down
2 changes: 2 additions & 0 deletions mod_social_slider/language/fr-FR/fr-FR.mod_social_slider.ini
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ JJ_SOCIAL_SLIDER_TAB_NEW="Nouvel onglet"
JJ_SOCIAL_SLIDER_TAB_SAME="Même onglet"
JJ_SOCIAL_SLIDER_SORTING="Ordre"
JJ_SOCIAL_SLIDER_SORTING_DESC="Vous pouvez modifier l'ordre en faisant glisser chaque boîte"
JJ_SOCIAL_SLIDER_NOFOLLOW="Nofollow"
JJ_SOCIAL_SLIDER_NOFOLLOW_DESC="Instruct some search engines not to follow thr Social Slider links."

JJ_SOCIAL_SLIDER_VIA_FACEBOOK="Suivez-nous sur Facebook"
JJ_SOCIAL_SLIDER_VIA_TWITTER="Suivez-nous sur Twitter"
Expand Down
2 changes: 2 additions & 0 deletions mod_social_slider/language/nl-BE/nl-BE.mod_social_slider.ini
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ JJ_SOCIAL_SLIDER_TAB_NEW="Nieuw tabblad"
JJ_SOCIAL_SLIDER_TAB_SAME="hetzelfde tabblad"
JJ_SOCIAL_SLIDER_SORTING="Order"
JJ_SOCIAL_SLIDER_SORTING_DESC="You can change the order by dragging each box"
JJ_SOCIAL_SLIDER_NOFOLLOW="Nofollow"
JJ_SOCIAL_SLIDER_NOFOLLOW_DESC="Instruct some search engines not to follow thr Social Slider links."

JJ_SOCIAL_SLIDER_VIA_FACEBOOK="Volg via Facebook"
JJ_SOCIAL_SLIDER_VIA_TWITTER="Volg via Twitter"
Expand Down
2 changes: 2 additions & 0 deletions mod_social_slider/language/ru-RU/ru-RU.mod_social_slider.ini
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,8 @@ JJ_SOCIAL_SLIDER_TAB_NEW="Новая закладка"
JJ_SOCIAL_SLIDER_TAB_SAME="Это же окно"
JJ_SOCIAL_SLIDER_SORTING="Цель"
JJ_SOCIAL_SLIDER_SORTING_DESC="Перетащите окно чтобы изменить позицию"
JJ_SOCIAL_SLIDER_NOFOLLOW="Nofollow"
JJ_SOCIAL_SLIDER_NOFOLLOW_DESC="Instruct some search engines not to follow thr Social Slider links."

JJ_SOCIAL_SLIDER_VIA_FACEBOOK="К нам на Facebook"
JJ_SOCIAL_SLIDER_VIA_TWITTER="Мы на Twitter"
Expand Down
4 changes: 4 additions & 0 deletions mod_social_slider/mod_social_slider.xml
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,10 @@
<option value="0">JJ_SOCIAL_SLIDER_TAB_NEW</option>
<option value="1">JJ_SOCIAL_SLIDER_TAB_SAME</option>
</field>
<field name="nofollow" class="btn-group" type="radio" default="0" label="JJ_SOCIAL_SLIDER_NOFOLLOW" description="JJ_SOCIAL_SLIDER_NOFOLLOW_DESC">
<option value="0">JJ_OFF</option>
<option value="1">JJ_ON</option>
</field>
</fieldset>
</fields>
</config>
Expand Down
13 changes: 8 additions & 5 deletions mod_social_slider/tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,17 @@

JHtml::_('stylesheet', 'mod_social_slider/style.css', array(), true);

$target = '';
$nofollow = '';

if ($params->get('tab', 0) == 0)
{
$target = ' target="_blank"';
}
else

if ($params->get('nofollow', 0) == 1)
{
$target = "";
$nofollow = ' rel="nofollow"';
}

echo '<ul id="jj_sl_navigation">';
Expand All @@ -29,17 +33,16 @@
{
$parts = explode('_', $item);
$key = $slides[$item];
$uppercase = strtoupper($key);

if ($params->get($key) == 1)
{
if ($parts[1] < 16)
{
echo '<li class="jj_sl_' . $key . '"><a href="' . $params->get($key . '_link') . '"' . $target . '><span class="jj_social_text">' . JText::_('JJ_SOCIAL_SLIDER_VIA_' . $uppercase . '') . '</span></a></li>';
echo '<li class="jj_sl_' . $key . '"><a href="' . $params->get($key . '_link') . '"' . $target . $nofollow . '><span class="jj_social_text">' . JText::_('JJ_SOCIAL_SLIDER_VIA_' . strtoupper($key) . '') . '</span></a></li>';
}
else
{
echo '<li class="jj_sl_' . $key . '"><a href="' . $params->get($key . '_link') . '"' . $target . '><span class="jj_social_text">' . JText::_($params->get($key . '_text')) . '</span></a></li>';
echo '<li class="jj_sl_' . $key . '"><a href="' . $params->get($key . '_link') . '"' . $target . $nofollow . '><span class="jj_social_text">' . JText::_($params->get($key . '_text')) . '</span></a></li>';
}
}
}
Expand Down

0 comments on commit 0177918

Please sign in to comment.