The parameter 'id' can (and should be) be omitted. Only use it if
you're trying to modify a tiddler that you obtained from this ZW
instance and already have its id.
> Get:
>
> - http://doc.tiddlywiki.org/?action=get&id=TiddlyDoc
>
> Information needed:
>
> 1. what kind of feedback does ZW provide in response to the Post
> requests? Some kind of error/status codes are needed to indicate whether the
> tiddler was saved or not.
It returns a redirect to a 'get' request. (which will be followed by
the browser) So the response you will see is the same as a regular
'get' request.
> 2. what happens if I Post a tiddler that already exists, will it be
> overwritten?
Yes. There is a history mechanism however, so this can in principle be
undone. (Can't be undone through TW right now -- but I plan to add
that)
> 3. Is there any possibility someone could provide a test ZW for me to
> use to help get this working? I dont have access to a server to set one up.
> (Preferrably a version that doesnt ahve the zope-specific-id requirement.
I have created one for you here:
http://ziddlywiki.com/TiddlySnip
this is based on the new unreleased 2.1 branch of ZiddlyWiki, and may be
unstable. Please report any bugs you find... If you don't have a login
you can create one here:
http://ziddlywiki.com/cookie_auth/signup
> 4. Anyone willing and able to get me started on the right direction
> regarding Http basis authentication when doing POSTS ?
I don't know about this...it may work "automatically" -- just try the
POST and the user should be presented with the auth dialog. Note that
the above site uses cookie-based auth rather than HTTP Basic.
> ccTiddly
> first off, thanks for the test site CoolCold!
> Post requests:
>
> - url: http://members.lycos.co.uk/cctiddly/TiddlySnip/msghandle.php
> - action: TiddlySnip
> - title: tiddler title
> - body: tiddler body
> - tags: tiddler tags
> - user: username
> - password: password in plain text
> - overwrite: required to specify overwrite
I would really like to unify this, so TiddlySnip doesn't have to care
about which kind of server it's talking to. Can ccTiddly use HTTP or
cookie auth (which would remove user/password)? 'action' seems
superfluous, as this action should be identical to a save, no? And
lastly, do we really need 'overwrite'? I'm willing to consider
it...convince me.
> Error/Status codes:
>
> - 001: tiddler added to store (success)
> - 002: tiddler already exists
> - 003: invalid username and password (not used)
> - 004: no privilege
> - 005: unknown error
I do not understand the need for these error messages. 001 and 002
should be the same, if 002 overwrites the tiddler, which (at least for
ZW) isn't an irreversible error. Note the 200 (OK) and 201 (Created)
HTTP response codes.
003 and 004 should return a HTTP 401 or 403 (unauthorized) error.
And I don't know why 005 should exist. ;) But I suspect returning an
HTTP 550 Internal Server Error is a better idea.
> Information needed:
>
> 1. Does ccT need arguments for tiddler created and tiddler modified?
> 2. can ccT provide the ability to get single tiddlers like ZW does?
> (http://doc.tiddlywiki.org/?action=get&id=TiddlyDoc
> )
>
> And for both ZW and ccT, will the serversides support the upcoming extended
> fields feature being introduced in TW 2.1? I am asking because some future
> features that we have planned for TiddlySnip will be based on this.
Ummm...maybe. How exactly are fields stored? How do you expect server
sides to deal with them? I thought this was to do with tiddler slicing,
in which case the content is part of the tiddler text itself, and
doesn't need to be replicated again.
I have actually used a field for the "revisionKey" which tracks
revision/undo. But the use of fields is not general. (yet)
--
Cheers,
Bob McElrath [Univ. of California at Davis, Department of Physics]
Somewhere, something incredible is waiting to be known. - Carl Sagan
> 3. Is there any possibility someone could provide a test ZW for me to
> use to help get this working? I dont have access to a server to set one up.
> (Preferrably a version that doesnt ahve the zope-specific-id requirement.
I have created one for you here:
http://ziddlywiki.com/TiddlySnip
this is based on the new unreleased 2.1 branch of ZiddlyWiki, and may be
unstable. Please report any bugs you find... If you don't have a login
you can create one here:
http://ziddlywiki.com/cookie_auth/signup
> 4. Anyone willing and able to get me started on the right direction
> regarding Http basis authentication when doing POSTS ?
I don't know about this...it may work "automatically" -- just try the
POST and the user should be presented with the auth dialog. Note that
the above site uses cookie-based auth rather than HTTP Basic.
> ccTiddly
> first off, thanks for the test site CoolCold!
> Post requests:
>
> - url: http://members.lycos.co.uk/cctiddly/TiddlySnip/msghandle.php
> - action: TiddlySnip
> - title: tiddler title
> - body: tiddler body
> - tags: tiddler tags
> - user: username
> - password: password in plain text
> - overwrite: required to specify overwrite
I would really like to unify this, so TiddlySnip doesn't have to care
about which kind of server it's talking to.
Can ccTiddly use HTTP or
cookie auth (which would remove user/password)? 'action' seems
superfluous, as this action should be identical to a save, no? And
lastly, do we really need 'overwrite'? I'm willing to consider
it...convince me.
> Error/Status codes:
>
> - 001: tiddler added to store (success)
> - 002: tiddler already exists
> - 003: invalid username and password (not used)
> - 004: no privilege
> - 005: unknown error
I do not understand the need for these error messages. 001 and 002
should be the same, if 002 overwrites the tiddler, which (at least for
ZW) isn't an irreversible error. Note the 200 (OK) and 201 (Created)
HTTP response codes.
003 and 004 should return a HTTP 401 or 403 (unauthorized) error.
And I don't know why 005 should exist. ;) But I suspect returning an
HTTP 550 Internal Server Error is a better idea.
> And for both ZW and ccT, will the serversides support the upcoming extended
> fields feature being introduced in TW 2.1? I am asking because some future
> features that we have planned for TiddlySnip will be based on this.
Ummm...maybe. How exactly are fields stored? How do you expect server
sides to deal with them? I thought this was to do with tiddler slicing,
in which case the content is part of the tiddler text itself, and
doesn't need to be replicated again.
<div tiddler= "Force refresh when loading new url?" modifier="Saq" modified= "200609032033" created="200609032033" tags="TiddlySnip " tsnip.url="http://forums.mozillazine.org/" tsnip.title ="Force" tsnip.category="default">var newTab </div>Note the tsnip attributes, these are extended fields.
Tiddler fields are not valid XML. Isn't that a problem? I thought we
were heading toward XML not away from it.
In my mind to store data this way is really abusing an unexpected
behavior of browsers, and that behavior might go away...
What ever happened with the XHTML compliant store? How will it store
tiddler fields, and are we going to transition to an XHTML compliant
store?
Saq Imtiaz [lew...@gmail.com] wrote:
> Tiddler slices are as you mentioned, part of the tiddler text. Tiddler
> fields are extended data fields similar to the tiddler.tags and
> tiddler.title. They are saved as attributes of the tiddler div in a regular
> TW.
> Eg:
>
> <div tiddler="Force refresh when loading new url?" modifier="Saq"
> modified="200609032033" created="200609032033" tags="TiddlySnip "
> tsnip.url="http://forums.mozillazine.org/" tsnip.title="Force"
> tsnip.category="default">var newTab </div>
>
> Note the tsnip attributes, these are extended fields.
> With TiddlySnip we plan to use these to track where 'snippet's were saved
> from, as there is a tentative idea to pull data in the other direction in a
> future version. That is, when you view a webpage that you saved a snippet
> from, the snippet will be shown overlayed over the page in a resizable,
> moveable and editable div. Very tentative idea though.
>
> But regarding extended fields in general, I have a strong feeling a LOT of
> future plugins will be using them, so thats a pretty good reason to try and
> support them.
Ok I'll keep this in mind.
Forgive me for coming late to the 'tiddler fields' discussion...
Tiddler fields are not valid XML. Isn't that a problem? I thought we
were heading toward XML not away from it.
In my mind to store data this way is really abusing an unexpected
behavior of browsers, and that behavior might go away...
What ever happened with the XHTML compliant store? How will it store
tiddler fields, and are we going to transition to an XHTML compliant
store?
Saq Imtiaz [lew...@gmail.com] wrote:
> Tiddler slices are as you mentioned, part of the tiddler text. Tiddler
> fields are extended data fields similar to the tiddler.tags and
> tiddler.title. They are saved as attributes of the tiddler div in a regular
> TW.
> Eg:
>
> <div tiddler="Force refresh when loading new url?" modifier="Saq"
> modified="200609032033" created="200609032033" tags="TiddlySnip "
> tsnip.url="http://forums.mozillazine.org/" tsnip.title="Force"
> tsnip.category="default">var newTab </div>
>
> Note the tsnip attributes, these are extended fields.
> With TiddlySnip we plan to use these to track where 'snippet's were saved
> from, as there is a tentative idea to pull data in the other direction in a
> future version. That is, when you view a webpage that you saved a snippet
> from, the snippet will be shown overlayed over the page in a resizable,
> moveable and editable div. Very tentative idea though.
>
> But regarding extended fields in general, I have a strong feeling a LOT of
> future plugins will be using them, so thats a pretty good reason to try and
> support them.
Ok I'll keep this in mind.
--
Cheers,
Bob McElrath [Univ. of California at Davis, Department of Physics]
Somewhere, something incredible is waiting to be known. - Carl Sagan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
iD8DBQFFCkWCjwioWRGe9K0RAjsTAKDZvjQHaF7HyJ1ma3cxfXqJ/Le0HACg52Pj
o0sjOvVPUtQOWNVO0j+V95k=
=SC0g
-----END PGP SIGNATURE-----
Tiddler fields are not valid XML. Isn't that a problem? I thought we were heading toward XML not away from it.
What ever happened with the XHTML compliant store? How will it store tiddler fields, and are we going to transition to an XHTML compliant store?
<div title="SampleTitle"> <pre title="title">SampleTitle</pre> <pre title="text">SampleText</pre> <pre title="modifier">UdoBorkowski</pre> <pre title="modified">200609150639</pre> <pre title="created">200609011146</pre> <pre title="tags">SampleTag1 SampleTag2</pre> </div>
For one, the store could be processed with standard XML tools.
For two, I can put MathML and SVG in my tiddlywiki.
And for three, abusing browser bugs to create features is a recipe for
future disasters, when one browser decides to suddenly stop honoring
random attributes. (But, if some spec says these attributes are
required to be made available in the DOM, I'd be interested...)
<pre title="priority">3</pre>
> --~--~---------~--~----~------------~-------~--~----~
> You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" group.
> To post to this group, send email to Tiddly...@googlegroups.com
> To unsubscribe from this group, send email to TiddlyWikiDe...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/TiddlyWikiDev
> -~----------~----~----~----~------~----~------~--~---
And for three, abusing browser bugs to create features is a recipe for future disasters, when one browser decides to suddenly stop honoring random attributes.
Udo
----------
Udo Borkowski
http://www.abego-software.de
Oh and doing fields this way lets one name their tiddler fields in Korean.
Sorry for late reply. Answers below
> Information needed:
>
> 1. Does ccT need arguments for tiddler created and tiddler modified?
ccT don't need these two arguement. I can take both though, just a line
of code change really.
> 2. can ccT provide the ability to get single tiddlers like ZW does?
> (http://doc.tiddlywiki.org/?action=get&id=TiddlyDoc
> )
Not implemented yet. Would you like it in regular TW form with a single
div in the storeArea? Or just the requested tiddler in div form?
>
> And for both ZW and ccT, will the serversides support the upcoming extended
> fields feature being introduced in TW 2.1? I am asking because some future
> features that we have planned for TiddlySnip will be based on this.
I actually have not played with TW 2.1 yet so there won't be support
for those at the moment.
> 'action' seems
>superfluous, as this action should be identical to a save, no?
Well, yes and no. They are mostly identical except overwrite and user
validation part
>And
>lastly, do we really need 'overwrite'? I'm willing to consider
>it...convince me.
I can default the action to append if you want to strip it. I used that
because there is a scenerio where the user can't read the tiddler but
are allow to insert/edit it. So there could be problem in that case.
Not that it would definitely happen (given this is a pretty weird
scenerio) but the system currently allows this kind of flexibility.
>005, I'm not sure about either, I think CoolCold added that as a second thought.
This is added as a kind of reserve. I have only use this as an error
catch and I also don't know about ZW's error code.
>> 2. what happens if I Post a tiddler that already exists, will it be
>> overwritten?
>Yes. There is a history mechanism however, so this can in principle be
>undone. (Can't be undone through TW right now -- but I plan to add
>that)
It may not be so bad for ZW since the history is show right on top of
the tiddler and the user can check quite quickly. Unfortunately, ccT is
not that advance yet and have to visit a different url for previous
history. The user might not know that a tiddler have been overwritten
and data is lost unnoticed.
So I don't mind dropping error code and use header instead. I do prefer
to have the overwrite variable though so the user is notified when a
tiddler can't be overwritten.
Hi guys,
Sorry for late reply. Answers below
> Information needed:
>
> 1. Does ccT need arguments for tiddler created and tiddler modified?
ccT don't need these two arguement. I can take both though, just a line
of code change really.
> 2. can ccT provide the ability to get single tiddlers like ZW does?
> (http://doc.tiddlywiki.org/?action=get&id=TiddlyDoc
> )
Not implemented yet. Would you like it in regular TW form with a single
div in the storeArea? Or just the requested tiddler in div form?
>> 2. what happens if I Post a tiddler that already exists, will it be
>> overwritten?
>Yes. There is a history mechanism however, so this can in principle be
>undone. (Can't be undone through TW right now -- but I plan to add
>that)
It may not be so bad for ZW since the history is show right on top of
the tiddler and the user can check quite quickly. Unfortunately, ccT is
not that advance yet and have to visit a different url for previous
history. The user might not know that a tiddler have been overwritten
and data is lost unnoticed.
So I don't mind dropping error code and use header instead. I do prefer
to have the overwrite variable though so the user is notified when a
tiddler can't be overwritten.
File-size was part of the reason, but the main one was backwards
compatibility. The community of tools and plugins around TW is
important, and I'm always trying to minimise the impact on existing
work.
In this case, 2.1 covers the majority of the outstanding XHTML issues,
and allows people who really need XHTML compliance to get it via Udo's
plugin. In the future we may well change the default store format to
XHTML, but that will be a community-driven decision.
Cheers
Jeremy
--
Jeremy Ruston
mailto:jer...@osmosoft.com
http://www.tiddlywiki.com
>can ccT provide the ability to get single tiddlers like ZW does?
Sound like its in the form
title
body
modifier
modified
created
tag
If you want, I can put something together similar to this.
>CoolCold, if ccT can supply single tiddlers in response to Get requests, as
mentioned earlier in this thread, we wont need overwrite. You can
default to
always overwrite.
I prefer to have the overwrite variable because of
1/ user may have funny privilege system
2/ history function is not mature in ccT
I would say having a single overwrite function would do. Say
0 = not overwrite/ask for further instruction
1 = overwrite
2 = append
>PS: CoolCold, whenever you get the time to try it out, do let us know how it
went with getting cookie authorization working with ccT.
I need to have a version of TS to test this. I am using cookie to store
the login info at the moment too so the changeover should be stright
forward.
>Currently ZW requires these arguments, but ccT does not. I don't have a
>problem either way. TiddlySnip can provide these, but you guys needs to
>decide which one of you has to change. ;)
Or you can still pass it through and we can decide how to treat it ;)
Since the difference won't be huge (in a matter of seconds?), it
shouldn't be a huge issue
>can ccT provide the ability to get single tiddlers like ZW does?
Sound like its in the form
title
body
modifier
modified
created
tag
If you want, I can put something together similar to this.
>CoolCold, if ccT can supply single tiddlers in response to Get requests, as
mentioned earlier in this thread, we wont need overwrite. You can
default to
always overwrite.
I prefer to have the overwrite variable because of
1/ user may have funny privilege system
2/ history function is not mature in ccT
I would say having a single overwrite function would do. Say
0 = not overwrite/ask for further instruction
1 = overwrite
2 = append
>PS: CoolCold, whenever you get the time to try it out, do let us know how it
went with getting cookie authorization working with ccT.
I need to have a version of TS to test this. I am using cookie to store
the login info at the moment too so the changeover should be stright
forward.
Ok, im sure we can work with that. ZW will simply ignore the overwrite variable. I will however be handling the append on the clientside, as I believe ZW doesnt have this option.
TIddlySnip will then interact with ccT in this manner:
1/ do a GET to see if tiddler exists
2/ if it exists prompt user to append,rename or overwrite
3/ if user chooses to rename, POST with write=1
if the tiddler does not exist, the POST will have write=0
Is the 'write' the same as 'overwrite'? What would happen if I throw back an error saying tiddler existed? Would you give an error message of some kind?
Mainly to avoid problems when converting between various storage formats. E.g. as Bob pointed out "theoretically" it would be possible to use non-ASCII fieldnames when using the XHTML plugin. But for the standard store format the fieldname must be a valid (XML) attribute name that does not allow all UNICODE chars. If we would not restrict the possible fieldnames to a "least common denominator" it would not be possible (or at least quite hard) to convert a store from one to another format.
Why is this necessary?
Sound like its in the form title body modifier modified created tag If you want, I can put something together similar to this.
I haven't followed this discussion in detail, but just a little note:
Sound like its in the form
title
body
modifier
modified
created
tag
If you want, I can put something together similar to this.You may consider already planning to support extended fields (metadata). Therefore it would probably be a good idea to use the same names as the fieldnames in 2.1. Esp. "body" is called "text" and "tag" is called "tags".
> Regarding ZW:
> Here is the information I currently have:
> Post requests:
>
> - URL : http://your.site/etc/?action=save
> - title: tiddler title
> - body: tiddler body
> - tags: tiddler tags
> - modified: TW modification
> - created: TW
> - id: zope-specific id
- Would it all be possible to do a POST that returns all tiddler titles as an array? ZW returns something like that when the user logins in... and if we use that to check if the tiddler exists, it will save frequent trips to the server.
Something like this maybe: "?action=contents"
if(typeof zw == "undefined") var zw = {};
zw.loggedIn = true;
zw.anonEdit = false;
zw.ziddlyPath = 'http://ziddlywiki.com/TiddlySnip/index_html';
zw.isAdmin = false;
zw.latestTiddler = 115841384259;
zw.username = 'lewcid';
version.extensions.ZiddlyWiki = '4';
zw.tiddlerList = {
"GettingStarted": "872.14225.24678.51490",
"GettingStarted23": "872.14221.20626.58845",
"GettingStarted234": "872.14224.28306.14182",
"GettingStarteds": "872.14215.63862.21538",
"Test": "
872.14046.45145.26129",
};
- ccT needs to accept and save tiddlers from POSTS like:
"action=save&id=title&title=title&body=text&tags=tag&modified=modifed&created=created&overwrite=0&username=username&password=password"
It can of course ignore the id,modified and created.
- Also, as we discussed before, we need to be able to fetch single tiddlers:
"?action=get&id=title"
- Would it all be possible to do a POST that returns all tiddler titles as an array? ZW returns something like that when the user logins in... and if we use that to check if the tiddler exists, it will save frequent trips to the server.
Something like this maybe: "?action=contents"
- Regarding authentication, we should be able to get it working without the need for cookie based authentication, so you dont need to worry about that for now.
However, I am curious, does ccT have any option for logging in via a POST?
- Once you've got that working, if you could please update the test site and let me know, that would be great.
Thanks for all your help guys!
Cheers,Saq
- Would it all be possible to do a POST that returns all tiddler titles as an array? ZW returns something like that when the user logins in... and if we use that to check if the tiddler exists, it will save frequent trips to the server.
Something like this maybe: "?action=contents"How should the return be like? Should I put all tiddler titles each in a new line? or put them as variable in a script?
My thinking here in proposing "unification" is to unify the javascript
necessary to use a server-side. This could then be a ServerSidePlugin
that we could distribute, and the plugin wouldn't care whether it was
using ccT or ZW. This plugin would have the bare minimum of
functionality that CC and I would probably extend. I'm not really
proposing that ccT/ZW functionality be identical. Just that there be a
common subset.
> > 2. can ccT provide the ability to get single tiddlers like ZW does?
> > > (http://doc.tiddlywiki.org/?action=get&id=TiddlyDoc
> > > )
> > Not implemented yet. Would you like it in regular TW form with a single
> > div in the storeArea? Or just the requested tiddler in div form?
>
>
> This is probably the most important part. If we can get this working, it
> will help with the error codes and the overwrite too.
> At this time, I dont have a personal preference for the format of the
> tiddler, but it makes sense to use the same as ZW.
>
> Have a look at:
> http://www.ziddlywiki.com/doc?action=get&id=TiddlyDoc
> and compare with: http://www.ziddlywiki.com/doc
I have been thinking that the "get" function really should return a div.
The reason is that the div contains all the information in the tiddler
that I'm now essentially sending in a custom format. (modified,
modifier, etc) Plus, if it's put in a div you can also send the fields.
As things stand now I'd have to extend the format of the data sent by
the "get" method to handle fields.
So, in the near future I will change "get" to return a div. I think ccT
should probably do the same.
> > 2. can ccT provide the ability to get single tiddlers like ZW does?
> > > (http://doc.tiddlywiki.org/?action=get&id=TiddlyDoc
> > > )
> > Not implemented yet. Would you like it in regular TW form with a single
> > div in the storeArea? Or just the requested tiddler in div form?
>
>
> This is probably the most important part. If we can get this working, it
> will help with the error codes and the overwrite too.
> At this time, I dont have a personal preference for the format of the
> tiddler, but it makes sense to use the same as ZW.
>
> Have a look at:
> http://www.ziddlywiki.com/doc?action=get&id=TiddlyDoc
> and compare with: http://www.ziddlywiki.com/doc
I have been thinking that the "get" function really should return a div.
The reason is that the div contains all the information in the tiddler
that I'm now essentially sending in a custom format. (modified,
modifier, etc) Plus, if it's put in a div you can also send the fields.
As things stand now I'd have to extend the format of the data sent by
the "get" method to handle fields.
So, in the near future I will change "get" to return a div. I think ccT
should probably do the same.
Ah thanks, this is a bug and I have fixed it now.
I will make modified and created optional arguments too (they will be
set by the current time).
> - Regarding authentication, if the user is already logged in it works.
> But I plan to log the user in each time using a POST,identical to how logins
> work in ZW. It seems the most practical approach.
The username and password arguments to XMLHTTPRequest.open() you asked
about seem, as far as I can tell, to be HTTP Basic authentication. So,
this should work with ZW. I still have to sort out the HTTP Basic vs.
cookie situation. (Right now I want to keep HTTP Basic as the main
login mechanism, but that's NOT what's used at zw.com) With cookies I
can also describe for you how to create the login cookie (it's a base64
encoded username/password, I think).
As I mentioned in another mail, I think we should change this to a div
(identical to as it would appear in the store), which can contain the
extended fields.
> - Regarding authentication, if the user is already logged in it works.
> But I plan to log the user in each time using a POST,identical to how logins
> work in ZW. It seems the most practical approach.
The username and password arguments to XMLHTTPRequest.open() you asked
about seem, as far as I can tell, to be HTTP Basic authentication. So,
this should work with ZW. I still have to sort out the HTTP Basic vs.
cookie situation. (Right now I want to keep HTTP Basic as the main
login mechanism, but that's NOT what's used at zw.com) With cookies I
can also describe for you how to create the login cookie (it's a base64
encoded username/password, I think).
Yes.
That would also get rid of all the arguments to the "save" function.
http://your.site.here/?action=save
And content of the POST would then not be www-urlencoded, but the plain
text div. This would mean that TS would need to set the "created" and
"modified" fields.
> Overall, I've got things figured out on my end, and am just waiting for the
> serverside implementations to be finalized so I can tweak the code
> accordingly.
I'll be back home on Monday, perhaps later this week I can put some more
work into ZW.
> PS: the idea of a serverside plugin does sound terrific!
Good! We should have some more serious discussions in that direction.
That will work fine. Also the name and password can (and maybe should)
be omitted. Any request to the login script (as above) will trigger the
browser's HTTP Basic and show the browser's login dialog. I do send it
in case the user is using cookies, but it's ignored if the user is using
HTTP Basic. (And will always work with HTTP Basic even if the user has
cookies enabled)
> This seems to be identical to how the macro used to login from ZW, so it
> should work with cookie and HTTP Basic authentication. If that's the case,
> it might be the easiest way of handlig logins.
>
> If there is some reason we shouldnt go down that road, just let me know.
> Creating login cookies etc shouldnt be a problem.
Yes this works on zw.com, but setting up the cookie-based auth is an
extra step that I don't think most users are doing with their ZW sites.
They are all using HTTP Basic instead. I'm not sure how to set up a
test site for you that uses the usual HTTP Basic, but as soon as I
figure it out I'll do that...
Saq Imtiaz [lew...@gmail.com] wrote:
> Hey Bob, either or is fine by me. I didnt suggest a div so as to not force a
> change on your end. Though, if the get returns a div, shouldnt the POST also
> use a div in interests of some symmetry?
Yes.
That would also get rid of all the arguments to the "save" function.
http://your.site.here/?action=save
And content of the POST would then not be www-urlencoded, but the plain
text div. This would mean that TS would need to set the "created" and
"modified" fields.
Hi,
So should I return a div or the same way as ZW now?
Hi,
Done.
Hi,
Given that it's my first time to use some of the functions, I'll apologise if it is very buggy. Please let me know of any problem you've found and I'll sort it out asap.
I've forgot to include the details of variables. Here are the HTTP return result
code:
200: ok - content updated
201: created - content created
204: no content - tiddler not found
401: unauthorized - username password error
403: forbidden - no privilege
405: Method Not Allowed - error for duplicated tiddler without overwrite
406: Not Acceptable - error for empty title or body
500: Internal Server Error - unknown error
I don't know what you have decide to do with overwrite but I set it to [1 = overwrite, 2 = append]
action =
"TiddlySnip" - save
"TSgetAll" - get all tiddler title
"TSget" - get a particular title
Hi,
Try the url
http://members.lycos.co.uk/cctiddly/TiddlySnip/msghandle.php
with post variable
action=TSget&title=GettingStarted
I started to worry the adverts from lycos might render it unusable. I'll try to set one up on sf.net and email you later.
Also, for the url, is it possible to use just the site url, without the msghandle.php?
So http://members.lycos.co.uk/cctiddly/TiddlySnip/ and not http://members.lycos.co.uk/cctiddly/TiddlySnip/msghandle.php
-unfortunately, this is not possible at the moment since index.php does not handle any of the changes. Is it possible to let the user put this in as a variable when filling in the url? This would also the user to pick different config file to use since ccT support hosting multiple TW.
I'll make the changes tonight. If using index.php is really necessary, I think I can put the codes there too but the codes would look messy. I'll see what I can do with it.
CC
Since you will need the username and password for GET request, would
you like to include that in POST or GET? I personally prefer POST for
security reasons (if it would appear in some sort of history). I don't
mind to use any of them, code wise.
CC
CC