0

出于某种原因,Kunena 为内部所有内容放置了 nofollow 链接。这对所有外部链接都有意义,但对内部链接肯定不是。我希望 Google 索引与我拥有的论坛帖子相关的路径。

我希望有人知道如何删除nofollow 链接。看起来这个文件是主要文件:components/com_kunena/lib/kunena.link.class.php

有一些功能可以删除 nofollow 链接,例如:

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);
    }

我试过在任何地方删除参数,我试着把它留空,我试过用follow它来代替。我还尝试查找nofollow整个 Kunena 组件中显示的每个位置,并尝试删除它们。仍然没有运气。有任何想法的人吗?

库内纳:2.0.2 Joomla:2.5.7

4

3 回答 3

0

您不需要更改nofollow,因为谷歌将索引整个主题和类别。检查主题的 url 是否已编入索引。并将 RSS 和站点地图添加到谷歌网站管理员。您可以配置 RSS@kunena 设置

于 2013-01-15T18:06:15.697 回答
0

通过更改此文件解决了这个问题:administrator/components/com_kunena/libraries/view.php

寻找:

public function getTopicLink

更改此行:

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

到:

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

这存在于几个地方。

于 2013-01-17T03:44:45.933 回答
0

如果我理解您最初的担忧,您想删除所有 rel="nofollow" 引用。

我会使用一个名为 ReReplacer 的免费组件来做到这一点。 http://www.nonumber.nl/extensions/replacer

创建一个搜索 rel="nofollow" 并将其替换为 rel="follow" 的替换项。

我为一个 Joomla 用户论坛做了这个,我们希望他们在他们的签名中有关注链接。

如果您购买专业版的替换器,那么您可以指定只替换 Kunena。

于 2013-01-21T17:36:24.313 回答