diff options
author | Ugnich Anton | 2014-12-22 17:28:47 +0700 |
---|---|---|
committer | Ugnich Anton | 2014-12-22 17:28:47 +0700 |
commit | 804ef16a1df1ecd8a948cdc0894d82cba77e8f42 (patch) | |
tree | d104b7434285367e8b4cf59d23125261e99becdf | |
parent | 9cde0d2d167e037d84f9dcf32e859e1555070d0c (diff) |
+ WIX advertising
-rw-r--r-- | src/java/com/juick/http/www/Home.java | 2 | ||||
-rw-r--r-- | src/java/com/juick/http/www/PageTemplates.java | 12 |
2 files changed, 11 insertions, 3 deletions
diff --git a/src/java/com/juick/http/www/Home.java b/src/java/com/juick/http/www/Home.java index 8b4ec6a6..52012182 100644 --- a/src/java/com/juick/http/www/Home.java +++ b/src/java/com/juick/http/www/Home.java @@ -99,7 +99,7 @@ public class Home { } PageTemplates.pageHead(out, title, head); PageTemplates.pageNavigation(out, visitor, paramSearch); - PageTemplates.pageHomeColumn(out, sql, visitor); + PageTemplates.pageHomeColumn(out, sql, visitor, paramShow == null && paramBefore == 0 && paramSearch == null && visitor == null); out.println("<section id=\"content\">"); diff --git a/src/java/com/juick/http/www/PageTemplates.java b/src/java/com/juick/http/www/PageTemplates.java index 686971e8..7d6bd1c8 100644 --- a/src/java/com/juick/http/www/PageTemplates.java +++ b/src/java/com/juick/http/www/PageTemplates.java @@ -139,12 +139,20 @@ public class PageTemplates { } public static void pageHomeColumn(PrintWriter out, Connection sql, com.juick.User visitor) { + pageHomeColumn(out, sql, visitor, false); + } + + public static void pageHomeColumn(PrintWriter out, Connection sql, com.juick.User visitor, boolean showAdv) { if (tagsHTML == null) { tagsHTML = PageTemplates.getPopularTags(sql, 80); } out.println("<aside id=\"column\">"); - out.println(" <p class=\"tags\">" + tagsHTML + "</p>"); + out.print(" <p class=\"tags\">" + tagsHTML); + if (showAdv) { + out.print(" <a href=\"http://ru.wix.com/\">конструктор сайтов</a>"); + } + out.println("</p>"); // if (visitor != null) { // printContestRating(out, sql); // } @@ -254,7 +262,7 @@ public class PageTemplates { if (sapeon) { out.println("var _acic={dataProvider:10};"); out.println("(function(){"); - out.println("var e=document.createElement('script');e.type='text/javascript';e.async=true;e.src='//www.aci'+'nt.net/aci.js';"); + out.println("var e=document.createElement('script');e.type='text/javascript';e.async=true;e.src='//www2.aci'+'nt.net/aci.js';"); out.println("var t=document.getElementsByTagName('script')[0];t.parentNode.insertBefore(e,t);"); out.println("})();"); } |