Navbar is now customizeable via docs/toolbar.html. There is a default should that file not be there. And... wtf, didn't my syndie thumbnail patch take? Well, no conflicts reported so, here it goes again.
This commit is contained in:
@ -25,6 +25,10 @@ div.logo {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
div.toolbar {
|
||||
font-weight: bold
|
||||
}
|
||||
|
||||
div.routersummary {
|
||||
/* width: 8em; */
|
||||
/* height: 5em; */
|
||||
|
@ -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 @@
|
||||
<a href="index.jsp"><img src="i2plogo.png" alt="Router Console" width="187" height="35" /></a><br />
|
||||
[<a href="config.jsp">configuration</a> | <a href="help.jsp">help</a>]
|
||||
</div>
|
||||
|
||||
<h4>
|
||||
<div class="toolbar">
|
||||
<% if (new File("docs/toolbar.html").exists()) { %>
|
||||
<jsp:useBean class="net.i2p.router.web.ContentHelper" id="toolbarhelper" scope="request" />
|
||||
<jsp:setProperty name="toolbarhelper" property="page" value="docs/toolbar.html" />
|
||||
<jsp:setProperty name="toolbarhelper" property="maxLines" value="300" />
|
||||
<jsp:getProperty name="toolbarhelper" property="content" />
|
||||
<% } else { %>
|
||||
<!-- Could not find docs/toolbar.html! -->
|
||||
<a href="susimail/susimail">Susimail</a> |
|
||||
<a href="susidns/index.jsp">SusiDNS</a> |
|
||||
<a href="syndie/">Syndie</a> |
|
||||
@ -27,10 +34,11 @@
|
||||
<a href="jobs.jsp">Jobs</a> |
|
||||
<a href="oldstats.jsp">Stats</a> |
|
||||
<a href="oldconsole.jsp">Internals</a>
|
||||
<% } %>
|
||||
<jsp:useBean class="net.i2p.router.web.NavHelper" id="navhelper" scope="request" />
|
||||
<jsp:setProperty name="navhelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" />
|
||||
<jsp:getProperty name="navhelper" property="clientAppLinks" />
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
<jsp:useBean class="net.i2p.router.web.NoticeHelper" id="noticehelper" scope="request" />
|
||||
<jsp:setProperty name="noticehelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" />
|
||||
|
@ -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) {}
|
||||
|
@ -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) {}
|
||||
|
@ -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) {}
|
||||
}
|
||||
|
@ -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("<a ").append(getClass("attachmentView")).append(" href=\"").append(getAttachmentURL(id)).append("\">");
|
||||
_bodyBuffer.append(sanitizeString(anchorText)).append("</a>");
|
||||
if(thumb >= 0) {
|
||||
_bodyBuffer.append("<img src=\"").
|
||||
append(getAttachmentURL(thumb)).
|
||||
append("\" alt=\"").append(anchorText).
|
||||
append("\" title=\"").append(anchorText).
|
||||
append("\" />");
|
||||
} else {
|
||||
_bodyBuffer.append(anchorText);
|
||||
}
|
||||
|
||||
_bodyBuffer.append("</a>");
|
||||
_bodyBuffer.append(getSpan("attachmentSummary")).append(" (");
|
||||
_bodyBuffer.append(getSpan("attachmentSummarySize")).append(f.length()/1024).append("KB</span>, ");
|
||||
_bodyBuffer.append(getSpan("attachmentSummaryName")).append(" \"").append(sanitizeString(name)).append("\"</span>, ");
|
||||
|
@ -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("</span>");
|
||||
} else {
|
||||
_bodyBuffer.append("<a ").append(getClass("attachmentView")).append(" href=\"").append(getAttachmentURL(id)).append("\">");
|
||||
_bodyBuffer.append(sanitizeString(anchorText)).append("</a>");
|
||||
_bodyBuffer.append("<a ").append(getClass("attachmentView")).append(" href=\"").append(getAttachmentURL(id)).append("\">");
|
||||
if(thumb >= 0) {
|
||||
_bodyBuffer.append("<img src=\"").
|
||||
append(getAttachmentURL(thumb)).
|
||||
append("\" alt=\"").append(anchorText).
|
||||
append("\" title=\"").append(anchorText).
|
||||
append("\" />");
|
||||
} else {
|
||||
_bodyBuffer.append(anchorText);
|
||||
}
|
||||
_bodyBuffer.append("</a>");
|
||||
_bodyBuffer.append(getSpan("attachmentSummary")).append(" (");
|
||||
_bodyBuffer.append(getSpan("attachmentSummarySize")).append(attachments[id].getDataLength()/1024).append("KB</span>, ");
|
||||
_bodyBuffer.append(getSpan("attachmentSummaryName")).append(" \"").append(sanitizeString(attachments[id].getName())).append("\"</span>, ");
|
||||
|
@ -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));
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -17,7 +17,8 @@ request.setCharacterEncoding("UTF-8");
|
||||
<li>[cut]more inside[/cut] = <a href="#">more inside...</a></li>
|
||||
<li>[quote][/quote] = Quoted text</li>
|
||||
<li>[img attachment="1"]alt[/img] = use attachment 1 as an image with 'alt' as the alt text</li>
|
||||
<li>[attachment id="0"]text[/attachment] = offer the attachment as a link in your post
|
||||
<li>[attachment id="0"]text[/attachment] = offer attachment 0 as a link in your post</li>
|
||||
<li>[attachment thumbnail="0" id="1"]text[/attachment] = offer attachment 1 as a link around a thumbnail image using attachment 0</li>
|
||||
<li>[link schema="eep" location="http://forum.i2p"]text[/link] = offer a link to an external resource (accessible with the given schema)</li>
|
||||
<li>[blog name="name" bloghash="base64hash"]description[/blog] = link to all posts in the blog</li>
|
||||
<li>[blog name="name" bloghash="base64hash" blogentry="1234"]description[/blog] = link to the specified post in the blog</li>
|
||||
|
@ -291,6 +291,7 @@
|
||||
<copy file="core/perl/i2ptest.sh" todir="pkg-temp/scripts/" />
|
||||
<mkdir dir="pkg-temp/docs" />
|
||||
<copy file="readme.html" todir="pkg-temp/docs/" />
|
||||
<copy file="toolbar.html" todir="pkg-temp/docs/" />
|
||||
<copy file="initialNews.xml" tofile="pkg-temp/docs/news.xml" />
|
||||
<copy file="installer/resources/startconsole.html" todir="pkg-temp/docs/" />
|
||||
<copy file="installer/resources/start.ico" todir="pkg-temp/docs/" />
|
||||
|
Reference in New Issue
Block a user