diff options
Diffstat (limited to 'src/java')
-rw-r--r-- | src/java/Global.properties | 2 | ||||
-rw-r--r-- | src/java/Global_ru.properties | 2 | ||||
-rw-r--r-- | src/java/User.properties | 1 | ||||
-rw-r--r-- | src/java/User_ru.properties | 1 | ||||
-rw-r--r-- | src/java/com/juick/http/www/PageTemplates.java | 4 | ||||
-rw-r--r-- | src/java/com/juick/http/www/UserThread.java | 25 |
6 files changed, 26 insertions, 9 deletions
diff --git a/src/java/Global.properties b/src/java/Global.properties index b0e9525e..164b57a2 100644 --- a/src/java/Global.properties +++ b/src/java/Global.properties @@ -16,7 +16,9 @@ Help=Help Older=Older Newer=Newer (replies)\ by=by +Recommended\ by=Recommended by Comment=Comment +Add\ a\ comment=Add a comment... Sponsored\ by=Sponsored by Block\ user=Block user Send\ private\ message=Send private message diff --git a/src/java/Global_ru.properties b/src/java/Global_ru.properties index 8d315dbf..b98693da 100644 --- a/src/java/Global_ru.properties +++ b/src/java/Global_ru.properties @@ -16,7 +16,9 @@ Help=\u0421\u043f\u0440\u0430\u0432\u043a\u0430 Older=\u0421\u0442\u0430\u0440\u044b\u0435 Newer=\u041d\u043e\u0432\u044b\u0435 (replies)\ by=\u043e\u0442 +Recommended\ by=\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u043e\u0432\u0430\u043b\u0438 Comment=\u041e\u0442\u0432\u0435\u0442\u0438\u0442\u044c +Add\ a\ comment=\u041d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439... Sponsored\ by=\u041f\u0440\u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0435 Block\ user=\u0417\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f Send\ private\ message=\u041e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 diff --git a/src/java/User.properties b/src/java/User.properties index 4d54c498..f3b563db 100644 --- a/src/java/User.properties +++ b/src/java/User.properties @@ -11,6 +11,7 @@ (Menu)\ Photos=Photos and videos (Menu)\ Tags=Tags (Menu)\ Search=Search +Replies=Replies Expand\ all=Expand all View\ as\ list=View as list View\ as\ tree=View as tree diff --git a/src/java/User_ru.properties b/src/java/User_ru.properties index 6a257a49..fd38d0d5 100644 --- a/src/java/User_ru.properties +++ b/src/java/User_ru.properties @@ -11,6 +11,7 @@ (Menu)\ Photos=\u0424\u043e\u0442\u043e \u0438 \u0432\u0438\u0434\u0435\u043e (Menu)\ Tags=\u0422\u0435\u0433\u0438 (Menu)\ Search=\u041f\u043e\u0438\u0441\u043a +Replies=\u041e\u0442\u0432\u0435\u0442\u044b Expand\ all=\u0420\u0430\u0441\u043a\u0440\u044b\u0442\u044c \u0432\u0441\u0435 View\ as\ list=\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0441\u043f\u0438\u0441\u043a\u043e\u043c View\ as\ tree=\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0434\u0435\u0440\u0435\u0432\u043e\u043c diff --git a/src/java/com/juick/http/www/PageTemplates.java b/src/java/com/juick/http/www/PageTemplates.java index 08e88342..69fbb5ce 100644 --- a/src/java/com/juick/http/www/PageTemplates.java +++ b/src/java/com/juick/http/www/PageTemplates.java @@ -407,7 +407,7 @@ public class PageTemplates { out.println(" <div class=\"msg-comments\"><a href=\"/" + uname + "/" + mid + "\">" + formatReplies(rs.getInt(10), locale) + "</a> " + rb.getString("(replies) by") + " " + repliesby + "</div>"); } else if (cancomment) { out.println(" <form action=\"/post\" method=\"POST\" enctype=\"multipart/form-data\"><input type=\"hidden\" name=\"mid\" value=\"" + mid + "\"/>"); - out.println(" <div class=\"msg-comment\"><textarea name=\"body\" rows=\"1\" class=\"reply\" placeholder=\"Add a comment...\" onkeypress=\"postformListener(this.form,event)\"></textarea></div>"); + out.println(" <div class=\"msg-comment\"><textarea name=\"body\" rows=\"1\" class=\"reply\" placeholder=\""+rb.getString("Add a comment")+"\" onkeypress=\"postformListener(this.form,event)\"></textarea></div>"); out.println(" </form>"); } out.println(" </li>"); @@ -417,7 +417,7 @@ public class PageTemplates { } finally { Utils.finishSQL(rs, stmt); } - } + } /* public static void printPhotos(PrintWriter out, Connection sql, ArrayList<Integer> mids, Locale locale) { ResourceBundle rb = ResourceBundle.getBundle("Global", locale); diff --git a/src/java/com/juick/http/www/UserThread.java b/src/java/com/juick/http/www/UserThread.java index 1680ca8e..320c62ba 100644 --- a/src/java/com/juick/http/www/UserThread.java +++ b/src/java/com/juick/http/www/UserThread.java @@ -141,6 +141,11 @@ public class UserThread { out.println("<ul>"); out.println(" <li id=\"msg-" + mid + "\" class=\"msg\" style=\"border: 0\">"); + out.println(" <div class=\"msg-avatar\"><a href=\"/" + uname + "/\"><img src=\"http://i.juick.com/a/" + uid + ".png\" alt=\"" + uname + "\"/></a></div>"); + out.println(" <div class=\"msg-ts\"><a href=\"/" + uname + "/" + mid + "\" title=\"" + rs.getString(9) + "\">" + PageTemplates.formatDate(rs.getInt(8), rs.getString(9), locale) + "</a></div>"); + out.println(" <div class=\"msg-header\"><a href=\"/" + uname + "/\">@" + uname + "</a>:" + tags + "</div>"); + out.println(" <div class=\"msg-txt\">" + txt + "</div>"); + if (rs.getString(11) != null) { if (rs.getString(11).equals("jpg")) { out.println(" <div class=\"msg-media\"><a href=\"http://i.juick.com/p/" + mid + ".jpg\"><img src=\"http://i.juick.com/photos-512/" + mid + ".jpg\" alt=\"\"/></a></div>"); @@ -152,17 +157,23 @@ public class UserThread { } } - out.println(" <div class=\"msg-avatar\"><a href=\"/" + uname + "/\"><img src=\"http://i.juick.com/a/" + uid + ".png\" alt=\"" + uname + "\"/></a></div>"); - out.println(" <div class=\"msg-ts\"><a href=\"/" + uname + "/" + mid + "\" title=\"" + rs.getString(9) + "\">" + PageTemplates.formatDate(rs.getInt(8), rs.getString(9), locale) + "</a></div>"); - out.println(" <div class=\"msg-header\"><a href=\"/" + uname + "/\">@" + uname + "</a>:" + tags + "</div>"); - out.println(" <div class=\"msg-txt\">" + txt + "</div>"); - if (cancomment) { out.println(" <form action=\"/post\" method=\"POST\" enctype=\"multipart/form-data\"><input type=\"hidden\" name=\"mid\" value=\"" + mid + "\"/>"); - out.println(" <div class=\"msg-comment\"><textarea name=\"body\" rows=\"1\" class=\"reply\" placeholder=\"Add a comment...\" onkeypress=\"postformListener(this.form,event)\"></textarea></div>"); + out.println(" <div class=\"msg-comment\"><textarea name=\"body\" rows=\"1\" class=\"reply\" placeholder=\""+rb.getString("Add a comment")+"\" onkeypress=\"postformListener(this.form,event)\"></textarea></div>"); out.println(" </form>"); } + ArrayList<String> recomm = MessagesQueries.getMessageRecommendations(sql, mid); + if (!recomm.isEmpty()) { + out.print(" <div class=\"" + (cancomment ? "msg-recomms" : "msg-comments") + "\">" + rb.getString("Recommended by") + " (" + recomm.size() + "): "); + for (int i = 0; i < recomm.size(); i++) { + if (i > 0) { + out.print(", "); + } + out.print("<a href=\"/" + recomm.get(i) + "/\">@" + recomm.get(i) + "</a>"); + } + } + out.println(" </li>"); out.println("</ul>"); } @@ -230,7 +241,7 @@ public class UserThread { out.print("<a href=\"#\" onclick=\"$('#replies>li').show(); $('#replies .msg-comments').hide(); return false\">" + rbuser.getString("Expand all") + "</a> · <a href=\"?view=list\">" + rbuser.getString("View as list") + "</a>"); } out.print("</div>"); - out.println(" <h2>Replies (" + replies.size() + ")</h2>"); + out.println(" <h2>"+rbuser.getString("Replies")+" (" + replies.size() + ")</h2>"); out.println("</div>"); out.println("<ul id=\"replies\">"); |