We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4195
    • 398 Posts
    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.
      Armand Pondman
      MODx Coding Team
      :: Jot :: PHx
      • 7923
      • 4,213 Posts
      Wow, sounds awesome bS! Great work, looking forward to try it!


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 4195
        • 398 Posts
        Quote from: doze at Sep 23, 2006, 03:51 PM

        Wow, sounds awesome bS! Great work, looking forward to try it!

        I like to get as much feedback as possible smiley this is just the basic revamped version of replix.. extra features coming up.
          Armand Pondman
          MODx Coding Team
          :: Jot :: PHx
          • 6726
          • 7,075 Posts
          I had heard about it from Ryan, now I get to have a look, awesome job bS !
            .: COO - Commerce Guys - Community Driven Innovation :.


            MODx est l'outil id
            • 22815
            • 1,097 Posts
            Wow. Looking forward to playing with this tomorrow; there’s a few things I’d put on hold waiting for Jot and so I’ll hopefully be able to give lots of feedback.

            But just looking at the spec, it looks good.
            The new line character is saved in the db, and converted to
            on demand. Nice.
            The dateformat bit.. could this mean it would be possible to let users specify their timezone (and their preferred date format), and use that offset/format when displaying timestamps?
            &tagid - string [A-Za-z0-9]
            Extra tag to use when two instances use the same docid
            I know someone for whom that will be very useful - he wanted to have both comments For and Against something - which could be covered by two instances of Jot! Brilliant.

              No, I don't know what OpenGeek's saying half the time either.
              MODx Documentation: The Wiki | My Wiki contributions | Main MODx Documentation
              Forum: Where to post threads about add-ons | Forum Rules
              Like MODx? donate (and/or share your resources)
              Like me? See my Amazon wishlist
              MODx "Most Promising CMS" - so appropriate!
              • 17883
              • 1,039 Posts
              Hi bs,

              glad to hear about the new version! Two questions:

              - I suppose the TBS-templating thing is depraced (hope so, because I ran into several problems with 0.95)?
              - Are you planning an import function for the "old XML-comments"? Erm, this question of course only makes sense if I understood correctly that the new JOT is DB-driven wink

              Regards and go on!
              Marc
                • 4195
                • 398 Posts
                Quote from: PaulGregory at Sep 24, 2006, 07:26 PM

                The dateformat bit.. could this mean it would be possible to let users specify their timezone (and their preferred date format), and use that offset/format when displaying timestamps?

                Yes, this is possible (requiring the php setlocale() being set to the correct timezone). Please do note that the added placeholder modifiers only work at runtime for the Jot templates. (document variables and other placeholders can be used, but chunks and snippets aren’t parsed within this parser)

                Quote from: MadeMyDay at Sep 25, 2006, 03:48 AM

                Hi bs,

                glad to hear about the new version! Two questions:

                - I suppose the TBS-templating thing is depraced (hope so, because I ran into several problems with 0.95)?
                - Are you planning an import function for the "old XML-comments"? Erm, this question of course only makes sense if I understood correctly that the new JOT is DB-driven wink

                - forget about TBS smiley although i have included the extra parser functions for templating i will stay as close to modx as possible
                - i’ve planned some sort of convertion tool but it has low priority


                In general.. i will be releasing updates in the next couple of days
                  Armand Pondman
                  MODx Coding Team
                  :: Jot :: PHx
                  • 17883
                  • 1,039 Posts
                  thx bs wink

                  - i’ve planned some sort of convertion tool but it has low priority

                  That means the new snippet is DB-driven (hadn´t time yet to try it, but that will follow soon). Glad to hear that wink
                    • 4195
                    • 398 Posts
                    Quote from: MadeMyDay at Sep 25, 2006, 07:39 AM

                    thx bs wink

                    - i’ve planned some sort of convertion tool but it has low priority

                    That means the new snippet is DB-driven (hadn´t time yet to try it, but that will follow soon). Glad to hear that wink

                    yes this release is db-only, future versions will include other data providers (such as xml).
                    In fact I coded it in such a way that all the get/set data related functions are in a seperate class.. so in the future I can copy the class file and change how it reads and write data.
                      Armand Pondman
                      MODx Coding Team
                      :: Jot :: PHx
                      • 17883
                      • 1,039 Posts
                      Hi bs,

                      I know you´re busy, but do you perhaps consider to implement a trackback-functionality to the snippet, so it would catch trackbacks and convert them into comments (like in wordpress)? That would be very cool... With an additionally plugin onDocSave that scans a new entry for trackbacking other blogs we would have a perfect blog system wink