From 9fae780d462eee90dc1c3891308f436699342e7d Mon Sep 17 00:00:00 2001 From: Ugnich Anton Date: Tue, 18 Mar 2014 04:42:16 +0700 Subject: Yandex Advertising upgrade --- src/java/com/juick/http/www/PageTemplates.java | 33 +++++++++++++------------- src/java/com/juick/http/www/UserThread.java | 4 ++++ web/style3.css | 2 ++ 3 files changed, 22 insertions(+), 17 deletions(-) diff --git a/src/java/com/juick/http/www/PageTemplates.java b/src/java/com/juick/http/www/PageTemplates.java index 88366ce0..f171eb07 100644 --- a/src/java/com/juick/http/www/PageTemplates.java +++ b/src/java/com/juick/http/www/PageTemplates.java @@ -52,9 +52,9 @@ public class PageTemplates { out.println(""); out.print(""); out.print(""); - out.print(""); - out.print(""); - out.print(""); + out.print(""); + out.print(""); + out.print(""); if (headers != null) { out.print(headers); } @@ -98,34 +98,33 @@ public class PageTemplates { out.println(""); } - public static void pageYandexAd(PrintWriter out, int YandexID) { - out.println("
"); + public static void pageYandexAd728(PrintWriter out, int YandexID) { + out.println("
"); out.println(""); } @@ -475,7 +474,7 @@ public class PageTemplates { for (int i = 0; i < msgs.size(); i++) { if (i == 1 && YandexID > 0 && ad_mid == 0) { - pageYandexAd(out, YandexID); + pageYandexAd728(out, YandexID); } com.juick.Message msg = msgs.get(i); @@ -501,7 +500,7 @@ public class PageTemplates { out.println("
"); out.println(" "); out.println("
@" + msg.User.UName + ":" + tags + "
"); - out.println("
"); + out.println("
"); if (msg.AttachmentType != null) { String fname = msg.MID + "." + msg.AttachmentType; out.println("

\"\"/

"); diff --git a/src/java/com/juick/http/www/UserThread.java b/src/java/com/juick/http/www/UserThread.java index 80e19bb1..8496fbe4 100644 --- a/src/java/com/juick/http/www/UserThread.java +++ b/src/java/com/juick/http/www/UserThread.java @@ -254,6 +254,10 @@ public class UserThread { out.println("

Ответы (" + replies.size() + ")

"); out.println(""); + if (replies.size() > 2) { + PageTemplates.pageYandexAd728(out, 1); + } + out.println("