Simplest way to make missing tiddlers display:none or visibility:invisible?

Hi @TW_Tones Tones,

Plain text is ideal for in-tiddler missing links – the kind of missing links that might be the fault of my own incomplete authoring.

In the system I’m setting up here, a bunch of cookie-like “id-key” tiddler titles are loaded up into the story river via a permaview. Those values are not helpful to the actual reader; it’s somewhere between distracting and curiosity-provoking (in an unhelpful way) for people who view this wiki, through an iframe, to have a sense of how certain elements of the site content are being highlighted for them based on their authenticated point of origin within the campus LMS.

I’m focusing not so much on the links to the missing tiddlers (there aren’t any, except for those in the SideBar open tab, which I’m scrubbing out), but on some of the ghost tiddlers themselves (that is, on making their frames and contents evaporate), since these “missing” tiddlers are just hanging out in the story river as fodder for filtered templates.

Yes, I am, very interested in your “Innovative hack” and the fact it leverages “Missing tiddlers” is interesting.

  • To be clear my cascade solution should do exactly the same as @saqimtiaz CSS solution only differently. It still needs the Open tab hack.

When you say;

  • Is this effectively the URL used to open the wiki?

However if I understand your “project” correctly, the root requirement is passing information in the URL to the wiki that provides “parameters” to the wiki, so different behaviours can be exhibited?

  • This is an interesting approach of yours, and as I said I am accumulating understanding of innovation possibilities on top of missing tiddlers.
  • There are certainly other approaches to the same goal I have “played with in the past” from using the “URL search parameter” $:/info/url/search, cookies and local storage.
    • Note: Using a URL search parameter breaks the “Timimi Saver”, I am yet to get a fix.

Any way thanks for sharing

Exactly. Learning Management Systems such as moodle are little walled gardens that house lots of info about each individual student (who authenticates through the university’s SSO, single sign-on).

A plugin filter like generico enables me (with some admin help, since I don’t have access) to set up “templates” that splice that data into bits of dynamic html that I can then serve up to students. In particular, I use this plugin’s functions to build an iframe with a permalink that includes a couple (non-missing) default tiddlers, along with “tiddlers” based on data fields from moodle.

My actual TW5 does not use student names, nor does it use official student ID numbers in it. That’s because it’s hosted off campus, and I haven’t yet found a way to host it on a campus server while keeping it as edit-on-the-fly easy as it is at tiddlyhost. Although students access it though the LMS, it wouldn’t be that hard to find its real home online (say, by discovering some of my posts here documenting the evolution of the site. :wink: ) It has lots of read-only css, but of course “view source” is always an option for a hosted file that’s not encrypted (and I’m so far from wanting to set up individual encryption for each student!).

For all these reasons, my teaching wikis don’t even have anything like a “tiddler” corresponding to each student. I do of course have student-specific strings tucked away in various fields (ones that are out of reach of the standard search window, and very hard to get at via the iframe portal without significant hacking skills).

Once the permaview puts these student-specific “missing” tiddlers in the story river, I can extract what’s needed for meaningful filters, given some basic assumptions (that one of the missing tiddlers is a numeric string of so-many-digits, another is an alpha string of such-and-such format, etc.). Those filters drive how a template can effectively display custom info for each authenticated student.

And, to make it nice, I can have the student’s first name displayed in various places (since the LMS is feeding it into the permaview) even though the student names are nowhere to be found in the html. :slight_smile:

But the seamless feeling is lost if there’s a tiddler-frame-sized banner in the story river corresponding to each of these “missing tiddlers.” Also, I don’t want them to be intentionally or unintentionally closed, thus destroying how their function should survive during the duration of the iframe session.

Thanks for Sharing, good to see you putting tiddlywiki to work in such a situation. I think it may qualify as a “Gorilla TiddlyWiki” as its not installed on the LMS itself.

  • If you have a working solution stick with it
  • I do think we may be able to find a little more robust and somewhat invisible way to do this rather than relying on the permaview.
  • I have the knowledge to “imagine other ways”, but not YET, the skills to “implement these other ways” :frowning:

One way that comes to mind is;

  • Using the permaview but also a Startup action which extracts the missing tiddlers, sets global variables and closes the missing tiddlers (may be a separate step).

I am very keen for us to develop and share methods to leverage and integrate TiddlyWiki in to other systems.

One pet project is to embed single file TiddlyWikis, in posts/pages, in iframes, in a WordPress site where access and writability can be mediated by the WordPress user authentication system.

  • Ideal also allowing serial editors - check out and in.
  • Similar methods may be used with Moodle integration if you control the server.

Yes, this is what I initially envisioned, but I don’t have the skills to think through the startup actions. (I wonder how many folks, like myself, learn certain tricks, and then overwork those same tricks just because they’re more familiar.)

As you know, I’m very eager for a multi-author solution — not necessarily with intro-level students, but with teaching assistants, maybe also seminar students, thesis students, etc.

If only I could control a server, within the campus domain, that would be as responsive and easy to use as tiddlyhost!

If such a tool (with plug-and-play server setup and multi-author permissions) were developed, I could finally imagine becoming an evangelist for TW-in-higher-ed. As it is, I come across as the weird geek who hates the confines of our LMS enough to cobble together a setup of Rube-Goldberg-esque complexity.

-Springer

Of course all you need is an always on device (or class/business hours) on the network, with a static IP Address, running Bob.

However modern networks often make it hard for people to access a node on a network segment in the access layer - office and class room, and they don’t provide a way for you to add it to the domain name service.

  • I once used switches, VPN’s and VLANs to stop this because we had risky users standing up servers in our corporate network (eg game servers).
    • “Gorilla servers” are a security risk as they are usually a way for malware to enter or host malware itself.
    • This is why you often need your server in the network core or server room, but perhaps your organisation does not prohibit this, especially in computer labs, dev teams and other areas.

If all users have access to the internet, you could use tiddlyhost itself, not multi-author without a check in/out facility), after all, TiddlyWIki’s are just something at the end of a URL in you moodle.

  • The best example I am aware of placed on the Internet is @jeremyruston 's AWS solution but I don’t know if it handles multi-author.

There may be additional ways around a secure environment but then you also run the risk of breaking policies.

Umm, you say “of course”… But I don’t know the first thing about Bob. What I do know is that I need to access the wiki from anywhere, and I’m not always on the university network. (Adding a VPN/VNC hurdle is not something I relish.)

Also, the fact that tiddlyhost now provides a decent history of backups (as well as a warning when one tries to save over a more recent copy) is vital to being able to work from wherever I am, knowing that if I get interrupted and leave a tab open, I’m not going to lose a ton of work if I slip up and start editing a stale window (or if I simply need to find and restore an earlier version of a stylesheet, without losing all the authoring done in the meantime).

BTW, I had never heard of “gorilla” (or is it guerilla?) servers. Guerilla servers sound like stealthy things that might cleverly operate against the rules. Gorilla servers sound like big noisy things that have no concept of rules at all. :wink:

Even though I’m “smuggling” tiddlywiki interface into an LMS environment, I’m not extracting any info from the university’s servers, nor installing anything onto them, nor doing anything that undermines security. Much less am I pounding my chest and knocking things over. :wink:

I prefer to think of my tiddlywiki as a little elven critter, or a duende – a helpful friend who peeks in through the window of an iframe, holds up a magic mirror there, and makes the LMS space seem larger (and more sparkly, and better organized) than it is. :slight_smile:

Maybe I should call it Tardis-ware. :wink:

1 Like

@saqimtiaz, this looks intriguing:

But I find the explanation there to be a bit cryptic, and there are no examples.

Does it work a bit like cascades, so I’d have a tiddler (tagged $:/tags/ClassFilters/TiddlerTemplate) that consists of a filter condition mediated by a “then” operator, after which I specify a class name?

If so, this could come in handy, so that I can build a clear css-level set of visual cues for when a missing tiddler fits certain conditions (its title appears in the xyz field of other tiddlers, or its title is purely numeric and exactly 6 digits, etc.).

(In case anybody’s confused, since I was asking for how to hide all missing tiddlers – I’m hiding them only for read-only viewers of the site. But it’s great to be able to recognize and manipulate the “missing” tiddlers in the story river when I’m troubleshooting as author!)

1 Like

Correct, though you can have multiple filters that match and assign classes, contra the first one wins in cascades. The input to the filter is the tiddler holding the filter and the story tiddler is available in the variable storyTiddler, and the output (if any) is assigned as a class in the story.

Edited to correct variable assignments.

Saq,

[UPDATE: Ignore this post; saq’s post was corrected above]

Thanks! I’m still missing something.

I’ve created a tiddler, tagged $:/tags/ClassFilters/TiddlerTemplate with this content:

[prefix[@]then[teamstyle]]

where I already have a stylesheet with css lines starting .teamstyle (which do apply properly to tiddlers with field class set to teamstyle)

However, the teamstyle class css is not yet getting applied with this new classfilter method (that is, to tiddlers whose title starts with @). What needs to be different?

(Once I understand this, I think it will inspire a reworking of my stylesheets, since filters are so much more flexible than the limited tag-based and tiddler-title-based methods I’m currently using.)

-Springer

Apologies, I mostly use the page template level classes so I had to remind myself of some of the details here. The input to the filter is in fact not the current tiddler in the story but the tiddler holding the filter. We should document the relevant variables.

This is an example of how you would write your filter to get it to work:

[<storyTiddler>prefix[@]then[teamstyle]]
2 Likes

Excellent! This works as envisioned, along with:

[<storyTiddler>is[missing]then[missingstyle]]

So in author mode, any “missing” tiddlers can get the missingstyle class, so as to display their templates with clear visual cues that they’re missing (black background, light text color), all set up via .missingstyle class css in my stylesheets.

Meanwhile, in my read-only css, I can have

.tc-tiddler-missing {
display: none;
}

(I’m also setting up missing links to appear as plain text, in case I have some old aspirational links, or links to things that were renamed while relink plugin was not in place. Also, as a complement to the open tab — which has now been hacked to omit missing tiddlers from its list — I have a :warning:︎ sidebar tab which displays ONLY missing tiddlers and related utility links, and which appears only in author mode. This enables me to reorder and close those missing tiddlers.)

Lots of pieces coming into play here, thanks all!

For what it’s worth, I’ve been trying to leverage startup actions to set a system tiddler’s cookie1 field to {{{ [list<tv-story-list>is[missing]!is[system]nsort[]first[]] }}}, and I’m not getting results, even though a button designed to accomplish that same action works fine.

The first easy explanation was that startup actions were happening before the story river was populated. So I switched to using the $:/tags/StartupAction/PostRender tag. The intended tiddler field does get established, but still isn’t populated with the result of the filter.

I’m writing in haste (hence without all the details), but if you have any ideas about why a startup-action would have trouble evaluating a filter that depends on recognizing missing tiddlers in the story river (even though that filter works fine otherwise), I’d love to hear your thoughts!

-Springer

The tv-story-list variable is set by the $navigator widget.
Startup actions are invoked by the root widget which is outside the $navigator widget, and therefore the tv-story-list variable is not defined. You would need to hardcode the story list title.

[Irrelevant tangent: I thought you meant that I would have to hardcode what the “missing tiddler” titles are… which is exactly what I can’t do, as they’re in the permaview which is configured by the LMS iframe variables (see my thread about generico filters and moodle)…]

No, you would need to hardcode the value of tv-story-list which for the default layout is $:/StoryList.

{{{ [list[$:/StoryList]is[missing]!is[system]nsort[]first[]] }}}

1 Like

Perfect! Now (as @TW_Tones was suggesting) I can actually close those missing tiddlers after setting the fields, and not have to worry so much about keeping them open in order to work with those incoming variables.

1 Like

Note that you can also put the variables in the URL as part of a query string, i.e. after a ? character instead of as part of the permalink.

TiddlyWiki will ignore them, but you can still read them from startup actions.

1 Like

While this thread is open, for potential future development:

How would a filter extract the info from the query part of the url variant being loaded? (I don’t find any obvious documentation on queries / query strings here or at tiddlywiki.com site…)

Visit https://tiddlywiki.com/empty.html?name=ferret&color=purple and then look at the shadow tiddler: $:/info/url/search.

So the startup actions would split/parse the text of this tiddler and extract the information needed and save it in tiddlers for reference.

This is cleaner in the sense that you do not need to deal with missing tiddlers in the story at all.