Latest version always available from my modx SVN branch.
Current attachment is Beta 2
* Enhanced commenting system
* Documentation will follow shortly.
* I expect some issues with the db-installer (triggers on first run) on different systems.
* Extra features coming real soon
Changes:
2006-09-26 - Jot 1.0 Beta 2
* fixed couple of bugs
* placeholders now hold tagid when available
* Generated links (current, subscribe etc.. ) now always hold the current document id. No matter what docid Jot is set to.
Features:
* access control
* pagination
* captcha
* custom fields
* subscriptions
* moderation
* post delay
* output to placeholders
* added templating capabilities
Usage:
[!Jot? &customfields=`name,email`!]
Parameters:
- &action - default | count-comments | count-subscriptions
default value is to show all (form + comments)
- &docid - document id
Link comments to this document, defaults to parent document.
- &tagid - string [A-Za-z0-9]
Extra tag to use when two instances use the same docid
- &subscribe - 0 | 1
0 = disable subscriptions (default)
1 = enable subscriptions
- &captcha - 0 | 1 | 2
0 = disable captcha when posting. (default)
1 = enable captcha when posting.
2 = enable captcha when posting, but disable it for logged in users.
- &customfields- comma seperated list of extra form fieldnames
Using this command will save the specified fields when posting. The default templates require you to add "name, email" as custom fields.
- &guestname- string
Name to use when none is specified.
- &postdelay- number of seconds between posts from the same use
0 = disable the delay(default)
1 > enable delay with specified number
- &pagination- number of comments per page
0 = disable, show all comments on one page (default)
1 > enable paging with specified number.
- &placeholders- 0 | 1
0 = no placeholders are created (default)
1 = placeholders are created for every debug value (see &debug parameter)
if no tagid is specified the placeholders are created like this: [+jot.html.form+]
if the tagid is specified the placeholders are created like this: [+jot.html.form.tagid+]
- &output- 0 | 1
0 = hide output (can be used in combination with &placeholder parameter)
1 = show output (default)
- &debug- 0 | 1
0 = disable output of all jot variables (default)
1 = enable output of all jot variables
- &authorid - id of topic author
defaults to author value for the current document.
- &canpost- comma delimitted web groups
comma delimitted web groups that can post comments. leave blank for public posting
- &canview- comma delimitted web groups
comma delimitted web groups that can post comments. leave blank for public viewing
- &canmoderate- comma delimitted web groups
comma delimitted web groups that can moderate comments. leave blank for no webuser moderation (moderation by using manager account)
&tplForm
&tplComments
&tplModerate
&tplNav
&tplNotify
&tplSubscribe
&cssRowAlt
&cssRowMe
&cssRowAuthor
Other stuff (yeah nice header text!)
included with the snippet is chunkie.class.inc.php it handles the templating for Jot. The parser is recursive.
This class adds the capability of modifying the output of a placeholder by adding ":modifier" within the placeholder name.
Multiple modifiers per placeholder is possible, they are applied in the order they are set after the initial placeholder name.
some examples:
Normal placeholder:
[+jot.sample+]
With modifiers:
[+jot.sample:esc:nl2br+]
the modifiers can also have options like:
[+jot.sample:date=`%a %B %d, %Y at %H:%M`+]
list of modifiers:
esc - escapes html and the [ ] characters
nl2br - converts new lines to
date=`dateformat` - converts timestamps to format specified (same as php’s strftime)
strip - strips newlines and multiple spaces.
username - converts the value to a manager or web username (webuser have negative integers)
math=`?+1+(2+3)+4/5*6` - use calculations, a ? is replaced by the current value of the placeholder
ifempty=`other value` - use other value when current is empty.