- About this site and Sean
Sean is a Freelance Website Developer based in Crewe, Cheshire.This site was set up in 2008 and serves as an informative tutorial and scripting resource for Wordpress among other things.Find out more about Sean on the 'About Me' page Maurice Barton is 9 months and 18 days old
- Test and Go Live in the HTML Model 2010/08/26
- Worldpay Login 2010/08/26
- MultiEdit Plugin 2010/08/22
- Font Squirrel | Download Hundreds of Free @font-face Fonts 2010/08/19
- Image Map Tool - On-line Image Map Creator - HTML & CSS 2010/08/05
- Online Payment Systems & Credit Card Payment Processing Services by Braintree Payment Solutions 2010/07/23
- Ultimate Guide to HTML Emails - Tips,Tutorials and Resources 2010/07/22
- Gmail SMTP Server and Port Settings 2010/07/15
- Creative Resources for Elementary Music Education | MakingMusicFun.net 2010/07/12
- Classical Sheet Music| Free Sheet music| Digital Sheet Music print 2010/07/12
- Login
- Recent Posts
- SB Comment Sanitiser
- SB Child List Update 1.2
- Wordpress sites hosted by Rackspace Cloud hacked!
- Recursive PHP function for finding a top level parent post
- NewMedias get’s it’s third musketeer!
- SB Password Expiry
- SB Child List finally gets an update!
- SB Newsletter Subcription Generator: Complimentary Subscriber plugin for Wordpress
-
- TagsAdvert Adverts AJAX Annoyances autoresponder bbPress Beta captcha Classifieds Comment Forms Computer Policy deals press Geocoding Google API Google Charts Google Map Google Maps Gpedit Handy Hint How to.. internet explorer Javascript learning Newmedias Personal Blog PHP Plugin Plugins Registration Forms SACK Session Manager Spammers Subversion Teaching Time Savers Tim Nash US States welcome email editor Widget Wordpress Wordpress Plugins Your Brand Your Classifieds Your Minder Zen Cart
SB Author Comments: Author Commenting plugin for Wordpress
April 15th, 2010 by Sean Leave a reply »To my knowledge it’s not possible to comment on an author in Wordpress. “Why would you want to do that?” you ask… Well for example a client of mine is running a classifieds site using the Classipress theme. The site uses classifieds as jobs for people to do and the people posting and signing up to the site are tradesmen. Comments, in this case, can be used as a feedback system and therefore are a valuable addition.
The wp_comments table doesn’t have support or scope to store comments with an associated user (as opposed to post). At this juncture I would have inserted a null (or 0) value into the post_id column and added a row into the wp_commentmeta table with the user ID it refers to. However, I didn’t write the core code for the project so I simply updated a neat little system written by Dan Wellman. Dan’s system is pretty good and uses AJAX and JSON to add comments to a new database table with two fields (author and comment). It was what I would call ‘a good start’ as DB details were required in a number of different files and the database had room for improvement. I have a few more plans for the code but for now have changed a couple of things and bundled it into a Wordpress plugin for you.
In my version the database table is created for you, it has several more fields including a primary key (!), timestamps and room for additional information (not currently utilised) to be stored. The Wordpress database class is used now so no duplication of the connection details is necessary.
Take a look at the plugin and comments and suggestions for additions are very welcome.
Download
SB Author Comments (1.84 KB)
Usage
Upload and activate the plugin as normal. Then add the following code to your author.php theme template making sure to edit the $author_id variable as appropriate.
<?php if (function_exists('sb_ac_comment_form')) { echo sb_ac_comment_form($author_id); } ?>Credit
Once again credit goes to Dan Wellman who detailed the integration into his site on his blog
Posted in AJAX, PHP, Plugins, Time Savers, Tutorials, Wordpress
Tags: comment author Plugin Wordpress Wordpress Plugins
You can follow any responses to this entry through the RSS 2.0 Feed. You can leave a response , or trackback from your own site.