[Pmwiki-users] Trackauthorship at pmwiki 0.6beta1

Patrick R. Michaud pmichaud
Fri Jan 23 15:41:18 CST 2004


Thanks for the patches.  Actually, I haven't decided exactly what
approach I'll take for the final implementation of track authorship, but
this is definitely worth looking at.

Thanks again!

Pm

On Fri, Jan 23, 2004 at 11:28:42PM +0100, Franz Pf?rtsch wrote:
> Hi People,
> 
> I have work on trackothership with 0.6beta1.
> 
> I have done  the following jobs.
> 
> I fixed the pagerevision, now it is working
> I expandet the the pmwiki.php to track the author, is there no author  
> detected all Pages are writen by the Author called pmwiki.
> After this I expanded the basic authentication and the session  
> authentication
> Now you can type in the user in the authentication formular.
> 
> This was done by editing of the following files:
> 
> pmwiki.php pagrev.php sessionauth.php
> 
> Please gave me comments to my work.
> 
> I hope PM is looking at my hard work.
> 
> A lot of regard
> 
> Franz
> 
> 
> Output from diff:
> 
> --------------->sessionauth.php
> fraz at george:~/public_html> diff  
> pmwiki-0.6.beta1.org/scripts/sessionauth.php  
> pmwiki-0.6.beta1/scripts/sessionauth.php
> 13c13,15
> < SDV($SessionAuthFmt,"<b>Password required</b><p>
> ---
> > if (@$HTTP_POST_VARS['author'])
> >   $HTTP_SESSION_VARS['author'] = $HTTP_POST_VARS['author'];
> > SDV($SessionAuthFmt,"<b>Author and Password required</b><p><br>
> 15,16c17,21
> <     method='post'>Password:
> <     <input tabindex='1' type='password' name='authpw' value='' />
> ---
> >     method='post'>
> >     <table>
> >     <tr><td>Author:</td><td><input name='author' value='$author'  
> /></td></tr>
> >     <tr><td>Password:</td><td><input tabindex='1' type='password'  
> name='authpw' value='' /></td></tr>
> >     </table>
> 21c26
> <   global $GroupAttributesFmt,$DefaultPasswords,$HTTP_SESSION_VARS,
> ---
> >   global  
> $author,$GroupAttributesFmt,$DefaultPasswords,$HTTP_SESSION_VARS,
> 33a39
> >
> 35c41
> <     if (crypt($authpw,$pw)==$pw) return $page;
> ---
> >     if (crypt($authpw,$pw)==$pw) { $author =  
> $HTTP_SESSION_VARS['author']; return $page; }
> 
> --------------->pagrev.php
> fraz at george:~/public_html> diff  
> pmwiki-0.6.beta1.org/scripts/pagerev.php  
> pmwiki-0.6.beta1/scripts/pagerev.php
> 42c42
> <     if (!preg_match("/^diff:(\d+):(\d+)/",$k,$match)) continue;
> ---
> >     if (!preg_match("/^diff:(\d+):(\d+):(\S+)/",$k,$match)) continue;
> 43a44
> >     $author =  $match[3];
> 55,56c56,57
> <         $clines = ($match[3]>'') ? '$[lines]  
> '.$match[1].'-'.$match[3] :
> <           '$[line] '.$match[1];
> ---
> >         $clines = ($match[3]>'') ? '$[lines]  
> '.$match[1].'-'.$match[3].' by '.$author :
> >           '$[line] '.$match[1].' by '.$author;
> 73d73
> < #    if ($SysPatchCmd) echo "<div class='diffrestore'><a  
> href='$PageUrl?action=edit&amp;restore=$k&amp;preview=y'>Restore</a></ 
> div>";
> 
> --------------->pmwiki.php
> fraz at george:~/public_html> diff pmwiki-0.6.beta1.org/pmwiki.php  
> pmwiki-0.6.beta1/pmwiki.php
> 183a184
> > SDV($author,"pmwiki");
> 841c842
> <   global $WikiDir,$DeleteKeyWord,$RecentChanges,$HTTP_POST_VARS,$Now,
> ---
> >   global  
> $WikiDir,$DeleteKeyWord,$RecentChanges,$HTTP_POST_VARS,$Now,$author,
> 852c853
> <     { $new["diff:$Now:".$page['time']] =  
> Diff($new["text"],$page["text"]); }
> ---
> >     { $new["diff:$Now:".$page['time'].":$author"] =  
> Diff($new["text"],$page["text"]); }
> 871c872
> <     $rcpage['text'] = "* $pgname . . . . . .  
> ".strftime($TimeFmt,$Now)."\n".
> ---
> >     $rcpage['text'] = "* $pgname . . . . . .  
> ".strftime($TimeFmt,$Now). ". . - . $author"."\n".
> 888c889
> <   global  
> $HTTP_SERVER_VARS,$AuthRealmFmt,$AuthDeniedFmt,$DefaultPasswords,
> ---
> >   global  
> $HTTP_SERVER_VARS,$AuthRealmFmt,$AuthDeniedFmt,$DefaultPasswords,$author 
> ,
> 901c902,903
> <     if (@crypt($HTTP_SERVER_VARS['PHP_AUTH_PW'],$pw)==$pw) return  
> $page;
> ---
> >     if (@crypt($HTTP_SERVER_VARS['PHP_AUTH_PW'],$pw)==$pw) {
> >       $author=$HTTP_SERVER_VARS['PHP_AUTH_USER'];return $page; }
> fraz at george:~/public_html>
> 


> 
> 




> -- 
> Pmwiki-users mailing list
> Pmwiki-users at pmichaud.com
> http://pmichaud.com/mailman/listinfo/pmwiki-users_pmichaud.com




More information about the pmwiki-users mailing list