Featuring CountComments

Featuring CountComments

Wordpress plugin

Install on Wordpress

App Details

  • extends information on Users page in Admin Menu with comment counts
  • settings page configurable for standard functions
  • easy to integrate (ships with multi/sidebar- and dashboard-widget functionality)
  • possible to integrate in “Right Now” box or to display as widget on the dashboard and on the user’s profile page
  • high performance because users’ comment counts are re-used within a page-call
  • API for developers
  • fully compatible with https/SSL/TLS-sites
  • fully multisite network compatible
  • clean uninstall

Requirement for this plugin: Your users have to be registered and logged in to comment – Thus, Featuring CountComments will not work properly in weblogs where anonymous comments are allowed!

Please find the version for WordPress

Plugin’s website: https://www.bernhard-riedl.com/projects/

Author’s website: https://www.bernhard-riedl.com/
Attention! – Geeks’ stuff ahead! 😉

API

Parameters can either be passed as an array or a URL query type string (e.g. “display=0&format=0”). Please note that WordPress parses all arguments as strings, thus booleans have to be 0 or 1 if used in query type strings whereas for arrays real booleans should be used.

$featuring_countcomments->count_by_user($params=array())

Counts the number of comments made by a user who is currently logged in or has a particular attribute.

$params:

  • user_attribute: one of the user’s attributes (matching query_type), for example, the user_id or a WP_User object; if no user_attribute is given, will fallback to currently logged in user

  • query_type: corresponding SQL-field of user’s attribute or WP_User object; default is user_id

    • user_id
    • display_name
    • user_nicename
    • user_email
    • user_login
    • WP_User object
  • format: if set to true (default), the output will be formatted using the attributes zero, one, more and thousands_separator; false = process plain count value

  • zero, one, more: for formatted output – %c gets replaced with the number of comments

    • ‘zero’ => ‘0 comments’
    • ‘one’ => ‘1 comment’
    • ‘more’ => ‘%c comments’
  • thousands_separator: divides counts by thousand delimiters; default , => e.g. 1,386

  • display: if you want to return the count (e.g. for storing it in a variable) instead of echoing it with this function-call, set display to false; default setting is true

The following example outputs the comment count of the user with the registered e-mail address ‘[email protected]’.

<?php global $featuring_countcomments; $params=array( 'query_type' => 'user_email', 'user_attribute' => '[email protected]' ); $featuring_countcomments->count_by_user($params); ?> 

$featuring_countcomments->count_by_comment($params=array())

Counts the number of comments made by a user who wrote a certain comment or the current comment in the comment-loop.

$params:

  • comment: a comment object or comment id; if empty retrieves current comment

  • format: if set to true (default), the output will be formatted using the attributes zero, one, more and thousands_separator; false = process plain count value

  • zero, one, more: for formatted output – %c gets replaced with the number of comments

    • ‘zero’ => ‘0 comments’
    • ‘one’ => ‘1 comment’
    • ‘more’ => ‘%c comments’
  • thousands_separator: divides counts by thousand delimiters default , => e.g. 1,386

  • display: if you want to return the count (e.g. for storing it in a variable) instead of echoing it with this function-call, set display to false; default setting is true

  • in_loop: if set to true (default), the query count for all user who wrote a comment which belongs to the post of the handed over comment will be cached; otherwise the comment count will be retrieved only for the user who posted the comment

The following example outputs the number of comments of the author with the current comment in the comment loop:

<?php global $featuring_countcomments; $featuring_countcomments->count_by_comment(); ?> 

Shortcodes

How-to for shortcodes

General Example:

Enter the following text anywhere in a post or page to output the comment count of user xyz:

[featuring_countcomments_count_by_user query_type="user_nicename" user_attribute="xyz"] by xyz so far... 

Available Shortcode:

featuring_countcomments_count_by_user 

Invokes $featuring_countcomments->count_by_user($params).

featuring_countcomments_count_by_comment 

Invokes $featuring_countcomments->count_by_comment($params).

Filters

How-To for filters

General Example:

function my_featuring_countcomments_defaults($params=array()) { $params['query_type'] = 'user_nicename'; return $params; } add_filter('featuring_countcomments_defaults', 'my_featuring_countcomments_defaults'); 

Available Filters:

featuring_countcomments_defaults 

In case you want to set the default parameters globally rather than handing them over on every function call, you can add the filter featuring_countcomments_defaults in for example featuring-countcomments.php or your own customization plugin (recommended).

Please note that parameters which you hand over to a function call ($featuring_countcomments->count_by_user or $featuring_countcomments->count_by_comment) will always override the defaults parameters, even if they have been set by a filter or in the admin menu.

featuring_countcomments_dashboard_widget 

Receives an array which is used for the dashboard-widget-function call to $featuring_countcomments->count_by_user. display and format will automatically be set to true and user_parameter to null to receive the current user’s count.

featuring_countcomments_dashboard_widget_text 

Receives a string which is used in the dashboard-widget. %c will be replaced by the comment count of the user who is currently logged in.

featuring_countcomments_dashboard_right_now 

Receives an array which is used for the dashboard-right-now-box-function call to $featuring_countcomments->count_by_user. display and format will automatically be set to true and user_parameter to null to retrieve the comment count of currently logged in user.

featuring_countcomments_dashboard_right_now_text 

Receives a string which is used in the right-now box on the dashboard. %c will be replaced by the comment count of the user who is currently logged in.

featuring_countcomments_user_profile 

Receives an array which is used for the user-profile-function call to $featuring_countcomments->count_by_user. display and format will automatically be set to true and user_parameter to null to retrieve the comment count of currently logged in user.

featuring_countcomments_user_profile_text 

Receives a string which is used in the user’s profile page. %c will be replaced by the comment count of the user who is currently logged in.

featuring_countcomments_users_custom_column 

Receives an array which is used for the users-page-function call to $featuring_countcomments->count_by_user. display and format will automatically be set to true and user_parameter to the user-id of each row to retrieve the user’s comment count.

Pricing

Starting from $0 per month.

Check Out the Etsy Reviews Widget

By Common Ninja

Etsy ReviewsTry For Free!

App Info

Rating

Reviewers

No reviews

Tags

author
authors
comment
comments
count

Developed By

Bernhard Riedl

Quick & Easy

Find the Best Wordpress plugins for you

Common Ninja has a large selection of powerful Wordpress plugins that are easy to use, fully customizable, mobile-friendly and rich with features — so be sure to check them out!

Testimonial

Testimonial plugins for Wordpress

Contact Form

Contact Form plugins for Wordpress

Maps

Maps plugins for Wordpress

Translation

Translation plugins for Wordpress

Chat

Chat plugins for Wordpress

Slider

Slider plugins for Wordpress

Reviews

Reviews plugins for Wordpress

Contact

Contact plugins for Wordpress

Galleries

Galleries plugins for Wordpress

SEO

SEO plugins for Wordpress

Forms

Forms plugins for Wordpress

Comments

Comments plugins for Wordpress

Backup

Backup plugins for Wordpress

Privacy

Privacy plugins for Wordpress

Optimize

Optimize plugins for Wordpress

Tabs

Tabs plugins for Wordpress

Social Sharing

Social Sharing plugins for Wordpress

Events Calendar

Events Calendar plugins for Wordpress

Comments

Comments plugins for Wordpress

Social Feeds

Social Feeds plugins for Wordpress

Social Sharing

Social Sharing plugins for Wordpress

Portfolio

Portfolio plugins for Wordpress

Video Player

Video Player plugins for Wordpress

popup

popup plugins for Wordpress

SiteMap

SiteMap plugins for Wordpress

Payment

Payment plugins for Wordpress

Coming Soon

Coming Soon plugins for Wordpress

Inventory

Inventory plugins for Wordpress

Testimonials

Testimonials plugins for Wordpress

Portfolio

Portfolio plugins for Wordpress

Membership

Membership plugins for Wordpress

Forms

Forms plugins for Wordpress

Analytics

Analytics plugins for Wordpress

Events Calendar

Events Calendar plugins for Wordpress

Sliders

Sliders plugins for Wordpress

Analytics

Analytics plugins for Wordpress

Reviews

Reviews plugins for Wordpress

Security

Security plugins for Wordpress

Ads

Ads plugins for Wordpress

Music Player

Music Player plugins for Wordpress

Countdown

Countdown plugins for Wordpress

Email Marketing

Email Marketing plugins for Wordpress

Membership

Membership plugins for Wordpress

Ecommerce

Ecommerce plugins for Wordpress

Customer Support

Customer Support plugins for Wordpress

Video Player

Video Player plugins for Wordpress

Tabs

Tabs plugins for Wordpress

Social Feeds

Social Feeds plugins for Wordpress

Common Ninja Apps

Some of the best Common Ninja plugins for Wordpress

Browse our extensive collection of compatible plugins, and easily embed them on any website, blog, online store, e-commerce platform, or site builder.

Etsy Reviews for Wordpress logo

Etsy Reviews

Show Etsy reviews to build trust, strengthen credibility, and help visitors make confident purchase decisions that support higher sales.

Instagram Carousel for Wordpress logo

Instagram Carousel

Show Instagram posts in a responsive carousel layout to enhance social proof and keep your site content visually fresh.

Course Registration Form for Wordpress logo

Course Registration Form

Use a scroll progress bar that visually tracks reading on the page, improves navigation, and keeps visitors aware of their position.

Blogger Feed for Wordpress logo

Blogger Feed

Show Blogger posts automatically with a Blogger feed that keeps your content fresh, improves navigation, and helps visitors discover more of your work.

Personality Quiz for Wordpress logo

Personality Quiz

Create interactive personality quizzes with custom results and flexible design to boost engagement and help visitors explore tailored outcomes easily.

LinkedIn Feed Carousel for Wordpress logo

LinkedIn Feed Carousel

Show LinkedIn posts with a LinkedIn feed carousel that auto updates, presents content in a smooth layout, and keeps visitors engaged.

Notification Popup for Wordpress logo

Notification Popup

Show alerts and updates with a notification popup that grabs attention, delivers important messages, and improves user experience.

Progress Bars for Wordpress logo

Progress Bars

Show progress clearly with animated progress bars that visualize goals, highlight achievements, and keep visitors engaged and motivated.

Real Estate Listings for Wordpress logo

Real Estate Listings

Create real estate listings with a listings widget that displays properties clearly, supports customization, and helps visitors explore homes more easily.

Video Gallery for Wordpress logo

Video Gallery

Showcase videos with a video gallery that organizes clips from multiple sources in clear visual layouts that keep visitors watching and support higher conversions.

AliExpress Reviews for Wordpress logo

AliExpress Reviews

Show AliExpress reviews to build trust, improve credibility, and help visitors make confident purchase decisions that support higher sales.

PDF Flipbook for Wordpress logo

PDF Flipbook

Transform PDFs into interactive flipbooks with a PDF flipbook widget that improves reading and keeps visitors engaged.

More plugins

plugins You Might Like

Discover Apps By Platform

Discover the best apps for your website

WordPress
Wix
Shopify
Weebly
Webflow
Joomla
PrestaShop
Shift4Shop
WebsiteX5
MODX
Opencart
NopCommerce

Common Ninja Search Engine

The Common Ninja Search Engine platform helps website builders find the best site widgets, apps, plugins, tools, add-ons, and extensions! Compatible with all major website building platforms - big or small - and updated regularly, our Search Engine tool provides you with the business tools your site needs!

Multiple platforms