");
out.println("Страница не найдена
");
diff --git a/src/java/com/juick/http/www/NewMessage.java b/src/java/com/juick/http/www/NewMessage.java
index 2072e41f..34733511 100644
--- a/src/java/com/juick/http/www/NewMessage.java
+++ b/src/java/com/juick/http/www/NewMessage.java
@@ -18,6 +18,7 @@
package com.juick.http.www;
import com.juick.Tag;
+import com.juick.server.CrosspostQueries;
import com.juick.server.MessagesQueries;
import com.juick.server.SubscriptionsQueries;
import com.juick.server.TagQueries;
@@ -235,7 +236,54 @@ public class NewMessage {
xmsg.to.Username = "jubo";
xmpp.send(xmsg);
- Utils.sendTemporaryRedirect(response, "/" + visitor.UName + "/" + mid);
+ //
+
+ response.setContentType("text/html; charset=UTF-8");
+ PrintWriter out = response.getWriter();
+ try {
+ PageTemplates.pageHead(out, "Сообщение опубликовано", null);
+ PageTemplates.pageNavigation(out, visitor, null);
+ PageTemplates.pageHomeColumn(out, sql, visitor);
+
+ String hashtags = "";
+ String tagscomma = "";
+ for (int i = 0; i < tagsArr.length; i++) {
+ if (i > 0) {
+ hashtags += " ";
+ tagscomma += ",";
+ }
+ hashtags += "#" + tagsArr[i];
+ tagscomma += tagsArr[i];
+ }
+
+ String url = URLEncoder.encode("http://juick.com/" + mid, "utf-8");
+ String sharetwi = hashtags + " " + body;
+ if (sharetwi.length() > 115) {
+ sharetwi = sharetwi.substring(0, 114) + "…";
+ }
+ sharetwi += " http://juick.com/" + mid;
+ String sharelj = URLEncoder.encode(body + "\n", "utf-8") + url;
+
+ out.println("");
+ out.println("Сообщение опубликовано
");
+ out.println("Поделитесь своим новым постом в социальных сетях:
");
+ if (CrosspostQueries.getTwitterTokens(sql, visitor.UID) == null) {
+ out.println("Отправить в Twitter
");
+ }
+ out.println("Отправить в LiveJournal
");
+ out.println("Отправить в ВКонтакте
");
+ if (CrosspostQueries.getFacebookToken(sql, visitor.UID) == null) {
+ out.println("Отправить в Facebook
");
+ }
+ out.println("Отправить в Google+
");
+ out.println("Ссылка на сообщение: http://juick.com/" + mid + "
");
+ out.println("");
+
+ PageTemplates.pageFooter(request, out, visitor, false);
+ PageTemplates.pageEnd(out);
+ } finally {
+ out.close();
+ }
}
public void doPostComment(Connection sql, HttpServletRequest request, HttpServletResponse response, Stream xmpp, com.juick.User visitor) throws ServletException, IOException {
diff --git a/src/java/com/juick/http/www/PageTemplates.java b/src/java/com/juick/http/www/PageTemplates.java
index c2e56fcb..37b17abf 100644
--- a/src/java/com/juick/http/www/PageTemplates.java
+++ b/src/java/com/juick/http/www/PageTemplates.java
@@ -28,7 +28,6 @@ import java.sql.ResultSet;
import java.sql.SQLException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.Calendar;
import java.util.Date;
import java.util.regex.Matcher;
@@ -52,9 +51,9 @@ public class PageTemplates {
out.println("");
out.print("");
out.print("");
- out.print("");
+ out.print("");
out.print("");
- out.print("");
+ out.print("");
if (headers != null) {
out.print(headers);
}
--
cgit v1.2.3