On 4/8/06, <b class="gmail_sendername">Tegan Dowling</b> <<a href="mailto:tmdowling@gmail.com">tmdowling@gmail.com</a>> wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div style="direction: ltr;">I'm running 2.1.5. Am not using any user-based authentication scheme - just the default requirements for passwords in order to edit.<br><br>In Config.php, I have<br> $EnablePostAuthorRequired = 1;
<br>as instructed on
<a href="http://www.pmwiki.org/wiki/Cookbook/RequireAuthor" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.pmwiki.org/wiki/Cookbook/RequireAuthor</a><br><br><br>But once logged in with an edit-enabling password, I can save changes without entering an Author name.
</div></blockquote><div><br>It turns out that *either one* of two bits of code in my config.php will cause this - and don't you know *that* was fun to find!!! Can anyone suggest how to modify either of these to get it to do what I want, without also having this side-effect of disabling the RequireAuthor setting?
<br><br>1) As I said above, I'm not using any user-based authentication, but I do still want the author cookie to work for my authors, so they don't have to re-enter author name with every edit in the same session; a friend who knows some php came up with this:
<br><br> //Author cookie<br> include_once("$FarmD/scripts/author.php");<br> if($AuthId && !@$_COOKIE[$AuthorCookie]) {<br> $Author = $AuthId; setcookie($AuthorCookie,<br> $Author, $AuthorCookieExpires, $AuthorCookieDir);
<br> }<br><br></div>This keeps the author name alive for the editing session, which is really nice, but it turns out that it disables the RequireAuthor setting.<br><br>2) Switched methods of tracking Author Contributions:
<br><br>A) Used to use the old-style Author Contributions recipe, which created AuthorName pages in a Contributions wikigroup, using the recipe authorcontribution.php, which used to be downloadable from <a href="http://www.pmwiki.org/wiki/Cookbook/Authorcontribution-OldVersion">
http://www.pmwiki.org/wiki/Cookbook/Authorcontribution-OldVersion</a> (it is more complex than the 4 lines that now appear on that cookbook page, and I can forward it if anyone would find that useful) - this one didn't interfere with the RequireAuthor setting.
<br>B) Now using the new-style, which creates AuthorName-Contrib pages in the Profiles wikigroup. This one uses the authorcontrib.php recipe, which is currently downloadable from <a href="http://www.pmwiki.org/wiki/Cookbook/AuthorContribution">
http://www.pmwiki.org/wiki/Cookbook/AuthorContribution</a>. The new one is called from config.php with<br>if ($action == 'edit' || $action == 'comment') {include_once("$FarmD/cookbook/authorcontrib.php"); }<br>
<br>And this, too, will disable the RequireAuthor setting, even if I comment out the Author-Cookies thinger listed as Item 1.<br><br>I really hate to give either one of these up, so I sure hope some PHP-parsing person can spot what's wrong with them!
<br><br>Thanks so much,<br><br>Tegan<br> </div>