TiddlyHost: Omitting username

Hello all. I have little, but frustrating problem. I am using TiddlyHost and everytime I load wiki, my username in TW is username from TiddlyHost. Can I ommit automatically fill username from server and can I persistently enter username for signing changes and for creator and modifier fields?

So, may be stupid question, but, is there any way to persistently store $:/status/UserName betwenn sessions?

You can create a startupaction for that:

<$action-setfield $tiddler="$:/status/UserName" text=“My custom username”/>

In a tiddler with the tag “$:/tags/StartupAction”

3 Likes

Many thanks, it works partially, but not solving my situation, because this change changes wiki file and public anonymous user must manually confirm leaving wiki page. So, yes, this is one solution, but not ideal.

I mean that is any solution for persistent (without changes between sessions). If it is not able, then your solution will be usefull.

Ah so your wiki is editable by other users too ! Then you need to use the BrowserStorage Plugin: https://tiddlywiki.com/#BrowserStorage%20Plugin

Demo: https://browser-storage-demo.tiddlyhost.com

EDIT: I misunderstood your comment, you meant that the startupaction was triggering a dirty state for the wiki, however luckily the browser storage addon doesnt have that issue :slight_smile:

EDIT2: Correction: it will trigger a dirty state but only for you, try opening the demo in private mode and you will see that the save button is not red.

EDIT3: Another solution is to use a startupaction + a test to see if you are logged in or not, but this is less flexible. If you want only one username to be saved this could be fine.

Change the startupaction to this:

<$list filter="[{$:/status/IsLoggedIn}match[yes]]">
<$action-setfield $tiddler="$:/status/UserName" text=“My custom username”/>
</$list>

You can also modify the filter that trigger the dirty state to ignore the username : in $:/config/SaverFilter, write


[all[]] -[prefix[$:/HistoryList]] -[prefix[$:/StoryList]] -[status[pending]plugin-type[import]] -[[$:/isEncrypted]] -[[$:/UploadName]] -[prefix[$:/state/]] -[prefix[$:/temp/]] 

-[[$:/status/UserName]]

This was supposed to be a feature. It was added along with #189 which sets $:/status/IsLoggedIn to provide a way for sites to indicate if you’re logged in. From your post I can see that setting the $:/status/UserName as well was a bad idea. I’ll remove it.

4 Likes