MPTW tweaks for online version??

6 views
Skip to first unread message

johannes

unread,
Mar 22, 2009, 9:20:57 PM3/22/09
to TiddlyWiki
i am a newbie tiddlywiki user so i apologize once again for my
ignorance.

i am using MPTW (which i love!) but...

i would like to remove the theme choosing option and just set one of
the themes as the default setting

and also have the tabs set to "off" as default so visitors to my site
don't see the list of tiddlers and i would like to remove the
interface options and the backstage button from the online site as
well

any suggestions gratefully received...
:)

johannes

unread,
Mar 23, 2009, 12:31:00 AM3/23/09
to TiddlyWiki
i have managed to figure out how set one of the themes as default so
that solves that problem
but i am very confused about how to make the thing behave in a
different way online than it does offline. it seems to ignore the
"hide edit features" preference setting when i place the file online!
see here
http://truthbeauty.info/v3/
as always any help much appreciated etc
:)

Ken Girard

unread,
Mar 23, 2009, 12:44:50 AM3/23/09
to TiddlyWiki
You have conflicting lines in MptwConfigPlugin &
zzMptwUserConfigPlugin

config.options.chkHttpReadOnly = true;
var originalReadOnly = readOnly;

in one of them and

config.options.chkHttpReadOnly = false;
readOnly = false;

in the other one

Ken Girard

On Mar 22, 11:31 pm, johannes <johann...@gmail.com> wrote:
> i have managed to figure out how set one of the themes as default so
> that solves that problem
> but i am very confused about how to make the thing behave in a
> different way online than it does offline. it seems to ignore the
> "hide edit features" preference setting when i place the file online!
> see herehttp://truthbeauty.info/v3/

Alex Hough

unread,
Mar 23, 2009, 3:40:13 AM3/23/09
to Tiddl...@googlegroups.com
Off topic comment on http://truthbeauty.info/v3/ :

"Borges and TaggyTagging - a natural combination!"

Alex

johannes

unread,
Mar 25, 2009, 6:27:05 AM3/25/09
to TiddlyWiki
@alex
:)
if only i had known about tiddlywiki when i wrote my phd!

@ken or anyone (help!)
i am thoroughly confused now.
i set
config.options.chkHttpReadOnly = true;
readOnly = true;
and now i can't edit the file anymore offline or online!

how does tw know when the file is being viewed online and where do i
put the arguments that depend on it?
is this documented somewhere obvious?
can someone point me to the documentation or explain it?
as always i appreciate the help?
:|

On Mar 23, 6:40 pm, Alex Hough <r.a.ho...@googlemail.com> wrote:
> Off topic comment onhttp://truthbeauty.info/v3/:

Eric Shulman

unread,
Mar 25, 2009, 6:44:46 AM3/25/09
to TiddlyWiki
> @ken or anyone (help!)
> i am thoroughly confused now.
> i set
> config.options.chkHttpReadOnly = true;
> readOnly = true;
> and now i can't edit the file anymore offline or online!

First, in order to fix your document, you need to bypass the tiddler
in which you set the above. To do this, open a *local* copy of the
document in 'safe' mode by adding
#start:safe
to the end of the URL and reloading the page.

Next, go to the tiddler with your errant settings, and change this:
readOnly = true;
to this:
readOnly = (document.location.protocol!='file:');

Save-and-reload... you should now be able to edit the document
normally again.

Note: instead of looking for "file:", you could set/clear the readOnly
flag for a specific TW username... like this:
readOnly = (config.options.txtUserName!='JohannesK');

This way, regardless of whether you are online or offline, *you* will
always be able to edit the document, while everyone else will always
get a readOnly rendering (unless, of course, they set *their* username
to 'JohannesK').

enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios

johannes

unread,
Mar 27, 2009, 12:30:23 AM3/27/09
to TiddlyWiki
omg
that is brilliant.
you are a genius.
thanks so much for the help!
i even managed to figure out how to use the same variable to determine
the visibility of the backstage link/options
:)

would it be possible to set the visibility of "options" and the list
of tiddlers in the sidebar the same way??

thanks again!

alex

unread,
Apr 7, 2009, 4:08:44 PM4/7/09
to TiddlyWiki

> would it be possible to set the visibility of "options" and the list
> of tiddlers in the sidebar the same way??

Yes!

Ingredients
-----------

1) Simon's hideWhen Plugin - http://mptw.tiddlyspot.com/#HideWhenPlugin
2) to edit your PageTemplate

Method
------

1) to any <div> you want to hide add this.

macro="hideWhen readOnly"

So for he ones you want to hide sidebar, your PageTemplate would
include these lines ;

<div macro="hideWhen readOnly" id='sidebarOptions' refresh='content'
tiddler='SideBarOptions'></div>
<div macro="hideWhen readOnly" id='sidebarTabs' refresh='content'
force='true' tiddler='SideBarTabs'></div>

> thanks again!

Thanks. This thread was just what I was looking for.

Alex
ps.
I really like Eric's
readOnly = (document.location.protocol!='file:');
It also looks like hideWhen and showWhen are really powerful
thingies. Looking forward to a fET craze on them
Reply all
Reply to author
Forward
0 new messages