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

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.

Thanks @Mohammad ! I have managed (I think) to reproduce the issue encountered by @dixonge, for now I solved it by adding a reset button to the UI :

To update simply drag and drop the title of the tiddler “$:/TiddlyTweaks/ReadOnly” inside a new wiki.
I wanted to update the ui when clicking on “hide all” but it seems like there is a timing issue with the macro, so I combined a save button with a refresh function.

I will open a thread for this solution, hopefully someone can help found a better way to solve this issue.

EDIT: Solution for hiding buttons/tabs ("read only") - contributions welcomed

1 Like

UPDATE for those reading along…

I believe that some of the problems I was experiencing were due to trying to test too many things at the same time. Fixing one thing broke another, etc. So here is my current setup which is working:

  1. Local edits served via TiddlyDesktop using all buttons/tabs as normal
  2. Local save + separate save to GitHub using @telumire 's button
  3. Read-only mode using @telumire 's setup (not the latest one with the reset button)
  4. Live version online is truly read-only w/ limited buttons/tabs as expected.

This is a very workable/desireable setup for me. In the end I will be pushing about 10-12 different sites using mostly subdomains. Sites are general, travel, art and then mostly genealogy-related.

Sorry for clogging up the main feed with all these side-issues!

1 Like

telumire, Thanks so much for this work!

Sorry I’ve been slow to come back around and acknowledge this helpful approach, and all your conscientious follow-through.

Most of my use-cases involve wanting to see edit tools whenever I’m interacting with my site (using an alternate browser if I want to do a reality-check on what web viewers will see), and wanting edit tools to be at all times unavailable to other viewers (especially for sites not directed at tw community).

So, it’s helpful not to have to remember to toggle author/reader mode after any given edit, prior to saving. So your approach is fantastic in this respect.

This thread has also gotten me to review Mohammad’s utility-plugin author tools, which (like all of the kookma toolkit) is very thorough (though I too, got briefly disoriented by instructions — check box to “exclude” things from being hidden).

In an ideal world, we’d get both of your tools to mind-meld. :slight_smile:

Meanwhile, I can imagine a role for each of these solutions, depending on user workflow.

-Springer

I have noted this! to see how better and consistent UI Utility can have!
It seems everybody assumes to have something when he/she clicks (checks) a checkbox for something!
The current implementation asks you to select (check) a checkbox if you donot want something, to exclude something.

I will work on this in summer time.

1 Like

Happy for that …

off-topic fun
TT

I think this great work, If the solution is stabilised, perhaps incorporating @telumire and @Mohammad features it would be useful to publish it. However a few more tweaks later would be useful; here are some as a suggestion.

  • Provide two “bookmarklets” the author can drag to their bookmarks that can unlock and lock the read only mode, this could even include a secret string.
  • Allow the different presentations of the wiki to be selected as read only or not eg; IP/Domain/LocalHost (any 127.x.x.x)/File and possibly even if the Local storage plugin is active, or other savers host configs eg; github, tiddlyhost…
  • Consideration of IPv6 in addition to IPv4 (Different representations of local host etc…)
  • Allow one to force read-only mode if served at a named URL eg example.com but not read-only at any other address, or other combinations.

I think “how can I hide the edit buttons when publishing” is such a common question year after year that this should be a standard feature of TiddlyWiki.

And just out of interest, Feather Wiki has this.

To see how it works:

  • Go to https://feather.wiki/ and notice it looks like a conventional web site. There are no confusing edit buttons.
  • Now visit https://feather.wiki/?page=s , which is the settings, scroll down and uncheck the “Publish” checkbox, then click the “Update” button to update the settings.
  • Now click “About” in the left nav menu, or any other page, and notice the wiki is now in full edit mode.
4 Likes

I agree one hundred percent and more :wink:
Why not have a standard feature for reader/author mode? Why we should go through those steps not easy for many end users?

Right.

Over years there have been several solutions. Some of them very sophisticated with hiding some stuff but not others.

BUT I think a CRUDE hider will suit many use cases easily.

When online hide …

1 - Right Sidebar

2 - Tiddler ViewBar Buttons.

I think part of the issue is that TW needs to help people who are “authors” first. And it is incredibly good at that.

But it probably led to under-estimations that end-users for purpose are not interested in how TW works, just want to visit a website.

NOT having things that are not needed helps a lot.

Just a comment
TT

1 Like

Yes, it should be but I think we could set some other mode handling features at the same time. I have build a working model for implementing read-only, author, designer and debug modes. In each case we want some global changes and in others we want macros to be inactive unless the associated mode is set, one way or the other.

Perhaps we should start a mode handling discussion to expand on this?

  • Developing a shared solution/plugin, including the work in this thread.
  • I would love to participate in a collaboration

that feeling when …

You search for a solution, find a potential one, go to save it to your hard drive and …

you find that you already did this before! Specifically, on July 1, the day you posted this haha

1 Like