Hi Eric > you need to force the TWCore's > internal global 'readOnly' flag to be set to true by creating a > tiddler (e.g. [[SetReadOnly]]), tagged with systemConfig, containing > this line: > > window.readOnly=true; > > When you save-and-reload the document, the [[SetReadOnly]] tiddler > will be invoked (because of the systemConfig tag) and the readOnly > flag will be set. However, this makes the document completely non- > editable for *everyone*, even *you*! To work around this, you can > enhance the above line of code like this: > > window.readOnly==(config.options.txtUserName!="MyName"); > > replacing "MyName" with *your* TW username (the one you set via > <<option txtUserName>> in the sidebar options panel). Instead of > always setting the readOnly flag to true for everyone, the above code > will set the readOnly flag *false* if the current username matches, > and *true* for everyone else.
Don't know why : window.readOnly==(config.options.txtUserName!="MyName"); did not work for me... Example: http://xn--mns-ula.dk/TW/phpFiles/backup/index.20120518.181649.html#zzConfig If I write: if (config.options.txtUserName!="UserName1") window.readOnly=true; it works! Example: http://xn--mns-ula.dk/TW/phpFiles/#zzConfig What am I doing wrong with the first line of code? - should I stick with my own solution? Cheers Måns Mårtensson -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To post to this group, send email to tiddlywiki@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.