[Pmwiki-users] Re: Author in HandlePosts
Christian Ridderström
chr
Fri Feb 20 07:10:22 CST 2004
On Fri, 20 Feb 2004, Patrick R. Michaud wrote:
> On Fri, Feb 20, 2004 at 10:42:11AM +0100, Christian Ridderstr?m wrote:
> > I'm trying to modify pmwiki-mode so that it can specify the name of the
> > author who posted the change, but it doesn't seem to work when I simply
> > add e.g.:
> > author=chr
> > to the posted data.
> >
> > Looking at pmwiki.php and HandlePost() doesn't make me any wiser either...
> > it seems that $Author just appears... (I looked at beta17). What is going
> > on here?
>
> The setting of $Author and other variables is handled by scripts/author.php.
> This is set up as an external module so that it's possible for future
> extensions to get the author name from a different source-- e.g. an
> external authenticator or a username+password system.
>
> But you should be able to just add author=name to the posted data--I've
> done this with pmwe a few times and it works. So there must be something
> else going on that is preventing it from appearing on your system. Note
> that author.php only accepts an author setting from a
> <form method='POST' ...>, it won't accept it from method='GET' or parameters
> in the URI.
Well, I'm using an Emacs package called http-post, and the description
says: " Use `http-post' to post to a URL." so I think I'm doing a post.
I tried simply adding 'author=name' to the data but the result was an
empty name on wiki, i.e. I got {{}}. This was a different from when I
didn't have 'author=name', so something happens.
I'm afraid I don't really know how http-post works :-( checking into
what's actually sent, I have these "headers"
Content-Type: application/x-www-form-urlencoded; charset=ISO-8859-1
Content-Length: 6598
And a body like this:
text=<lots of encoded text>
&author=chr
&diffclass=
&action=post
&pagename=EmacsModes%2eChangeLog
Do you have an idea of how I could test if this 'body' is sent using
'post' or 'get'?
For instance, is it correct that $HTTP_POST_VARS only will contain
'posted' key/value-pairs, whereas $HTTP_GET_VARS only will contain things
through get?
And how do you extract key/value pairs that are passed through the URI?
/Christian
--
Christian Ridderstr?m http://www.md.kth.se/~chr
More information about the pmwiki-users
mailing list