Prevent from enter into edit/view mode in public TW

9 views
Skip to first unread message

Amzg

unread,
Sep 11, 2008, 4:52:39 AM9/11/08
to TiddlyWiki
I've managed to prevent actual editing from visitors on a public TW,
but is there any way to simply make it impossible for them to even go
into "view" mode?
I.e "double click" causing nothing.
No "view" menu option, and actually no "more" either preferably?

BTW, I will add any (usable) replies to tw.org as a part of a
description on how to put up a public TW. This is very much needed -
it is a common question, and it is even listed as a TW-application on
the very front page of tiddlywiki.com

Thank you!

/Mat

Eric Shulman

unread,
Sep 11, 2008, 7:16:57 AM9/11/08
to TiddlyWiki


On Sep 11, 1:52 am, Amzg <matiasg...@gmail.com> wrote:
> I've managed to prevent actual editing from visitors on a public TW,
> but is there any way to simply make it impossible for them to even go
> into "view" mode?
> I.e "double click" causing nothing.
> No "view" menu option, and actually no "more" either preferably?

Edit the slice table in the shadow tiddler, [[ToolbarCommands]].

The individual slices (table rows) define the toolbar content for the
ViewTemplate and EditTemplate, respectively.

If a toolbar command is preceded by "+", it is associated with the
double-click action. By default, the ViewTemplate toolbar includes
"+editTiddler"... if you remove the "+", then no double-click action
will be performed. If you remove the entire "+editTiddler" entry in
the list, the "view/edit" menu will be omitted from the toolbar.

The "more" stuff is also defined in the same [[ToolbarCommands]] slice
table... look for a ">" symbol. When the toolbar is actually
rendered, that symbol is automatically replaced with "more", and the
rest of the commands that follow it are hidden until you click on the
"more" link. If you want to completely eliminate all of the "more"
command items, just remove the ">" and everything after it from the
appropriate slice definition in [[ToolbarCommands]].

enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios

Amzg

unread,
Sep 11, 2008, 10:37:26 PM9/11/08
to TiddlyWiki
Thank you for your informative answer!

Turns out it's a bit more complex than I expected though as I only
want the effects to take place for visitors, but not for me when I
work with it all.

As per your recommendations in another thread, I've created a
systemConfig with the the following, that works very well:

if (config.options.txtUserName!="Matias") {
config.options.chkShowRightSidebar=false;
config.options.chkSinglePageMode= true;
readOnly=true;
showBackstage=false;
}

I'm thinking that maybe something can be setup in there to activate a
special [[ToolbarCommands]] or equivalent.
Personally I could even disable/remove the toolbar completely for
visitors, i.e even no "close" command, as they see things in
singlepagemode but, as mentioned, I intend to do a general write up on
tw.org on how to create a public webpage and I realize not everyone
will want singlepagemode for visitors.

Again, thank you!

/Mat
Reply all
Reply to author
Forward
0 new messages