Hi Sorry could you give me an exmaple please, I tried - would this bring up two different Icons so Date 1 could be return "* [[" + tiddler.title + "]] <<tiddlerIcons settings [[=" + tiddler.title + "]]>\>\n";
and Date 2 return "* [[" + tiddler.title + "]] <<tiddlerIcons recent [[=" + tiddler.title + "]]>\>\n"; this is what I tried <<forEachTiddler where 'tiddler.tags.contains("tag here")' script ' function lastDays(tiddler) { var compareDate1 = new Date(); compareDate1.setDate(compareDate1.getDate() - 30); if ((tiddler.modified > compareDate2) && (tiddler.modified < compareDate1)) return "* [[" + tiddler.title + "]] <<tiddlerIcons settings [[=" + tiddler.title + "]]>\>\n"; var compareDate2 = new Date(); compareDate2.setDate(compareDate2.getDate() - 60); if ((tiddler.modified > compareDate2) && (tiddler.modified < compareDate1)) return "* [[" + tiddler.title + "]] <<tiddlerIcons recent [[=" + tiddler.title + "]]>\>\n"; else return "* [[" + tiddler.title + "]]\n"; }' write 'lastDays(tiddler)' >> And thank you saw the popup text, all done Regards On Wednesday, November 7, 2012 3:41:00 PM UTC+8, whatever wrote: > > Hi! > Yes, you figured it out correctly: > compareDate.setDate(compareDate.getDate() - 30); > > As for a range, you'd need to have to time points, so you need to do > some changes: > > var compareDate1 = new Date(); > var compareDate2 = new Date(); > compareDate1.setDate(compareDate1.getDate() - 30); > compareDate2.setDate(compareDate2.getDate() - 60); > if ((tiddler.modified > compareDate2) && (tiddler.modified < > compareDate1)) > > > As you can see, there are now two compareDates instead of one and > tiddler.modified needs to be between them. > The rest is the same. > > w > > On 7 nov., 07:29, Philippe De Feularde <sa...@burningtastebuds.com> > wrote: > > Can I push it - is there a way for another icon for 30 - 60 days ? > > > > > > > > > > > > > > > > On Monday, November 5, 2012 7:48:24 PM UTC+8, whatever wrote: > > > > > Hi! > > > > > Try the following (beware googlewrap): > > > > > <<forEachTiddler > > > script ' > > > function lastDays(tiddler) { > > > var compareDate = new Date(); > > > compareDate.setDate(compareDate.getDate() - 10); > > > if (tiddler.modified > compareDate) > > > return "* [[" + tiddler.title + "]] <<tiddlerIcons recent [[=" + > > > tiddler.title + "]]>\>\n"; > > > else > > > return "* [[" + tiddler.title + "]]\n"; > > > }' > > > write 'lastDays(tiddler)' > > > > > This should show icons next to tiddlers changed in the last 10 days. > > > Change "recent", if you want a different icon. Icon settings are > > > dependent on TiddlerIconsPluginConfig. > > > > > w > > > > > On 5 nov., 04:00, Philippe De Feularde <sa...@burningtastebuds.com> > > > wrote: > > > > Hi Eric, > > > > and a BIG thank you for your quick reply. > > > > > > Im a little confused. > > > > > > when we use ForEachTiddler we are assigning the list with tags so > for > > > > example > > > > > > <<forEachTiddler > > > > where > > > > 'tiddler.tags.contains("``rximag")' > > > > > > so this brings up our list of tiddlers with rximag, after a while > there > > > is > > > > quite a lot of tiddlers in that section so next to the name we > wanted > > > icons > > > > which are new so users can see what is new etc... > > > > > > I have imported what you have asked me to import but how do I assign > > > images > > > > to the tiddlers that are new etc.. > > > > > > Regards > > > > > > Philippe > > > > > > On Monday, November 5, 2012 9:19:58 AM UTC+8, Eric Shulman wrote: > > > > > > > On Nov 4, 4:24 pm, Philippe De Feularde < > sa...@burningtastebuds.com> > > > > > wrote: > > > > > > Is there a way to highlight new tiddlers with an icon so users > can > > > view > > > > > the > > > > > > newest tiddlers from the list? We use ForEachTiddler so we just > want > > > an > > > > > > icon to highlight the tiddlers that have been changed within the > > > last 30 > > > > > > days or added. Stretching it could there be an icon to see if > it’s > > > been > > > > > > changed then a different icon if it has been added? > > > > > > > First, import the following plugins: > > > > >http://www.tiddlytools.com/#TiddlerIconsPlugin > > > > >http://www.tiddlytools.com/#TiddlerIconsPluginConfig > > > > >http://www.tiddlytools.com/#AttachFilePluginFormatters > > > > > > > Next, import the attachment tiddlers tagged with 'silk' (also from > > > > > tiddlytools.com). These are the actual .png format icon images > used > > > > > by the above plugins. > > > > > > > After saving-and-reloading.... you can use the <<tiddlerIcons>> > macro: > > > > > > > <<tiddlerIcons>> - shows icons for the current tiddler > > > > > <<tiddlerIcons =TiddlerName>> - shows icons for the specified > tiddler > > > > > <<tiddlerIcons iconID>> - shows a specific icon > > > > > > > For your purposes, you will want embed the "<<tiddlerIcons > > > > > =TiddlerName>>" macro sequence into your ForEachTiddler output, > > > > > substituting the name of the tiddler (i.e. "tiddler.title") being > > > > > handled in the foreach processing. When that output is rendered, > the > > > > > <<tiddlerIcons>> macro will display the appropriate icons for the > > > > > named tiddler. QED. > > > > > > > enjoy, > > > > > -e > > > > > Eric Shulman > > > > > TiddlyTools / ELS Design Studios > > > > > > > HELP ME TO HELP YOU - MAKE A CONTRIBUTION TO MY "TIP JAR"... > > > > > http://www.TiddlyTools.com/#Donations > > > > > > > Professional TiddlyWiki Consulting Services... > > > > > Analysis, Design, and Custom Solutions: > > > > > http://www.TiddlyTools.com/#Contact > -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To view this discussion on the web visit https://groups.google.com/d/msg/tiddlywiki/-/Pl1gzO85ntYJ. 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.