[tw] Re: PrettyDatesPlugin, problems
The other thread solved my puzzle! http://groups.google.com/group/TiddlyWiki/browse_thread/thread/4e5f04d121549aad/3f153189c302cfd9?lnk=gst&q=mikes# Thanks for all the help and patience! On Jun 23, 11:06 pm, Tobias Beer wrote: > How about putting a or right in front of "by" (as in > "nowby") in the Viewtemplate? Though a linebreak in the editor right > after the previous should usually do. > > On 22 Jun., 13:03, Michael Johanson > wrote: > > > Well, atleast I thought everything was solved... > > > I didn't notice it at first but this is what I get, e.g. : (updated > > just nowby MichaelJohanson) > > You see what is wrong? Yes, "nowby" which should be "now by". > > > I can't find it anywhere in the ViewTemplate code or > >PrettyDatesPlugin. Where else should I look? > > My codes doesn't differ at all compared to MPTW. > > > /Mike > > > On Jun 22, 12:21 pm, Michael Johanson > > wrote: > > > > Got it all sorted out now. > > > Thanks for the help and patience. > > > > /Mike > > > > On Jun 22, 11:49 am, wolfgang wrote: > > > > > In Page or ViewTemplate you can comment parts of it out, so you don't > > > > have to delete and later don't find the bit of code again if you would > > > > want to revert, by using > > > > > In the example above, if you want the code commented out back, it > > > > would look like this: > > > > > > > > > (updated > > > > by ) > > > > ( > > > > ) > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To post to this group, send email to TiddlyWiki@googlegroups.com To unsubscribe from this group, send email to tiddlywiki+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/TiddlyWiki?hl=en -~--~~~~--~~--~--~---
[tw] Re: PrettyDatesPlugin, problems
Ignore me earlier post, was a missunderstanding! The other thread solved my puzzle. :) Thanks for the patience and help! On Jun 24, 8:19 am, Michael Johanson wrote: > I see what you are all saying and yes, it should work but in my case I > don't even got a "by" in my code. I use the TW you get > fromhttp://mptw.tiddlyspot.com/ > Scroll up and you'll see that it is missing. > > The most strange thing is that nothing happens when I change the code, > I can delete it and nothing happens. > As stated earlier, I'm not the best at this things so maybe you guys > know something I don't. > > Hope I don't get on your nervs, wan't to learn! > > PS. A little reminder: My update form look like this, e.g: (updated > just nowby Michael Johanson) > It does not look like this: Michael Johanson, 27 September 2009 > (created 27 September 2009) > or like this: updated 20/06/2009 by Michael Johanson > > On Jun 23, 11:06 pm, Tobias Beer wrote: > > > How about putting a or right in front of "by" (as in > > "nowby") in the Viewtemplate? Though a linebreak in the editor right > > after the previous should usually do. > > > On 22 Jun., 13:03, Michael Johanson > > wrote: > > > > Well, atleast I thought everything was solved... > > > > I didn't notice it at first but this is what I get, e.g. : (updated > > > just nowby MichaelJohanson) > > > You see what is wrong? Yes, "nowby" which should be "now by". > > > > I can't find it anywhere in the ViewTemplate code or > > > PrettyDatesPlugin. Where else should I look? > > > My codes doesn't differ at all compared to MPTW. > > > > /Mike > > > > On Jun 22, 12:21 pm, Michael Johanson > > > wrote: > > > > > Got it all sorted out now. > > > > Thanks for the help and patience. > > > > > /Mike > > > > > On Jun 22, 11:49 am, wolfgang wrote: > > > > > > In Page or ViewTemplate you can comment parts of it out, so you don't > > > > > have to delete and later don't find the bit of code again if you would > > > > > want to revert, by using > > > > > > In the example above, if you want the code commented out back, it > > > > > would look like this: > > > > > > > > > > > (updated > > > > > by ) > > > > > ( > > > > > ) > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To post to this group, send email to TiddlyWiki@googlegroups.com To unsubscribe from this group, send email to tiddlywiki+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/TiddlyWiki?hl=en -~--~~~~--~~--~--~---
[tw] Re: PrettyDatesPlugin, problems
I see what you are all saying and yes, it should work but in my case I don't even got a "by" in my code. I use the TW you get from http://mptw.tiddlyspot.com/ Scroll up and you'll see that it is missing. The most strange thing is that nothing happens when I change the code, I can delete it and nothing happens. As stated earlier, I'm not the best at this things so maybe you guys know something I don't. Hope I don't get on your nervs, wan't to learn! PS. A little reminder: My update form look like this, e.g: (updated just nowby Michael Johanson) It does not look like this: Michael Johanson, 27 September 2009 (created 27 September 2009) or like this: updated 20/06/2009 by Michael Johanson On Jun 23, 11:06 pm, Tobias Beer wrote: > How about putting a or right in front of "by" (as in > "nowby") in the Viewtemplate? Though a linebreak in the editor right > after the previous should usually do. > > On 22 Jun., 13:03, Michael Johanson > wrote: > > > Well, atleast I thought everything was solved... > > > I didn't notice it at first but this is what I get, e.g. : (updated > > just nowby MichaelJohanson) > > You see what is wrong? Yes, "nowby" which should be "now by". > > > I can't find it anywhere in the ViewTemplate code or > > PrettyDatesPlugin. Where else should I look? > > My codes doesn't differ at all compared to MPTW. > > > /Mike > > > On Jun 22, 12:21 pm, Michael Johanson > > wrote: > > > > Got it all sorted out now. > > > Thanks for the help and patience. > > > > /Mike > > > > On Jun 22, 11:49 am, wolfgang wrote: > > > > > In Page or ViewTemplate you can comment parts of it out, so you don't > > > > have to delete and later don't find the bit of code again if you would > > > > want to revert, by using > > > > > In the example above, if you want the code commented out back, it > > > > would look like this: > > > > > > > > > (updated > > > > by ) > > > > ( > > > > ) > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To post to this group, send email to TiddlyWiki@googlegroups.com To unsubscribe from this group, send email to tiddlywiki+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/TiddlyWiki?hl=en -~--~~~~--~~--~--~---
[tw] Re: PrettyDatesPlugin, problems
How about putting a or right in front of "by" (as in "nowby") in the Viewtemplate? Though a linebreak in the editor right after the previous should usually do. On 22 Jun., 13:03, Michael Johanson wrote: > Well, atleast I thought everything was solved... > > I didn't notice it at first but this is what I get, e.g. : (updated > just nowby MichaelJohanson) > You see what is wrong? Yes, "nowby" which should be "now by". > > I can't find it anywhere in the ViewTemplate code or > PrettyDatesPlugin. Where else should I look? > My codes doesn't differ at all compared to MPTW. > > /Mike > > On Jun 22, 12:21 pm, Michael Johanson > wrote: > > > Got it all sorted out now. > > Thanks for the help and patience. > > > /Mike > > > On Jun 22, 11:49 am, wolfgang wrote: > > > > In Page or ViewTemplate you can comment parts of it out, so you don't > > > have to delete and later don't find the bit of code again if you would > > > want to revert, by using > > > > In the example above, if you want the code commented out back, it > > > would look like this: > > > > > > > (updated > > > by ) > > > ( > > > ) > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To post to this group, send email to TiddlyWiki@googlegroups.com To unsubscribe from this group, send email to tiddlywiki+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/TiddlyWiki?hl=en -~--~~~~--~~--~--~---
[tw] Re: PrettyDatesPlugin, problems
Morris, you are correct. You helped me with this same issue back in May. Michael, you can get a solution at the bottom of this thread: http://groups.google.com/group/TiddlyWiki/browse_thread/thread/4e5f04d121549aad/3f153189c302cfd9?lnk=gst&q=mikes# Hope that helps... On Jun 22, 11:37 am, Morris Gray wrote: > On Jun 22, 9:03 pm, Michael Johanson > wrote: > > > You see what is wrong? Yes, "nowby" which should be "now by". > > > I can't find it anywhere in the ViewTemplate code or > > PrettyDatesPlugin. Where else should I look? > > My codes doesn't differ at all compared to MPTW. > > I solved this problem some long time ago. Then I think it was also no > space after the 'by' I vaguely think it might have had something to > do with the code wrapping. Even if the code seems to have spaces in > the right places try delete them and add a new space. > > Morris > > On Jun 22, 9:03 pm, Michael Johanson > wrote: > > > Well, atleast I thought everything was solved... > > > I didn't notice it at first but this is what I get, e.g. : (updated > > just nowby MichaelJohanson) > > You see what is wrong? Yes, "nowby" which should be "now by". > > > I can't find it anywhere in the ViewTemplate code or > > PrettyDatesPlugin. Where else should I look? > > My codes doesn't differ at all compared to MPTW. > > > /Mike > > > On Jun 22, 12:21 pm, Michael Johanson > > wrote: > > > > Got it all sorted out now. > > > Thanks for the help and patience. > > > > /Mike > > > > On Jun 22, 11:49 am, wolfgang wrote: > > > > > In Page or ViewTemplate you can comment parts of it out, so you don't > > > > have to delete and later don't find the bit of code again if you would > > > > want to revert, by using > > > > > In the example above, if you want the code commented out back, it > > > > would look like this: > > > > > > > > > (updated > > > > by ) > > > > ( > > > > ) > > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To post to this group, send email to TiddlyWiki@googlegroups.com To unsubscribe from this group, send email to tiddlywiki+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/TiddlyWiki?hl=en -~--~~~~--~~--~--~---
[tw] Re: PrettyDatesPlugin, problems
On Jun 22, 9:03 pm, Michael Johanson wrote: > You see what is wrong? Yes, "nowby" which should be "now by". > > I can't find it anywhere in the ViewTemplate code or > PrettyDatesPlugin. Where else should I look? > My codes doesn't differ at all compared to MPTW. I solved this problem some long time ago. Then I think it was also no space after the 'by' I vaguely think it might have had something to do with the code wrapping. Even if the code seems to have spaces in the right places try delete them and add a new space. Morris On Jun 22, 9:03 pm, Michael Johanson wrote: > Well, atleast I thought everything was solved... > > I didn't notice it at first but this is what I get, e.g. : (updated > just nowby MichaelJohanson) > You see what is wrong? Yes, "nowby" which should be "now by". > > I can't find it anywhere in the ViewTemplate code or > PrettyDatesPlugin. Where else should I look? > My codes doesn't differ at all compared to MPTW. > > /Mike > > On Jun 22, 12:21 pm, Michael Johanson > wrote: > > > Got it all sorted out now. > > Thanks for the help and patience. > > > /Mike > > > On Jun 22, 11:49 am, wolfgang wrote: > > > > In Page or ViewTemplate you can comment parts of it out, so you don't > > > have to delete and later don't find the bit of code again if you would > > > want to revert, by using > > > > In the example above, if you want the code commented out back, it > > > would look like this: > > > > > > > (updated > > > by ) > > > ( > > > ) > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To post to this group, send email to TiddlyWiki@googlegroups.com To unsubscribe from this group, send email to tiddlywiki+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/TiddlyWiki?hl=en -~--~~~~--~~--~--~---
[tw] Re: PrettyDatesPlugin, problems
ViewTemplate: , ( ) PrettyDatesPlugin: Date.prototype.prettyDate = function() { var diff = (((new Date()).getTime() - this.getTime()) / 1000); var day_diff = Math.floor(diff / 86400); if (isNaN(day_diff)) return ""; else if (diff < 0)return "in the future"; else if (diff < 60) return "just now"; else if (diff < 120) return "1 minute ago"; else if (diff < 3600) return Math.floor(diff/60) + " minutes ago"; else if (diff < 7200) return "1 hour ago"; else if (diff < 86400)return Math.floor(diff/3600) + " hours ago"; else if (day_diff == 1) return "Yesterday"; else if (day_diff < 7)return day_diff + " days ago"; else if (day_diff < 14) return "a week ago"; else if (day_diff < 31) return Math.ceil(day_diff/7) + " weeks ago"; else if (day_diff < 62) return "a month ago"; else if (day_diff < 365) return "about " + Math.ceil(day_diff/31) + " months ago"; else if (day_diff < 730) return "a year ago"; else return Math.ceil(day_diff/365) + " years ago"; } Date.prototype.formatString_orig_mptw = Date.prototype.formatString; Date.prototype.formatString = function(template) { return this.formatString_orig_mptw(template).replace(/ /,this.prettyDate()); } // for MPTW. otherwise edit your ViewTemplate as required. // config.mptwDateFormat = ' (DD/MM/YY)'; config.mptwDateFormat = ''; On Jun 22, 1:03 pm, Michael Johanson wrote: > Well, atleast I thought everything was solved... > > I didn't notice it at first but this is what I get, e.g. : (updated > just nowby MichaelJohanson) > You see what is wrong? Yes, "nowby" which should be "now by". > > I can't find it anywhere in the ViewTemplate code orPrettyDatesPlugin. Where > else should I look? > My codes doesn't differ at all compared to MPTW. > > /Mike > > On Jun 22, 12:21 pm, Michael Johanson > wrote: > > > Got it all sorted out now. > > Thanks for the help and patience. > > > /Mike > > > On Jun 22, 11:49 am, wolfgang wrote: > > > > In Page or ViewTemplate you can comment parts of it out, so you don't > > > have to delete and later don't find the bit of code again if you would > > > want to revert, by using > > > > In the example above, if you want the code commented out back, it > > > would look like this: > > > > > > > (updated > > > by ) > > > ( > > > ) > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To post to this group, send email to TiddlyWiki@googlegroups.com To unsubscribe from this group, send email to tiddlywiki+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/TiddlyWiki?hl=en -~--~~~~--~~--~--~---
[tw] Re: PrettyDatesPlugin, problems
Well, atleast I thought everything was solved... I didn't notice it at first but this is what I get, e.g. : (updated just nowby MichaelJohanson) You see what is wrong? Yes, "nowby" which should be "now by". I can't find it anywhere in the ViewTemplate code or PrettyDatesPlugin. Where else should I look? My codes doesn't differ at all compared to MPTW. /Mike On Jun 22, 12:21 pm, Michael Johanson wrote: > Got it all sorted out now. > Thanks for the help and patience. > > /Mike > > On Jun 22, 11:49 am, wolfgang wrote: > > > In Page or ViewTemplate you can comment parts of it out, so you don't > > have to delete and later don't find the bit of code again if you would > > want to revert, by using > > > In the example above, if you want the code commented out back, it > > would look like this: > > > > > (updated > > by ) > > ( > > ) > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To post to this group, send email to TiddlyWiki@googlegroups.com To unsubscribe from this group, send email to tiddlywiki+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/TiddlyWiki?hl=en -~--~~~~--~~--~--~---
[tw] Re: PrettyDatesPlugin, problems
Got it all sorted out now. Thanks for the help and patience. /Mike On Jun 22, 11:49 am, wolfgang wrote: > In Page or ViewTemplate you can comment parts of it out, so you don't > have to delete and later don't find the bit of code again if you would > want to revert, by using > > In the example above, if you want the code commented out back, it > would look like this: > > > (updated > by ) > ( > ) > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To post to this group, send email to TiddlyWiki@googlegroups.com To unsubscribe from this group, send email to tiddlywiki+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/TiddlyWiki?hl=en -~--~~~~--~~--~--~---
[tw] Re: PrettyDatesPlugin, problems
In Page or ViewTemplate you can comment parts of it out, so you don't have to delete and later don't find the bit of code again if you would want to revert, by using In the example above, if you want the code commented out back, it would look like this: (updated by ) ( ) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To post to this group, send email to TiddlyWiki@googlegroups.com To unsubscribe from this group, send email to tiddlywiki+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/TiddlyWiki?hl=en -~--~~~~--~~--~--~---
[tw] Re: PrettyDatesPlugin, problems
Wolfgang, That clearly made a change, I now get the date format displayed in the code but It's not the one I was looking for and what PrettyDates is supposed to do. I want the function displaying like this, e.g.: Updated two weeks ago created one year ago I'm starting to believe I've missed something out, maybe a template or something which I need to download? Thanks. PS. No problem AndrewMc ;D On Jun 22, 9:43 am, wolfgang wrote: > Replace the subtitle div with this one: > > > (updated > by ) > > > > GoogleGroops will add additional newlines, find the original div in > the MptwTheme tiddler. > > Regards.. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To post to this group, send email to TiddlyWiki@googlegroups.com To unsubscribe from this group, send email to tiddlywiki+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/TiddlyWiki?hl=en -~--~~~~--~~--~--~---
[tw] Re: PrettyDatesPlugin, problems
Thank you Michael for asking this question on using PrettyDatesPlugin. It is one that I have been puzzling over too. And of course, a big thank you wolfgang for your answer which is working perfectly for me (hooray!). Cheers Andrew On Jun 22, 7:43 pm, wolfgang wrote: > Replace the subtitle div with this one: > > > (updated > by ) > > > > GoogleGroops will add additional newlines, find the original div in > the MptwTheme tiddler. > > Regards.. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To post to this group, send email to TiddlyWiki@googlegroups.com To unsubscribe from this group, send email to tiddlywiki+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/TiddlyWiki?hl=en -~--~~~~--~~--~--~---
[tw] Re: PrettyDatesPlugin, problems
Replace the subtitle div with this one: (updated by ) GoogleGroops will add additional newlines, find the original div in the MptwTheme tiddler. Regards.. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To post to this group, send email to TiddlyWiki@googlegroups.com To unsubscribe from this group, send email to tiddlywiki+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/TiddlyWiki?hl=en -~--~~~~--~~--~--~---
[tw] Re: PrettyDatesPlugin, problems
Have you installed the plugin properly? from the source, go into EDIT and copy the entire code into a tiddler (not just the visible part of it). Be sure to TAG it properly. what are the problems you are encountering exactly? are you using the MPTW template? you can also post a minimal example at, say, tiddlyspot.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To post to this group, send email to TiddlyWiki@googlegroups.com To unsubscribe from this group, send email to tiddlywiki+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/TiddlyWiki?hl=en -~--~~~~--~~--~--~---
[tw] Re: PrettyDatesPlugin, problems
Hi wolfgang, Thanks for the beginners tip but anyways, I see what you are saying about ViewTemplate. I've been there and tried editing it, even before I posted this thread, but I can't seem to find out how to make it work. I'm ripping my hair off here! ;) As far as I can see, this is what I should focus at: , ( ) How should I implement the new code? Thanks, trying to learn new stuff :) On Jun 19, 12:18 pm, wolfgang wrote: > Welcome Johnsen, > > > Can anyone please tell me if there is a common problem I might have > > missed? > > Or write a simple/fast guide on how to get it all right? :) > > > Do I need some other plugin to make it work? > > Do I need to change the code in a shadow tiddler? > > > Thanks in advance, can't wait! > > To get fast answers it's always advantageous to add a link to the > plugin making troubles: > > http://mptw.tiddlyspot.com/#PrettyDatesPlugin > > Because there are hundreds of systemConfig tagged tiddlers, and > everyone uses only some. > > I don't use Pretty Dates, but in the plugin code I can read: > > // for MPTW. otherwise edit your ViewTemplate as required. > // config.mptwDateFormat = ' (DD/MM/YY)'; > config.mptwDateFormat = ''; > > MPTW uses a systemTheme tagged tiddler, where you'll find the > ViewTemplate to edit as required. > All TW which don't use a systemTheme: find ViewTemplate in the right > sidebar under 'More' > 'Shadowed' and adapt accordingly. > > Regards.. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To post to this group, send email to TiddlyWiki@googlegroups.com To unsubscribe from this group, send email to tiddlywiki+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/TiddlyWiki?hl=en -~--~~~~--~~--~--~---
[tw] Re: PrettyDatesPlugin, problems
Welcome Johnsen, > Can anyone please tell me if there is a common problem I might have > missed? > Or write a simple/fast guide on how to get it all right? :) > > Do I need some other plugin to make it work? > Do I need to change the code in a shadow tiddler? > > Thanks in advance, can't wait! To get fast answers it's always advantageous to add a link to the plugin making troubles: http://mptw.tiddlyspot.com/#PrettyDatesPlugin Because there are hundreds of systemConfig tagged tiddlers, and everyone uses only some. I don't use Pretty Dates, but in the plugin code I can read: // for MPTW. otherwise edit your ViewTemplate as required. // config.mptwDateFormat = ' (DD/MM/YY)'; config.mptwDateFormat = ''; MPTW uses a systemTheme tagged tiddler, where you'll find the ViewTemplate to edit as required. All TW which don't use a systemTheme: find ViewTemplate in the right sidebar under 'More' > 'Shadowed' and adapt accordingly. Regards.. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To post to this group, send email to TiddlyWiki@googlegroups.com To unsubscribe from this group, send email to tiddlywiki+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/TiddlyWiki?hl=en -~--~~~~--~~--~--~---