7
But what if I do want links followed in my articles/posts except the ones that cause duplicate content such as print and pdf links? Surely there's another way around this? I have manually edited these links like this:
a href="link.htm" rel="nofollow"
but it's a pain to do. Not all search engines obey this and I'm not even sure Google does half the time. Isn't there another way around this? Such as putting these links into JavaScript? I've heard search engines do not index/read JavaScript. Any ideas?
EDITED TO ADD:
On second thought - I've decided only registered users get to print or make PDFs. I think it's a good compromise. Off the top of my head, something like this should work in the smartsection_item.html template:
<{if $xoops_isuser}><span style="float: right; text-align: right;"><{$item.adminlink}>span><{else}><{/if}>
Quote:
//index nofollow
$meta_robots = str_replace( ',follow' , ',nofollow' , $xoopsTpl->get_template_vars( "xoops_meta_robots" ) ) ;
$xoopsTpl->assign( "xoops_meta_robots" , $meta_robots ) ;
before
include_once XOOPS_ROOT_PATH.'/footer.php';
?>
This will tell the robots to index your pages ONLY, not to follow any other links in the article, including "send to a friend", "print", "pdf", and other links.
Xoops default settings will allow the robots to index your page, then to print the page and to make a pdf version of the page - three versions of the same document. You could easily get penalized by Google for duplicate contents.
[size=x-small]Working sites:
XOOPS 2.0.16 PHP 5.2.2, MySQL 5.0.24a-standard-log, Apache/2.0.54 (Unix)
XOOPS 2.2.4, PHP 4.3.10, MySQL 3.23.58, Apache/1.3.33 (Unix)[/size]