Changeset e5fa7e0


Ignore:
Timestamp:
Dec 13, 2005 8:18:59 AM (15 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
7ac673c
Parents:
ab4f3008
git-author:
polecat <polecat> (12/13/05 08:18:59)
git-committer:
zzz <zzz@…> (12/13/05 08:18:59)
Message:

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.

Files:
11 edited

Legend:

Unmodified
Added
Removed
  • apps/routerconsole/jsp/default.css

    rab4f3008 re5fa7e0  
    2424        padding: .5em;
    2525        text-align: left;
     26}
     27
     28div.toolbar {
     29    font-weight: bold
    2630}
    2731
  • apps/routerconsole/jsp/nav.jsp

    rab4f3008 re5fa7e0  
     1<%@page import="java.io.File" %>
    12<% response.setHeader("Pragma", "no-cache");
    23   response.setHeader("Cache-Control","no-cache");
     
    1415 [<a href="config.jsp">configuration</a> | <a href="help.jsp">help</a>]
    1516</div>
    16 
    17 <h4>
     17<div class="toolbar">
     18 <% if (new File("docs/toolbar.html").exists()) { %>
     19   <jsp:useBean class="net.i2p.router.web.ContentHelper" id="toolbarhelper" scope="request" />
     20   <jsp:setProperty name="toolbarhelper" property="page" value="docs/toolbar.html" />
     21   <jsp:setProperty name="toolbarhelper" property="maxLines" value="300" />
     22   <jsp:getProperty name="toolbarhelper" property="content" />
     23<% } else { %>
     24 <!-- Could not find docs/toolbar.html! -->
    1825 <a href="susimail/susimail">Susimail</a> |
    1926 <a href="susidns/index.jsp">SusiDNS</a> |
     
    2835 <a href="oldstats.jsp">Stats</a> |
    2936 <a href="oldconsole.jsp">Internals</a>
     37<% } %>
    3038 <jsp:useBean class="net.i2p.router.web.NavHelper" id="navhelper" scope="request" />
    3139 <jsp:setProperty name="navhelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" />
    3240 <jsp:getProperty name="navhelper" property="clientAppLinks" />
    33 </h4>
     41</div>
    3442
    3543<jsp:useBean class="net.i2p.router.web.NoticeHelper" id="noticehelper" scope="request" />
  • apps/syndie/java/src/net/i2p/syndie/ArchiveIndexer.java

    rab4f3008 re5fa7e0  
    184184        public void receiveAddress(String name, String schema, String protocol, String location, String anchorText) {}
    185185        public void receiveArchive(String name, String description, String locationSchema, String location, String postingKey, String anchorText) {}
    186         public void receiveAttachment(int id, String anchorText) {}
     186        public void receiveAttachment(int id, int thumbnail, String anchorText) {}
    187187        public void receiveBegin() {}
    188188        public void receiveBlog(String name, String blogKeyHash, String blogPath, long blogEntryId, List blogArchiveLocations, String anchorText) {}
  • apps/syndie/java/src/net/i2p/syndie/HeaderReceiver.java

    rab4f3008 re5fa7e0  
    1515    public void receiveAddress(String name, String schema, String protocol, String location, String anchorText) {}
    1616    public void receiveArchive(String name, String description, String locationSchema, String location, String postingKey, String anchorText) {}
    17     public void receiveAttachment(int id, String anchorText) {}
     17    public void receiveAttachment(int id, int thumbnail, String anchorText) {}
    1818    public void receiveBegin() {}
    1919    public void receiveBlog(String name, String blogKeyHash, String blogPath, long blogEntryId, List blogArchiveLocations, String anchorText) {}
  • apps/syndie/java/src/net/i2p/syndie/sml/EventReceiverImpl.java

    rab4f3008 re5fa7e0  
    112112    public void receivePre(String text) {}
    113113    public void receiveHR() {}
    114     public void receiveAttachment(int id, String anchorText) {}
     114    public void receiveAttachment(int id, int thumbnail, String anchorText) {}
    115115}
  • apps/syndie/java/src/net/i2p/syndie/sml/HTMLPreviewRenderer.java

    rab4f3008 re5fa7e0  
    3232    }   
    3333   
    34     public void receiveAttachment(int id, String anchorText) {
     34    public void receiveAttachment(int id, int thumb, String anchorText) {
     35        anchorText = sanitizeString(anchorText);
    3536        if (!continueBody()) { return; }
    3637        if ( (id < 0) || (_files == null) || (id >= _files.size()) ) {
    37             _bodyBuffer.append(sanitizeString(anchorText));
     38            _bodyBuffer.append(anchorText);
    3839        } else {
    3940            File f = (File)_files.get(id);
     
    4142            String type = (String)_fileTypes.get(id);
    4243            _bodyBuffer.append("<a ").append(getClass("attachmentView")).append(" href=\"").append(getAttachmentURL(id)).append("\">");
    43             _bodyBuffer.append(sanitizeString(anchorText)).append("</a>");
     44            if(thumb >= 0) {
     45                _bodyBuffer.append("<img src=\"").
     46                    append(getAttachmentURL(thumb)).
     47                    append("\" alt=\"").append(anchorText).
     48                    append("\" title=\"").append(anchorText).
     49                    append("\" />");
     50            } else {
     51                _bodyBuffer.append(anchorText);
     52            }
     53                   
     54            _bodyBuffer.append("</a>");
    4455            _bodyBuffer.append(getSpan("attachmentSummary")).append(" (");
    4556            _bodyBuffer.append(getSpan("attachmentSummarySize")).append(f.length()/1024).append("KB</span>, ");
  • apps/syndie/java/src/net/i2p/syndie/sml/HTMLRenderer.java

    rab4f3008 re5fa7e0  
    514514    }
    515515   
    516     public void receiveAttachment(int id, String anchorText) {
     516    public void receiveAttachment(int id, int thumb, String anchorText) {
    517517        if (!continueBody()) { return; }
    518518        Attachment attachments[] = _entry.getAttachments();
     
    520520            _bodyBuffer.append(getSpan("attachmentUnknown")).append(sanitizeString(anchorText)).append("</span>");
    521521        } else {
    522             _bodyBuffer.append("<a ").append(getClass("attachmentView")).append(" href=\"").append(getAttachmentURL(id)).append("\">");
    523             _bodyBuffer.append(sanitizeString(anchorText)).append("</a>");
     522            _bodyBuffer.append("<a ").append(getClass("attachmentView")).append(" href=\"").append(getAttachmentURL(id)).append("\">");           
     523            if(thumb >= 0) {
     524                _bodyBuffer.append("<img src=\"").
     525                    append(getAttachmentURL(thumb)).
     526                    append("\" alt=\"").append(anchorText).
     527                    append("\" title=\"").append(anchorText).
     528                    append("\" />");
     529            } else {
     530                _bodyBuffer.append(anchorText);
     531            }
     532            _bodyBuffer.append("</a>");
    524533            _bodyBuffer.append(getSpan("attachmentSummary")).append(" (");
    525534            _bodyBuffer.append(getSpan("attachmentSummarySize")).append(attachments[id].getDataLength()/1024).append("KB</span>, ");
  • apps/syndie/java/src/net/i2p/syndie/sml/RSSRenderer.java

    rab4f3008 re5fa7e0  
    209209        }
    210210    }
    211     public void receiveAttachment(int id, String anchorText) {
     211    public void receiveAttachment(int id, int thumb, String anchorText) {
    212212        if (!continueBody()) { return; }
    213213        _bodyBuffer.append(sanitizeString(anchorText));
  • apps/syndie/java/src/net/i2p/syndie/sml/SMLParser.java

    rab4f3008 re5fa7e0  
    212212    private static final String T_ARCHIVE = "archive";
    213213   
     214    private static final String P_THUMBNAIL = "thumbnail";
    214215    private static final String P_ATTACHMENT = "attachment";
    215216    private static final String P_WHO_QUOTED = "author";
     
    285286            receiver.receivePre(body);
    286287        } else if (T_ATTACHMENT.equals(tagName)) {
    287             receiver.receiveAttachment((int)getLong(P_ATTACHMENT_ID, attr), body);
     288            receiver.receiveAttachment(
     289                            (int)getLong(P_ATTACHMENT_ID, attr),
     290                            (int)getLong(P_THUMBNAIL, attr),
     291                            body);
    288292        } else {
    289293            if (_log.shouldLog(Log.WARN))
     
    403407        public void receiveImage(String alternateText, int attachmentId);
    404408        public void receiveAddress(String name, String schema, String protocol, String location, String anchorText);
    405         public void receiveAttachment(int id, String anchorText);
     409        public void receiveAttachment(int id, int thumb, String anchorText);
    406410        public void receiveBold(String text);
    407411        public void receiveItalic(String text);
  • apps/syndie/jsp/smlref.jsp

    rab4f3008 re5fa7e0  
    1818  <li>[quote][/quote] = Quoted text</li>
    1919  <li>[img attachment="1"]alt[/img] = use attachment 1 as an image with 'alt' as the alt text</li>
    20   <li>[attachment id="0"]text[/attachment] = offer the attachment as a link in your post
     20  <li>[attachment id="0"]text[/attachment] = offer attachment 0 as a link in your post</li>
     21  <li>[attachment thumbnail="0" id="1"]text[/attachment] = offer attachment 1 as a link around a thumbnail image using attachment 0</li>
    2122  <li>[link schema="eep" location="http://forum.i2p"]text[/link] = offer a link to an external resource (accessible with the given schema)</li>
    2223  <li>[blog name="name" bloghash="base64hash"]description[/blog] = link to all posts in the blog</li>
  • build.xml

    rab4f3008 re5fa7e0  
    292292        <mkdir dir="pkg-temp/docs" />
    293293        <copy file="readme.html" todir="pkg-temp/docs/" />
     294        <copy file="toolbar.html" todir="pkg-temp/docs/" />
    294295        <copy file="initialNews.xml" tofile="pkg-temp/docs/news.xml" />
    295296        <copy file="installer/resources/startconsole.html" todir="pkg-temp/docs/" />
Note: See TracChangeset for help on using the changeset viewer.