website rev 1071

get-feeds: rel='nofollow' to scn and forum activity
author Aleksej Bobylev <al.bobylev@gmail.com>
date Fri Jun 29 11:17:30 2012 +0000 (2012-06-29)
parents ecb638cb5473
children 58354eeb4cda
files lib/get-feeds.php
line diff
     1.1 --- a/lib/get-feeds.php	Thu May 24 11:41:39 2012 +0200
     1.2 +++ b/lib/get-feeds.php	Fri Jun 29 11:17:30 2012 +0000
     1.3 @@ -23,6 +23,12 @@
     1.4  function get_feed($feed) {
     1.5  	$cache = '/var/cache/slitaz/website';
     1.6  	$entries = 4;
     1.7 +	// no follow all links, but hg commits
     1.8 +	if ($feed !== "wok.xml") {
     1.9 +		$nofollow = " rel='nofollow'"
    1.10 +	else
    1.11 +		$nofollow = ""
    1.12 +	}
    1.13  	// have the page displayed even if any xml file
    1.14  	if ( ! file_exists("$cache/$feed")) {
    1.15  		echo "</p>\n<div>\n";
    1.16 @@ -38,7 +44,7 @@
    1.17  		echo "</p>\n<div>\n<ul>\n";
    1.18  		foreach($x->channel->item as $entry) {
    1.19  			$count = $count + 1;
    1.20 -			echo "	<li><a href='$entry->guid'>" .
    1.21 +			echo "	<li><a href='$entry->guid'$nofollow>" .
    1.22  				$entry->title . "</a></li>\n";
    1.23  			if ($count == $entries) {
    1.24  				break;
    1.25 @@ -99,7 +105,7 @@
    1.26  		echo "</p>\n<div>\n<ul>\n";
    1.27  		foreach($x->channel->item as $entry) {
    1.28  			$count = $count + 1;
    1.29 -			echo "	<li><a href='$entry->link'>" .
    1.30 +			echo "	<li><a href='$entry->link' rel='nofollow'>" .
    1.31  				$entry->title . "</a></li>\n";
    1.32  			if ($count == $entries) {
    1.33  				break;