more syndie cleanup
This commit is contained in:
@ -17,7 +17,7 @@
|
||||
<h4>
|
||||
<a href="susimail/susimail">Susimail</a> |
|
||||
<a href="susidns/index.jsp">SusiDNS</a> |
|
||||
<a href="syndie/index.jsp">Syndie</a> |
|
||||
<a href="syndie/">Syndie</a> |
|
||||
<a href="i2ptunnel/index.jsp">I2PTunnel</a> |
|
||||
<a href="tunnels.jsp">Tunnels</a> |
|
||||
<a href="profiles.jsp">Profiles</a> |
|
||||
|
@ -366,7 +366,13 @@ public class BlogManager {
|
||||
|
||||
public String getDefaultProxyHost() { return _context.getProperty("syndie.defaultProxyHost", "localhost"); }
|
||||
public String getDefaultProxyPort() { return _context.getProperty("syndie.defaultProxyPort", "4444"); }
|
||||
public String[] getUpdateArchives() { return _context.getProperty("syndie.updateArchives", "").split(","); }
|
||||
public String[] getUpdateArchives() {
|
||||
String str = _context.getProperty("syndie.updateArchives", "");
|
||||
if ( (str != null) && (str.trim().length() > 0) )
|
||||
return str.split(",");
|
||||
else
|
||||
return new String[0];
|
||||
}
|
||||
public boolean getImportAddresses() { return _context.getProperty("syndie.importAddresses", "false").equals("true"); }
|
||||
public int getUpdateDelay() {
|
||||
int delay = Integer.parseInt(_context.getProperty("syndie.updateDelay", "12"));
|
||||
|
@ -25,7 +25,7 @@ public class Updater {
|
||||
_log.debug("Update started.");
|
||||
String[] archives = bm.getUpdateArchives();
|
||||
for (int i = 0; i < archives.length; i++) {
|
||||
_log.debug("Fetching " + archives[i]);
|
||||
_log.debug("Fetching [" + archives[i] + "]");
|
||||
fetchArchive(archives[i]);
|
||||
_log.debug("Done fetching " + archives[i]);
|
||||
}
|
||||
@ -43,6 +43,10 @@ public class Updater {
|
||||
}
|
||||
|
||||
public void fetchArchive(String archive) {
|
||||
if ( (archive == null) || (archive.trim().length() <= 0) ) {
|
||||
_log.error("Fetch a null archive?" + new Exception("source"));
|
||||
return;
|
||||
}
|
||||
BlogManager bm = BlogManager.instance();
|
||||
User user = new User();
|
||||
RemoteArchiveBean rab = new RemoteArchiveBean();
|
||||
@ -51,7 +55,7 @@ public class Updater {
|
||||
if (rab.getRemoteIndex() != null) {
|
||||
HashMap parameters = new HashMap();
|
||||
parameters.put("action", new String[] {"Fetch all new entries"});
|
||||
rab.fetchSelectedBulk(user, parameters);
|
||||
rab.fetchSelectedBulk(user, parameters, true);
|
||||
}
|
||||
_log.debug(rab.getStatus());
|
||||
}
|
||||
|
@ -575,7 +575,7 @@ public class HTMLRenderer extends EventReceiverImpl {
|
||||
|
||||
String inReplyTo = (String)_headers.get(HEADER_IN_REPLY_TO);
|
||||
if ( (inReplyTo != null) && (inReplyTo.trim().length() > 0) )
|
||||
_postBodyBuffer.append(" <a ").append(getClass("summParent")).append(" href=\"").append(getPageURL(sanitizeTagParam(inReplyTo))).append("\">(view parent)</a>\n");
|
||||
_postBodyBuffer.append(" <a ").append(getClass("summParent")).append(" href=\"threads.jsp?").append(ThreadedHTMLRenderer.PARAM_VIEW_POST).append('=').append(sanitizeTagParam(inReplyTo)).append("\">(view parent)</a>\n");
|
||||
|
||||
_postBodyBuffer.append("</span></td></tr>\n");
|
||||
_postBodyBuffer.append("<!-- end of the post summary -->\n");
|
||||
@ -716,7 +716,7 @@ public class HTMLRenderer extends EventReceiverImpl {
|
||||
|
||||
String inReplyTo = (String)_headers.get(HEADER_IN_REPLY_TO);
|
||||
if ( (inReplyTo != null) && (inReplyTo.trim().length() > 0) ) {
|
||||
_postBodyBuffer.append(" <a ").append(getClass("summDetailParent")).append(" href=\"").append(getPageURL(sanitizeTagParam(inReplyTo))).append("\">(view parent)</a><br />\n");
|
||||
_postBodyBuffer.append(" <a ").append(getClass("summDetailParent")).append(" href=\"threads.jsp?").append(ThreadedHTMLRenderer.PARAM_VIEW_POST).append('=').append(sanitizeTagParam(inReplyTo)).append("\">(view parent)</a>\n");
|
||||
}
|
||||
|
||||
_postBodyBuffer.append("</td>\n</form>\n</tr>\n");
|
||||
@ -984,11 +984,10 @@ public class HTMLRenderer extends EventReceiverImpl {
|
||||
protected String getEntryURL() { return getEntryURL(_user != null ? _user.getShowImages() : false); }
|
||||
protected String getEntryURL(boolean showImages) {
|
||||
if (_entry == null) return "unknown";
|
||||
return "index.jsp?" + ArchiveViewerBean.PARAM_BLOG + "=" +
|
||||
Base64.encode(_entry.getURI().getKeyHash().getData()) +
|
||||
"&" + ArchiveViewerBean.PARAM_ENTRY + "=" + _entry.getURI().getEntryId() +
|
||||
"&" + ArchiveViewerBean.PARAM_SHOW_IMAGES + (showImages ? "=true" : "=false") +
|
||||
"&" + ArchiveViewerBean.PARAM_EXPAND_ENTRIES + "=true";
|
||||
return "threads.jsp?" + ThreadedHTMLRenderer.PARAM_AUTHOR + '=' +
|
||||
Base64.encode(_entry.getURI().getKeyHash().getData()) + '&' +
|
||||
ThreadedHTMLRenderer.PARAM_VIEW_POST + '=' + _entry.getURI().getKeyHash().toBase64() + '/' +
|
||||
_entry.getURI().getEntryId();
|
||||
}
|
||||
|
||||
protected String getAttachmentURLBase() { return "viewattachment.jsp"; }
|
||||
@ -1029,44 +1028,44 @@ public class HTMLRenderer extends EventReceiverImpl {
|
||||
return getPostURL(blog);
|
||||
}
|
||||
}
|
||||
|
||||
public String getPageURL(String selector) { return getPageURL(_user, selector); }
|
||||
public String getPageURL(User user, String selector) { return getPageURL(user, selector, -1, -1); }
|
||||
public String getPageURL(User user, String selector, int numPerPage, int pageNum) {
|
||||
|
||||
/**
|
||||
* entry may take the form of "base64/messageId", "entry://base64/messageId", or "blog://base64/messageId"
|
||||
*
|
||||
*/
|
||||
public String getPageURL(String entry) {
|
||||
StringBuffer buf = new StringBuffer(128);
|
||||
buf.append("index.jsp?");
|
||||
buf.append("selector=").append(sanitizeTagParam(selector)).append("&");
|
||||
if ( (pageNum >= 0) && (numPerPage > 0) ) {
|
||||
buf.append(ArchiveViewerBean.PARAM_PAGE_NUMBER).append('=').append(pageNum).append('&');
|
||||
buf.append(ArchiveViewerBean.PARAM_NUM_PER_PAGE).append('=').append(numPerPage).append('&');
|
||||
}
|
||||
if (user != null) {
|
||||
buf.append(ArchiveViewerBean.PARAM_EXPAND_ENTRIES).append('=').append(user.getShowExpanded()).append('&');
|
||||
buf.append(ArchiveViewerBean.PARAM_SHOW_IMAGES).append('=').append(user.getShowImages()).append('&');
|
||||
buf.append("threads.jsp?");
|
||||
if (entry != null) {
|
||||
if (entry.startsWith("entry://"))
|
||||
entry = entry.substring("entry://".length());
|
||||
else if (entry.startsWith("blog://"))
|
||||
entry = entry.substring("blog://".length());
|
||||
if (entry.length() > 0) {
|
||||
buf.append(ThreadedHTMLRenderer.PARAM_VIEW_POST).append('=').append(entry).append('&');
|
||||
buf.append(ThreadedHTMLRenderer.PARAM_VISIBLE).append('=').append(entry).append('&');
|
||||
}
|
||||
}
|
||||
return buf.toString();
|
||||
}
|
||||
|
||||
|
||||
public String getPageURL(Hash blog, String tag, long entryId, int numPerPage, int pageNum, boolean expandEntries, boolean showImages) {
|
||||
return getPageURL(blog, tag, entryId, null, numPerPage, pageNum, expandEntries, showImages);
|
||||
}
|
||||
public String getPageURL(Hash blog, String tag, long entryId, String group, int numPerPage, int pageNum, boolean expandEntries, boolean showImages) {
|
||||
StringBuffer buf = new StringBuffer(128);
|
||||
buf.append("index.jsp?");
|
||||
buf.append("threads.jsp?");
|
||||
if (blog != null)
|
||||
buf.append(ArchiveViewerBean.PARAM_BLOG).append('=').append(Base64.encode(blog.getData())).append('&');
|
||||
buf.append(ThreadedHTMLRenderer.PARAM_AUTHOR).append('=').append(blog.toBase64()).append('&');
|
||||
if (tag != null)
|
||||
buf.append(ArchiveViewerBean.PARAM_TAG).append('=').append(Base64.encode(DataHelper.getUTF8(tag))).append('&');
|
||||
if (entryId >= 0)
|
||||
buf.append(ArchiveViewerBean.PARAM_ENTRY).append('=').append(entryId).append('&');
|
||||
if (group != null)
|
||||
buf.append(ArchiveViewerBean.PARAM_GROUP).append('=').append(Base64.encode(DataHelper.getUTF8(group))).append('&');
|
||||
if ( (pageNum >= 0) && (numPerPage > 0) ) {
|
||||
buf.append(ArchiveViewerBean.PARAM_PAGE_NUMBER).append('=').append(pageNum).append('&');
|
||||
buf.append(ArchiveViewerBean.PARAM_NUM_PER_PAGE).append('=').append(numPerPage).append('&');
|
||||
}
|
||||
buf.append(ArchiveViewerBean.PARAM_EXPAND_ENTRIES).append('=').append(expandEntries).append('&');
|
||||
buf.append(ArchiveViewerBean.PARAM_SHOW_IMAGES).append('=').append(showImages).append('&');
|
||||
buf.append(ThreadedHTMLRenderer.PARAM_TAGS).append('=').append(sanitizeTagParam(tag)).append('&');
|
||||
if (entryId >= 0) {
|
||||
String entry = blog.toBase64() + '/' + entryId;
|
||||
buf.append(ThreadedHTMLRenderer.PARAM_VIEW_POST).append('=').append(entry).append('&');
|
||||
buf.append(ThreadedHTMLRenderer.PARAM_VISIBLE).append('=').append(entry).append('&');
|
||||
}
|
||||
if ( (pageNum >= 0) && (numPerPage > 0) )
|
||||
buf.append(ThreadedHTMLRenderer.PARAM_OFFSET).append('=').append(pageNum*numPerPage).append('&');
|
||||
return buf.toString();
|
||||
}
|
||||
public String getArchiveURL(Hash blog, SafeURL archiveLocation) {
|
||||
@ -1080,6 +1079,5 @@ public class HTMLRenderer extends EventReceiverImpl {
|
||||
+ "&network=" + sanitizeTagParam(schema)
|
||||
+ "&protocol=" + sanitizeTagParam(protocol)
|
||||
+ "&location=" + sanitizeTagParam(location);
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -411,10 +411,7 @@ public class ArchiveViewerBean {
|
||||
pages++;
|
||||
if (pageNum > 0) {
|
||||
String prevURL = null;
|
||||
if ( (selector == null) || (selector.trim().length() <= 0) )
|
||||
prevURL = rend.getPageURL(blog, tag, entryId, group, numPerPage, pageNum-1, expandEntries, showImages);
|
||||
else
|
||||
prevURL = rend.getPageURL(user, selector, numPerPage, pageNum-1);
|
||||
prevURL = rend.getPageURL(blog, tag, entryId, group, numPerPage, pageNum-1, expandEntries, showImages);
|
||||
//System.out.println("prevURL: " + prevURL);
|
||||
out.write(" <a class=\"b_selectorPrevMore\" href=\"" + prevURL + "\"><<</a>");
|
||||
} else {
|
||||
@ -423,10 +420,7 @@ public class ArchiveViewerBean {
|
||||
out.write("<span class=\"b_selectorPage\">Page " + (pageNum+1) + " of " + pages + "</span>");
|
||||
if (pageNum + 1 < pages) {
|
||||
String nextURL = null;
|
||||
if ( (selector == null) || (selector.trim().length() <= 0) )
|
||||
nextURL = rend.getPageURL(blog, tag, entryId, group, numPerPage, pageNum+1, expandEntries, showImages);
|
||||
else
|
||||
nextURL = rend.getPageURL(user, selector, numPerPage, pageNum+1);
|
||||
nextURL = rend.getPageURL(blog, tag, entryId, group, numPerPage, pageNum+1, expandEntries, showImages);
|
||||
//System.out.println("nextURL: " + nextURL);
|
||||
out.write(" <a class=\"b_selectorNextMore\" href=\"" + nextURL + "\">>></a>");
|
||||
} else {
|
||||
|
@ -0,0 +1,46 @@
|
||||
package net.i2p.syndie.web;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import javax.servlet.http.HttpServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.servlet.ServletException;
|
||||
|
||||
import net.i2p.I2PAppContext;
|
||||
import net.i2p.client.naming.*;
|
||||
import net.i2p.data.*;
|
||||
import net.i2p.syndie.*;
|
||||
import net.i2p.syndie.data.*;
|
||||
import net.i2p.syndie.sml.*;
|
||||
|
||||
/**
|
||||
* Confirm page before hitting a remote site
|
||||
*
|
||||
*/
|
||||
public class ExternalLinkServlet extends BaseServlet {
|
||||
protected String getTitle() { return "Syndie :: External link"; }
|
||||
|
||||
protected void renderServletDetails(User user, HttpServletRequest req, PrintWriter out, ThreadIndex index,
|
||||
int threadOffset, BlogURI visibleEntry, Archive archive) throws IOException {
|
||||
String b64Schema = req.getParameter("schema");
|
||||
String b64Location = req.getParameter("location");
|
||||
if ( (b64Schema == null) || (b64Schema.trim().length() <= 0) ||
|
||||
(b64Location == null) || (b64Location.trim().length() <= 0) ) {
|
||||
out.write("<tr><td colspan=\"3\">No location specified</td></tr>\n");
|
||||
} else {
|
||||
byte loc[] = Base64.decode(b64Location);
|
||||
if ( (loc == null) || (loc.length <= 0) ) {
|
||||
out.write("<tr><td colspan=\"3\">Invalid location specified</td></tr>\n");
|
||||
} else {
|
||||
String location = DataHelper.getUTF8(loc);
|
||||
out.write("<tr><td colspan=\"3\">Are you sure you want to go to <a href=\"");
|
||||
out.write(HTMLRenderer.sanitizeTagParam(location));
|
||||
out.write("\" title=\"Link to an external site\">");
|
||||
out.write(HTMLRenderer.sanitizeString(location));
|
||||
out.write("</a></td></tr>\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -145,10 +145,11 @@ public class PostServlet extends BaseServlet {
|
||||
writeAuthActionFields(out);
|
||||
out.write("Please confirm that the above is ok");
|
||||
if (BlogManager.instance().authorizeRemote(user)) {
|
||||
out.write(", and select what additional archives you want the post transmitted to.");
|
||||
out.write("Otherwise, just hit your browser's back arrow and make changes.\n");
|
||||
out.write(", and select what additional archives you want the post transmitted to. ");
|
||||
out.write("To make changes, hit your browser's back arrow and try again.\n");
|
||||
out.write("Remote archive to push this post to: ");
|
||||
out.write("<select class=\"b_postConfirm\" name=\"" + PARAM_REMOTE_ARCHIVE + "\">\n");
|
||||
out.write("<option name=\"\">-None-</option>\n");
|
||||
out.write("<option name=\"\">None - don't push this post anywhere</option>\n");
|
||||
PetNameDB db = user.getPetNameDB();
|
||||
TreeSet names = new TreeSet();
|
||||
for (Iterator iter = db.getNames().iterator(); iter.hasNext(); ) {
|
||||
@ -164,6 +165,8 @@ public class PostServlet extends BaseServlet {
|
||||
}
|
||||
|
||||
out.write("</select><br />\n");
|
||||
out.write("If you don't push this post remotely now, you can do so later on the <a href=\"syndicate.jsp\">syndicate</a> screen ");
|
||||
out.write("by choosing an archive, verifying that they don't already have the post, and selecting which posts to push.\n");
|
||||
}
|
||||
out.write("</span><input class=\"b_postConfirm\" type=\"submit\" name=\"" + PARAM_ACTION
|
||||
+ "\" value=\"" + ACTION_CONFIRM + "\" />\n");
|
||||
|
@ -29,19 +29,45 @@ public class RSSServlet extends HttpServlet {
|
||||
String login = req.getParameter("login");
|
||||
String pass = req.getParameter("password");
|
||||
user = BlogManager.instance().login(login, pass); // ignore failures - user will just be unauthorized
|
||||
if (!user.getAuthenticated())
|
||||
if (!user.getAuthenticated()) {
|
||||
user.invalidate();
|
||||
user = BlogManager.instance().getDefaultUser();
|
||||
}
|
||||
}
|
||||
|
||||
String selector = req.getParameter("selector");
|
||||
if ( (selector == null) || (selector.length() <= 0) ) {
|
||||
selector = getDefaultSelector(user);
|
||||
String tags = req.getParameter(ThreadedHTMLRenderer.PARAM_TAGS);
|
||||
Set tagSet = new HashSet();
|
||||
if (tags != null) {
|
||||
StringTokenizer tok = new StringTokenizer(tags, " \n\t\r");
|
||||
while (tok.hasMoreTokens()) {
|
||||
String tag = (String)tok.nextToken();
|
||||
tag = tag.trim();
|
||||
if (tag.length() > 0)
|
||||
tagSet.add(tag);
|
||||
}
|
||||
}
|
||||
ArchiveViewerBean.Selector sel = new ArchiveViewerBean.Selector(selector);
|
||||
|
||||
int count = 10;
|
||||
String wanted = req.getParameter("wanted");
|
||||
if (wanted != null) {
|
||||
try {
|
||||
count = Integer.parseInt(wanted);
|
||||
} catch (NumberFormatException nfe) {
|
||||
count = 10;
|
||||
}
|
||||
}
|
||||
if (count < 0) count = 10;
|
||||
if (count > 100) count = 100;
|
||||
|
||||
Archive archive = BlogManager.instance().getArchive();
|
||||
ArchiveIndex index = archive.getIndex();
|
||||
List entries = ArchiveViewerBean.pickEntryURIs(user, index, sel.blog, sel.tag, sel.entry, sel.group);
|
||||
FilteredThreadIndex index = new FilteredThreadIndex(user, archive, tagSet, null);
|
||||
List entries = new ArrayList();
|
||||
// depth first search of the most recent threads
|
||||
for (int i = 0; i < count && i < index.getRootCount(); i++) {
|
||||
ThreadNode node = index.getRoot(i);
|
||||
if (node != null)
|
||||
walkTree(entries, node);
|
||||
}
|
||||
|
||||
StringBuffer cur = new StringBuffer();
|
||||
cur.append(req.getScheme());
|
||||
@ -58,26 +84,12 @@ public class RSSServlet extends HttpServlet {
|
||||
out.write(" <channel>\n");
|
||||
out.write(" <title>Syndie feed</title>\n");
|
||||
String page = urlPrefix;
|
||||
if (sel.tag != null)
|
||||
page = page + "threads.jsp?" + ThreadedHTMLRenderer.PARAM_TAGS + '=' + HTMLRenderer.sanitizeXML(sel.tag);
|
||||
else if ( (sel.blog != null) && (sel.entry > 0) )
|
||||
page = page + "threads.jsp?" + ThreadedHTMLRenderer.PARAM_VIEW_POST + '=' + sel.blog.toBase64() + '/' + sel.entry;
|
||||
if (tags != null)
|
||||
page = page + "threads.jsp?" + ThreadedHTMLRenderer.PARAM_TAGS + '=' + HTMLRenderer.sanitizeXML(tags);
|
||||
out.write(" <link>" + page +"</link>\n");
|
||||
out.write(" <description>Summary of the latest Syndie posts</description>\n");
|
||||
out.write(" <generator>Syndie</generator>\n");
|
||||
|
||||
int count = 10;
|
||||
String wanted = req.getParameter("wanted");
|
||||
if (wanted != null) {
|
||||
try {
|
||||
count = Integer.parseInt(wanted);
|
||||
} catch (NumberFormatException nfe) {
|
||||
count = 10;
|
||||
}
|
||||
}
|
||||
if (count < 0) count = 10;
|
||||
if (count > 100) count = 100;
|
||||
|
||||
RSSRenderer r = new RSSRenderer(I2PAppContext.getGlobalContext());
|
||||
for (int i = 0; i < count && i < entries.size(); i++) {
|
||||
BlogURI uri = (BlogURI)entries.get(i);
|
||||
@ -90,10 +102,13 @@ public class RSSServlet extends HttpServlet {
|
||||
out.close();
|
||||
}
|
||||
|
||||
private static String getDefaultSelector(User user) {
|
||||
if ( (user == null) || (user.getDefaultSelector() == null) )
|
||||
return BlogManager.instance().getArchive().getDefaultSelector();
|
||||
else
|
||||
return user.getDefaultSelector();
|
||||
private void walkTree(List uris, ThreadNode node) {
|
||||
if (node == null)
|
||||
return;
|
||||
if (uris.contains(node))
|
||||
return;
|
||||
uris.add(node.getEntry());
|
||||
for (int i = 0; i < node.getChildCount(); i++)
|
||||
walkTree(uris, node.getChild(i));
|
||||
}
|
||||
}
|
||||
|
@ -14,6 +14,7 @@ import net.i2p.util.EepPost;
|
||||
import net.i2p.syndie.data.*;
|
||||
import net.i2p.syndie.sml.*;
|
||||
import net.i2p.syndie.*;
|
||||
import net.i2p.util.I2PThread;
|
||||
import net.i2p.util.Log;
|
||||
|
||||
/**
|
||||
@ -184,9 +185,16 @@ public class RemoteArchiveBean {
|
||||
File tmp = File.createTempFile("fetchBulk", ".zip", BlogManager.instance().getTempDir());
|
||||
|
||||
boolean shouldProxy = (_proxyHost != null) && (_proxyPort > 0);
|
||||
EepGet get = new EepGet(_context, shouldProxy, _proxyHost, _proxyPort, 0, tmp.getAbsolutePath(), url.toString(), postData.toString());
|
||||
final EepGet get = new EepGet(_context, shouldProxy, _proxyHost, _proxyPort, 0, tmp.getAbsolutePath(), url.toString(), postData.toString());
|
||||
get.addStatusListener(new BulkFetchListener(tmp));
|
||||
get.fetch();
|
||||
|
||||
if (shouldBlock) {
|
||||
get.fetch();
|
||||
} else {
|
||||
I2PThread t = new I2PThread(new Runnable() { public void run() { get.fetch(); } }, "Syndie fetcher");
|
||||
t.setDaemon(true);
|
||||
t.start();
|
||||
}
|
||||
} catch (IOException ioe) {
|
||||
_statusMessages.add("Internal error creating temporary file to fetch " + HTMLRenderer.sanitizeString(url.toString()) + ": " + ioe.getMessage());
|
||||
}
|
||||
@ -278,11 +286,11 @@ public class RemoteArchiveBean {
|
||||
_proxyHost = null;
|
||||
_proxyPort = -1;
|
||||
_exportCapable = false;
|
||||
if (user == null) user = new User();
|
||||
if (user == null) user = BlogManager.instance().getDefaultUser();
|
||||
|
||||
if ( (schema == null) || (schema.trim().length() <= 0) ||
|
||||
(location == null) || (location.trim().length() <= 0) ) {
|
||||
_statusMessages.add("Location must be specified");
|
||||
_statusMessages.add("Location must be specified [" + location + "] [" + schema + "]");
|
||||
_fetchIndexInProgress = false;
|
||||
return;
|
||||
}
|
||||
|
5
apps/syndie/jsp/about.html
Normal file
5
apps/syndie/jsp/about.html
Normal file
@ -0,0 +1,5 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html
|
||||
><head><title>What is Syndie?</title></head
|
||||
><body bgcolor="#BBBBFF">
|
||||
<p>Syndie is, like, neat, man. (aka todo)</p>
|
||||
</body></html>
|
@ -1,36 +0,0 @@
|
||||
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" import="net.i2p.data.*, net.i2p.syndie.web.*, net.i2p.syndie.sml.*" %><%
|
||||
request.setCharacterEncoding("UTF-8");
|
||||
%><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 TRANSITIONAL//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>SyndieMedia</title>
|
||||
<link href="style.jsp" rel="stylesheet" type="text/css" >
|
||||
</head>
|
||||
<body>
|
||||
<table border="1" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr class="b_toplogo"><td colspan="5" valign="top" align="left" class="b_toplogo"><jsp:include page="_toplogo.jsp" /></td></tr>
|
||||
<tr><td valign="top" align="left" rowspan="2" class="b_leftnav"><jsp:include page="_leftnav.jsp" /></td>
|
||||
<jsp:include page="_topnav.jsp" />
|
||||
<td valign="top" align="left" rowspan="2" class="b_rightnav"><jsp:include page="_rightnav.jsp" /></td></tr>
|
||||
<tr class="b_content"><td valign="top" align="left" colspan="3" class="b_content">
|
||||
<span class="b_externalWarning">Are you sure you really want to go to
|
||||
<%
|
||||
String loc = request.getParameter("location");
|
||||
String schema = request.getParameter("schema");
|
||||
String desc = request.getParameter("description");
|
||||
if (loc != null) loc = HTMLRenderer.sanitizeString(DataHelper.getUTF8(Base64.decode(loc)));
|
||||
if (schema != null) schema = HTMLRenderer.sanitizeString(DataHelper.getUTF8(Base64.decode(schema)));
|
||||
if (desc != null) desc = HTMLRenderer.sanitizeString(DataHelper.getUTF8(Base64.decode(desc)));
|
||||
|
||||
if ( (loc != null) && (schema != null) ) {
|
||||
out.write("<span class=\"b_externalLoc\">" + loc + "</span> <span class=\"b_externalNet\"(" + schema + ")</span>");
|
||||
if (desc != null)
|
||||
out.write(": <span class=\"b_externalDesc\"" + desc + "\"</span>");
|
||||
out.write("? ");
|
||||
out.write("<a class=\"b_external\" href=\"" + loc + "\">yes</a>");
|
||||
} else {
|
||||
out.write("<span class=\"b_externalUnknown\">(some unspecified location...)</span>");
|
||||
}
|
||||
%></span></td></tr>
|
||||
</table>
|
||||
</body>
|
BIN
apps/syndie/jsp/images/syndielogo.png
Normal file
BIN
apps/syndie/jsp/images/syndielogo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.4 KiB |
@ -1,3 +1,13 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html
|
||||
><head><title>Syndie</title></head
|
||||
><body><meta http-equiv="refresh" content="0;url=index.jsp" /><a href="index.jsp">Enter</a></body></html>
|
||||
><head><title>Welcome to Syndie</title></head
|
||||
><body bgcolor="#BBBBFF"><div align="center" valign="center">
|
||||
<table border="0"><tr><td valign="top">
|
||||
<img src="images/syndielogo.png" alt="" /></td>
|
||||
<td valign="top" align="left"><b>Welcome to Syndie!</b><br />
|
||||
|
||||
<p>Jump right in and <a href="threads.jsp">read</a> syndicated posts</p>
|
||||
<p><a href="post.jsp">Create</a> a new post of your own</p>
|
||||
<p><a href="about.html">Learn more</a> about Syndie</p>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
</body></html>
|
||||
|
@ -1,27 +0,0 @@
|
||||
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" import="net.i2p.syndie.web.*" %><%
|
||||
request.setCharacterEncoding("UTF-8");
|
||||
%><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 TRANSITIONAL//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>SyndieMedia</title>
|
||||
<link href="style.jsp" rel="stylesheet" type="text/css" >
|
||||
<link href="rss.jsp?<%
|
||||
if (request.getParameter("blog") != null)
|
||||
out.write("blog=" + request.getParameter("blog") + "&");
|
||||
if (request.getParameter("entry") != null)
|
||||
out.write("entry=" + request.getParameter("entry") + "&");
|
||||
if (request.getParameter("tag") != null)
|
||||
out.write("tag=" + request.getParameter("tag") + "&");
|
||||
if (request.getParameter("selector") != null)
|
||||
out.write("selector=" + request.getParameter("selector") + "&");
|
||||
%>" rel="alternate" type="application/rss+xml" >
|
||||
</head>
|
||||
<body>
|
||||
<table border="1" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr class="b_toplogo"><td colspan="5" valign="top" align="left" class="b_toplogo"><jsp:include page="_toplogo.jsp" /></td></tr>
|
||||
<tr><td valign="top" align="left" rowspan="2" class="b_leftnav"><jsp:include page="_leftnav.jsp" /></td>
|
||||
<jsp:include page="_topnav.jsp" />
|
||||
<td valign="top" align="left" rowspan="2" class="b_rightnav"><jsp:include page="_rightnav.jsp" /></td></tr>
|
||||
<tr class="b_content"><td valign="top" align="left" colspan="3" class="b_content"><jsp:include page="_bodyindex.jsp" /></td></tr>
|
||||
</table>
|
||||
</body>
|
@ -14,7 +14,7 @@ request.setCharacterEncoding("UTF-8");
|
||||
<li>[b][/b] = <b>bold</b></li>
|
||||
<li>[i][/i] = <i>italics</i></li>
|
||||
<li>[u][/u] = <i>underline</i></li>
|
||||
<li>[cut]more inside[/cut] = [<a href="#">more inside...</a>]</li>
|
||||
<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>[blog name="name" bloghash="base64hash"]description[/blog] = link to all posts in the blog</li>
|
||||
|
@ -54,6 +54,11 @@
|
||||
<servlet-class>net.i2p.syndie.web.ImportFeedServlet</servlet-class>
|
||||
</servlet>
|
||||
|
||||
<servlet>
|
||||
<servlet-name>net.i2p.syndie.web.ExternalLinkServlet</servlet-name>
|
||||
<servlet-class>net.i2p.syndie.web.ExternalLinkServlet</servlet-class>
|
||||
</servlet>
|
||||
|
||||
<servlet>
|
||||
<servlet-name>net.i2p.syndie.UpdaterServlet</servlet-name>
|
||||
<servlet-class>net.i2p.syndie.UpdaterServlet</servlet-class>
|
||||
@ -108,6 +113,10 @@
|
||||
<servlet-name>net.i2p.syndie.web.ImportFeedServlet</servlet-name>
|
||||
<url-pattern>/importfeed.jsp</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>net.i2p.syndie.web.ExternalLinkServlet</servlet-name>
|
||||
<url-pattern>/externallink.jsp</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<session-config>
|
||||
<session-timeout>
|
||||
|
@ -1,4 +1,7 @@
|
||||
$Id: history.txt,v 1.319 2005/11/11 21:38:56 cervantes Exp $
|
||||
$Id: history.txt,v 1.320 2005/11/12 00:03:54 jrandom Exp $
|
||||
|
||||
2005-11-14 jrandom
|
||||
* Migrate to the new Syndie interface
|
||||
|
||||
2005-11-11 jrandom
|
||||
* Add filtering threads by author to Syndie, populated with authors in the
|
||||
|
Reference in New Issue
Block a user