diff options
author | Ugnich Anton | 2014-07-25 17:56:18 +0700 |
---|---|---|
committer | Ugnich Anton | 2014-07-25 17:56:18 +0700 |
commit | a0a9e4151991111886d88b565fda7db9fba1dfd8 (patch) | |
tree | 7f8ff1a97b2830f584d7c9d616997b1906422966 /src/java/com/juick/http/www/User.java | |
parent | 2b9c93ac6d216b67e95ccc0cfb30bc5f58c9744a (diff) |
SEO, advertising
Diffstat (limited to 'src/java/com/juick/http/www/User.java')
-rw-r--r-- | src/java/com/juick/http/www/User.java | 19 |
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) { } |