How to add "new here" to ToolbarCommands?

14 views
Skip to first unread message

Robert Mark Bram

unread,
Jul 1, 2011, 10:41:44 PM7/1/11
to tidd...@googlegroups.com
Hi All,

I have added the NewHerePlugin (http://mptw.tiddlyspot.com/#NewHerePlugin) and want to add the command to the view toolbar. How do I do this?

I tried editing ToolbarCommands to add newHere, but this does nothing:
|~ViewToolbar|+editTiddler +cloneTiddler > fields refreshTiddler changeToPublic changeToPrivate newHere revisions syncing permalink references jump closeOthers < closeTiddler|

So, how do I do this?

Do I even need the NewHerePlugin? I read somewhere else that this would do the same:  <<newTiddler ... tag:{{tiddler.title}}>> , but that just gives a button that creates a tiddler with the tag "tiddler.title".

I would like to do a similar thing in the toolbar with the QuickNote command: <<quickNote dateformat:"-YYYY0MM0DD-0hh0mm0ss" tags:"quicknote journal">>

Any clues on these three things would be most appreciated!

Rob
:)

PMario

unread,
Jul 2, 2011, 5:06:43 AM7/2/11
to TiddlyWeb
Hi Rob,
do you use a file TW or TiddlySpace?
TiddlySpace doesn't allow {{tiddler.title}} anymore, due to security
concerns.

If you have a look at the plugins source [1], you'l see it just uses
<<newTiddler..>> macro.
But as far as I know, MPTW uses it inside the MptwTheme tiddler. See
section ViewTemplateToolbar

I did a short test and included it into the ToolbarCommands tiddler.
It doesn't do anything.

-m

[1] http://mptw.tiddlyspot.com/#NewHerePlugin
[2] http://mptw.tiddlyspot.com/#MptwTheme

colmjude

unread,
Jul 2, 2011, 5:24:46 AM7/2/11
to tidd...@googlegroups.com


On Saturday, 2 July 2011 10:06:43 UTC+1, PMario wrote:
Hi Rob,
do you use a file TW or TiddlySpace?
TiddlySpace doesn't allow {{tiddler.title}} anymore, due to security
concerns.

If you have a look at the plugins source [1], you'l see it just uses
<<newTiddler..>> macro.
But as far as I know, MPTW uses it inside the MptwTheme tiddler. See
section ViewTemplateToolbar

I did a short test and included it into the ToolbarCommands tiddler.
It doesn't do anything.

The reason it does nothing is because the newHere plugin is a macro 
config.macros.newHere ...
whereas the ToolbarCommands looks for commands
config.commands.<commandName>
hence it can't find newHere when you add it to ToolbarCommands 

Colm

PMario

unread,
Jul 2, 2011, 6:28:53 AM7/2/11
to TiddlyWeb
I did a short shot at my teamwork place and created a "newTagged"
command.
That works like newHere but is a ToolbarCommand.

if you want to have a different button text, read the plugin docu :)

Feedback is very welcome !!

have fun!
Mario

[1] http://hoster.peermore.com/recipes/TeamWork/tiddlers.wiki#NewTaggedCommand

Robert Mark Bram

unread,
Jul 2, 2011, 8:21:19 PM7/2/11
to tidd...@googlegroups.com
Hi PMario,


do you use a file TW or TiddlySpace?
TiddlySpace doesn't allow {{tiddler.title}} anymore, due to security
concerns.  

Well, I do use TiddleSpace.

Rob
:) 

Robert Mark Bram

unread,
Jul 2, 2011, 8:29:49 PM7/2/11
to tidd...@googlegroups.com
Hi PMario,


I did a short shot at my teamwork place and created a "newTagged"
command.
That works like newHere but is a ToolbarCommand.

How exactly do you create a new command please? I am googling, but not finding anything useful yet.

Rob
:) 

PMario

unread,
Jul 3, 2011, 4:01:51 AM7/3/11
to TiddlyWeb
On 3 Jul., 02:29, Robert Mark Bram <robertmarkb...@gmail.com> wrote:
> How exactly do you create a new command please? I am googling, but not
> finding anything useful yet.
I posted a link to the macro in the first post :)
[1] http://hoster.peermore.com/recipes/TeamWork/tiddlers.wiki#NewTaggedCommand
-m

Robert Mark Bram

unread,
Jul 3, 2011, 9:45:14 PM7/3/11
to tidd...@googlegroups.com
Hi PMario,


> How exactly do you create a new command please? I am googling, but not
> finding anything useful yet.
I posted a link to the macro in the first post :)
[1] http://hoster.peermore.com/recipes/TeamWork/tiddlers.wiki#NewTaggedCommand
-m

Wow, thanks for that - I now have your command, and have learnt that you can add to system objects like config.commands in *any* tiddler, Javascript syntax.

One more thing then.. how do I put a nice icon there instead of the text - the icons in TiddlySpace look pretty good and I don't to mar the look now. :)

Thanks again!

Rob
:)

Robert Mark Bram

unread,
Jul 4, 2011, 12:50:24 AM7/4/11
to tidd...@googlegroups.com
Thanks for this Mario!
One more question. :)

Can that command be adapted to be a journalling one? I.e. make title include the username and time-stamp, add "journal" to the tag list?

Rob
:)

PMario

unread,
Jul 4, 2011, 4:45:39 AM7/4/11
to TiddlyWeb
On 4 Jul., 03:45, Robert Mark Bram <robertmarkb...@gmail.com> wrote:
> One more thing then.. how do I put a nice icon there instead of the text -
> the icons in TiddlySpace look pretty good and I don't to mar the look now.
> :)
just create an icon named "newTagged" (without the qoutes).
It needs to be an svg icon. TiddlySpace will handle it.

-m

PMario

unread,
Jul 4, 2011, 6:51:25 AM7/4/11
to TiddlyWeb
> One more question. :)
>
> Can that command be adapted to be a journalling one? I.e. make title include
> the username and time-stamp, add "journal" to the tag list?
A more complex ToolbarCommand isn't usefull, because it doesn't have
the flexibility you need. It would be just more complex.

Have a look at the MPTW theming [1].
See section !ViewTemplate and !ViewTemplateToolbar. Doing it this way
will give you all the flexibility, you need.

To avoid the {{..}} in the journal, just hardcode it.

newTiddler, newJournal parameters are at [2] and [3]

-m

[1] http://mptw.tiddlyspot.com/#MptwTheme
[2] http://oldwiki.tiddlywiki.org/wiki/NewTiddler_%28macro%29
[3] http://oldwiki.tiddlywiki.org/wiki/NewJournal_%28macro%29

PMario

unread,
Jul 4, 2011, 6:53:56 AM7/4/11
to TiddlyWeb
Uuups,
The icon will be a problem here :)
Needs some more thinking.

-m
... thinking, thinking ......
Reply all
Reply to author
Forward
0 new messages