Last Changed JotBox

Due to playing a little bit more with JotSpot, I now created ourselves a little last changed miniWindow for our Toolbar. I really like to know what is changing around me, so something like this should be on the main page or somewhere else. I opted for the Toolbar as there is an error message for people using the WYSIWYG editor on the main page otherwise.

The script is rather simple.

<jot:miniWindow title=”Latest Changes” contentStyle=”font-size:8pt;” width=”80″ hidden=”false”>
<jot:search order=”editTime-” set=”nodeResult” limit=”5″ forAll=”true” />
<jot:loop over=”nodeResult” set=”node”>
   1. [[wiki:${node/path}][${node/name}]] (${node/time/relative} by ${node/user})
</jot:loop>
</jot:miniWindow>

Remember that the spaces are important. A 3 whitespace indent before the 1 will make this into a list going from 1 to 5 (due to the limit=”5″) in the loop. You simply need to create this code in something like LastChangedBox within your Wiki and then include that in your Toolbar (simply click edit in the toolbar and it will be self explanatory). Bingo, you now have your last 5 changes pages, with the time from now and who changed them in your toolbar.

5 comments so far

  1. Jamie Wilkinson August 29, 2005 8:13 pm

    Hey Oli — nice to see you back blogging. Hope the honeymoon went well! ;)
    Nerd commentary: I’m not sure how I feel on the above Jot syntax. It seems very flexible, which is fantastic, but that flexibility really looks much more obtuse than it needs to be.

    What they seem to be overlooking is the fact that 99.5% of websites do basically the same thing. Jot is really awesome and will probably still do really well, especially since they do a good job of pre-packaging most everything, but I don’t think I’ll be developing for them!

  2. Jamie Wilkinson August 29, 2005 8:14 pm

    Hey Oli — nice to see you back blogging. Hope the honeymoon went well! ;)
    Nerd commentary: I’m not sure how I feel on the above Jot syntax. It seems very flexible, which is fantastic, but that flexibility really looks much more obtuse than it needs to be. What they seem to be overlooking is the fact that 99% of websites do basically the same thing, just in different contexts. Explicit loops are so 2 years ago! KISS.

    Jot is really awesome and will probably still do really well, especially since they do a good job of pre-packaging most everything, but I don’t think I’ll be developing for them

  3. Scott McMullan (JotSpot) September 12, 2005 11:33 pm

    Cool Oliver, thx for posting this.

    To Jamie’s point, you could ditch the explicit loop and have the table tag do the looping for you automagically:

    Replace:

    [jot:loop over=”nodeResult” set=”node”>
    1. [[wiki:${node/path}][${node/name}]] (${node/time/relative} by ${node/user})
    [/jot:loop>

    With:

    [jot:table contents=”nodeResult”/>

    (note: I prefaced tags with ‘[’ instead of ‘

  4. Jamie Wilkinson September 13, 2005 12:06 am

    Hi Scott,

    Hope you didn’t take offense! I really enjoyed the demo of JotSpot I used a lot and my comment was made with zero knowledge of Jot code syntax beyond Oli’s post.

    I’ve been working with Textpattern a lot recently and have fallen in love with the way it simplifies CRUD (the 99%) by very cleanly seperating everything that could possibly be re-used and taking away the need to explicitly loop over anything — your upgrade to Oli’s code seemed to do basically that! I’m dreadfully underinformed and don’t know how flexible it gets — i.e. what formats the display of those nodeResults? Can that display formatting be easily re-used under different contexts everywhere on the site? Is all of that relatively easy to manage?

    Teaches me to write things in public places without doing the research. ;) I think I’ll certainly look more at Jot and try to give you more constructive commentary and feedback in the future!

  5. Oliver Thylmann September 13, 2005 4:12 pm

    Thanks for the comment Scott. You code does look a lot simpler ;) But hey, mine has the wonderful 1,2,3 and it’s easier to get it smaller. I think I had all this in a table via something else before but I am not sure. I will try it out and hopefully post more about our jotspot experience.

Leave a comment

Please be polite and on topic. Your e-mail will never be published.