Replace Tiddler Subtitle with History Forward/Back buttons.

150 views
Skip to first unread message

Liam and Holly

unread,
Feb 11, 2012, 8:19:23 AM2/11/12
to TiddlyWiki
Hi,
I've worked out a few things like hiding the tiddler subtitle by
setting it to 'display: none' on the stylsheet, and I've got the
HistoryPlugin working and changed the buttons to say <<Back
Forward>>. But I can't seem to put it all together so that the
history buttons occupy the subtitle space (With the default subtitle
gone).

I've tried finding where the subtitle is generated so I can insert the
buttons, but I can't find this. I've also tried altering my
stylesheet to insert the buttons instead of 'display: none', but this
didn't work either. I don't actually know anything about code so I'm
just having a stab in the dark. Please answer this message in the
most simplest of terms because I'm very green at this... Cheers!

Måns

unread,
Feb 11, 2012, 5:44:36 PM2/11/12
to TiddlyWiki
Hi Liam

>  I've worked out a few things like hiding the tiddler subtitle by
> setting it to 'display: none' on the stylsheet, and I've got the
> HistoryPlugin working and changed the buttons to say <<Back
> Forward>>.  But I can't seem to put it all together so that the
> history buttons occupy the subtitle space (With the default subtitle
> gone).
>
> I've tried finding where the subtitle is generated so I can insert the
> buttons, but I can't find this.

When you say "subtitle" do you mean the SiteSubtitle or subtitles on
every tiddler?

You'll find the SiteSubtitle tiddler in the Shadow tiddlers tab in the
menu to the right...

Replace what's in the textarea - and *not* the title of the tiddler...

If you want to have the historyplugin back and forward buttons in
*every* tiddler's subtitle and not just in the Site header's subtitle,
you'll have to consult the ViewTemplate tiddler (also a shadow
tiddler)...

Cheers Måns Mårtensson

Liam and Holly Erickson

unread,
Feb 11, 2012, 7:20:03 PM2/11/12
to tiddl...@googlegroups.com
Thanks for your reply.  I do want the history buttons in each tiddler under the title so it looks like the ViewTemplate is where we're heading.  I'm guessing that I have to add <<back>><<forward>> somewhere in this shadow tiddler.  Can you please walk me through this.  I'm also anticipating that the buttons will be the same color as the removed subtitle was, but to make them noticeable I'd like them to be the same color as any other link (if possible).


--
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.


PMario

unread,
Feb 12, 2012, 4:22:47 AM2/12/12
to TiddlyWiki
It would be nice to get a link to the plugin you are talking about.
-m

Liam and Holly

unread,
Feb 12, 2012, 5:18:30 AM2/12/12
to TiddlyWiki


On Feb 12, 5:22 pm, PMario <pmari...@gmail.com> wrote:
> It would be nice to get a link to the plugin you are talking about.
> -m

Sure, You'll find the HistoryPlugin in the TW I'm building:
http://mytemplate.tiddlyspot.com/

PMario

unread,
Feb 12, 2012, 9:14:13 AM2/12/12
to TiddlyWiki
ok,
It seems you are using old versions of SinglePageModePlugin [1] and
BreadcrumbsPlugin [2]. At your tw, the header info is stripped, which
is not good, because they contain links back to the "up to date"
version and (more important) links to the documentation tiddlers.

BreadcrumbsPlugin defines a toolbar command "previousTiddler", which
will create a toolbar button "back" it can be easily included into
ToolbarCommands tiddler. (just an info)

SinglePageModePlugin (latest version) imo creates a permalink for
every tiddler, so the browser back and forward buttons can be used.
(Have a look at the plugins ..Info tiddlers)
====

HistoryPlugin is kind of redundant. The only difference to breadcrumbs
is the "forward" button.
Your ViewTemplate [3] contains:

<div class='title' macro='view title'></div>
<div class='subtitle'><span macro='view modifier link'></span>, <span
macro='view modified date'></span> (<span macro='message
views.wikified.createdPrompt'></span> <span macro='view created
date'></span>)</div>
<div class='tagging' macro='tagging'></div>

where div class='subtitle' contains the modifier ..... stuff
to add the back and forward buttons you should add

<div class='myHistory clearfix'>
<span class='backButton' macro='back'></span>
<span class='forwardButton' macro='forward'></span>
</div>

it should look similar to this afterwards:

... some more lines
<div class='title' macro='view title'></div>
<div class='subtitle'><span macro='view modifier link'></span>, <span
macro='view modified date'></span> (<span macro='message
views.wikified.createdPrompt'></span> <span macro='view created
date'></span>)</div>
<div class='myHistory clearfix'> <!--new-->
<span class='backButton' macro='back'></span>
<span class='forwardButton' macro='forward'></span>
</div> <!--end new-->
<div class='tagging' macro='tagging'></div>
... some more lines

in your StyleSheet (see:right sidebar: More:Shadowed) tiddler you'll
need (or add):

/*{{{*/
.clearfix {
display: block;
overflow: auto;
}

.backButton {
float: left;
}

.forwardButton {
float: right;
}
/*}}}*/

I did test it. It should do something similar you requested.

have fun!
-mario

[1] http://www.tiddlytools.com/#SinglePageModePlugin
[2] http://www.tiddlytools.com/#BreadcrumbsPlugin
[3] http://mytemplate.tiddlyspot.com/#ViewTemplate

On Feb 12, 11:18 am, Liam and Holly <liam.holly.erick...@gmail.com>
wrote:

Poul

unread,
Feb 12, 2012, 9:50:23 AM2/12/12
to TiddlyWiki
Beware that the ViewTemplate is not processed like normal wiki text;
it's html with some attributes that indicate macros to call to insert
the variable parts.

This means that rather than <<back>>, you would have to write <span
macro='back'></span>

On 12 Feb., 01:20, Liam and Holly Erickson
<liam.holly.erick...@gmail.com> wrote:
> Thanks for your reply.  I do want the history buttons in each tiddler under
> the title so it looks like the ViewTemplate is where we're heading.  I'm
> guessing that I have to add <<back>><<forward>> somewhere in this shadow
> tiddler.  Can you please walk me through this.  I'm also anticipating that
> the buttons will be the same color as the removed subtitle was, but to make
> them noticeable I'd like them to be the same color as any other link (if
> possible).
>
/Poul

Liam and Holly

unread,
Feb 12, 2012, 12:58:18 PM2/12/12
to TiddlyWiki


Thanks Mario and Paul!

This really helped. In fact your advice has given me a better result
than what I was originally aiming for because now that I have updated
the Plugins the history buttons on the the browser can be used (as you
pointed out).

Cheers.

Liam and Holly

unread,
Feb 12, 2012, 5:02:24 PM2/12/12
to TiddlyWiki
I must be seeing things. I'm sure the singleTiddler Permalink
fucntion was working and enabled the browser 'forward/back buttons'.
But it's not working now and I don't know why?

Also the single tiddler populates instantly, which I like, instead of
drifting into view. But I can't replicate this in my other TW's. Why
is this one instant?

Thanks.

On Feb 13, 1:58 am, Liam and Holly <liam.holly.erick...@gmail.com>
wrote:

PMario

unread,
Feb 13, 2012, 1:54:55 PM2/13/12
to TiddlyWiki
Have a look at:
http://mytemplate.tiddlyspot.com/#SinglePageModePlugin

There is an option
x Display one tiddler at a time
| x Automatically permalink current tiddler

They both need to be checked.

If you want to make them permanent you can use a eg: zzConfig tiddler
and tag is systemConfig
It should contain:

config.options.chkSinglePageMode = true;
config.options.chkSinglePagePermalink = true;


But be aware. The above will overwrite cookies set by users, after a
page reload.


At the right sidebar: Options menue ther is a
__ EnableAnimations checkbox. If it is checked you have
animations ...

have fun!
mario

Liam

unread,
Feb 13, 2012, 7:15:35 PM2/13/12
to TiddlyWiki
Thanks, this really helps, it's now doing what I wan't!

Which overwrites user cookies, the checkboxex or the zzConfig tiddler?
and excuse my ignorance, but what does it mean to overwrite user
cookies?

Also my animations box is checked but dosen't work, this checkbox does
the right thing in my other tiddlers, so I'm guessing I've damaged it
while playing around in the shadow tiddlers, perhaps the View Tiddler
while getting the forward/back buttons working.

Thanks for helping a nubee.

HansBKK

unread,
Feb 13, 2012, 9:32:03 PM2/13/12
to tiddl...@googlegroups.com
On Tuesday, February 14, 2012 7:15:35 AM UTC+7, Liam wrote:
Which overwrites user cookies, the checkboxex or the zzConfig tiddler?
and excuse my ignorance, but what does it mean to overwrite user
cookies?

TW & co plugins store their configuration data (which you change from defaults by checking boxes) in cookies.

"User cookies" in the sense that they are stored in browser X on machine Y.

Note that Eric's cookie-storage plugins will allow you to store the option data in the TW file itself rather than browser cookies, including on a per-user basis.

Setting options via directives in zzConfig is simply a way to override those choices, so if you the TW file is opened on a new machine it will follow the former rather than the cookie-stored choices if they exist. The "zz" is simply to ensure that tiddler opens last.

Liam

unread,
Feb 13, 2012, 11:04:53 PM2/13/12
to TiddlyWiki
OK, just so I understand this correctly: Does this mean that if I use
the zzConfig then the settings in zzConfig will be used regardless of
cookies on X or Y. If I use Eric's plugin I will have global control
in the sense that not just the cookie instructions in zzConfig but all
cookies from all tiddlers. Effectively the TW will then run the same
for all users (as far as cookies are concerned). Have I understood
this right? zzConfig = just those cookies, Eric's Plugin = all
cookies.

HansBKK

unread,
Feb 14, 2012, 12:08:29 AM2/14/12
to tiddl...@googlegroups.com
On Tuesday, February 14, 2012 11:04:53 AM UTC+7, Liam wrote:
if I use the zzConfig then the settings in zzConfig will be used regardless of cookies on X or Y.

Yes, but only those specific setting which you override there.
 
 If I use Eric's plugin I will have global control in the sense that not just the cookie instructions in zzConfig but all cookies from all tiddlers.  Effectively the TW will then run the same for all users (as far as cookies are concerned).  Have I understood this right?

The purpose of Eric's plugins is to contain all those settings usually stored in cookies within its tiddlers instead. There are per-user settings as well as global ones, and both can be alternatively-stored and IMO better controlled there than they would be as cookies.

However if you use both Eric's plugins and zzConfig, any settings you store there will override the former just as they do the cookie-stored ones, because they execute last.

Eric's plugins are amazingly well-documented - read the info tiddlers, download and test them out without mucking about with zzConfig first, and you'll understand fully. Then and only then, use zzConfig but only if you really need to.

Reply all
Reply to author
Forward
0 new messages