Toggle "clean" end user and "full featured" authoring interfaces

37 views
Skip to first unread message

Hal

unread,
Dec 5, 2010, 6:07:47 PM12/5/10
to TiddlyWiki
Hi,

I’m trying to create an end-user interface that is clear of the
standard authoring elements: Full screen (no header, no sidebars, no
Backstage) and no toolbar commands visable to the user. (I’m using a
single-page mode, so there is no need for "close" as well as any of
the toolbar commands to be displayed.) Users will get to input
contributions into a note section, using Lewcid’s
TiddlerNotesPlugin.

I do want the authoring features to be available for a handful of
authors, however, so I need some way that an authorized contributor
(with no technical skills), and only an authorized contributor, can
easily trigger them to appear. I’ve assembled a variety of plugins for
toggling the sidebars and for displaying full screen, and I’ve patched
together some ways to hide the toolbar commands. But in the end I’ve
created more of a collection of diverse routines, with different
toggles, rather than a unified blend that is easy to turn on and off.

I'm looking to have the interface perform the same way regardless of
whether it is local or uploaded and run from a server.

My questions: Is there an existing theme that incorporates what I need
so I can just start from that? Or is there one plugin that toggles on
and off a variety of elements as I choose? Or can someone suggest a
way to tie what I want into one on/off toggle action that would be
easy to manage?

I have a feeling there is a solution out there, but I haven't found
it.

Thanks,
Hal

Eric Shulman

unread,
Dec 5, 2010, 6:46:11 PM12/5/10
to TiddlyWiki
> I’m trying to create an end-user interface that is clear of the
> standard authoring elements ...

> I do want the authoring features to be available for a handful of
> authors, however, so I need some way that an authorized contributor
> (with no technical skills), and only an authorized contributor, can
> easily trigger them to appear....

http://www.TiddlyTools.com/#SwitchThemePlugin
http://www.TiddlyTools.com/#TotallyTiddlers

TotallyTiddlers is a *systemTheme* that hides ALL the TiddlyWiki
elements: no headers, no sidebar/mainmenu, no tiddler titles, no
toolbars... nothing but actual tiddler content. This is also
sometimes referred to as "kiosk mode", since it can be used to create
TiddlyWiki documents that deliver interactive information to the
general public using touchscreen-based "kiosk"-style read-only
interfaces.

To apply this theme at startup, so that only specific users to have
"authoring" abilities, you can create a tiddler tagged with
systemConfig, containing something like this:

//{{{
var co=config.options; // abbrev
var authors=[ 'UserName', 'OtherUser', 'SomeoneElse', ... ];
co.txtTheme=authors.contains[co.txtUserName]?'Stylesheet':'TotallyTiddlers';
//}}}

When processed, the above code determines, based on the current
TiddlyWiki username, whether or not to apply the TotallyTiddlers theme
or to fall back to the standard "full-featured" authoring theme.

enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios

Hal

unread,
Dec 6, 2010, 1:15:27 AM12/6/10
to TiddlyWiki
Eric,

Thanks so much for your quick response--and for having already built a
solution.

For some reason, though, I can't seem to make it all work. I have
toggled everything off, but I can't get it to toggle on with an
appropriate UserName. Could I have made a mistake in the code in the
new tiddler with the systemConfig tag. I assume I need to substitute
the actual UserNames in the second line (var authors=[ 'UserName',
'OtherUser', 'SomeoneElse', ... ];), which I did. Shouldn't that
enable me to author? Do I need to do something to the third line
( co.txtTheme=authors.contains[co.txtUserName]?'Stylesheet':'TotallyTiddlers'­; )?


Thanks
Hal


On Dec 5, 6:46 pm, Eric Shulman <elsdes...@gmail.com> wrote:
> > I’m trying to create an end-user interface that is clear of the
> > standard authoring elements ...
> > I do want the authoring features to be available for a handful of
> > authors, however, so I need some way that an authorized contributor
> > (with no technical skills), and only an authorized contributor, can
> > easily trigger them to appear....
>
> http://www.TiddlyTools.com/#SwitchThemePluginhttp://www.TiddlyTools.com/#TotallyTiddlers

Måns

unread,
Dec 6, 2010, 2:39:37 AM12/6/10
to TiddlyWiki
Hi Hal

Have you tried using a paramifier to open your TW as a "trusted" user?
http:/xxxxx.com/#txtUserName:Allowed2EditUserName

Cheers Måns Mårtensson

On 6 Dec., 07:15, Hal <hchristen...@crsol.com> wrote:
> Eric,
>
> Thanks so much for your quick response--and for having already built a
> solution.
>
> For some reason, though, I can't seem to make it all work. I have
> toggled everything off, but I can't get it to toggle on with an
> appropriate UserName. Could I have made a mistake in the code in the
> new tiddler with the systemConfig tag. I assume I need to substitute
> the actual UserNames in the second line (var authors=[ 'UserName',
> 'OtherUser', 'SomeoneElse', ... ];), which I did. Shouldn't that
> enable me to author? Do I need to do something to the third line
> ( co.txtTheme=authors.contains[co.txtUserName]?'Stylesheet':'TotallyTiddlers' ­; )?
>
> Thanks
> Hal
>
> On Dec 5, 6:46 pm, Eric Shulman <elsdes...@gmail.com> wrote:
>
>
>
> > > I’m trying to create an end-user interface that is clear of the
> > > standard authoring elements ...
> > > I do want the authoring features to be available for a handful of
> > > authors, however, so I need some way that an authorized contributor
> > > (with no technical skills), and only an authorized contributor, can
> > > easily trigger them to appear....
>
> >http://www.TiddlyTools.com/#SwitchThemePluginhttp://www.TiddlyTools.c...

Måns

unread,
Dec 6, 2010, 2:45:14 AM12/6/10
to TiddlyWiki
You can switch themes and themeparameters with a paramifier as well:
file:///E:/Private/Documents/TidlyWiki/TestWiki.htm#chkRandomTheme:true
see:
https://groups.google.com/group/tiddlywiki/browse_thread/thread/a1e12d6c650561a6/4cdbde6c28abef29?hl=da&lnk=gst&q=Paramifier+txtusername#4cdbde6c28abef29
"..url/#txtTheme:TotallyTiddlers
Note: an 'option paramifier' is simply the name of some TW option,
(e.g., txtTheme, chkAnimate, txtUserName, etc.) followed by a colon
(:) and then the value to assign to that option. An option
paramifier
*temporarily* supersedes whatever option value, fi any, that is
currently stored in the browser cookies. " (Eric Shulman)

Cheers Måns Mårtensson

Seba

unread,
Dec 6, 2010, 3:07:13 AM12/6/10
to TiddlyWiki
Hi Hal and Eric,

this kind a thing would suit me too, however the same thing happened
to me as it did to Hal.
No matter what username I use, everything is toggled off.

Please advise.
regards
seba

On 6 dec., 08:45, Måns <humam...@gmail.com> wrote:
> You can switch themes and themeparameters with a paramifier as well:
> file:///E:/Private/Documents/TidlyWiki/TestWiki.htm#chkRandomTheme:true
> see:https://groups.google.com/group/tiddlywiki/browse_thread/thread/a1e12...

Hal

unread,
Dec 7, 2010, 2:53:40 PM12/7/10
to TiddlyWiki
Mans,

Thanks very much for the suggestion. I’m afraid, though, that you’ve
gone beyond my programming experience and my current understanding of
TiddlyWiki. I can install pre-built macros and plug-ins and work my
way through CSS coding, and I can follow step-by-step instructions to
make something work, but unfortunately, I’m not knowledgeable enough
to follow your suggestions or to tie it to the plugin’s Eric
suggested. Someday, perhaps, but not now.

My challenge right now, and it appears to be Seba’s as well, is to
figure out what I didn’t do—or did wrong—in implementing those
plugins. Did I miss a step or is there a step missing from the
documentation? Or do I need to create javascript here? I'm stuck. Does
anyone have any suggestions?

Thanks,
Hal
> > > > > TiddlyTools / ELS Design Studios- Hide quoted text -
>
> - Show quoted text -
Message has been deleted

PMario

unread,
Dec 7, 2010, 4:45:48 PM12/7/10
to TiddlyWiki
uups: the settings are at:

http://hal-tt.tiddlyspot.com/#zzConfig

On Dec 7, 10:44 pm, PMario <pmari...@gmail.com> wrote:
> Hi,
> There seems to be a typo  in Eric's script.
> Stylesheet .. needs to be : StyleSheet
>
> And may be:
> var authors=[ 'hal-tt', 'OtherUser', 'SomeoneElse', ... ];
> the extra ", ..."] only indicates, that there are more useres
> possible. the ", ..." are not needed.
>
> This should work
> //{{{
> var co=config.options; // abbrev
> var authors=[ 'hal-tt', 'OtherUser', 'SomeoneElse' ];
> co.txtTheme=authors.contains[co.txtUserName]?'StyleSheet':'TotallyTiddlers';
> //}}}
>
> @hal .. I created a new tw at tiddlyspot, to test the stuff.http://hal-tt.tiddlyspot.com
>
> If you open it with:http://hal-tt.tiddlyspot.com/#txtTheme:StyleSheet
> it should be also activated in edit mode.
>
> I pm you the password. You can take it over, or delete it, if you
> don't need it.
> user name is: hal-tt
>
> Username and PW have to be set in the right sidebar Options.
>
> have fun!
> mario
Message has been deleted

PMario

unread,
Dec 7, 2010, 5:04:43 PM12/7/10
to TiddlyWiki
Hi,
There seems to be a typo in Eric's script.
Stylesheet .. needs to be : StyleSheet

And may be:
var authors=[ 'hal-tt', 'OtherUser', 'SomeoneElse', ... ];
the extra ", ..."] only indicates, that there are more useres
possible. the ", ..." are not needed.

And a tricky one, that I copied the first time :)

This should work

//{{{
var co=config.options; // abbrev
var authors=[ 'hal-tt', 'OtherUser', 'SomeoneElse' ];
co.txtTheme=authors.contains(co.txtUserName)?'StyleSheet':'TotallyTiddlers';

Hal

unread,
Dec 7, 2010, 5:30:18 PM12/7/10
to TiddlyWiki
Mario,

I really appreciate your help. I still have a problem, though.

I loaded the two plugins (TotallyTiddlers, SwitchThemePlugin) and
created a tiddler tagged with systemConfig, but when I try to run the
program, the Plugin Manager tiddler appears and announces an error:
"Error: 'shy' is undefined"

I have no idea what that is referring to. Did I do something wrong?


Thanks,
Hal
> > mario- Hide quoted text -

PMario

unread,
Dec 7, 2010, 5:53:23 PM12/7/10
to TiddlyWiki
have a look at hal-tt.
TotallyTiddler needs to be tagged: systemTheme _no_ systemConfig
SwitchThemePlugin is tagged: systemConfig
zzConfig is tagged: systemConfig.

that's it.

Hal

unread,
Dec 7, 2010, 6:40:51 PM12/7/10
to TiddlyWiki
Mario,

We're getting closer I think. Thanks for bearing with me.

I think I caused the previous error somehow in cutting and pasting. My
zzConfig files seems ok now.

But my TotallyTiddler is getting an PluginManager error that says:
Error: Expected ';'
I don't see a ";" missing anywhere, but maybe I've missed it.

Also, my TotallyTiddler was automaticaly tagged as:
systemTheme CSS ThemePackage

It is now tagged as: systemTheme_no_ systemConfig CSS ThemePackage

Is that correct?

Thanks,
Hal
> > > - Show quoted text -- Hide quoted text -

PMario

unread,
Dec 8, 2010, 10:35:48 AM12/8/10
to TiddlyWiki

> It is now tagged as: systemTheme_no_ systemConfig CSS ThemePackage
systemTheme
CSS
ThemePackage

are ok.

I meant don't tag it systemConfig with "no systemConfig"

systemTheme .. makes it accessible to switchTheme macro
CSS, and ThemePackage .. are only a tags for sorting

-m

Hal

unread,
Dec 8, 2010, 1:38:35 PM12/8/10
to TiddlyWiki
Mario,

I decided to just work with the file you created on TiddlySpot rather
than fuss with the errors I was getting. That works. I thank you very
much for that.

But I began running into more problems when I download a local version
of the file. It would switch themes a few times and then it would not.
I was using IE and began to get this message after a while:

Stop running this script?
A script on this page is causing Internet Explorer to run slowly If it
continues to run, your computer might become unresponsive.

So I stopped using IE. In Firefox now, I'm having no problems so far.
So is this a known IE problem with those plugins? It seems to run OK
in TiddlySpot with IE, but not locally. That may or may not be a
problem for my intended audience down the road, depending on how I
eventually deploy it.

Again, my gratitude for your assistance.

Hal

PMario

unread,
Dec 8, 2010, 5:14:00 PM12/8/10
to TiddlyWiki
> Again, my gratitude for your assistance.
You are welcome.

> So is this a known IE problem with those plugins?
I think it depends on the IE version you are using. Only IE9 will be
fast. All other versions simply cant handle JavaScript very well. So
it's just the truth :) They are slow. But they shouldn't blame JS for
this.
-m

Seba

unread,
Dec 9, 2010, 4:46:38 PM12/9/10
to TiddlyWiki
Hi guys,

I am going bananas here:)
I've done everything PMario has advised and I also get the Plugin
Manager error for TotallyTiddlers plugin:

Error: SyntaxError: missing ; before statement

Any ideas?

regards,
seba

Måns

unread,
Dec 9, 2010, 5:21:01 PM12/9/10
to TiddlyWiki
Hi Seba

> I've done everything PMario has advised and I also get the Plugin
> Manager error for TotallyTiddlers plugin:

TotallyTiddlers isn't a plugin - it's a theme.
Remove the systemConfig tag from the TotallyTiddlers tiddler and make
sure it is tagged with "systemTheme" (without the quotes).

The plugin needed to use themes in TiddlyWiki is SwitchThemePlugin
http://www.tiddlytools.com/#SwitchThemePlugin.
Make sure the SwitchThemePlugin tiddler is tagged with
"systemConfig" (without the quotes).

Read about how to use SwitchThemePlugin here:
http://www.tiddlytools.com/#SwitchThemePluginInfo

Cheers Måns Mårtensson

Seba

unread,
Dec 9, 2010, 11:46:04 PM12/9/10
to TiddlyWiki
Hi Mans,

thank you very much, it was indeed a stupid mistake on my part.
Everything works now:)

regards
seba

On 9 dec., 23:21, Måns <humam...@gmail.com> wrote:
> Hi Seba
>
> > I've done everything PMario has advised and I also get the Plugin
> > Manager error for TotallyTiddlers plugin:
>
> TotallyTiddlers isn't a plugin - it's a theme.
> Remove the systemConfig tag from the TotallyTiddlers tiddler and make
> sure it is tagged with "systemTheme" (without the quotes).
>
> The plugin needed to use themes in TiddlyWiki is SwitchThemePluginhttp://www.tiddlytools.com/#SwitchThemePlugin.

Hal

unread,
Dec 10, 2010, 10:48:21 AM12/10/10
to TiddlyWiki
Thanks, Hans & Seba

Regards,
Hal
> > Cheers Måns Mårtensson- Hide quoted text -

Seba

unread,
Dec 12, 2010, 3:38:38 AM12/12/10
to TiddlyWiki
One more note on this....
It have to reload the page twice in order to see the changes (kiosk
mode on/off).
After I hit the reload I am prompted to enter the username (I set this
up on the pageTemplate) but the mode doesn't change. The second time
around after reloading the change is applied.

I tried it locally and over http.
Any ideas?

regards,
seba

Måns

unread,
Dec 12, 2010, 7:24:18 AM12/12/10
to TiddlyWiki
Hi Seba

I know of (at least) three ways to make TiddlyWiki startup with a
given theme:
The theme is set by a cookie in your browser.
First option is to "hardcode" the cookie to make sure that TW will
start up with a particular theme in any browser (*and when reloaded*-
no matter what changes has been made to the temporary cookie)

1) In a tiddler tagged with systemConfig write (without the outer
quotes): "config.options.txtTheme="SystemThemeTitle";"

Second option is using the addressbar of your browser for setting a
socalled paramifier (see another post in this thread):

2) In the browser's addressline write: URL/#txtTheme:SystemThemeTitle

Third option is to "hardcode" the choice of theme directly into the
Plugin itself - however it's *NOT* advisable to change code in
original plugins - as you unintentionally could spread your modded
code to a lot of people who copies your TW, and they would have
unexpected results not documented in the plugindocs at TiddlyTools. If
you hardcode changes - rename the plugin and change the slices to
reflect that *you* have made those changes - not to bother the
original author (Eric Shulman) - as he can/will not support
modifications of his original plugin code. (Which btw I think is very
understandable!!)

3) In the SwitchThemePlugin tiddler make changes to the code.... (I
wouldn't do this...)

If TotallyTiddlers is set as startup theme (option
2=config.options.txtTheme) - and you have setup usernames to open an
editable theme (ie. default) As Eric wrote (changed txtTheme to
"default"):
//{{{
var co=config.options; // abbrev
var authors=[ 'YourUserName', 'OtherUser', 'SomeoneElse', ... ];
co.txtTheme=authors.contains[co.txtUserName]?'Stylesheet':'default' ;
//}}}

then you should be able to switch to "default" by (option 1=URL/
#txtUserName:YourUserName) -

- untested -

Cheers Måns Mårtensson

Eric Shulman

unread,
Dec 12, 2010, 12:09:21 PM12/12/10
to TiddlyWiki
> It have to reload the page twice in order to see the changes (kiosk
> mode on/off).
> After I hit the reload I am prompted to enter the username (I set this
> up on the pageTemplate) but the mode doesn't change. The second time
> around after reloading the change is applied.
>
> I tried it locally and over http.
> Any ideas?

All plugins are invoked *before* the page content (i.e., PageTemplate)
is rendered. As a consequence, the systemConfig tiddler that sets the
theme, based on username, has *already been invoked* by the time the
"ask for username" prompt is triggered from the PageTemplate. Once
the username is set (and stored in a cookie), reloading the page
invokes the systemConfig tiddler again, but this time, there's a
proper username cookie value, so the conditional theme-setting code
will then work as expected.

-e


Seba

unread,
Dec 12, 2010, 1:55:37 PM12/12/10
to TiddlyWiki
Eric,

thank you for clarifying that for me.
regards,
seba
Reply all
Reply to author
Forward
0 new messages