Joey Hess
cd7ac8f72a
add Comments link when displaying a page inline
...
This link will supplant the usual Discussion link for pages
that have comments enabled.
2008-12-17 19:38:02 -05:00
Joey Hess
5feffc8b0b
fix test when comments_closed_pagespec is empty
2008-12-17 19:06:29 -05:00
Joey Hess
140c0bacba
change around comments pagespecs
...
I think it is clearer to have one pagespec that controls all pages with
comments, and a separate pagespec that can be used to close new comments on
a subset of those pages.
2008-12-17 18:50:04 -05:00
Joey Hess
9b837fd5ed
fix default values for config settings
...
defaults cannot be set in getsetup, do it in checkconfig to avoid
uninitialized value warnings.
2008-12-17 17:05:49 -05:00
Joey Hess
bb93fccf06
Coding style change: Remove explcit vim folding markers.
2008-12-17 15:22:16 -05:00
Joey Hess
985b229be6
checksessionexpiry: rework
...
This function as factored out was a bit confusing, I think this makes more
sense.
2008-12-17 14:26:08 -05:00
Joey Hess
613a54a3cb
Merge branch 'master' into comments
2008-12-17 14:06:57 -05:00
Joey Hess
f9b87a9f8b
monotone: When getting the log, tell monotone how many entries we want, rather than closing the pipe, which it dislikes. (thm)
2008-12-17 13:59:12 -05:00
Joey Hess
b2366f764b
rename: Fix double-escaping of page name in edit box.
...
titlepage normally escapes, but so does formbuilder.
2008-12-17 13:56:10 -05:00
Joey Hess
15ec55eff5
elide unnecessary variables
2008-12-12 15:38:23 -05:00
Joey Hess
ef972a871b
remove fixme
...
sessioncgi hooks are always called with the wiki locked
2008-12-12 15:25:12 -05:00
Joey Hess
928f6938d2
fix redefinition of $author
2008-12-12 15:22:43 -05:00
Joey Hess
9557c7c890
move related code together
2008-12-12 15:19:01 -05:00
Joey Hess
f3735891ca
whitespace
2008-12-12 15:13:07 -05:00
Joey Hess
18eeb068a6
don't explicitly use inline
...
loadplugin("inline") should take care of that
2008-12-12 15:10:17 -05:00
Joey Hess
2a7849b838
avoid unnecessary variable
2008-12-12 15:08:06 -05:00
Joey Hess
0ced5995d5
get rid of the [postcomment] hack
...
I think that using a flag variable is sorta cleaner.
(This is untested.)
2008-12-12 15:05:26 -05:00
Joey Hess
38c92e63bb
move getsetup to usual place
2008-12-12 14:59:23 -05:00
Simon McVittie
473160c947
htmlbalance: don't compact whitespace, and set misc other options
...
Not compacting whitespace is the most important one: now that we run
sanitize hooks on individual posted comments in the comments plugin,
whitespace that is significant to Markdown (but not HTML) is lost.
(cherry picked from commit cb5aaa3cee
)
2008-12-12 14:23:12 -05:00
Joey Hess
41efa5ac92
Merge branch 'master' into comments
2008-12-12 14:21:08 -05:00
Joey Hess
88e8d4bf8d
meta: Pass info to htmlscrubber so htmlscrubber_skip can take effect.
2008-12-12 14:06:45 -05:00
Simon McVittie
1942fc3bd6
comments: Store dates in GMT and in ISO-8601
...
The [[!_comment]] directive is a serialization format, not something for
presentation to users, so we should use the least ambiguous possible
representation.
2008-12-12 11:02:41 +00:00
Joey Hess
8d3a3c6a1e
simplifiy logic
2008-12-11 17:31:57 -05:00
Simon McVittie
f2d5ead6af
comments: Change internal-use-only directive from [[!comment]] to [[!_comment]]
2008-12-11 21:23:55 +00:00
Simon McVittie
dd1fa13bce
comments: Use new feedfile, emptyfeeds options to inline
2008-12-11 21:19:50 +00:00
Simon McVittie
3560460eb6
comments: don't interpolate IP into anonymous user's "name"
...
If an admin wants the IP in the comment display template they can still
get it (the default template shows it).
2008-12-11 21:14:05 +00:00
Simon McVittie
1698364da0
comments: fix invocation of possibly_foolish_untaint
2008-12-11 21:14:05 +00:00
Simon McVittie
fbf145ca3f
comments: avoid warning if there's no subject
2008-12-11 21:14:05 +00:00
Simon McVittie
a5889912b3
comments: Optionally allow anonymous commenters to set their name/URL.
...
Also provide a way for the comment template to pick up the verified
username/IP.
2008-12-11 21:14:05 +00:00
Simon McVittie
0a69c7ed56
comments: Remove some dead code
2008-12-11 21:14:05 +00:00
Simon McVittie
44a7d77a30
comments: rename main field to "editcontent" consistent with editpage
...
This has the side-effect that Ikiwiki's default style.css gives the text
box 100% width.
2008-12-11 21:14:05 +00:00
Simon McVittie
edb69335f2
comments: instead of hard-coding mdwn, allow any supported page format
2008-12-11 21:14:05 +00:00
Simon McVittie
9af0f04df3
comments: Save comments as a file with one big [[!comment]] directive.
...
This delays all comment formatting until the last possible time, allows
us to set metadata without worrying that commenters may be able to evade
it, and means that changes to how a comment is saved can be handled
gracefully. It also gives us somewhere to put the commenter's username
or IP address for later reference.
2008-12-11 21:14:05 +00:00
Simon McVittie
6a986a8a0b
Remove dead code for preprocessing [[!comments]]
2008-12-11 21:14:05 +00:00
Simon McVittie
1d696aef2c
comments: Duplicate logic and CGI hook from recentchanges to link user pages correctly
2008-12-11 21:14:05 +00:00
Simon McVittie
f88870f102
Qualify name of formattime() correctly
2008-12-11 21:14:04 +00:00
Simon McVittie
80e84e32bf
Delay checking for session expiry til we actually post a comment
2008-12-11 21:14:04 +00:00
Simon McVittie
24bfc3fdc5
comments: record the time at which each comment was posted
2008-12-11 21:14:04 +00:00
Simon McVittie
e66e2c2a7e
comments: Use a checkconfig hook to get the default value of comments_pagename
2008-12-11 21:14:04 +00:00
Simon McVittie
4ff161ba0b
comments: render comments/commenturl in page.tmpl
2008-12-11 21:14:04 +00:00
Simon McVittie
49eabc676a
comments: use global config to decide whether commenting is allowed, and for name of page
...
Also:
* decide comment page name sooner
* set permalink on it
2008-12-11 21:14:04 +00:00
Simon McVittie
a9b0b3da5f
comments: use global configuration for allow_directives, commit, and pagename
2008-12-11 21:14:04 +00:00
Simon McVittie
d35a2bd2de
comments: Add some global configuration
2008-12-11 21:14:04 +00:00
Simon McVittie
4972baac4d
comments: make preprocess a no-op
2008-12-11 21:14:04 +00:00
Simon McVittie
c9bb8b03a4
comments: document what linkuser does
2008-12-11 21:14:03 +00:00
Simon McVittie
404792c618
comments: add a stub pagetemplate hook to show the comments
2008-12-11 21:14:03 +00:00
Simon McVittie
3abfc1d71c
comments: Use HTML entities to escape directives
2008-12-11 21:14:03 +00:00
Simon McVittie
430ac61f21
Embed comments into comments_embed.tmpl rather than concatenating in perl
2008-12-11 21:14:03 +00:00
Simon McVittie
286dbb0541
comments: use CGI module's checksessionexpiry
2008-12-11 21:14:03 +00:00
Simon McVittie
9a6005a212
editpage: factor out checksessionexpiry into IkiWiki::CGI
2008-12-11 21:14:03 +00:00