## defs provided:
## singlepost(post, threadpage) - one post
## rules(board, thread=None) - the rules underneath the posting form (used internally here)
## postform(board, thread=None) - the posting form
## internal:
## post_name_label(post) - outputs a name (and link, if one is defined)
## post_timestamp_label(post, dateformat=None) - timestamp, with link if one is defined and no name is set.
## dateformat is passed to format_timestamp
## post_label(post, dateformat=None) - post subject, name, timestamp, and poster ID
## sticky_icon() - for a sticky icon
## post_message(post, threadpage=True) - message text of a post. if threadpage is False, long messages are
## abbreviated with a note to that effect.
<%!
import matsuba.templatetools as tt
import extutil
##>
# True = index.html, 1.html, 2.html, etc.
# False = only index.html
THREADLIST_MULTIPAGE = False
# True = Wakaba style:
# Posts increment globally
# Threads served via /board/res/threadid.html
# Post id references link to #postid on the thread page
# False = Kareha style:
# Each thread has a post #1
# Threads are served via /board/read/postrange
# Post id references link to a single-post view
# Multiple-post ranges are supported in post references
# (Side effect note: posts are never deleted from the board in this style)
# This requires some mod_rewrite magic to work.
POSTIDS_ABSOLUTE = False
# True = a subject is required when posting a new thread
# False = subject can be blank
REQUIRE_SUBJECT = True
# Other pages to generate (catalog, subback, ...)
OTHER_PAGES = [('rssreplies', 'rss.xml'), ('subback', 'subback.html')]
## -------------------------------------------------------------------------------------------------------------
## Single post.
## vars:
## post = Post object
## threadpage = boolean. Affects post abbreviation etc.
## Just the name
<%def name="post_name_label(post)">
${tt.format_name_trip(post.name_trip, ['', ''], ['', ''], post.link)}
%def>
## Just the timestamp
<%def name="post_timestamp_label(post, dateformat=None)">
% if post.link and not filter(None, post.name_trip):
${tt.timestamp(post, dateformat)}
% else:
${tt.timestamp(post, dateformat)}
% endif
%def>
<%def name="singlepost(post, threadpage)"><%
if threadpage:
abbrev = None
else:
abbrev = extutil.abbreviate_html(post.message)
%>
% if post.aborn:
##