update the default syndie post, and add in some html hooks for it

only allow 40 chars in the subject within the thread tree
This commit is contained in:
jrandom
2005-11-15 10:22:57 +00:00
committed by zzz
parent da42f5717b
commit 7db9ce6e5b
4 changed files with 31 additions and 7 deletions

View File

@@ -150,11 +150,13 @@ public abstract class BaseServlet extends HttpServlet {
Collection tags = getFilteredTags(req);
Collection filteredAuthors = getFilteredAuthors(req);
if (forceNewIndex || (index == null) || (!index.getFilteredTags().equals(tags)) || (!index.getFilteredAuthors().equals(filteredAuthors))) {
boolean tagsChanged = ( (index != null) && (!index.getFilteredTags().equals(tags)) );
boolean authorsChanged = ( (index != null) && (!index.getFilteredAuthors().equals(filteredAuthors)) );
if (forceNewIndex || (index == null) || (tagsChanged) || (authorsChanged) ) {
index = new FilteredThreadIndex(user, BlogManager.instance().getArchive(), getFilteredTags(req), filteredAuthors);
req.getSession().setAttribute("threadIndex", index);
if (_log.shouldLog(Log.INFO))
_log.info("New filtered index created (forced? " + forceNewIndex + ")");
_log.info("New filtered index created (forced? " + forceNewIndex + ", tagsChanged? " + tagsChanged + ", authorsChanged? " + authorsChanged + ")");
}
render(user, req, resp.getWriter(), index);
@@ -191,7 +193,7 @@ public abstract class BaseServlet extends HttpServlet {
name = name + i;
}
pn = new PetName(name, "syndie", "syndieblog", loc);
pn = new PetName(name, AddressesServlet.NET_SYNDIE, AddressesServlet.PROTO_BLOG, loc);
}
pn.addGroup(group);
if (isNew)
@@ -230,6 +232,8 @@ public abstract class BaseServlet extends HttpServlet {
BlogManager.instance().saveUser(user);
}
if (rv)
_log.debug("Bookmarking required rebuild");
return rv;
}
@@ -530,6 +534,8 @@ public abstract class BaseServlet extends HttpServlet {
//SKIP_TAGS.add("post");
//SKIP_TAGS.add("thread");
SKIP_TAGS.add("offset"); // if we are adjusting the filter, ignore the previous offset
SKIP_TAGS.add("addLocation");
SKIP_TAGS.add("addGroup");
SKIP_TAGS.add("login");
SKIP_TAGS.add("password");
}

View File

@@ -256,7 +256,7 @@ public class ViewThreadedServlet extends BaseServlet {
String subject = rec.getHeader(HTMLRenderer.HEADER_SUBJECT);
if (subject == null)
subject = "";
out.write(trim(subject, 60));
out.write(trim(subject, 40));
out.write("</a>\n</td><td class=\"threadRight\">\n");
out.write("<a href=\"");
out.write(getViewThreadLink(req, node, user));