[wp-hackers] comment author vs post author

Jason wphackers at jasonverber.info
Fri Dec 3 16:57:37 UTC 2004


I have a new plugin called User Comments that could be modified to help. 
As it is, the plugin moderates comments
not posted by users, but it makes use of the user_id column in the 
comments table, storing the user_id of the comments
author if there is one.

This id is available in the comments loop, so comparing it to the 
author's id would allow you to see if the author of the
post wrote the comment without relying on email addresses. The only 
drawback at this point: you have to be willing to
moderate comments from non-users. But, I plan on doing a little work on 
the plugin this weekend; I originally thought
my options should be "moderate" and "disallow" non-user comments, but 
since there is a value in tracking user comments
without interfering with non-user comments, I'll also add a "do nothing" 
option for non-user comments.

I'll post back when I've updated the plugin. The current version is here:
http://noprerequisite.com/archives/2004/12/01/user-comments-plugin/

Jason

BoBB wrote:

>That is fantastic :) At least it was until I realized that anyone
>posting witht he email address will be viewed as the author of the
>post. What about checking if the user is logged in and then checking
>if they have the same email. And if they are not logged in just do
>nothing.
>
>
>On Fri, 03 Dec 2004 06:34:37 -0500, Mark Jaquith
><mark.wordpress at txfx.net> wrote:
>  
>
>>$authordata->user_email will be the e-mail address of the author of the
>>POST, correct.  The comment data is under $comment.
>>
>>BoBB wrote:
>>
>>    
>>
>>>So in the comment loop $authordata refers to the author of the post
>>>and not of the comment correct?
>>>
>>>      
>>>
>>_______________________________________________
>>
>>
>>hackers mailing list
>>hackers at wordpress.org
>>http://wordpress.org/mailman/listinfo/hackers_wordpress.org
>>
>>    
>>
>
>
>  
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/hackers_wordpress.org/attachments/20041203/d8834f77/attachment.htm


More information about the hackers mailing list