FramedLinksPlugin - keeping the configuration persistent

89 views
Skip to first unread message

Simon

unread,
Aug 2, 2012, 4:03:37 PM8/2/12
to tiddl...@googlegroups.com
Probably a silly question. If a tiddlywiki with the FramedLinksPlugin is on my desktop, I can tick (check) the "display inline frames for all external links" box. If I upload the tiddlywiki to a server, how can I ensure this box stays ticked when other people acces the page?

Simon

unread,
Aug 4, 2012, 10:48:07 AM8/4/12
to tiddl...@googlegroups.com
Er... anybody? (Question not clear enough?)

whatever

unread,
Aug 4, 2012, 10:58:43 AM8/4/12
to TiddlyWiki
Make a tiddler SystemSettings and tag it systemConfig. In it, put
this:
config.options.chkFramedLinks=true;

w

Simon

unread,
Aug 4, 2012, 11:39:03 AM8/4/12
to tiddl...@googlegroups.com
Perfect! Thank you very much.

PMario

unread,
Aug 5, 2012, 1:45:48 PM8/5/12
to TiddlyWiki
You shouldn't use SystemSettings for that. It is a reserved name that
is used to keep permanent settings, as a cookie replacement. see:
http://tiddlywiki.com/#PersistentOptions

It must not be tagged systemConfig since it is processed by the core
at startup.

Instead of SystemSettings you can use eg: zzConfig and tag it
systemConfig.

-m

Eric Shulman

unread,
Aug 5, 2012, 2:56:35 PM8/5/12
to TiddlyWiki
As PMario noted, [[SystemSettings]] is a special name, used by the
TWCore to automatically store persistent option settings, so you
should not use it as a 'plugin' (i.e., a tiddler tagged with
"systemConfig", containing javascript code).

However, rather than using the old 'zzConfig' convention to initialize
the internal option value for FramedLinksPlugin, you *CAN* use the
SystemSettings tiddler, in the way it is intended.... simply write:

chkFramedLinks: true

Then, during startup processing, the TWCore will read the
SystemSettings and automatically perform the assignment:
config.options.chkFramedLinks=true
(i.e., the same action as the old 'plugin initialization' approach).

enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios

HELP ME TO HELP YOU - MAKE A CONTRIBUTION TO MY "TIP JAR"...
http://www.TiddlyTools.com/#Donations

Professional TiddlyWiki Consulting Services...
Analysis, Design, and Custom Solutions:
http://www.TiddlyTools.com/#Contact

PMario

unread,
Aug 5, 2012, 7:10:58 PM8/5/12
to TiddlyWiki
On Aug 5, 8:56 pm, Eric Shulman <elsdes...@gmail.com> wrote:
> However, rather than using the old 'zzConfig' convention to initialize
> the internal option value for FramedLinksPlugin, you *CAN* use the
> SystemSettings tiddler, in the way it is intended.... simply write:
>
> chkFramedLinks: true

There actually is a difference between zzConfig (plugin) and
SystemSettings.

The zzConfig line
config.options.chkFramedLinks=true;
will set the variable to true, everytime the TW is loaded. If you
change the setting by unchecking the option in the backstage, it will
be set the next time you reload the TW.

If you use SystemSettings and uncheck the option, the TW core will
update the SystemSettings tiddler. If you save your TW and reload, it
will reflect the last active setting, which is quite a different
usecase.

-m

Eric Shulman

unread,
Aug 5, 2012, 10:18:54 PM8/5/12
to TiddlyWiki
> If you use SystemSettings and uncheck the option, the TW core will
> update the SystemSettings tiddler. If you save your TW and reload, it
> will reflect the last active setting, which is quite a different
> usecase.

In the OP, Simon wrote:
> If I upload the tiddlywiki to a server, how can I ensure this
> box stays ticked when other people acces the page?

Given this specific question, I have assumed that Simon intends the
online copy of the document to be for viewing, not editing (i.e., read-
only -- which is, of course, the default when viewing via http://).
In addition, as long as an <<option chkFramedLinks>> checkbox is not
embedded somewhere that a reader can click on, the value of the
setting is not going to change. Thus, using SystemSettings for
'permanent' read-only option values will work as desired when the
document is posted online.

-e

Simon

unread,
Aug 6, 2012, 8:52:33 AM8/6/12
to tiddl...@googlegroups.com
Actually, I tried Eric's solution and couldn't get it to work - the web page still opened in a new tab or window.

Using zzConfig works OK.

Simon

unread,
Aug 6, 2012, 9:13:05 AM8/6/12
to tiddl...@googlegroups.com
Apologies to Eric - the reason it didn't work was that I created a tiddler called SystemSettings, instead of using the one that was inbuilt. Now that I've found that and entered his code, it works fine.

PMario

unread,
Aug 6, 2012, 9:17:01 AM8/6/12
to TiddlyWiki
On Aug 6, 2:52 pm, Simon <simonba...@gmail.com> wrote:
> Actually, I tried Eric's solution and couldn't get it to work - the web
> page still opened in a new tab or window.
>
> Using zzConfig works OK.

SystemSettings should work too, if it contains
chkFramedLinks: true

The tag systemConfig __needs__ to be removed. But as I wrote. the core
will update this value. So if you change it and upload your TW it will
contain your actual value as the default.

-m
Reply all
Reply to author
Forward
0 new messages