AVeryNiceWeb

Count Per Day Plugin shortcodes

Count Per Day Plugin shortcodes

Postby admin » Mon Mar 27, 2017 3:55 pm

Shortcodes

You can use these shortcodes in the content of your posts to show a number or list
or in your theme files while adding e.g. <?php echo do_shortcode("[THE_SHORTCODE]"); ?>.
To use the shortcodes within a text widget you have to add add_filter("widget_text", "do_shortcode"); to the functions.php of your theme.

[CPD_READS_THIS]
[CPD_READS_TOTAL]
[CPD_READS_TODAY]
[CPD_READS_YESTERDAY]
[CPD_READS_LAST_WEEK]
[CPD_READS_THIS_MONTH]
[CPD_READS_PER_MONTH]
[CPD_VISITORS_TOTAL]
[CPD_VISITORS_ONLINE]
[CPD_VISITORS_TODAY]
[CPD_VISITORS_YESTERDAY]
[CPD_VISITORS_LAST_WEEK]
[CPD_VISITORS_THIS_MONTH]
[CPD_VISITORS_PER_MONTH]
[CPD_VISITORS_PER_DAY]
[CPD_VISITORS_PER_POST]
[CPD_FIRST_COUNT]
[CPD_POSTS_ON_DAY]
[CPD_CLIENTS]
[CPD_COUNTRIES]
[CPD_COUNTRIES_USERS]
[CPD_REFERERS]
[CPD_FLOTCHART]
[CPD_MOST_VISITED_POSTS limit="5" days="30" postsonly="1" posttypes="posts,pages"]

limit (optional): max records to show, default = all
days (optional), show last x days
postsonly (optional), 1 = don't show index pages
posttypes (optional), show this posttypes only, sets postsonly to 1

[CPD_POSTS_ON_DAY date="2010-10-06" limit="3"]

date (optional), format: year-month-day, default = today
limit (optional): max records to show, default = all

[CPD_MAP width="500" height="340" what="reads"]

width and height: size, default 500x340 px
what: map content - reads|visitors|online, default reads

[CPD_SEARCHES days="14" limit="20"]

days (optional), show last x days
limit (optional): show x most searched strings

Functions

You can place these functions in your template.
Use
<?php
global $count_per_day;
if(method_exists($count_per_day,"show")) echo $count_per_day->getReadsAll(true);
?>
to check if plugin is activated.

show( $before, $after, $show, $count, $page )'

$before = text before number e.g. <p> (default "")
$after = text after number e.g. reads</p> (default " reads")
$show = true/false, "echo" complete string or "return" number only (default true)
$count = true/false, false will not count the reads (default true)
$page (optional) PostID

count()

only count reads, without any output
show call it

getFirstCount( $return )

shows date of first count
$return: 0 echo, 1 return output

getUserPerDay( $days, $return )

shows average number of visitors per day of the last $days days
default on dashboard (see it with mouse over number) = "Latest Counts - Days" in options
$return: 0 echo, 1 return output

getReadsAll( $return )

shows number of total reads
$return: 0 echo, 1 return output

getReadsToday( $return )

shows number of reads today
$return: 0 echo, 1 return output

getReadsYesterday( $return )

shows number of reads yesterday
$return: 0 echo, 1 return output

getReadsLastWeek( $return )

shows number of reads last week (7 days)
$return: 0 echo, 1 return output

getReadsThisMonth( $return )

shows number of reads current month
$return: 0 echo, 1 return output

getReadsPerMonth( $return )

lists number of reads per month
$return: 0 echo, 1 return output

getUserAll( $return )

shows number of total visitors
$return: 0 echo, 1 return output

getUserOnline( $frontend, $country, $return )

shows number of visitors just online
$frontend: 1 no link to map
$country: 0 number, 1 country list
$return: 0 echo, 1 return output

getUserToday( $return )

shows number of visitors today
$return: 0 echo, 1 return output

getUserYesterday( $return )

shows number of visitors yesterday
$return: 0 echo, 1 return output

getUserLastWeek( $return )

shows number of visitors last week (7 days)
$return: 0 echo, 1 return output

getUserThisMonth( $return )

shows number of visitors current month
$return: 0 echo, 1 return output

getUserPerMonth( $frontend, $return )

lists number of visitors per month
$frontend: 1 no links
$return: 0 echo, 1 return output

getUserPerPost( $limit, $frontend, $return )

lists $limit number of posts, -1: all, 0: get option from DB, x: number
$frontend: 1 no links
$return: 0 echo, 1 return output

getMostVisitedPosts( $days, $limits, $frontend, $postsonly, $return, $posttypes )

shows a list with the most visited posts in the last days
$days = days to calc (last days), 0: get option from DB
$limit = count of posts (last posts), 0: get option from DB
$frontend: 1 no links
$postsonly: 0 show, 1 don't show categories and taxonomies
$return: 0 echo, 1 return output
$posttypes: comma separated list of post types, default: empty to show all

getVisitedPostsOnDay( $date, $limit, $show_form, $show_notes, $frontend, $return )

shows visited pages at given day
$date day in MySQL date format yyyy-mm-dd, 0 today
$limit count of posts
$show_form show form for date selection, default on, in frontend set it to 0
$show_notes show button to add notes in form, default on, in frontend set it to 0
$frontend: 1 no links
$return: 0 echo, 1 return output

getClients( $return )

shows visits per client/browser in percent
$return: 0 echo, 1 return output

getReferers( $limit, $return, $days )

lists top $limit referrers of the last $days days, 0: get option from DB, x: number
$return: 0 echo, 1 return output

getMostVisitedPostIDs( $days, $limit, $cats, $return_array )

$days last x days, default = 365
$limit return max. x posts, default = 10
$cats IDs of categories to filter, array or number
$return_array true returns an array with Post-ID, title and count, false returns comma separated list of Post-IDs

function getMap( $what, $width, $height, $min )

gets a world map
$what visitors|reads|online
$width size in px
$height size in px
$min : 1 disable title, legend and zoombar

getDayWithMostReads( $return )

shows day with most Reads
$return: 0 echo, 1 return output

getDayWithMostVisitors( $return )

shows day with most Visitors
$return: 0 echo, 1 return output

GeoIP

With GeoIP you can associate your visitors to an country using the IP address.
On options page you can update you current visits. This take a while! The Script checks 100 IP addresses at once an reload itself until less then 100 addresses left. Click the update button to check the rest.
If the rest remains greater than 0 the IP address is not in GeoIP database (accuracy 99.5%).
You can update the GeoIP database from time to time to get new IP data. This necessitates write permissions to wp-content/count-per-day-geoip directory.
If the automatically update don't work download GeoIPv6.dat.gz, extract and rename it to GeoIP.dat and load it to the count-per-day-geoip directory.
More information about GeoIP on http://www.maxmind.com
The AVNW Support Team
http://www.AVeryNiceWeb.com

If we have provided you with great information or service, there are a few ways you can show your appreciation:
  1. Become a AVNW Paid Subscriber.- We are constantly updating our data base with great tips and solutions to common problems, especially with Ultimate Member. If you found our site because of a WordPress issue, then your issue (if solved) will be published with the solution(s) for others to benefit from.
  2. Make a small donation.- We have buttons at the top and bottom that will allow you to do so via PayPal fast.
  3. Send us a testimonial.- Testimonials giving us praise for our good work is also valuable to us and encourages others to seek our support.
  4. Post a review (OP only).- If you came from a WordPress support board, posting a good review about our free service could also compel others to seek our advice & support.
  5. Like us on Facebook.- Recently our account had a problem on FB and we were forced to create a new one. We lost all our posts & likes. :(
If you do all 5, you'll get a surprise bonus from us. :)
Thank You!
User avatar
admin
Site Admin
 
Posts: 381
Joined: Mon Jan 13, 2014 3:18 am
Location: New York City

Return to Plugins

Who is online

Users browsing this forum: No registered users and 0 guests

cron