Friday, August 8, 2008, 2:36:43 PM, Vince Administration wrote: > Hans, > In setting up a Fox Forum, there is something that should be simple > that I can't make happen. > What I would like is that anyone be allowed to read, but only > registered users be allowed to post or to create new topics. > This is actually what happens, but when an unregistered user reads a > topic, the add comment form appears, and > after attempting to post, a password form is displayed. What I would > prefer is not to have the comment form at all if > the user is not registered, and perhaps a reminder with link to a > login page.
Do in your setup 'registered users' have page 'edit' rights? Then you can modify FoxTemplats.FormTemplates section #newtopic and change (:include FoxTemplates.CommentForm:) to (:if auth edit:) (:include FoxTemplates.CommentForm:) (:ifend:) This will hide the commment form for non-registered (non-edit privileged) users. For existing topics you would need to change each topic page similarly. to display a rweminder etc change the above to something like (:if auth edit:) (:include FoxTemplates.CommentForm:) (:else:) To post comments please [[Forum.Register| register]] (:ifend:) > And BTW, is there a way to > set up different permissions for adding a comment and creating a new > group? I think you would need to restrict the edit priveliges to the Forum group, using local Group customisation. > And is there a way for an authorized user to be > able to edit his own posts, but not others? To do this in a secure way you would need to use AuthUser and have registered users login, then do conditional checks against authuser name. Define the authuser condition as given in http://www.pmwiki.org/wiki/Cookbook/ConditionalMarkupSamples and modify FoxTemplates.DisplayTemplates by changing within the (:if ... conditional markups author {$$author} to authuser {$$author} also make sure that $author is defined in config.php with $AuthId: # set passwords and authuser settings include_once("$FarmD/scripts/authuser.php"); #if (@$_SESSION['authid']) $Author=$_SESSION['authid']; if ($AuthId) { $Author = $AuthId; setcookie('author',$Author,0,'/'); } include_once("$FarmD/scripts/author.php"); Then you would not need any author input fields, as $author is always set by the login user name. ~Hans _______________________________________________ pmwiki-users mailing list [email protected] http://www.pmichaud.com/mailman/listinfo/pmwiki-users
