Re: [tw] Re: Bug report: Tiddler CSS ID containing spaces
While an ID gets generated for the tiddler and contains the title, the spaces are not removed or replaced. I'm afraid that's a known issue which can't be fixed without breaking backwards compatibility: http://trac.tiddlywiki.org/ticket/472 Since spaces function as selectors in CSS, the tiddler cannot be accessed with CSS. There's a workaround: http://tiddlywiki.org/wiki/Tiddler-Specific_Styles#Using_Tiddler_IDs This works: div[tiddler="Title Of Tiddler Goes Here"].tiddler .viewer Unfortunately, IE6 balks at that: http://www.webdevout.net/browser-support-css#css2selectors -- F. -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To post to this group, send email to tiddlyw...@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] createTiddlyButton inside a transclusion
Hello, I found possible to create a button with a transclusion (and not two buttons !) and the TW core function : createTiddlyButton It seems odd because the tiddler macro calls a non-existent section in order not to get two buttons ! The transclusion tiddler looks like this : Name : CreateButtonTiddler Tiddler text : <> You can call this transclusion in a simple way : <> I'm far from an expert in javascript and TW programming. So I'm wondering if this transclusion is "safe" and if I'm not going to encounter some problems using it ? Thanks for your advices FrD -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To post to this group, send email to tiddlyw...@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: Bug report: Tiddler CSS ID containing spaces
Thank you Eric and FND, this solves my problem. :) -- Kolya On Aug 2, 9:46 am, FND wrote: > > While an ID gets generated for the tiddler and contains the title, > > the spaces are not removed or replaced. > > I'm afraid that's a known issue which can't be fixed without breaking > backwards compatibility:http://trac.tiddlywiki.org/ticket/472 > > > Since spaces function as selectors in CSS, the tiddler cannot be > > accessed with CSS. > > There's a > workaround:http://tiddlywiki.org/wiki/Tiddler-Specific_Styles#Using_Tiddler_IDs > > > This works: > > div[tiddler="Title Of Tiddler Goes Here"].tiddler .viewer > > Unfortunately, IE6 balks at > that:http://www.webdevout.net/browser-support-css#css2selectors > > -- F. -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To post to this group, send email to tiddlyw...@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: automatically disappearing tiddlers
Eric, > When I first wrote this plugin many years ago, the code looked very > much like what Paul has posted. We've been here many times before. My strong aesthetic is for minimal code which does the one thing I require, where as yours is to be highly configurable and meet many different use-cases from different people. Both approaches have value and there is room in this world for both. -- Paul (psd) http://blog.whatfettle.com -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To post to this group, send email to tiddlyw...@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: automatically disappearing tiddlers
> > When I first wrote this plugin many years ago, the code looked very > > much like what Paul has posted. > My strong aesthetic is for minimal code which does the one thing I > require, where as yours is to be highly configurable and meet many > different use-cases from different people. > > Both approaches have value and there is room in this world for both. Indeed... in many cases, minimal code can achieve the desired effect, and I was *not* suggesting that there is only one plugin needed for all use-cases. In fact, I'm all for "aesthetic, minimalist coding"... I really love it when a powerful result can be achieved in just a few lines of code. However, when that result does not meet the actual expectations of the users, then functionality dictates, and coding aesthetics lose out. The "minimal code" in your plugin IS very attractively simple and understandable, and *seems* to provide exactly what is being "required" ("close open tiddlers before opening another") and, as I said previously, my plugin code started out nearly identical to what you wrote. However, while that code did fulfill the basic *functional specification*, the actual *user experience*, as reported by real- world users in the field, showed that it was not sufficient, and that additional code was necessary to achieve the results that people were actually asking for. For example here's a use-case that is very common and causes a VERY bad **loss-of-data** outcome: 1) edit a tiddler 2) make changes (but don't finish editing yet!) 3) click any link in the page 4) tiddler being edited is closed (without warning) and changes from (2) are DISCARDED WITHOUT WARNING! In addition to avoiding data loss, ensuring that a tiddler open for editing is not *automatically* closed -- and can even be left open after confirmation, even while viewing another tiddler -- it makes it MUCH easier to copy/paste content between tiddlers. Otherwise, you would have to "open-edit-copy-cancel" on the first tiddler, followed by "open-edit-paste-done" in the second tiddler... and if you need to copy more than one piece of content between tiddlers, you have to repeat the entire cycle again for each snippet you need to copy! Another example the "scrolling problem" 1) document has lots of tiddlers, so sidebar tabs display is very long 2) open a long tiddler (one that doesn't fit on a single screen) 3) read that tiddler (scrolling to the bottom as needed) 4) without scrolling back up to the top of page click any link in the sidebar 5) current tiddler is closed, new tiddler is opened, but... 6) this does NOT cause the browser to scroll back and, while the new tiddler IS displayed, it is SCROLLED OUT OF VIEW, and there is *NO* visible tiddler until the user *manually* scrolls the page back to the top Another example... the browser's BACK/FORWARD buttons Most people who use 'one at a time' tiddler display are attempting to recreate the familiar page-transition experience of a 'normal' web site. Included in that experience is the expectation that the browser's BACK/FORWARD buttons can be used to quickly navigate between the visited 'pages' (i.e. tiddlers). In fact, this particular expectation is reinforced by the plugin code because the URL in the browser IS being updated to show the current "#TiddlerName" permalink. However, while the brower's history does include each permalinked URL, pressing the BACK/FORWARD buttons does nothing, because there is no real page transition occuring even though the URL in the browser *does* change. Additional plugin code was needed to enable TiddlyWiki to detect and respond to these browser-based events so that the *expected* navigation behavior could be supported. While this code adds complexity to the plugin, it is also 100% transparent to the user, and things "just work" as expected. Of course, the user *could* install something like http://www.TiddlyTools.com/#BreadcrumbsPlugin to provide an alternative means of navigating the tiddler "history" for the current session. However, this approach is obviously MUCH more radical than merely adding code to SinglePageModePlugin, and still doesn't address the user's expectation that the brower's BACK/ FORWARD buttons *should* just work in this situation. In conclusion: while I also prefer 'minimal' code when appropriate, TiddlyWiki is not an exercise in software engineering principles.. it's a practical tool for helping real people to accomplish their goals, and a 'solution' that does not meet those goals is not a solution at all. respectfully, -e Eric Shulman TiddlyTools / ELS Design Studios -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To post to this group, send email to tiddlyw...@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.
Re: [tw] Re: Show field value instead of title in search result
Hi Eric, Many thanks for the instruction. Have tried but unable to get it work. I created a tiddler with a custom field called "title2", with a search config tiddler ([[zzSearchOptionsConfig]]) that goes like: //{{{ window.formatSearchResults_list=function(text,matches) { // bullet list of links to matching tiddlers var body=''; var co=config.options; // abbrev var pattern=co.chkRegExpSearch?text:text.escapeRegExp(); var sensitive=co.chkCaseSensitiveSearch?"mg":"img"; var link='{{tiddlyLinkExisting{%1}}}'; for(var t=0;t wrote: > > Wonder whether it is possible to config SearchOptionPlugin or > > SimpleSearchPlugin to NOT to show tiddler titles in search result, but > > value from a custom field (say a field called "alternative_title")? > > http://www.TiddlyTools.com/#SearchOptionsPlugin > > is specifically designed to permit *redefintion* of the search result > output functions. > > In order to customiz the list content, the function you want to change > is called > window.formatSearchResults_list() > > First, go to the SearchOptionsPlugin, and edit the source. Scroll > down until you find the above function definition, and copy it to the > clipboard. > > Next, create a separate tiddler (e.g., SearchOptionsPluginConfig), > tagged with systemConfig, and paste in the copied code, like this: > > //{{{ > window.formatSearchResults_list=function(text,matches) { >... > } > //}}} > > Then, replace this ONE line: >var fixup=title.replace(/'/g,"\\x27").replace(/"/g,"\\x22"); > with something like this: >var fixup=store.getValue(tid,"fieldname"); >fixup=fixup.replace(/'/g,"\\x27").replace(/"/g,"\\x22"); > > Of course, you will need a bit more code to get the desired fieldname > based on current language selection, but I leave that as "an exercise > for the reader". > > enjoy, > -e > > -- > You received this message because you are subscribed to the Google Groups > "TiddlyWiki" group. > To post to this group, send email to tiddlyw...@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. > > -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To post to this group, send email to tiddlyw...@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: Show field value instead of title in search result
change this: var fixup=store.getValue(tid,"title2"); to this: var fixup=store.getValue(title,"title2"); enjoy, -e -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To post to this group, send email to tiddlyw...@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.
Re: [tw] Re: Show field value instead of title in search result
Great! It now opens the *translated tiddler* from the original tiddler. Better if search results can show titles of translated tiddlers (i.e. "title2") instead. Could this be done? On 3 August 2010 11:20, Eric Shulman wrote: > change this: > var fixup=store.getValue(tid,"title2"); > to this: > var fixup=store.getValue(title,"title2"); > > enjoy, > -e > > -- > You received this message because you are subscribed to the Google Groups > "TiddlyWiki" group. > To post to this group, send email to tiddlyw...@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. > > -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To post to this group, send email to tiddlyw...@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.