出于某种原因,Kunena将所有内部内容都放入了nofollow链接。这对于所有的外部链接都是有意义的,但对于内部链接肯定不是。我希望谷歌索引与我的论坛帖子相关的路径。
我希望有人知道如何删除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代替它。我还尝试查找在整个Kunena组件中显示nofollow的每个位置,并尝试删除这些位置。还是不走运。有谁有什么想法吗?
库内纳: 2.0.2 Joomla: 2.5.7
发布于 2013-01-17 11:44:46
通过更改此文件解决了此问题: 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-16 02:06:16
你不需要改变nofollow,因为谷歌将索引整个主题和类别。检查主题的url,如果它被索引的话。并将RSS和sitemap添加到google网站管理员。您可以配置RSS@ kunena设置
发布于 2013-01-22 01:36:24
如果我理解您最初的顾虑,您希望删除所有的rel="nofollow“引用。
我会使用一个名为ReReplacer的免费组件来做到这一点。http://www.nonumber.nl/extensions/rereplacer
创建一个搜索rel="nofollow“的rereplacer条目,并将其替换为rel="follow”。
我这样做是为了Joomla用户的一个论坛,我们希望他们在签名中有关注的链接。
如果你购买了rereplacer的pro版本,那么你可以指定只替换Kunena。
https://stackoverflow.com/questions/12867167
复制相似问题