aboutsummaryrefslogtreecommitdiff
path: root/src/java/com/juick/http/www/User.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/com/juick/http/www/User.java')
-rw-r--r--src/java/com/juick/http/www/User.java19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/java/com/juick/http/www/User.java b/src/java/com/juick/http/www/User.java
index 8723a7e9..83601ade 100644
--- a/src/java/com/juick/http/www/User.java
+++ b/src/java/com/juick/http/www/User.java
@@ -120,7 +120,7 @@ public class User {
String head = "<link rel=\"alternate\" type=\"application/rss+xml\" title=\"@" + user.UName + "\" href=\"//rss.juick.com/" + user.UName + "/blog\"/>";
if (paramTag != null && TagQueries.getTagNoIndex(sql, paramTag.TID)) {
head += "<meta name=\"robots\" content=\"noindex,nofollow\"/>";
- } else if (paramBefore > 0) {
+ } else if (paramBefore > 0 || paramShow != null) {
head += "<meta name=\"robots\" content=\"noindex\"/>";
}
PageTemplates.pageHead(out, title, head);
@@ -170,7 +170,8 @@ public class User {
response.setContentType("text/html; charset=UTF-8");
PrintWriter out = response.getWriter();
try {
- PageTemplates.pageHead(out, "Теги " + user.UName, null);
+ String head = "<meta name=\"robots\" content=\"noindex,nofollow\"/>";
+ PageTemplates.pageHead(out, "Теги " + user.UName, head);
PageTemplates.pageNavigation(out, visitor, null);
pageUserColumn(out, sql, user, visitor);
@@ -195,7 +196,8 @@ public class User {
response.setContentType("text/html; charset=UTF-8");
PrintWriter out = response.getWriter();
try {
- PageTemplates.pageHead(out, "Подписки " + user.UName, null);
+ String head = "<meta name=\"robots\" content=\"noindex\"/>";
+ PageTemplates.pageHead(out, "Подписки " + user.UName, head);
PageTemplates.pageNavigation(out, visitor, null);
pageUserColumn(out, sql, user, visitor);
@@ -243,7 +245,8 @@ public class User {
response.setContentType("text/html; charset=UTF-8");
PrintWriter out = response.getWriter();
try {
- PageTemplates.pageHead(out, "Читатели " + user.UName, null);
+ String head = "<meta name=\"robots\" content=\"noindex\"/>";
+ PageTemplates.pageHead(out, "Читатели " + user.UName, head);
PageTemplates.pageNavigation(out, visitor, null);
pageUserColumn(out, sql, user, visitor);
@@ -317,14 +320,14 @@ public class User {
}
out.println(" <ul>");
out.println(" <li><a href=\"./\">Блог</a></li>");
- out.println(" <li><a href=\"./?show=recomm\">Рекомендации</a></li>");
- out.println(" <li><a href=\"./?show=photos\">Фотографии</a></li>");
+ out.println(" <li><a href=\"./?show=recomm\" rel=\"nofollow\">Рекомендации</a></li>");
+ out.println(" <li><a href=\"./?show=photos\" rel=\"nofollow\">Фотографии</a></li>");
out.println(" </ul>");
out.println(" <hr/>");
out.println(" <form action=\"./\">");
out.println(" <p><input type=\"text\" name=\"search\" class=\"inp\" placeholder=\"Поиск\"/></p>");
out.println(" </form>");
- out.println(" <p class=\"tags\">" + pageUserTags(sql, user, visitor, 20) + "<a href=\"./tags\">...</a></p>");
+ out.println(" <p class=\"tags\">" + pageUserTags(sql, user, visitor, 20) + "<a href=\"./tags\" rel=\"nofollow\">...</a></p>");
out.println(" <hr/>");
out.println(" <div id=\"ustats\"><ul>");
out.println(" <li><a href=\"./friends\">Я читаю: " + UserQueries.getStatsIRead(sql, user.UID) + "</a></li>");
@@ -393,7 +396,7 @@ public class User {
for (int i = 0; i < cnt; i++) {
String tag = Utils.encodeHTML(tags[i].Name);
try {
- tag = "<a href=\"./?tag=" + URLEncoder.encode(tags[i].Name, "UTF-8") + "\" title=\"" + tags[i].UsageCnt + "\">" + tag + "</a>";
+ tag = "<a href=\"./?tag=" + URLEncoder.encode(tags[i].Name, "UTF-8") + "\" title=\"" + tags[i].UsageCnt + "\" rel=\"nofollow\">" + tag + "</a>";
} catch (UnsupportedEncodingException e) {
}