Quick mod for you, tested on esport template.
Adds nofollow switch to menu items, switch it on/off from menu item settings under Menu Params (GavickPro).
Find File: /plugins/system/plg_gkextmenu/parameters.xml
Find Lines: 42/43/44 which is below
- Code: Select all
<option value="menu9">menu9</option>
<option value="menu10">menu10</option>
</field>
Replace with below.
- Code: Select all
<option value="menu9">menu9</option>
<option value="menu10">menu10</option>
</field>
<field name="gk_rel" type="radio" default="0" label="Enable No Follow:" description="Enable or disable nofollow option for this menu item.">
<option value="0">No</option>
<option value="1">Yes</option>
</field>
Find File: /templates/gk_esport/lib/menu/GKBase.class.php
Find Lines: 372 to 398 which is below
- Code: Select all
if ($tmpname) {
if ($tmp->type == 'separator') {
$data = '<a href="#" ' . $active . ' ' . $id . ' ' . $title . '>' . $txt . '</a>';
} else {
if ($tmp->url != null) {
switch ($tmp->browserNav) {
default:
case 0:
// _top
$data = '<a href="' . $tmp->url . '" ' . $active . ' ' . $id . ' ' . $title .
'>' . $txt . '</a>';
break;
case 1:
// _blank
$data = '<a href="' . $tmp->url . '" target="_blank" ' . $active . ' ' . $id .
' ' . $title . '>' . $txt . '</a>';
break;
case 2:
$data = '<a href="' . $tmp->url . '" target="_blank" ' . $active . ' ' . $id .
' ' . $title . '>' . $txt . '</a>';
break;
}
} else {
$data = '<a ' . $active . ' ' . $id . ' ' . $title . '>' . $txt . '</a>';
}
}
}
Replace with below
- Code: Select all
if ($tmp->gkparams->get('gk_rel')) {
$rel = " rel=\"nofollow\"";
}
if ($tmpname) {
if ($tmp->type == 'separator') {
$data = '<a href="#" ' . $active . ' ' . $id . ' ' . $title . ' ' . $rel . '>' . $txt . '</a>';
} else {
if ($tmp->url != null) {
switch ($tmp->browserNav) {
default:
case 0:
// _top
$data = '<a href="' . $tmp->url . '" ' . $active . ' ' . $id . ' ' . $title .
' ' . $rel . '>' . $txt . '</a>';
break;
case 1:
// _blank
$data = '<a href="' . $tmp->url . '" target="_blank" ' . $active . ' ' . $id .
' ' . $title . ' ' . $rel . '>' . $txt . '</a>';
break;
case 2:
$data = '<a href="' . $tmp->url . '" target="_blank" ' . $active . ' ' . $id .
' ' . $title . ' ' . $rel . '>' . $txt . '</a>';
break;
}
} else {
$data = '<a ' . $active . ' ' . $id . ' ' . $title . ' ' . $rel . '>' . $txt . '</a>';
}
}
}
See you around...