Title: Dexs.Counter
Author: pytesNET
Published: <strong>Disyembre 11, 2016</strong>
Last modified: Disyembre 15, 2016

---

Maghanap ng mga plugin

![](https://ps.w.org/dexs-counter/assets/banner-772x250.png?rev=1555071)

Ang plugin na ito ay **hindi pa nasusubukan sa pinakabagong 3 major release ng WordPress**.
Maaaring hindi na ito minamantine o sinusuportahan at maaaring may mga isyu sa compatibility
kapag ginamit sa mas bagong bersyon ng WordPress.

![](https://ps.w.org/dexs-counter/assets/icon-256x256.png?rev=1555071)

# Dexs.Counter

 Ni [pytesNET](https://profiles.wordpress.org/sambrishes/)

[I-download](https://downloads.wordpress.org/plugin/dexs-counter.0.1.3.zip)

 * [Mga Detalye](https://tl.wordpress.org/plugins/dexs-counter/#description)
 * [Mga Review](https://tl.wordpress.org/plugins/dexs-counter/#reviews)
 *  [Pag-install](https://tl.wordpress.org/plugins/dexs-counter/#installation)
 * [Development](https://tl.wordpress.org/plugins/dexs-counter/#developers)

 [Suporta](https://wordpress.org/support/plugin/dexs-counter/)

## Deskripsyon

The Dexs.Counter plugin detects each (unique) view and stores the collected data
into the own
 database table as well as own post_meta, which can be used to configure
WP_Query loops depending on the counter. This informations are already used in the
2 frontend and in the small dashboard widget. The plugin contains also an extended
statistic, which shows the daily views (of all posts) as diagram within the dashboard
widget. Last but not Least: The plugin offers also a small rating system.

#### Alpha

This plugin is still Alpha and will be expanded in the future. However, it should
not contain
 critical bugs, but if you found one or if you even have general suggestions
for improvement then write us on our [WordPress Plugin Support Page](https://wordpress.org/support/plugin/dexs-counter).

Thank You!

#### Features

 * Post Types: En/Disable the view and rating counter on each single (costum) post
   type.
 * Exclude Roles: In/Exclude user roles from the view- and rating system.
 * Rating Layout: Choose between a single (Like), double (Like, Dislike), 3-level
   and 5-level rating layout.
 * Frontend Widgets: 2 Frontend widgets which allows you to display post lists depending
   on the view and rate counter.
 * Extended Statistics: Logs each day-counter and displays this informations within
   the dashboard widget.

## Mga Screenshot

[⌊The settings page.⌉⌊The settings page.⌉[

The settings page.

[⌊The dashboard widget.⌉⌊The dashboard widget.⌉[

The dashboard widget.

## Pag-install

 1. Upload the `dexs-counter` folder to your `/wp-content/plugins/` directory
 2. Activate the plugin through the ‘Plugins’ menu in WordPress
 3. Configure the plugin through the own ‘Dexs Counter’ Admin Page.
 4. Use It and rate our plugin on the official [WordPress Plugin Directory](https://plugins.wordpress.org/dexs-counter);
    3!

## FAQ

You can use the dexs counter environment easily within your own WordPress theme.
This is useful, if
 you want to adapt the dexs counter design seamless to your theme.
Please Note: You should always check, if the respective function exists with the
php `function_exists(function_name)` method!

### dexs_cr_get_views ($post_id, $type)

Get one of the four view counter numbers for the respective post.

**Parameters**

 * **$post_id** _(Required)_
    The respective post id. Use the `get_the_ID()` WordPress
   function within a loop.
 * **$type** _(Optional)_
    Set the view counter type by using one of the following
   strings
    - `"total"` returns all registered clicks. (Default)
 *  - `"daily"` returns all registered clicks for the current day.
 *  - `"unique"` returns all unique clicks (one click / user).
 *  - `"daily_unique"` returns all unique clicks (one click / user) for the current
      day.

**Return Values**

Returns the view counter number as **integer** or **false** if the $post_id parameter
in invalid.

### dexs_cr_has_viewed ($post_id)

Checks if the current user has already clicked on the respective post.

**Parameters**

 * **$post_id** _(Required)_
    The respective post id. Use the `get_the_ID()` WordPress
   function within a loop.

**Return Values**

Returns **true** if the user has already clicked on the post, and **false** if not
or if the
 $post_id parameter is invalid!

### dexs_cr_get_rating ($post_id)

Get the rating data for the respective post.

**Parameters**

 * **$post_id** _(Required)_
    The respective post id. Use the `get_the_ID()` WordPress
   function within a loop.

**Return Values**

Returns an **array** with the rating data or **false** on failure. Note: The rating
data (or rather
 the array keys) depends on your rating layout setting (see below),
but the values are always **integers** an represents the number of ratings / clicks
on the respective rating value.

 * On **“Single”**: `array("like" => [int])`
 * On **“Double”**: `array("like" => [int], "dislike" => [int])`
 * On **“3-Level”**: `array("1" => [int], "2" => [int], "3" => [int])`
 * On **“5-Level”**: `array("1" => [int], "2" => [int], "3" => [int], "4" => [int],"
   5" => [int])`

### dexs_cr_has_rated ($post_id, $value)

Checks if the current user has already rated yet and returns perhaps his rating 
value.

**Parameters**

 * **$post_id** _(Required)_
    The respective post id. Use the `get_the_ID()` WordPress
   function within a loop.
 * **$value** _(Optional)_
    Change the returning value:
    - `false` checks only if the user has already rated. (Default)
 *  - `true` checks if the user has already rated and returns the rate value.

**Return Values**

    ```
    ($value == false):<br />
    ```

Returns **true** if the user has already rated yet or **false** if not or if the
$post_id is invalid.
 Note: Returns **NULL** if the current user is within an excluded
role!

    ```
    ($value == true):<br />
    ```

Returns the respective rating value as **string** or an empty **string** if the 
current user hasn’t
 rated yet. Note: Returns **false** if the $post_id is invalid
and **NULL** if the current user is within an excluded role

### dexs_cr_rating_link ($post_id, $value)

**Parameters**
 Creates one or more rating links with an WordPress nonce. Example:
http://www.example.com/post_permalink/?dexs-nonce=_nonce_&dexs=rating_value

 * **$post_id** _(Required)_
    The respective post id. Use the `get_the_ID()` WordPress
   function within a loop.
 * **$value** _(Optional)_
    Configure the returning value:
    - `NULL` all rating values, depending on the rating layout. (Default)
 *  - `*value*` checks if the user has already rated and returns the rate value.

**Return Values**

    ```
    ($value == NULL):<br />
    ```

Returns all rating links as **array** or **false* on failure. Note: The array keys
are the
 respective rating values, depending on the rating layout setting!

    ```
    ($value == value):<br />
    ```

Returns the respective rating link as **string** or **false** on failure. Note: 
Returns also false
 if the given value doesn’t match to the rating layout setting!

### WP_Query

You can use the following settings to change the post order, of your costum WP_Query
requests,
 depending to view counter OR rating counter. Note: You may return an 
empty post list, if you use the daily or daily_unique counter and if nobody has 
viewed a single post item on the day yet. Note also: The Dexs.Counter plugin doesn’t
automatically add the counter meta data to all of your posts. So each post that 
havn’t been clicked / rated yet are therefore not considered!

    ```
    &lt;?php
        // The Most-Viewed Posts (Total)
        $query = array(
            "order"     => "DESC",
            "orderby"   => "meta_value_num",
            "meta_key"  => "dexs_views_total"
        );
        $posts = new WP_Query($query);

        // The Most-Viewed Posts (Unique)
        $query = array(
            "order"     => "DESC",
            "orderby"   => "meta_value_num",
            "meta_key"  => "dexs_views_unique"
        );
        $posts = new WP_Query($query);

        // The Most-Viewed Posts (Total / Today)
        $query = array(
            "order"     => "DESC",
            "orderby"   => "meta_value_num",
            "meta_key"  => "dexs_views_today"
        );
        $posts = new WP_Query($query);

        // The Most-Viewed Posts (Unique / Today)
        $query = array(
            "order"     => "DESC",
            "orderby"   => "meta_value_num",
            "meta_key"  => "dexs_views_today_unique"
        );
        $posts = new WP_Query($query);

        // The Best-Rated Posts
        $query = array(
            "order"     => "DESC",
            "orderby"   => "meta_value_num",
            "meta_key"  => "dexs_ratings"
        );
        $posts = new WP_Query($query);

        // The Worst-Rated Posts
        $query = array(
            "order"     => "ASC",
            "orderby"   => "meta_value_num",
            "meta_key"  => "dexs_ratings"
        );
        $posts = new WP_Query($query);

        // The Most-Rated Posts
        $query = array(
            "order"     => "DESC",
            "orderby"   => "meta_value_num",
            "meta_key"  => "dexs_ratings_num"
        );
        $posts = new WP_Query($query);

        // The Fewest-Rated Posts
        $query = array(
            "order"     => "ASC",
            "orderby"   => "meta_value_num",
            "meta_key"  => "dexs_ratings_num"
        );
        $posts = new WP_Query($query);
    ?&gt;
    ```

## Mga Review

Wala pang reviews para sa plugin na ito.

## Mga Contributor at Developer

Ang “Dexs.Counter” ay open source software. Ang mga sumusunod na tao ay nag-ambag
sa plugin na ito.

Mga Contributor

 *   [ pytesNET ](https://profiles.wordpress.org/sambrishes/)

Ang “Dexs.Counter” ay naisalin na sa 1 (na) locale. Salamat sa [mga tagasalin](https://translate.wordpress.org/projects/wp-plugins/dexs-counter/contributors)
para sa kanilang mga kontribusyon.

[Isalin ang “Dexs.Counter” sa iyong wika.](https://translate.wordpress.org/projects/wp-plugins/dexs-counter)

### Interesado sa development?

[Tingnan ang code](https://plugins.trac.wordpress.org/browser/dexs-counter/), i-
check ang [SVN repository](https://plugins.svn.wordpress.org/dexs-counter/), o mag-
subscribe sa [development log](https://plugins.trac.wordpress.org/log/dexs-counter/)
sa pamamagitan ng [RSS](https://plugins.trac.wordpress.org/log/dexs-counter/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### Version 0.1.3 (Alpha)

 * [FIX] Error on an empty counter diagram within the dashboard widget.

#### Version 0.1.2 (Alpha)

 * [UPD] The design and data within the counter diagram.
 * [FIX] The counter diagram datasets had the wrong direction.

#### Version 0.1.1 (Alpha)

 * [ADD] Trivial “Humanity Test” for the view counter.
 * [ADD] The `dexs-counter-verify` option as part of the new “Humanity Test”.
 * [FIX] The `_ip()` function has hashed the wrong value.

#### Version 0.1.0 (Alpha)

 * First Release

## Meta

 *  Bersyon **0.1.3**
 *  Huling na-update **10 taon ang nakalipas**
 *  Mga aktibong installation **10+**
 *  Bersyon ng WordPress ** 4.0 o mas bago **
 *  Sinubukan hanggang **4.7.33**
 *  Mga Wika
 * [English (US)](https://wordpress.org/plugins/dexs-counter/) at .[German](https://de.wordpress.org/plugins/dexs-counter/).
 *  [Isalin sa iyong wika](https://translate.wordpress.org/projects/wp-plugins/dexs-counter)
 * Mga Tag
 * [count](https://tl.wordpress.org/plugins/tags/count/)[Counter](https://tl.wordpress.org/plugins/tags/counter/)
   [rating](https://tl.wordpress.org/plugins/tags/rating/)[view](https://tl.wordpress.org/plugins/tags/view/)
   [views](https://tl.wordpress.org/plugins/tags/views/)
 *  [Advanced View](https://tl.wordpress.org/plugins/dexs-counter/advanced/)

## Mga Rating

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/dexs-counter/reviews/#new-post)

[Tingnan lahat ng review](https://wordpress.org/support/plugin/dexs-counter/reviews/)

## Mga Contributor

 *   [ pytesNET ](https://profiles.wordpress.org/sambrishes/)

## Suporta

May gusto kang sabihin? Kailangan ng tulong?

 [Tingnan ang support forum](https://wordpress.org/support/plugin/dexs-counter/)