diff --git a/apps/routerconsole/jsp/default.css b/apps/routerconsole/jsp/default.css
index f06e46207..d308818c1 100644
--- a/apps/routerconsole/jsp/default.css
+++ b/apps/routerconsole/jsp/default.css
@@ -25,6 +25,10 @@ div.logo {
text-align: left;
}
+div.toolbar {
+ font-weight: bold
+}
+
div.routersummary {
/* width: 8em; */
/* height: 5em; */
diff --git a/apps/routerconsole/jsp/nav.jsp b/apps/routerconsole/jsp/nav.jsp
index 57c826466..d555922d1 100644
--- a/apps/routerconsole/jsp/nav.jsp
+++ b/apps/routerconsole/jsp/nav.jsp
@@ -1,3 +1,4 @@
+<%@page import="java.io.File" %>
<% response.setHeader("Pragma", "no-cache");
response.setHeader("Cache-Control","no-cache");
response.setDateHeader("Expires", 0);
@@ -13,8 +14,14 @@

[configuration | help]
-
-
+
" />
diff --git a/apps/syndie/java/src/net/i2p/syndie/ArchiveIndexer.java b/apps/syndie/java/src/net/i2p/syndie/ArchiveIndexer.java
index 24eee6542..25bcfac9a 100644
--- a/apps/syndie/java/src/net/i2p/syndie/ArchiveIndexer.java
+++ b/apps/syndie/java/src/net/i2p/syndie/ArchiveIndexer.java
@@ -183,7 +183,7 @@ class ArchiveIndexer {
public void receiveAddress(String name, String schema, String protocol, String location, String anchorText) {}
public void receiveArchive(String name, String description, String locationSchema, String location, String postingKey, String anchorText) {}
- public void receiveAttachment(int id, String anchorText) {}
+ public void receiveAttachment(int id, int thumbnail, String anchorText) {}
public void receiveBegin() {}
public void receiveBlog(String name, String blogKeyHash, String blogPath, long blogEntryId, List blogArchiveLocations, String anchorText) {}
public void receiveBold(String text) {}
diff --git a/apps/syndie/java/src/net/i2p/syndie/HeaderReceiver.java b/apps/syndie/java/src/net/i2p/syndie/HeaderReceiver.java
index 9a9c2aa19..8b6bfe0ec 100644
--- a/apps/syndie/java/src/net/i2p/syndie/HeaderReceiver.java
+++ b/apps/syndie/java/src/net/i2p/syndie/HeaderReceiver.java
@@ -14,7 +14,7 @@ public class HeaderReceiver implements SMLParser.EventReceiver {
public void receiveAddress(String name, String schema, String protocol, String location, String anchorText) {}
public void receiveArchive(String name, String description, String locationSchema, String location, String postingKey, String anchorText) {}
- public void receiveAttachment(int id, String anchorText) {}
+ public void receiveAttachment(int id, int thumbnail, String anchorText) {}
public void receiveBegin() {}
public void receiveBlog(String name, String blogKeyHash, String blogPath, long blogEntryId, List blogArchiveLocations, String anchorText) {}
public void receiveBold(String text) {}
diff --git a/apps/syndie/java/src/net/i2p/syndie/sml/EventReceiverImpl.java b/apps/syndie/java/src/net/i2p/syndie/sml/EventReceiverImpl.java
index 206a82849..399b01e92 100644
--- a/apps/syndie/java/src/net/i2p/syndie/sml/EventReceiverImpl.java
+++ b/apps/syndie/java/src/net/i2p/syndie/sml/EventReceiverImpl.java
@@ -111,5 +111,5 @@ public class EventReceiverImpl implements SMLParser.EventReceiver {
public void receiveH5(String text) {}
public void receivePre(String text) {}
public void receiveHR() {}
- public void receiveAttachment(int id, String anchorText) {}
+ public void receiveAttachment(int id, int thumbnail, String anchorText) {}
}
diff --git a/apps/syndie/java/src/net/i2p/syndie/sml/HTMLPreviewRenderer.java b/apps/syndie/java/src/net/i2p/syndie/sml/HTMLPreviewRenderer.java
index 0d749b149..6d67e1408 100644
--- a/apps/syndie/java/src/net/i2p/syndie/sml/HTMLPreviewRenderer.java
+++ b/apps/syndie/java/src/net/i2p/syndie/sml/HTMLPreviewRenderer.java
@@ -31,16 +31,27 @@ public class HTMLPreviewRenderer extends HTMLRenderer {
ArchiveViewerBean.PARAM_ATTACHMENT + "=" + id;
}
- public void receiveAttachment(int id, String anchorText) {
+ public void receiveAttachment(int id, int thumb, String anchorText) {
+ anchorText = sanitizeString(anchorText);
if (!continueBody()) { return; }
if ( (id < 0) || (_files == null) || (id >= _files.size()) ) {
- _bodyBuffer.append(sanitizeString(anchorText));
+ _bodyBuffer.append(anchorText);
} else {
File f = (File)_files.get(id);
String name = (String)_filenames.get(id);
String type = (String)_fileTypes.get(id);
_bodyBuffer.append("");
- _bodyBuffer.append(sanitizeString(anchorText)).append("");
+ if(thumb >= 0) {
+ _bodyBuffer.append("
");
+ } else {
+ _bodyBuffer.append(anchorText);
+ }
+
+ _bodyBuffer.append("");
_bodyBuffer.append(getSpan("attachmentSummary")).append(" (");
_bodyBuffer.append(getSpan("attachmentSummarySize")).append(f.length()/1024).append("KB, ");
_bodyBuffer.append(getSpan("attachmentSummaryName")).append(" \"").append(sanitizeString(name)).append("\", ");
diff --git a/apps/syndie/java/src/net/i2p/syndie/sml/HTMLRenderer.java b/apps/syndie/java/src/net/i2p/syndie/sml/HTMLRenderer.java
index 12fe3c9d3..16a10d62c 100644
--- a/apps/syndie/java/src/net/i2p/syndie/sml/HTMLRenderer.java
+++ b/apps/syndie/java/src/net/i2p/syndie/sml/HTMLRenderer.java
@@ -513,14 +513,23 @@ public class HTMLRenderer extends EventReceiverImpl {
}
}
- public void receiveAttachment(int id, String anchorText) {
+ public void receiveAttachment(int id, int thumb, String anchorText) {
if (!continueBody()) { return; }
Attachment attachments[] = _entry.getAttachments();
if ( (id < 0) || (id >= attachments.length)) {
_bodyBuffer.append(getSpan("attachmentUnknown")).append(sanitizeString(anchorText)).append("");
} else {
- _bodyBuffer.append("");
- _bodyBuffer.append(sanitizeString(anchorText)).append("");
+ _bodyBuffer.append("");
+ if(thumb >= 0) {
+ _bodyBuffer.append("
");
+ } else {
+ _bodyBuffer.append(anchorText);
+ }
+ _bodyBuffer.append("");
_bodyBuffer.append(getSpan("attachmentSummary")).append(" (");
_bodyBuffer.append(getSpan("attachmentSummarySize")).append(attachments[id].getDataLength()/1024).append("KB, ");
_bodyBuffer.append(getSpan("attachmentSummaryName")).append(" \"").append(sanitizeString(attachments[id].getName())).append("\", ");
diff --git a/apps/syndie/java/src/net/i2p/syndie/sml/RSSRenderer.java b/apps/syndie/java/src/net/i2p/syndie/sml/RSSRenderer.java
index b38f9b0ee..ef57ddc37 100644
--- a/apps/syndie/java/src/net/i2p/syndie/sml/RSSRenderer.java
+++ b/apps/syndie/java/src/net/i2p/syndie/sml/RSSRenderer.java
@@ -208,7 +208,7 @@ public class RSSRenderer extends HTMLRenderer {
_bodyBuffer.append(sanitizeString(anchorText));
}
}
- public void receiveAttachment(int id, String anchorText) {
+ public void receiveAttachment(int id, int thumb, String anchorText) {
if (!continueBody()) { return; }
_bodyBuffer.append(sanitizeString(anchorText));
}
diff --git a/apps/syndie/java/src/net/i2p/syndie/sml/SMLParser.java b/apps/syndie/java/src/net/i2p/syndie/sml/SMLParser.java
index d3d03165e..116a40b03 100644
--- a/apps/syndie/java/src/net/i2p/syndie/sml/SMLParser.java
+++ b/apps/syndie/java/src/net/i2p/syndie/sml/SMLParser.java
@@ -211,6 +211,7 @@ public class SMLParser {
private static final String T_ATTACHMENT = "attachment";
private static final String T_ARCHIVE = "archive";
+ private static final String P_THUMBNAIL = "thumbnail";
private static final String P_ATTACHMENT = "attachment";
private static final String P_WHO_QUOTED = "author";
private static final String P_QUOTE_LOCATION = "location";
@@ -284,7 +285,10 @@ public class SMLParser {
} else if (T_PRE.equals(tagName)) {
receiver.receivePre(body);
} else if (T_ATTACHMENT.equals(tagName)) {
- receiver.receiveAttachment((int)getLong(P_ATTACHMENT_ID, attr), body);
+ receiver.receiveAttachment(
+ (int)getLong(P_ATTACHMENT_ID, attr),
+ (int)getLong(P_THUMBNAIL, attr),
+ body);
} else {
if (_log.shouldLog(Log.WARN))
_log.warn("need to learn how to parse the tag [" + tagName + "]");
@@ -402,7 +406,7 @@ public class SMLParser {
String postingKey, String anchorText);
public void receiveImage(String alternateText, int attachmentId);
public void receiveAddress(String name, String schema, String protocol, String location, String anchorText);
- public void receiveAttachment(int id, String anchorText);
+ public void receiveAttachment(int id, int thumb, String anchorText);
public void receiveBold(String text);
public void receiveItalic(String text);
public void receiveUnderline(String text);
diff --git a/apps/syndie/jsp/smlref.jsp b/apps/syndie/jsp/smlref.jsp
index 87e647447..b67cfb8a2 100644
--- a/apps/syndie/jsp/smlref.jsp
+++ b/apps/syndie/jsp/smlref.jsp
@@ -17,7 +17,8 @@ request.setCharacterEncoding("UTF-8");
[cut]more inside[/cut] = <a href="#">more inside...</a>
[quote][/quote] = Quoted text
[img attachment="1"]alt[/img] = use attachment 1 as an image with 'alt' as the alt text
- [attachment id="0"]text[/attachment] = offer the attachment as a link in your post
+ [attachment id="0"]text[/attachment] = offer attachment 0 as a link in your post
+ [attachment thumbnail="0" id="1"]text[/attachment] = offer attachment 1 as a link around a thumbnail image using attachment 0
[link schema="eep" location="http://forum.i2p"]text[/link] = offer a link to an external resource (accessible with the given schema)
[blog name="name" bloghash="base64hash"]description[/blog] = link to all posts in the blog
[blog name="name" bloghash="base64hash" blogentry="1234"]description[/blog] = link to the specified post in the blog
diff --git a/build.xml b/build.xml
index ed8ced03a..e6ae236a9 100644
--- a/build.xml
+++ b/build.xml
@@ -291,6 +291,7 @@
+