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(" ");
- 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("");
if (listview) {
printList(out, replies);
diff --git a/web/style3.css b/web/style3.css
index a4591a6f..f2a16f8a 100644
--- a/web/style3.css
+++ b/web/style3.css
@@ -68,6 +68,8 @@ article footer.comm { margin: 13px 0 0 0; }
article textarea { width: 530px; padding: 2px; resize: vertical; vertical-align: top; min-height: 12pt; height: 12pt; border: 0; }
article input { width: 50px; margin-left: 6px; vertical-align: top; border: 1px solid #CCC; background: #EEE; color: #999; }
+#yandex_ad_728 { width: 728px; height: 90px; margin: 20px 0 30px 0; }
+
#geomap { width: 700px; height: 300px; margin-top: 1em; overflow: hidden; }
.msg { margin: 10px 0 20px 0; }
--
cgit v1.2.3