UploadTiddler on demand from Form

5 views
Skip to first unread message

c.skye

unread,
Sep 27, 2008, 3:06:54 PM9/27/08
to TiddlyWiki
Hi again

Within my education package I have a TW that I am devloping that acts
as a learning journal, simple note taking system, GTD, emailer...and
updates entries to a common bibliography.

So, most of these activities are completly client-side (in my case
student-side ie sits on their course pendrive and does not need to be
uploaded to the server). However some parts are shared works, so
sometimes I want to upload a new tiddler (and not the whole TW) to the
server-side TW.

UploadTiddlerPlugin lets me upload a tiddler from the local
system...my challenge is how to turn this facility on and off as I
need to. Normally I would simply use a short script to toggle the
parameter "chkUploadTiddlerFromFile".

Now, for the bibliography I am using a simple html form. So
"newTiddler" button is actually

{{{<<newTiddler label:"livro ou jornal" text:{{"<<formTiddler
[[NewBookTemplate]]>" + ">"}} tag:"livro" tag:"biblioteca">><<icon
New.ico 25 25>>}}}

(the icon stuff is just because I prefer the buttons to be graphical
rather than text - very handy when consistantly working in two
different languages!)

So, the new tiddler botton opens a tiddler where students type in the
book title, then they hit "done" and the form opens up, they fill in
the author, publisher....information and hit close. The information is
stored locally!.

The problem is that UploadTiddler is set to upload the information on
"done" - ie exiting edit mode -which is before they have entered the
bulk of the information into the form. I want to upload this new
tiddler from within View mode!

My thinking is to use TaggedTemplatePlugin (which is installed anyway)
to put an extra button in the tool bar for tiddlers that are tagged
with "bibliography". I can put {{{<<upload>>}}} in the toolbar.but
that uploads the whole TW, not just the new tiddler.

So, at last, my request...what I need is the code for a simple macro
(maybe called "uploadbiblio") which sets the parameter
"chkUploadTiddlerFromFile" to "true" and then activates the
UploadTiddlerPlugin (which is normally activiated by closing the edit
mode). And ideally then resets chkUploadTiddlerFromFile to false again
(so that all future tiddlers arent uploaded!!!!

Can someone help me with this macro...or suggest a better solution!!

Thanks
Skye

BidiX

unread,
Sep 30, 2008, 5:37:59 PM9/30/08
to Tiddl...@googlegroups.com
Hi Skye,

2008/9/27 c.skye <sk...@ipcp.org.br>

So, at last, my request...what I need is the code for a simple macro
[...]
I've just wrote UploadTiddlerMacro. 

This macro simply force chkUploadTiddler to true, call UploadTiddlerPlugin and restore the previous chkUploadTiddler.

Usage:
<<uploadTiddler [tiddlerTitle]>>
    tiddlerTitle: if omitted the title of the current tiddler


Enjoy UploadTiddlerMacro and UploadTiddlerPlugin,

-- BidiX 
http://BidiX.info
Reply all
Reply to author
Forward
0 new messages