Skip to content
Commits on Source (3)
......@@ -7,27 +7,27 @@ posts and pages, and to show reports on that counting.
Counting words
--------------
![word-counting](https://aztlan.fciencias.unam.mx/gitlab/canek/word-count/-/wikis/uploads/3d66d398842ccf58ca565136ca29927c/word-counting.png)
![word-counting](https://aztlan.fciencias.unam.mx/gitlab/canek/free-word-count/-/wikis/uploads/3d66d398842ccf58ca565136ca29927c/word-counting.png)
Statistics
----------
![statistics](https://aztlan.fciencias.unam.mx/gitlab/canek/word-count/-/wikis/uploads/6c2ddb6780ca0c38cff2ec95e362b2c0/statistics.png)
![statistics](https://aztlan.fciencias.unam.mx/gitlab/canek/free-word-count/-/wikis/uploads/6c2ddb6780ca0c38cff2ec95e362b2c0/statistics.png)
Tables
------
![tables](https://aztlan.fciencias.unam.mx/gitlab/canek/word-count/-/wikis/uploads/4b1675be1712ff16072b75d4b99b28cc/tables.png)
![tables](https://aztlan.fciencias.unam.mx/gitlab/canek/free-word-count/-/wikis/uploads/4b1675be1712ff16072b75d4b99b28cc/tables.png)
Bar charts
----------
![bar-charts](https://aztlan.fciencias.unam.mx/gitlab/canek/word-count/-/wikis/uploads/62a666528dcedc9fcdb12243985760c0/bar-charts.png)
![bar-charts](https://aztlan.fciencias.unam.mx/gitlab/canek/free-word-count/-/wikis/uploads/62a666528dcedc9fcdb12243985760c0/bar-charts.png)
Pie charts
----------
![pie-charts](https://aztlan.fciencias.unam.mx/gitlab/canek/word-count/-/wikis/uploads/f8aa3f9afa8e1f0045d6a443a961fc3b/pie-charts.png)
![pie-charts](https://aztlan.fciencias.unam.mx/gitlab/canek/free-word-count/-/wikis/uploads/f8aa3f9afa8e1f0045d6a443a961fc3b/pie-charts.png)
The charts in the reports are created using the
[apexcharts](https://apexcharts.com/) library, available under the MIT license.
......@@ -36,11 +36,11 @@ The charts in the reports are created using the
Installation
------------
Put the `word-count` directory in `${WPDIR}/wp-content/plugins` and activate it
in the plugins section of the admin page. The first time you visit the "Word
count" section, the plugin will start to automatically count the words of all
the published posts and pages. How long will it take depends on the server
machine and the number of posts and pages.
Put the `free-word-count` directory in `${WPDIR}/wp-content/plugins` and
activate it in the plugins section of the admin page. The first time you visit
the "Word count" section, the plugin will start to automatically count the
words of all the published posts and pages. How long will it take depends on
the server machine and the number of posts and pages.
After that, the word count will be automatically updated when you publish posts
and pages; but if you feel is necessary you can trigger the count manually
......
......@@ -185,14 +185,14 @@ msgstr "Palabras en entradas:"
msgid "Total words:"
msgstr "Total de palabras:"
#: datetime-chart.php:26 top-20-tables.php:81 word-count.php:21
#: datetime-chart.php:53 datetime-chart.php:52 datetime-chart.php:55
#: free-word-count.php:21 top-20-tables.php:119
#: datetime-chart.php:26 top-20-tables.php:81 datetime-chart.php:53
#: datetime-chart.php:52 datetime-chart.php:55 free-word-count.php:21
#: top-20-tables.php:119
msgid "Word count"
msgstr "Número de palabras"
#: word-count.php:21 tab-barcharts.php:8 tab-piecharts.php:8 tab-stats.php:10
#: tab-tables.php:8 word-count.php:20 tab-stats.php:15 free-word-count.php:20
#: tab-barcharts.php:8 tab-piecharts.php:8 tab-stats.php:10 tab-tables.php:8
#: word-count.php:20 tab-stats.php:15 free-word-count.php:20
#: tab-barcharts.php:5 tab-piecharts.php:5 tab-stats.php:19 tab-tables.php:5
msgid "Word count and statistics for posts and pages"
msgstr "Número de palabras y estadísticas para entradas y páginas"
......
......@@ -5,7 +5,7 @@
define('WC_ROWS_PER_PAGE', 20);
global $wpdb;
$taburl = get_site_url() . '/wp-admin/admin.php?page=word-count&wc-tab=';
$taburl = get_site_url() . '/wp-admin/admin.php?page=free-word-count&wc-tab=';
function get_wc_tab() {
$wc_tab = !empty($_GET["wc-tab"]) ? $_GET["wc-tab"] : 'tab-stats';
......@@ -18,7 +18,7 @@ function get_wc_tab() {
function echoPage($type, $page, $current, $sep = ' | ', $filter = '') {
$wc_tab = get_wc_tab();
$url = get_site_url() . '/wp-admin/admin.php?page=word-count'
$url = get_site_url() . '/wp-admin/admin.php?page=free-word-count'
. "&wc-tab=$wc_tab&wc-$type-page=$page";
if ($filter != '') {
$url = $url . "&wc-$type-filter=$filter";
......@@ -105,9 +105,9 @@ class WordCounter {
this.intervalId = -1;
this.progressValue = 0;
this.baseUrl = siteUrl +
'/wp-content/plugins/word-count/word-count-progress.php?' +
'/wp-content/plugins/free-word-count/free-word-count-progress.php?' +
'key=' + key + '&total=' + total;
this.relocateUrl = siteUrl + '/wp-admin/admin.php?page=word-count';
this.relocateUrl = siteUrl + '/wp-admin/admin.php?page=free-word-count';
}
launchInterval() {
......
<?php
$base_url = get_site_url() . '/wp-content/plugins/word-count';
$base_url = get_site_url() . '/wp-content/plugins/free-word-count';
$sql = $wpdb->prepare("SELECT SUM(CAST({$wpdb->postmeta}.meta_value AS UNSIGNED)) AS total
FROM {$wpdb->posts}, {$wpdb->postmeta}
......
......@@ -66,7 +66,7 @@ if ($wc_filter == '') {
$results = $wpdb->get_results($sql);
$n = $wpdb->num_rows;
$base_url = get_site_url() . '/wp-content/plugins/word-count';
$base_url = get_site_url() . '/wp-content/plugins/free-word-count';
?>
<script src="<?php echo $base_url; ?>/apexcharts/apexcharts.js"></script>
<div class="wc_section">
......
......@@ -5,7 +5,7 @@ $wc_page = !empty($_GET["wc-$post_type-page"]) ?
$wc_filter = !empty($_GET["wc-$post_type-filter"]) ?
$_GET["wc-$post_type-filter"] : '';
$base_url = get_site_url() . '/wp-content/plugins/word-count';
$base_url = get_site_url() . '/wp-content/plugins/free-word-count';
$sql = '';
if ($wc_filter == '') {
......