- About this site and Sean Barton
Sean Barton is a Freelance PHP Website Developer in Crewe, Cheshire. He is a Wordpress and CMS/Framework specialist.This site was set up in 2008 as a tutorial and scripting resource for the PHP language and Wordpress. -
Do you want to be notified whenever I post something new for you to read? Just enter your email address below... - Our Services
- Wordpress plugin development
- Ecommerce (WPSC, Woocommerce, Shopify, Magento)
- PSD to Wordpress theme conversion (Responsive)
- Website design work (Banners, Logos, Full Site, etc)
- Website analysis (security, usability, SEO)
- API Integrations (InfusionSoft, SalesForce, CT, etc..)
- Wordpress consultancy & expert advice
- Crisis support
- Website hosting
The main services offered are Wordpress based although we do a great deal of technical programming for bespoke systems. From troubleshooting, extending frameworks, finding bugs to writing them from scratch.
Find out more by looking through our past projects or get a quote.
- Most Viewed
- Recent Posts
- How to integrate Mandrill into your PHP site
- Welcome email editor temporarily unavailable (Update: Back in business!)
- SB Content Widget – WordPress plugin
- SB Add WooCommerce Tabs – WordPress Plugin
- SB Mini Features WordPress plugin
- SB Spider Framework
- SB Custom Page Override Menus WordPress Plugin
- WordPress page header images made easy with SB Uploader
Maurice Barton is 3 years, 5 months, and 29 days old
Beatrix Barton is 2 years, 4 months, and 19 days old
- Search for something?
-

A proud member of the Federation of Small Businesses
-
- Categories
- AJAX
- Apple
- bbPress
- Bug Fixes
- Ecommerce
- Events
- ExpressionEngine
- Geolocation
- Google Charts
- Google Maps
- Important!
- Linux
- Mac
- News
- Payment Processors
- Personal Blog
- PHP
- Plugins
- SEO
- Shameless Plugs
- Statements and Rants
- Statistics
- Subversion
- Teaching
- Time Savers
- Troubleshooting
- Tutorials
- Usability
- Windows
- Wordpress
- Your Brand
- Zen Cart
- TagsAdvert Adverts AJAX Annoyances autoresponder bbPress Beta captcha Classifieds Comment Forms 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 plugin 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
Related posts:
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.