Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Timeline/History with UserName?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  11 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Gibson  
View profile  
 More options Nov 6, 10:13 am
From: Gibson <kentucky.gib...@googlemail.com>
Date: Fri, 6 Nov 2009 07:13:03 -0800 (PST)
Local: Fri, Nov 6 2009 10:13 am
Subject: Timeline/History with UserName?
Hi all :)

At the minute I'm using the timeline macro in a tiddler to give me a
quick history of when things have been created but I'd also like
details of when they were modified and by which user, if that's
possible.

Is there some way I can do that?

Thanks,
-G-


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Måns  
View profile  
 More options Nov 6, 3:27 pm
From: Måns <humam...@gmail.com>
Date: Fri, 6 Nov 2009 12:27:32 -0800 (PST)
Local: Fri, Nov 6 2009 3:27 pm
Subject: Re: Timeline/History with UserName?
Hi Gibson

Try

<script>
        var out=[]; var who='';
        var tids=store.getTiddlers('modifier');
        for (i=0; i<tids.length; i++) { var t=tids[i];
                if (who!=t.modifier) {
                        who=t.modifier;
                        out.push('by '+who+':');
                }
                out.push('*[['+t.title+']]');
        }
        return out.join('\n');
</script>

Regards Måns Mårtensson

On 6 Nov., 16:13, Gibson <kentucky.gib...@googlemail.com> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Gibson  
View profile  
 More options Nov 9, 4:05 am
From: Gibson <kentucky.gib...@googlemail.com>
Date: Mon, 9 Nov 2009 01:05:41 -0800 (PST)
Local: Mon, Nov 9 2009 4:05 am
Subject: Re: Timeline/History with UserName?
Hi,

Thanks for that - it's great for getting the "who" part :)

Can you tell me how I'd add the date at the side of the output line
out.push('*[['+t.title+']]');  ?

Thanks again,
-G-

On Nov 6, 8:27 pm, Måns <humam...@gmail.com> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Måns  
View profile  
 More options Nov 9, 7:51 am
From: Måns <humam...@gmail.com>
Date: Mon, 9 Nov 2009 04:51:03 -0800 (PST)
Local: Mon, Nov 9 2009 7:51 am
Subject: Re: Timeline/History with UserName?
Hi Gibson

try:
out.push('*[['+t.title+']]'+t.modified+'');

regards Måns Mårtensson

On 9 Nov., 10:05, Gibson <kentucky.gib...@googlemail.com> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Morris Gray  
View profile  
 More options Nov 9, 11:46 pm
From: Morris Gray <msg...@symbex.net.au>
Date: Mon, 9 Nov 2009 20:46:31 -0800 (PST)
Local: Mon, Nov 9 2009 11:46 pm
Subject: Re: Timeline/History with UserName?
You might like to try:

out.push('*[['+t.title+']] '+t.modified.formatString('YYYY.0MM.0DD -
DDD 0hh:0mm:0ss')+'');

This will make it a bit more tidy.

 Morris

On Nov 9, 11:51 pm, Måns <humam...@gmail.com> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Måns  
View profile  
 More options Nov 10, 4:01 am
From: Måns <humam...@gmail.com>
Date: Tue, 10 Nov 2009 01:01:21 -0800 (PST)
Local: Tues, Nov 10 2009 4:01 am
Subject: Re: Timeline/History with UserName?
Thanks Morris - I didn't know that..
So taught by Alex H's thread: (prevent wikification in a script)
http://groups.google.dk/group/tiddlywiki/browse_thread/thread/86dcc6f...
I've added three double quotes on each side of '+who+' to prevent
wikification of usernames:

                        out.push('by """'+who+'""":');
                }
                out.push('*[['+t.title+']] '+t.modified.formatString
('YYYY.0MM.0DD - DDD 0hh:0mm:0ss')+'');

The opposite solution (always to wikify/link to a tiddler with
username as title) would be something like:

               out.push('by [['+who+']]:');
                }
                out.push('*[['+t.title+']] '+t.modified.formatString
('YYYY.0MM.0DD - DDD 0hh:0mm:0ss')+'');

Regards Måns Mårtensson

On 10 Nov., 05:46, Morris Gray <msg...@symbex.net.au> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Morris Gray  
View profile  
 More options Nov 10, 8:07 am
From: Morris Gray <msg...@symbex.net.au>
Date: Tue, 10 Nov 2009 05:07:37 -0800 (PST)
Local: Tues, Nov 10 2009 8:07 am
Subject: Re: Timeline/History with UserName?
My last submission ;-) Next....
-------------------------------------
<script>
        var out=['| !Script by Shulman, Mårtensson & Gray |\>|']; var
who='';
        var tids=store.getTiddlers('modifier');
        for (i=0; i<tids.length; i++) { var t=tids[i];
                if (who!=t.modifier) {
                        who=t.modifier;
                        out.push('| modified by """'+who+'""": |
\>|');
                }
                out.push('|[['+t.title+']]|'+t.modified.formatString
('YYYY.0MM.0DD-DDD 0hh:0mm:0ss')+" |"+'');
        }
        return out.join('\n');
</script>
---------------------------------------

Morris

On Nov 10, 8:01 pm, Måns <humam...@gmail.com> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Måns  
View profile  
 More options Nov 10, 4:19 pm
From: Måns <humam...@gmail.com>
Date: Tue, 10 Nov 2009 13:19:44 -0800 (PST)
Local: Tues, Nov 10 2009 4:19 pm
Subject: Re: Timeline/History with UserName?
Very neat Morris

On 10 Nov., 14:07, Morris Gray <msg...@symbex.net.au> wrote:

> My last submission ;-) Next....

One question though - Is it necessary to change it into a fET to make
use of TablesortingPlugin ( http://tw.lewcid.org/#TableSortingPlugin )
or is it possible to make the table sortable within the script?

YS Måns Mårtensson


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mike  
View profile  
 More options Nov 10, 4:44 pm
From: Mike <eris...@gmail.com>
Date: Tue, 10 Nov 2009 13:44:22 -0800 (PST)
Local: Tues, Nov 10 2009 4:44 pm
Subject: Re: Timeline/History with UserName?
With some help from ELS I have replaced all of my fET calls to inline
JS :)
I think you are missing the header (hdr)
i.e.
var hdr="|sortable|k\n| !Brand | !Name | !Wrapper | !Recommended By | !
Purchased ||h"
out.push(hdr);

A Working Example:
<script>
   var out=[];
   var fmt='| %0 | %1 | %2 | %3 | %4 | {{fine{[[%5|%5]]}}} |';
   var tids=store.getMatchingTiddlers("Cigar && ! excludeLists && !
Trash","created");
   var hdr="|sortable|k\n| !Brand | !Name | !Wrapper | !Recommended By
| !Purchased ||h"

   out.push(hdr);
        if (!tids.length) out=["No Cigars found"];

   for (var i=0; i<tids.length; i++) {
        var val1=tids[i].title;
        if (store.getTiddlerSlice(val1,"PersonalRank") != "Not Rated")
continue;
        if (store.getTiddlerSlice(val1,"Purchased") != "Yes") continue;
        var val2=store.getTiddlerSlice(val1,'Brand')
        var val3=store.getTiddlerSlice(val1,'Name')
        var val4=store.getTiddlerSlice(val1,'Wrapper')
        var val5=store.getTiddlerSlice(val1,'RecommendedBy')
        var val6=store.getTiddlerSlice(val1,'Purchased')
        out.push(fmt.format([val2,val3,val4,val5,val6,val1]));
   }
   return out.join('\n');
</script>

On Nov 10, 3:19 pm, Måns <humam...@gmail.com> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Måns  
View profile  
 More options Nov 10, 9:56 pm
From: Måns <humam...@gmail.com>
Date: Tue, 10 Nov 2009 18:56:26 -0800 (PST)
Local: Tues, Nov 10 2009 9:56 pm
Subject: Re: Timeline/History with UserName?
Hi Mike

Thanks for the hint..

I understand that I should write sth like (I know this is wrong
- ....:

  var out=[];
   var fmt='| %0 | %1 | %2 | %3 |';
   for (var i=0; i<tids.length; i++) {
   var val1=tids[i].title; if (2!=t.modifier)
   var val2=t.modifier;
   var val3=t.modified.formatString ('YYYY.0MM.0DD-DDD 0hh:0mm:0ss')+"
|"+'');
   var hdr="|sortable|k\n| !Tiddler | !Modifier | !Modified|h"
   out.push(hdr);

I know next script isn't right - but it is nevertheless usefull even
if made wrong - :
(It sorts Modifier and TiddlerTitles in the same column)

I think: If I could separate tiddlertitle t.modifier and t.modified
(in three parts/columns instead of two )- Then I would have a correct
sortable table

<script>
        var out= ['| Script by Shulman, Mårtensson & Gray|c'];
        var hdr="|sortable|k\n| !Tiddler&Modifier | !Modified |h"
out.push(hdr);
        var who='';
        var tids=store.getTiddlers('modifier');
        for (i=0; i<tids.length; i++) { var t=tids[i];
                if (who!=t.modifier) {
                        who=t.modifier;
                        out.push('| modified by @@"""'+who+'""":@@ |
\>|');
                }
                out.push('|[['+t.title+']]|'+t.modified.formatString
('YYYY.0MM.0DD-DDD 0hh:0mm:0ss')+" |"+'');
        }
        return out.join('\n');
</script>

Can you help me out?

YS Måns Mårtensson

On 10 Nov., 22:44, Mike <eris...@gmail.com> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Gibson  
View profile  
 More options Nov 12, 3:34 am
From: Gibson <kentucky.gib...@googlemail.com>
Date: Thu, 12 Nov 2009 00:34:06 -0800 (PST)
Local: Thurs, Nov 12 2009 3:34 am
Subject: Re: Timeline/History with UserName?
Great :)

Thanks everyone!

On Nov 10, 4:46 am, Morris Gray <msg...@symbex.net.au> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google