Read only per Tiddler

17 views
Skip to first unread message

Linck Atlanta, Ga

unread,
Dec 21, 2009, 11:58:52 AM12/21/09
to TiddlyWiki
Is there a way to have some tiddlers read only while others are able
to be edited?

Mark S.

unread,
Dec 21, 2009, 2:48:29 PM12/21/09
to TiddlyWiki
I like to provide people with a bad answer, so that others will have
the incentive to jump in with the right one ;-) Its possible this
solution is not the best.

If you load TaggedTemplateTweak from tiddlytools.com, then after
saving and reloading you should be able to copy the contents of your
ViewTemplate tiddler into a tiddler readonlyViewTemplate .

In this new template, change the toolbar line, by taking the
ToolbarCommands section and replacing it with the actual contents of
TollCommands::ViewToolbar. So you might be changing this:

<div class='toolbar' macro='toolbar
[[ToolbarCommands::ViewToolbar]]'></div>

to this:

<div class='toolbar' macro='toolbar closeTiddler closeOthers
+editTiddler > fields syncing permalink references jump'></div>

What you see may depend on your TW model and version. Now delete the
+editTiddler macro command, so that that line looks like:

<div class='toolbar' macro='toolbar closeTiddler closeOthers > fields
syncing permalink references jump'></div>

By the way, if Google Groups wraps these lines, fix them.

Ok, now any tiddler that you tag with 'readonly', will not offer the
'edit' option.

If you ever have to go back and re-edit readonly tiddler, you can
temporarily rename readonlyViewTemplate to something else, edit the
tiddler, and then rename again.

HTH
Mark

StephanF

unread,
Dec 21, 2009, 5:05:32 PM12/21/09
to TiddlyWiki
Depending on why you want the tiddlers to be read only, you could put
the readonly tiddlers in a separate TW, and then 'include' them into
your main TW using http://tiddlywiki.abego-software.de/#IncludePlugin.
If you don't provide the (experimental) editing plugin, then the
included tiddlers are read-only.
The main issue would seem to be if your purpose is security you would
have to be able to put the readonly TW somewhere where your readers
can't get to it but the main TW would need to be able to see it in
order to include it. If all you want is to avoid accidental editing,
then I think this would work for you.

Stephan

Linck Schlich

unread,
Dec 21, 2009, 5:46:59 PM12/21/09
to tiddl...@googlegroups.com
Accidental editing is in fact the purpose... this works perfectly!  Thanks.

--

You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To post to this group, send email to tiddl...@googlegroups.com.
To unsubscribe from this group, send email to tiddlywiki+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/tiddlywiki?hl=en.



Eric Shulman

unread,
Dec 22, 2009, 12:02:35 AM12/22/09
to TiddlyWiki
On Dec 21, 8:58 am, "Linck Atlanta, Ga" <lschl...@gmail.com> wrote:
> Is there a way to have some tiddlers read only while others are able
> to be edited?

These plugins:
http://www.TiddlyTools.com/#TiddlerPasswordPlugin
http://www.TiddlyTools.com/#TaggedTemplateTweak
will let you define a custom [[LockedEditTemplate]] that includes
<span macro="getTiddlerPassword"></span>
to automatically prompt for a password when attempting to edit a
tiddler tagged with "locked". If the correct password is not entered,
the tiddler is closed to prevent editing.

enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios

Linck Atlanta, Ga

unread,
Dec 22, 2009, 1:00:33 PM12/22/09
to TiddlyWiki
This... even better. Thank you for your reply.

Ken Girard

unread,
Dec 22, 2009, 5:30:49 PM12/22/09
to TiddlyWiki
Even more choices:
I have several TWs I distribute at work that are intended to give
people access to information, but they have no need to edit them. So I
set about making it easy for me, but hard for them, to be able to edit
things.

First I started with a version of TW that has a top menu and the
search in the header.
Then I installed the HideWhenPlugin (http://mptw.tiddlyspot.com/
#HideWhenPlugin)
and put this into my ViewTemplate:
<div class='toolbar' macro="showWhen config.options.txtUserName ==
'KenGirard' ">
<span macro='toolbar editTiddler closeOthers closeTiddler'></
span>
</div>

<div class='toolbar' macro="showWhen config.options.txtUserName !==
'KenGirard' ">
<span macro='toolbar closeTiddler'></span>
</div>

Now if the signin name is KenGirard, I can edit, otherwise all I get
is a way to close the tiddler. Less confusion for folks.

Having gone even further in my efforts to keep accidents from
happening, I hid my sidebar like so in the PageTemplate:
<!---
<div id='sidebar'>
<div id='sidebarOptions' refresh='content'
tiddler='SideBarOptions'></div>
<div id='sidebarTabs' refresh='content' force='true'
tiddler='SideBarTabsSlider'></div>
</div>
--->

And then added the following to my systemTweak tiddler (tagged
systemConfig)
config.tasks.extraTab = {
text: "Extras",
tooltip: "Additional stuff I wanted to hide",
content: "<<tiddler contentFooter>>"
};
config.backstageTasks.push("extraTab");

The contentFooter tiddler contains:
Name:<<option txtUserName>> :: <<newTiddler>> :: <<newTiddler
label:"Add program" title:"New Program" tag:"Program" text:"Type the
description in this section">> :: SaveBackups <<option
chkSaveBackups>> :: AutoSave <<option chkAutoSave>> :: [[Tabs|
SideBarTabs]] :: [[Options|SideBarOptions]]

and can be easily accessed from the Backstage button.

I've thought that if I need to make it even less likely that anyone
might edit things, I could remove the Name:<<option txtUserName>>
section, as I can open any other TW and sign in to set the cookie for
this one.

Ken Girard

> > TiddlyTools / ELS Design Studios- Hide quoted text -
>
> - Show quoted text -

Reply all
Reply to author
Forward
0 new messages