Easiest way to display TW as user-facing web site without buttons/tabs?

Kookma Utility has an author/reader mode. It is not as professional and complete as @telumire solution, but it is a simple author/reader mode

https://kookma.github.io/TW-Utility/#demo%2Futility-author-tools

on Windows alt+ctl+a brings the modal, and ctrl+alt+L switch silently the modes.

2 Likes

Is there a way to set the default to reader mode? If so, that might work well as the vast majority of readers/viewers would not know about the keyboard shortcut.

I think the last state is kept when saving! So if you are in reader mode and save the wiki, it will kept in reader mode. On Node.JS any changes normally saved, so before publishing just go to reader mode.

But sadly this is manual!

Just had major issues w/ your plugin! Some of it was the confusion of excluding vs. including. The way the author mode panel is worded was difficult to understand. In the Bulk UI tab, putting a checkmark in a box meant that this item does not show in reader mode. In the Individual UI tab, putting a checkmark in a box meant that this item does show in reader mode! It is the reverse, and very confusing.

Furthermore, selecting any of the four main tabs (Open, Recent, Tools, More) does not persist as you toggle between author/reader mode (Ctrl+Alt+L). It defaults to all of them being gone in Reader mode.

When I had all four selected, I disabled and deleted the plugin, then restarted. I was stuck in Reader mode with no way to exit. The main tabs had a Excluded tag, and there was no edit button on any tiddler. I had to reinstall, fix all the selections, delete the Excluded tags, then disable, delete the plugin and restart. It was a fairly frustrating experience :frowning:

Sorry for dumping this here, some of it should probably be on GitHub…

I should have asked before but what plugin are you using ?

The two in question were Kookma’s Favorites and Trashbin. I have since realized that I don’t actually use those, so don’t spend any time on that unless you are simply curious…

Actually there was only “Hide Individual UI element”, then I added the “Hide Bulk of UI element” to have more flexibility for advanced users.

It clearly says “Select items to be excluded” and “Show …” so if one read what the item says, there is no confusion! BUT you are right as I myself always click and then see what happens :wink: so it is better to have the same effect when we check the checkbox in both windows!

This is quite natural. No app restores changes after uninstalling!

Well this is very weird because I installed those plugins and they appears as expected :

(I updated the UI to use vertical tabs, its more consistent with the overall UI of tiddlywiki).

Maybe you grabbed a previous version ? Here’s the latest :

ReadOnly.json (7.5 KB)

I was using the version from your last post, theoretically after you edited it?

The new version works as advertised!

Now I have a problem. All of my local files come up in read-only mode, so i can no longer edit them! This is pretty much the opposite of what I need. :angry:

I tried opening them as file:/// and w/ WebDAVNav - also unable to open them in safe mode. FML

You can force the edit mode using a checkbox :

Press alt+n to create a tiddler, then copy/paste this code :

<span title="toggle read/edit"><$checkbox class="toggle" tiddler="$:/status/IsLoggedIn" field="text" checked="yes" actions={{$:/TiddlyTweaks/ReadOnly}}/>
</span>

However I dont understand why it’s stuck in read mode, the filter should match your url ??

What’s the version of your tiddlywiki ?
Can you open the tiddler $:/info/url/full ?

You can restore your default settings by opening the tiddler $:/AdvancedSearch (with the search or from the url - e.g https://read-only.tiddlyhost.com/#:[[$:/AdvancedSearch]]), then in the Filter tab use this filter :

[search:title[sidebar]] [search:title[visibility]] [[$:/TiddlyTweaks/ReadOnly]]

And delete the matches :

This will delete the readonly tiddler and force the default settings for the core plugin by deleting the modified tiddlers. Double check the results before deleting anything !

If you are still stuck in read mode then I can try to help you by private messages but it shouldnt be possible…

Nice little trick there! (the toggle span) - ok, so I turned the buttons and tabs back on then made sure the kookma utility plugin and your readonly json file were deleted and gone. I then re-added the .json file and edited it and changed the filter from localhost to the IP address being served up by WebDAVNav. That does the trick. Local copy stays in edit mode, the copy I push to GitHub>Netlify stays in read-only mode.

That’s the Catch-22 I was getting stuck in. Turn things off, then local site gets all those things turned off because the filter was setting it to read-only. Guess the only way to prevent that is to make that one line of the filter editable? Is there a way to check the URL from inside your .json file?

Glad you were able to fix it ! I think a better way would be to use the checkbox toggle (the span isn’t needed) to “log you in”, then when you upload to github you remove the tiddler “$:/status/IsLoggedIn” from the upload filter. Otherwise you will need to edit your ip adress in the filter manually every time it changes …

If you are using the github saver addon, you can use my SaveToGitHub tweak :

GithubSaverButton.json (16.6 KB)

demo : TiddlyTweaks — Small tweaks for TiddlyWiki

A quick note about how this tweak works :

This work by disabling the normal save, filling in the github credentials from a setting tiddler, then triggering a save. Since the github credentials are filled in and the autosave is disabled, the github save take the highest specificity and the wiki is saved to github. Then, the github credentials are erased from the github saver settings (but kept in the setting tiddler), the autosave is re-enabled allowing to save normally after. It’s contrived but for now there is no other way to choose a saver without using javascript.

I think you only need $:/SaveToGitHub/Button and $:/SaveToGitHub/PublishFilter, the rest should be optional. Once it’s installed, fill the required info in $:/SaveToGitHub/Settings (or go into the new sidebar) and it should be ready to work - just click the github icon to save to github.

Do a backup BEFORE trying anything! And make sure everything seems fine once you did your save to github.

Since I am unable to both save locally and to GitHub (you have to choose one or the other) I turned off the GitHub Saver. I am manually pushing at this point.

My second TW instance is still stuck in read-only mode. At this point, none of the changes I make in the ReadOnly tab have any effect on the local copy. I deleted the .json file, and re-imported a new copy after manually replacing localhost with the IP address. Nothing changed.

Checking and unchecking the logged in checkbox does not do anything. Turning on all the buttons in read-only mode does nothing. I’m getting a bit worried that this file has become corrupt…

This is the point of my “github saver button”, you can edit your wiki and save locally, then click on the github button to save to github. With this you get two save button, one for saving locally and the other to push to github.

I suspect that this is because the visibility of the button is not restored. Reminder that the read only tab only serve to specify what button CAN be displayed, so to restore the visibility you should instead go to $:/ControlPanel > Appearance/Toolbars and check the icons. They should reappear :slight_smile:

If this fail you can try to delete the system tiddlers :

If this still doesnt work, you can go to $:/core/ui/Buttons/save-wiki, save your wiki then try to drag/drop your wiki in https://tiddlywiki.com/upgrade.html to make an upgrade and override the core tiddlers … but it shouldnt be necessary.

Well now - you’ve got my attention!

Well, that works initially - but when I try saving and refreshing, or using the checkbox to log in/out, everything resets to read-only mode. Here’s my workflow:

Starting out, no edit button on tiddlers. Go to ControlPanel > Appearance > Toolbars > View Toolbar tab. Check the Edit button.

Go to ReadOnly > View Toolbar tab - only Maximize tiddler and Close are selected.

Save changes. Refresh.

Edit buttons gone.

Go to ControlPanel > Appearance > Toolbars > View Toolbar tab. Edit button is unchecked!

I’m stuck in this circle…

Sometime you will need to refresh TWICE to see your changes, did you try that ?

If the edit button visibility is restored and you saved, then refreshed the wiki twice, and it still is hidden, then that means the actions in $:/TiddlyTweaks/ReadOnly is triggered, meaning you are still in read only according to the filter. Try to delete the filter in $:/TiddlyTweaks/ReadOnly (in the macro read-only-filter) , then refresh and see if it fixes the issue.

Refreshed multiple times, no go.

Deleted filter section of the ReadOnly file - dropped back to an earlier version where almost NOTHING is available on any sidebar or page control or tiddler. It’s time for dinner and I think I’ll just wait till tomorrow on this. And I was thinking that running my tiddlers in node.js was just going to be too much work so I stayed with single files…

Try to delete the tiddlers as said previously, if it fails you can try to update your wiki, if it still doesnt work you can try to follow the steps here : Tips & Tricks to salvage tiddlers from a corrupted single file TiddlyWiki

If your wiki is online and you cant download an offline copy, you can create a tiddler (alt+N) and write {{$:/snippets/download-wiki-button}} to get a download button.

I can do it for you if you want, feel free to send me you tiddlywiki file ; my inbox is open. Good luck !

2 Likes

This is a good solution and it make sense to have its own thread under tips and tricks.