dtu15253 2012-10-12 21:11
浏览 41
已采纳

Joomla的Kunena使用nofollow作为内部链接

For some reason Kunena puts nofollow links for everything internal. This makes sense for all external links but certainly not for internal ones. I want Google to index the paths associated with the forum posts I have.

I'm hoping someone knows how to remove the nofollow links. It looks like this file is the main one: components/com_kunena/lib/kunena.link.class.php

There are a few functions where I remove the nofollow links such as:

static function GetHrefLink($link, $name, $title = '', $rel = 'nofollow', $class = '', $anker = '', $attr = '') {
            return '<a ' . ($class ? 'class="' . $class . '" ' : '') . 'href="' . $link . ($anker ? ('#' . $anker) : '') . '" title="' . $title . '"' . ($rel ? ' rel="' . $rel . '"' : '') . ($attr ? ' ' . $attr : '') . '>' . $name . '</a>';
    }

    //
    // Basic universal href link
    //
    static function GetSefHrefLink($link, $name, $title = '', $rel = 'nofollow', $class = '', $anker = '', $attr = '') {
            $uri = $link instanceof JURI ? $link : JURI::getInstance($link);
            if ($anker) $uri->setFragment($anker);
            return JHTML::_('kunenaforum.link', $uri, $name, $title, $class, $rel, $attr);
    }

I've tried removing the parameter everywhere, I tried just leaving it empty and I've tried using follow as a replacement. I've also tried looking for every single place where nofollow is shown in the whole Kunena component and tried removing those. Still no luck. Anyone with any ideas?

Kunena: 2.0.2 Joomla: 2.5.7

  • 写回答

3条回答 默认 最新

  • doupao2277 2013-01-17 03:44
    关注

    Resolved this by changing this file: administrator/components/com_kunena/libraries/view.php

    Find:

    public function getTopicLink

    Change this line:

    return JHTML::_('kunenaforum.link', $uri, $content, $title, $class, 'nofollow'); 
    

    to:

    return JHTML::_('kunenaforum.link', $uri, $content, $title, $class, 'follow'); 
    

    This exists in several spots.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 想问一下树莓派接上显示屏后出现如图所示画面,是什么问题导致的
  • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
  • ¥15 cmd cl 0x000007b
  • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line
  • ¥500 火焰左右视图、视差(基于双目相机)
  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号