Home  »  Solutions  »  Wordpress Plugin: Extra Comment Fields
Preview of Wordpress Plugin: Extra Comment Fields

Wordpress Plugin: Extra Comment Fields

Nate Weiner - Posted in Solutions, , , Comments (74) - Download

Overview

This Wordpress plugin allows you to add additional fields for users to complete when submitting a comment. The extra data will be saved in the wp database and can be retrieved when showing a post’s list of comments.

The extra comment variables will show up in the list of comments in your Wordpress admin and are editable through the standard admin comment edit page.

This plugin requires a basic knowledge of HTML to modify your comment form.

Jump to Download

Example of Use

For this example, we are going to add a field asking for a users age to the comments form.

1. First, add the field to your comments form.

Typically your comments form is in your theme folder and is comments.php
Most likely: (/wp-content/themes/YOURTHEME/comments.php)

Enter the HTML of your new field into the desired spot. To add a textfield for the user to enter their age into, you would add the following to your form. I’ll add mine right below the url textfield.

<p><input type="text" name="age" id="age" size="22" />
<label for="url"><small>Website</small></label></p>

Screenshot of Adding Field

2. Next, we need to add the field-variable to Wordpress.

Inside your Wordpress admin, click the ‘Settings’ menu. Then click the ‘Extra Comment Fields’ menu.

Next, enter the name of the field. This has to be the exact name attribute you gave to the field you added to your comments form. For example, I added this field to my form:

<p><input type="text" name="age" id="age" size="22" />
<label for="url"><small>Website</small></label></p>

The input’s name attribute is ‘age’, so the variable you would enter for this field is ‘age‘.

Note: This can only contain letters, numbers, and/or dashes.

3. Last we want to make use of the data somehow when showing comments.

Your extra fields will be in the $comments variable retrieved by Wordpress. The extra fields you added will have a prefix of ‘extra_’. So to access the data for our ‘age‘ field, we use $comment->extra_age inside the comments loop.

So, for example, if I modify the default theme’s comment.php file, I just insert one line to display the extra comment information (highlighted in bold).

<ol class=”commentlist”>

<?php foreach ($comments as $comment) : ?>

<li <?php echo $oddcomment; ?>id=”comment-<?php comment_ID() ?>”>
<?php echo get_avatar( $comment, 32 ); ?>
<cite><?php comment_author_link() ?></cite> Says:
<?php if ($comment->comment_approved == ‘0′) : ?>
<em>Your comment is awaiting moderation.</em>
<?php endif; ?>
<br />

<small class=”commentmetadata”><a href=”#comment-<?php comment_ID() ?>” title=”"><?php comment_date(’F jS, Y’) ?> at <?php comment_time() ?></a> <?php edit_comment_link(’edit’,’ ‘,”); ?></small>

<?php comment_text() ?>
User’s Age is: <?php print $comment->extra_age; ?>

</li>

<?php
/* Changes every other comment to a different class */
$oddcomment = ( empty( $oddcomment ) ) ? ‘class=”alt” ‘ : ”;
?>

<?php endforeach; /* end for each comment */ ?>

</ol>

Version History

1.2 - June 23rd, 2008

  • Corrected behavior when deleting/changing status of comment

1.1 Alpha - May 20th. 2008

  • Fixed blank comment content field

1.0 Beta - May 4th, 2008

  • Updated for WP 2.5
  • Added ability to edit comments
  • Added ability to view comments in admin
  • Extra Comments data deleted when comment is deleted
  • Fixed database table prefix

0.2 Alpha - Sept. 2007

  • Initial Release

Download

Download the Extra Comment Fields Wordpress Plugin version 1.2 Beta
(For Wordpress 2.5+)

Download the Extra Comment Fields Wordpress Plugin version 0.2 Alpha
(Only for Wordpress 2.0 - 2.3)

To install, unzip the files into your /wp- content/plugins/ folder. Then activate it under the Plugin menu in your Wordpress admin.

Important Note When Upgrading from 0.2 to 1

If your Wordpress database tables do not start with ‘wp_’, you will likely need to rename the wp_comments_extra table in your database to match the other table’s prefix. This is a result of the first version incorrectly assuming the prefix across all installations.

For example, if you have have tables named called prefix_posts, prefix_comments, prefix_options, etc then you should rename the wp_comments_extra table to prefix_comments_extra.

Comments (74)


  1. Nice! I’ve been looking for something like this for a while.

    November 30th, 1999 Mikel
  2. Using WP 2.3, I see this error after Activating the plugin and navigating to the options page to configure it:

    WordPress database error: [Table 'waywardpress.wp_comments_extra' doesn't exist]
    SHOW COLUMNS FROM `wp_comments_extra`

    Seems that the install/activation isn’t creating the tables correctly, possibly due to an incompatibility with 2.3?

    October 12th, 2007 Jason
  3. Hey Jason, I will take a look at this tonight and get it fixed. In the meantime, if you can access your WP database and run queries on it, run:

    CREATE TABLE `wp_comments_extra` (
    `comment_id` BIGINT NOT NULL ,
    PRIMARY KEY ( `comment_id` )
    )

    This will create the table and should fix the problem on your end for now.

    October 12th, 2007 Nate Weiner
  4. Thanks Nate! No rush on my end. I am just testing to see if I can customize your plugin for a more robust solution to add in additional free text fields in comment forms. I just figured you’d like the feedback on my initial experience since I am not sure if you have tested on WP2.3 yet.

    October 12th, 2007 Jason
  5. Jason, I’ve corrected the problem, please download version 0.15 Thanks again.

    October 13th, 2007 Nate Weiner
  6. This worked great — thank you for making the plugin.

    To make the field I added a required one, I edited wp_comments_post, and that seemed to work fine.

    Thanks for your good work!

    October 16th, 2007 Nabha
  7. I downloaded the plugin today and am getting a similar error as Jason, above, when I try to add a new field in the admin:

    WordPress database error: [Table 'x.wp_accmecomments_extra' doesn't exist]
    ALTER TABLE `wp_accmecomments_extra` ADD `type` TEXT NOT NULL ;

    I tried running the query you posted, but got this back:

    Documentation
    #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ”wp_comments_extra’ (’comment_id’ BIGINT NOT NULL, PRIMARY KEY (’comment_id’))’ at line 1

    This doesn’t occur in the version of WordPress I have installed on my local machine. Everything works smoothly there. Any ideas? Let me know if there’s other configuration info that would be helpful. Thanks.

    October 19th, 2007 Todd Prouty
  8. Todd, I’ve fixed this issue and uploaded a new version, download it and let me know if you have any further issues.
    Thanks!

    October 23rd, 2007 Nate Weiner
  9. I compared the new version (0.2) with the old (0.15) and I think the change is going in the wrong direction. You replaced $sql = "ALTER TABLE `".$wpdb->prefix."comments_extra` ADD `".$_POST['new_var'].”` TEXT NOT NULL ;”;
    with $sql = "ALTER TABLE `wp_comments_extra` ADD `".$_POST['new_var'].”` TEXT NOT NULL ;”;. The problem I was having ended up being caused by your hard-coding of the database prefix, “wp_”. Media Temple’s one-click installer for WP uses “wp_sitename” as the prefix, which breaks the plugin. Using that prefix variable is probably the right idea, but it would need to be used throughout the plugin. Replacing all the instances of “wp_” with the prefix used in my database fixed it for now.

    If anyone is getting similar errors but doesn’t know what their table prefix is, look it up in wp-config.php.

    October 23rd, 2007 Todd Prouty
  10. hi

    your plugin works fine on my English blog, thank you. But it messed up on the Russian blog. I use the plugin to add “city” field to the comments.

    The plugin worked okay initially but now all comments display the same country. I deactivated-reactivated the plugin - same result. It possibly has to do with using dashes in the additional field, as both times the replicated city name contained a dash. Please drop me an email if you solve that.

    November 8th, 2007 Alex
  11. This plugin looks very interesting thanks, though could you explain further how to access the data from $comment->extra_type (where to put it, or an example perhaps)

    November 9th, 2007 Ed
  12. Yet another useful idea, thanks

    November 10th, 2007 bLuefRogX
  13. I was having trouble getting the extra field to display (using echo “$comments->extra_[fieldname]“) and found out that ecf_getComments wasn’t running.

    More research showed that comments_array isn’t listed as one of the actions on the current Wordpress API:
    http://codex.wordpress.org/Plugin_API/Action_Reference

    I fixed this by adding a line to comments.php immediately after:
    if ($comments) :

    The line I added is:
    ecf_getComments($comments, $id);

    I hope that helps someone. I am totally new to the plugin API, and actions, and so on, and couldn’t find a better way to fix things.

    Everything works great now.

    November 15th, 2007 Nabha
  14. hi

    After some initial troubles, I managed to make your plugin work, but two issues remain:

    I’m using the plugi for “country” field and it shows the previous entry. That is, if someone is making a comment, his “country” field is pre-filled with the country of previous commenter.

    Also, activating the plugin creates an empty comment always on top. That is, the last comment is always empty. Clicking on Edit produces “no such comment message.”

    I’m running wp 2.2.1

    November 26th, 2007 Alex
  15. I would love to use your plugin, and I was able t add an extra field to the comment form and it is stored in the db, but I have can’t find out how to show the field in the comment *sigh*

    December 7th, 2007 gekow
  16. Oh, and is there a chance to see (and edit) the custom fields in the admin edit comment screen?

    gekow

    December 7th, 2007 gekow
  17. No support so far? I mean it’s nice to have my comments approved, but it would be better to have them answered :)

    December 10th, 2007 gekow
  18. Gekow,

    Just wanted to update you on the status of things at the Idea Shower, like the Wordpress Extra Comments Plugin.

    I’m in my last week of my current job. I’ve left that position to dedicate more time to Idea Shower and contract work. Things will be busy (and therefore slow) over the next couple of weeks but in January, once the dust has settled, you can expect many updates and releases (including some for Read It Later).

    I’m doing my best to keep the updates rolling, and soon I’ll be able to keep up with them. I appreciate the support and hope to get you guys updates soon.

    With that said, can you send me the code you are currently using to output your comments? And give me a description of where you’d like them to appear alongside the other information, I can then show you where to put them.

    Thanks!

    Nate

    December 10th, 2007 Nate Weiner
  19. Like others, I have now spent many hours simply trying to the the extra fields to show up in my comments… It appears that the comments loop does not recognize the “comments->extra_”myfield”… Actually it appears that the entire “extra_fields” table is invisible to the loop…

    I am simply trying to show a City, State, Country attribute on each post on my wishes pages… The form is working and the table is populated… I have tried “echo”, “print” and creating functions all to no avail…

    I am certain that there is a simple/obvious solution that I am missing.

    Can you share a successful implementation of this plug-in so that I can understand what I am missing? I am so close I can taste it!

    Thanks in advance!

    December 11th, 2007 hhempel
  20. @hhempel:

    You’re using comments->extra_myfield, when it should be comment->extra_myfield (no `s` at the end of ‘comment’) while recursing through the comments array.

    I’ve added an example above under #3.

    Does that help?

    December 11th, 2007 Nate Weiner
  21. Hi Nate,

    I am so impressed with the fast response and I really appreciate it! Truth is that I am still a bit lost (partially due to the fact that I am at the hairy end of my technical know-how rope)…

    I tried both the comments->extra_myfield (w/o the “s”) and the comment->extra_myfield (with the “s”) previously and failed to mention it… Sorry… I wish it were that easy. I am either failing to get the php syntax correct or I am failing to “connect” the “extra field” table to the code…

    Maybe you can answer 3 questions to set me straight:
    1) Can I call the extra comment field directly from the DB without the use of a function? (ie: print comment->extra_commentcity;) ?
    2) How does the php code know to look in a different table when the bulk of the functions being called in the template are coming from the standard comments table?
    3) Do I need to “wrap” the print/echo calls with or or ???

    There are several instances in the stock WP PHP code where calls are being made directly to the DB ($comment->comment_ID)… When I try and use the same exact calls, the parser completes, but the “display” is empty (nothing appears)…

    In this forum there is a reference to the “ecf_getComments($comments, $id);” issue… Could I be a victim of this?

    Thanks!!!!
    Your patience and understanding are MOST appreciated!

    Hugh
    2)

    December 11th, 2007 hhempel
  22. GREAT PLUGIN! Since we’re on the subject of flexibile forms can you please display how this PHP code will differ for the different kinds of form tags? For instance, since your example above is based on SELECT and OPTION tags, how would the PHP look if my extra form field is an INPUT field for a line of text?

    Ultimately I want my commenters to be able to enter their location into the text field exactly as they choose to display it. So they’d be free to write in either ‘New York’ or ‘NYC’ or ‘NY, NY’ or ‘New York City’ etc. If they’re international they should be able to enter things like ‘france’ or ‘new south wales, australia’ or ‘Cape Town, S.A.’ What would be the PHP syntax that goes with a plain text extra field?

    I hope this’ll be useful to all the readers here.

    December 18th, 2007 Malik
  23. [...] the Idea Shower » » Wordpress Plugin: Extra Comment Fields (tags: http://www.ideashower.com 2007 mes11 dia20 WordPress plugin comments blogging) [...]

    December 21st, 2007 rascunho » Blog Archive » links for 2007-12-21
  24. Hi,

    I can not download the plugin, I get the error:

    High security alert!!!

    You are not permitted to download the file “extra-comment-fields.zip”.

    URL = http://www.ideashower.com/files/scripts/extra-comment-fields.zip

    If anyone has a copy please reply as I have been looking for a plugin like for ages.

    Thanks

    January 8th, 2008 Joe
  25. When the comments are being moderated/edited from the backend, is there a way to edit the information that is submitted in the extra fields?

    January 10th, 2008 Jeffrey
  26. Is there a way to get the extra fields data included in the the RSS feed for the comments?

    January 24th, 2008 Michael Aivaliotis
  27. This just plain doesn’t work. On the ‘extra comment fields’ options page, (part 2 of tutorial) I add a field and save it. But when I return, it says I haven’t defined any extra fields. As a result, nothing works. It’s really disappointing!

    Any ideas why this would be happening? I’m using the latest verison of wordpress.

    Cheers

    Peter

    February 4th, 2008 Peter Watts
  28. Is there a way I can use this to add extra text fields and drop down menus that show in the comment field once the user submits a comment?

    I’m setting up a Wordpress Review site where users submit reviews and would like to have additional comment information such as pros, cons, how long have you used this product, etc…

    Thanks,

    Mike

    February 13th, 2008 Mike
  29. Mike,

    Absolutely, that’s what this plugin is for.  If you give me a little more specifics on what you’re trying to accomplish I can help you out!

    Nate 

    February 14th, 2008 Nate Weiner
  30. Hi Nate, thanks for the reply! Basically, I’m wondering how I can add extra fields to the comment form itself so that a user can add additional information with their comment. So for example, a user would not only see a field for their name, e-mail, url, and comment, but also a field for pros and cons, time you have used product, etc…

    Furthermore, I need these fields to be posted with each comment after submission by the user.

    I’m a complete newbie when it comes to php coding, but I’m pretty sure WP only supports the name, e-mail, url, and comment fields in the default wp-comments-post.php file, so I’m wondering what I need to do in order to add these fields to the comments.php in my theme folder and get WP to post them along with the default fields.

    -Mike

    February 14th, 2008 Mike
  31. Mike

    Do you have any experience with HTML?  You don’t need to make any changes to wp-comments-post.php.  All you need to change is your comments.php file in your theme.

    1. Add form fields as you normally would with any website to the comment form.  For example, if you wanted to add a ‘pros’ field you might add:
      <input type="text" name="pros" />
    2. Then go into your Wordpress Admin and under the Options menu select ‘Extra Comment Fields’.
    3. Then add the variable ‘pros’ (this should match up with the name of the field you added (see above)

    Now when a user submits the contact form, it should save the pros data.

    To display this data alongside the comments, thats where you’ll need to do a little bit of PHP.  But it’s not too bad.  If you open up the default theme’s comments.php file, you can do this to display the pros field.

    1. Find where php begins to ouput the LI’s that make up the OL with classname ‘commentlist’.  This is the actual list of comments that you see on the bottom of each post.
    2. Inside the ‘foreach ($comments as $comment) :’ loop you’ll see it outputting the date, author and comment content.
    3. Just above <?php comment_text() ?>, enter in: ‘<strong>Pros: </strong> <?php print $comment->extra_pros; ?>   (replace ‘pros’ with whatever your variable name is).

    Now that should output any data they submitted in the Pros field as well.

    Hopefully that helps, if you get stuck defintely write back! 

    February 18th, 2008 Nate Weiner
  32. [...] Why? Because theres a lot of great ideas being developed there. One of my favorite is the Extra comments plugin  [...]

    February 28th, 2008 Found ya, IDEA SHOWER « Minelabs
  33. Hey Nate,

    Thanks for the great plugin, I got it working after reading your last post. Thanks for that!

    Cheers,

    Leigh.

    March 3rd, 2008 Leigh
  34. Nate i know some HTML and PHP to setup with no problems. But i dont know how put or run the querie. I google about this but i dont know how…or run a querie or insert table….. can tell me or explanin how make work this plugin solution.

    March 7th, 2008 Andrew A
  35. Hi, does plugin allows you to make the drop-down options (e.g. General|Reviews|Support) like your comment form?

    Regards,

    ~Mint Tree~
    http://www.BestWordPressTemplate.com

    March 17th, 2008 Best WordPress Template
  36. Hello!
    I think this try.

    March 18th, 2008 Floroskop
  37. Hi Nate. Excellent plugin, it’s filling a very big void. I just wonder, would you ever consider making the comments editable? This is a big problem for me because the edit_comment function only allows you to edit the default fields. The only way to edit something entered in an extra field is to delete the comment and redo. As you can imagine, this isn’t the most user-friendly method.

    Maybe it isn’t something that would be included in the core of the plugin, but do you have any tips on what changes would need to be made to the admin template to allow this? It would be greatly appreciated and I’m sure there’s plenty of others using this plugin that would enjoy this feature.

    Regards,

    Peter

    March 18th, 2008 Peter Watts
  38. Hey Peter,

    I really would like to add it to the edit comments section but WP doesn’t make it very easy to hook into that part of the template.  I’m looking at WP 2.5 to see if they’ve made any improvements in that manner.  If not, I’ll probably work out an alternative method.

    Thanks! 

    March 20th, 2008 Nate Weiner
  39. Mint Tree,

    The plugin definitely always you to make drop-down options.  I’m using it for that on Idea Shower.  Take a look at the steps in the post, they use the same code I use on my site.

    Thanks! 

    March 20th, 2008 Nate Weiner
  40. Hi Nate,

    Your plugin is really nice!

    I would like to add more fields and I would like to make my comments form ajax driven, any suggestions?

    Again, really nice work on your plugin!

    March 27th, 2008 Michael
  41. Hi,

    I’m trying to get your plugin to work on a new site but not being successful.

    I’m using this in the form input

    Pros:

    Cons:

    I’m using this in the print area

    Pros: extra_Pros; ?>
    Cons: extra_Cons; ?>

    I’ve added the additional comment fields in WordPress but still it won’t display the field data…

    suggestions?

    Thanks in advance!!!

    March 27th, 2008 Michael
  42. One thing that’s missing (I think?!) is the ability to store previously submitted values in a cookie, as WordPress already does for the commenter’s name, URL and email.

    I’m working on a site where people will probably submit large numbers of comments. I want to add a ‘country’ field for styling purposes. But at the moment, whilst their name etc will be pre-populated into the form, the country selector can’t easily carry previous values over.

    It looks easy enough to do, by hacking wp-comments-post, but I’d rather not touch core files like that. Can it be fitted into the plugin? Maybe the values could come back as $comment_author_extra_whatever.

    April 1st, 2008 Simon
  43. Hi,

    Thanks for the plugin — I’m using WordPress 2.5, have installed the plugin, but none of the extra comment fields seem to be saved. (When I go to the Settings are of WP 2.5, there is a menu choice for “Extra Comments Fields”; when I use that, I see the “Add New Field” and “Current Fields” sections, but when I put the variable name and click “add field” it shows in the Current Fields section, but disappears if I navigate away from this screen or then try to add another field. Is the plugin simply not functioning in 2.5 yet? Not torqued, of course — just asking.

    Thanks.

    April 5th, 2008 XAMPPuser
  44. Hey Nate, just what i was looking for thx! However, a number of issues. Firstly I have to create the wp_comments_extra manually, secondly even though the field value gets stored i cant retrieve it via $comment->extra_field . Any ideas? FYI im using WP 2.5

    April 10th, 2008 Richard
  45. Hey Richard, I haven’t looked over this plugin for WP 2.5 yet so it may be related to that. If you send me the part of the code that’s display your comments I’ll take a look and see if I notice any other issues.

    Thanks!

    April 11th, 2008 Nate Weiner
  46. I have installed version 2.5 of Wordpress and your plug-in v. 0.2 (why not version 1 Beta)

    Anyway the code you show at the top of your page is not relevant to WP 2.5

    How would you call the value of the new field with this code :

    Here is what the code looks like (the top part of it)

    //———-code—————-//

    <li class=”" id=”comment-”>
    on
    comment_approved == ‘0′) : ?>
    Votre Coup de Gueule est en attente d’une modération.

    April 11th, 2008 William
  47. An other thing, it would be wise if you could show a simpler example involving a text fiel such as ‘enter your hometown’, as the drop down menu example complicates the code for those who aren’t php savvy and just want to use the plug-in to add a text field. If you had done so I might have been better able to sort the problem myself.
    This is obviously more of a problem for those who use WP v.2.5
    W

    April 11th, 2008 William
  48. Me again, sorry, but apart from creating a new table and a column for each new field, which I could do by using my mySql admin tool, what else does it do ? ie. I am wanting to edit the commnents and noticed that the new fields do not appear in the edit commnent page. If I delete a comment, will it also delete the data in the comment_extra table. A lot of things aren’t clear. In the end, I wonder if I should bother using it. Sorry for saying that. I am probably feeling too frustrated with that job…

    April 11th, 2008 William
  49. Thx Nat, here’s where i print the extra ‘business’ info

    extra_business) ? ‘, ‘.$comment->extra_business : ”); ?>
    </code.

    April 13th, 2008 Richard
  50. Nate, maybe im missing something but it appears one of your API hooks is referring to file activate_extra-comment-fields.php, which isn’t in the zip download you provide. Maybe this is why the database isnt being created

    April 14th, 2008 Richard
  51. Hi

    Cool plugin. Works on WordPress 2.5. But I would really appreciate it if you could help me out on this.

    I notice that when the admin deletes the comment, the entry inside table wp_comments_extra is not deleted.

    How do I get it to delete together with the comment in table wp_comments?

    Also, at the admin side, when the admin edits the comment, the $comment does not contain the values inside wp_comments_extra. How do I add it in?

    April 23rd, 2008 kumar
  52. Need an update for WP 2.5… I’ve well installed all you said on my blog, but nothing seem to work : there is no comments type, all are display.

    May 2nd, 2008 Thomas
  53. I just get your mail. I dunno if I understand well the previous system… The new system seem to be good, a sort of custom field for comments :-)

    Could you give us the code for the “All / General / Reviews / Support / Suggestions…” tabs ?

    May 5th, 2008 Thomas
  54. Nice work! I’m very pleased to see that the ability to edit posts has been added. However, it doesn’t seem to work for me. When I go to edit a comment, the extra fields and comment field are blank. They do not load the values from the database, so I can’t edit them. But on the manage comments screen, they appear perfectly! I’ve uploaded some pictures to show you what I mean. It sounds like a small bug somewhere. It would be great if you could help me out. Cheers, Peter

    http://vminor.com/images/manage.jpg
    http://vminor.com/images/edit.jpg

    As you can see in the manage shot, everything seems fine. But when I go to edit, I get nothing. I’m assuming it has nothing to do with not upgrading to 2.5.1…..

    May 11th, 2008 Peter
  55. Hi, I’m having exactly the same problem that XAMPPuser.
    Does anyone know what could be the cause?

    XAMPPuser said
    Hi,

    Thanks for the plugin — I’m using WordPress 2.5, have installed the plugin, but none of the extra comment fields seem to be saved. (When I go to the Settings are of WP 2.5, there is a menu choice for “Extra Comments Fields”; when I use that, I see the “Add New Field” and “Current Fields” sections, but when I put the variable name and click “add field” it shows in the Current Fields section, but disappears if I navigate away from this screen or then try to add another field. Is the plugin simply not functioning in 2.5 yet? Not torqued, of course — just asking.

    Thanks.

    May 15th, 2008 Wilson
  56. Thank you for the plug-in first of all.

    I’ve ran into an issue of trying to edit a comment in the admin screen. When I get to that page the comment field and the custom fields are actually blank. I accidently lost a comment this way.

    I run WP 2.5. Did you have any issues like that? Any ideas?

    May 18th, 2008 Daniel
  57. Still waiting :-)

    Would like to know also how to count the number of a specific comment category.

    May 19th, 2008 Thomas
  58. Alas, i’m running with the same problem with 2.5.1.
    The only time the extra comment is when ‘comment is waiting for approval’ is active (the value of the variable is still in memory). The variable is never written to the database, and when the comment is approved, all traces are lost.

    Keep up the good work, until a solution is found because the original idea is good!

    May 19th, 2008 Le Monochrome
  59. Hey all, I’ve released 1.1 which should solve the blank comment field issue. If you still have problems, drop me a line and I’ll investigate further.

    May 20th, 2008 Nate Weiner
  60. First, thank you for a great plug-in! It works great, except when I go to COMMENTS -> AWAITING MODERATION tab, I get the following warning messages:

    Warning: reset() [function.reset]: Passed variable is not an array or object in /home/c2013vis/public_html/wp-content/plugins/extra-comment-fields.php on line 180

    Warning: current() [function.current]: Passed variable is not an array or object in /home/c2013vis/public_html/wp-content/plugins/extra-comment-fields.php on line 181

    Comment Date Actions

    Warning: Invalid argument supplied for foreach() in /home/c2013vis/public_html/wp-admin/edit-comments.php on line 197

    May 27th, 2008 RR
  61. Also, is there a way to organize the comments by each field? (for example, numerically ordered by age or alphabetically grouped by location?)

    Thanks again

    May 27th, 2008 RR
  62. I’m having the same problem as Michael:

    Hey Nate, just what i was looking for thx! However, a number of issues. Firstly I have to create the wp_comments_extra manually, secondly even though the field value gets stored i cant retrieve it via $comment->extra_field . Any ideas? FYI im using WP 2.5

    Except that I’m using WP 3.3 and your .2.

    Help?

    May 30th, 2008 Tara
  63. Plugin seems to still be showing blank comments that are in moderation (haven’t been approved yet). Using Wordpress 2.5.1.

    June 5th, 2008 jay
  64. hi nate, great work. setting it up on 2.5.1 was a breeze but now i ran into comment moderation issues. the extra is rendered the right way in the comments overview and comment edit screen. the ‘comments waiting for approval’ stays empty (not producing any php errors as mentioned above). by approving/editing/saving a comment the whole comments_extra table records in the DB seem to get lost.
    would be great if you can fix this…
    keep up the good work!

    June 9th, 2008 Alex
  65. short update, just did another try: approving a comment out of edit-comment.php did only flush the record for this comment. aproving a comment or editing the extra from comment.php?action=editcomment&c= seems to work

    June 9th, 2008 Alex
  66. Hi Nate. Thanks for releasing 1.1. However, it doesn’t seem to entirely solve the problem. Now, when I go to edit a comment, the comment text is present (good!), but my custom fields are still blank. Any ideas? Peter

    June 10th, 2008 Peter
  67. hi tehre. do you use this plugin to separate your comments into the different sections? any other possible uses for this plugin? care to share your method for separating these commetns?

    June 10th, 2008 ovidiu
  68. I noticed that the entries in the database are deleted when you even just approve a comment in wordpress 2.5.1

    add_action(’wp_set_comment_status’, ‘ecf_delete_comment’);

    function ecf_delete_comment($id)

    This function just deletes the extra field of a comment without checking status.
    It should probably not do this if the comment action was set to approve… Fix needed

    June 21st, 2008 Norm
  69. Hey all, I pushed a new update out (1.2), it corrects the delete behavior described by Norm and I believe it should resolve some of the disappearing data being reported.

    Keep me posted on the results.

    June 23rd, 2008 Nate Weiner
  70. I had to change the ecf_install() function to this:

    function ecf_install() {
    global $wpdb, $table_prefix;
    $wpdb->query($wpdb->prepare(”CREATE TABLE IF NOT EXISTS `” . $wpdb->prefix . “wp_comments_extra` (
    `comment_id` bigint(20) unsigned NOT NULL auto_increment,
    PRIMARY KEY ( `comment_id` ))”));
    }

    June 26th, 2008 Jon Rogers
  71. [...] the Idea Shower » » WordPress Plugin: Extra Comment Fields [...]

    June 26th, 2008 My Today’s Diigo 06/26/2008 « Rif.webmemo
  72. If I want to display those comment in every page in the sidebar. how?

    thanks!

    June 27th, 2008 kailoon
  73. How to use it when I am using the pageg comment plugin. Because it is using a file called comments-paged.php. The value cant be shown.

    Please help. Thanks!

    June 30th, 2008 kailoon
  74. [...] Wordpress Plugin - Extra Comment Fields - This Wordpress plugin allows you to add additional fields for users to complete when submitting a comment. The extra data will be saved in the wp database and can be retrieved when showing a post’s list of comments. [...]

    July 2nd, 2008 Best Design Resources of June 2008 | CrazyLeaf Design Blog

Leave a Reply