Version Description
- Made the admin class load conditionally instead of always.
- Added donation button.
- Updated documentation.
Download this release
Release Info
Developer | joostdevalk |
Plugin | Clicky by Yoast |
Version | 1.2.1 |
Comparing to | |
See all releases |
Code changes from version 1.2 to 1.2.1
- clicky.php +4 -4
- readme.txt +19 -10
- screenshot-1.jpg +0 -0
- screenshot-2.jpg +0 -0
- yst_plugin_tools.css +11 -0
- yst_plugin_tools.php +30 -15
clicky.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Clicky for WordPress
|
4 |
-
Version: 1.2
|
5 |
Plugin URI: http://getclicky.com/goodies/#wordpress
|
6 |
Description: Integrates Clicky on your blog!
|
7 |
Author: Joost de Valk
|
@@ -10,7 +10,7 @@ Author URI: http://yoast.com/
|
|
10 |
|
11 |
load_plugin_textdomain('clicky','','/clicky/lang/');
|
12 |
|
13 |
-
if ( ! class_exists( 'Clicky_Admin' ) ) {
|
14 |
|
15 |
require_once('yst_plugin_tools.php');
|
16 |
|
@@ -202,8 +202,10 @@ if ( ! class_exists( 'Clicky_Admin' ) ) {
|
|
202 |
<div class="meta-box-sortables">
|
203 |
<?php
|
204 |
$this->plugin_like('clicky');
|
|
|
205 |
$this->plugin_support('clicky');
|
206 |
$this->news();
|
|
|
207 |
?>
|
208 |
</div>
|
209 |
<br/><br/><br/>
|
@@ -392,5 +394,3 @@ function clicky_track_comment($commentID, $comment_status) {
|
|
392 |
}
|
393 |
}
|
394 |
add_action('comment_post','clicky_track_comment',10,2);
|
395 |
-
|
396 |
-
?>
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Clicky for WordPress
|
4 |
+
Version: 1.2.1
|
5 |
Plugin URI: http://getclicky.com/goodies/#wordpress
|
6 |
Description: Integrates Clicky on your blog!
|
7 |
Author: Joost de Valk
|
10 |
|
11 |
load_plugin_textdomain('clicky','','/clicky/lang/');
|
12 |
|
13 |
+
if ( is_admin() && ! class_exists( 'Clicky_Admin' ) ) {
|
14 |
|
15 |
require_once('yst_plugin_tools.php');
|
16 |
|
202 |
<div class="meta-box-sortables">
|
203 |
<?php
|
204 |
$this->plugin_like('clicky');
|
205 |
+
$this->donate();
|
206 |
$this->plugin_support('clicky');
|
207 |
$this->news();
|
208 |
+
|
209 |
?>
|
210 |
</div>
|
211 |
<br/><br/><br/>
|
394 |
}
|
395 |
}
|
396 |
add_action('comment_post','clicky_track_comment',10,2);
|
|
|
|
readme.txt
CHANGED
@@ -1,37 +1,46 @@
|
|
1 |
-
=== Clicky ===
|
2 |
Contributors: joostdevalk
|
3 |
-
Donate link: http://yoast.com/
|
4 |
-
Tags: analytics, statistics, clicky
|
5 |
Requires at least: 2.8
|
6 |
Tested up to: 3.2
|
7 |
-
Stable tag: 1.2
|
8 |
|
9 |
-
Integrates the Clicky
|
10 |
|
11 |
== Description ==
|
12 |
|
13 |
-
Integrates the [Clicky web analytics](http://getclicky.com/145844) service
|
14 |
|
15 |
-
* Automatically adding your Clicky tracking code everywhere.
|
16 |
* Option to ignore admins.
|
17 |
* Option to store names of commenters.
|
|
|
18 |
* Option to track posts & pages as goals and assign a revenue to that page or post.
|
19 |
* An overview of your site's statistics on your dashboard.
|
20 |
-
|
21 |
-
|
22 |
|
23 |
== Installation ==
|
24 |
|
25 |
1. Upload the `clicky` folder to the `/wp-content/plugins/` directory
|
26 |
1. Activate the plugin through the 'Plugins' menu in WordPress
|
27 |
-
1. Enter your Site ID, Key and Admin Key
|
|
|
28 |
|
29 |
== Screenshots ==
|
30 |
|
31 |
1. The Clicky WordPress plugin settings panel.
|
|
|
32 |
|
33 |
== Changelog ==
|
34 |
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
= 1.2 =
|
36 |
|
37 |
* Update to work with the new CDN per [this post](http://getclicky.com/blog/264/important-were-moving-to-a-real-cdn-soon-depending-on-how-youve-set-up-tracking-you-may-need-to-take-action).
|
1 |
+
=== Clicky by Yoast ===
|
2 |
Contributors: joostdevalk
|
3 |
+
Donate link: http://yoast.com/donate/
|
4 |
+
Tags: analytics, statistics, clicky, getclicky
|
5 |
Requires at least: 2.8
|
6 |
Tested up to: 3.2
|
7 |
+
Stable tag: 1.2.1
|
8 |
|
9 |
+
Integrates the Clicky (from getClicky.com) web analytics service into your blog.
|
10 |
|
11 |
== Description ==
|
12 |
|
13 |
+
Integrates the [Clicky web analytics](http://getclicky.com/145844) service into your blog.
|
14 |
|
15 |
+
* Automatically adding your Clicky (from getClicky.com) tracking code everywhere.
|
16 |
* Option to ignore admins.
|
17 |
* Option to store names of commenters.
|
18 |
+
* Stores comments as an action using the getClicky [internal data logging API](https://secure.getclicky.com/help/customization/manual#internal). This requires a [pro account](http://getclicky.com/145844) to work.
|
19 |
* Option to track posts & pages as goals and assign a revenue to that page or post.
|
20 |
* An overview of your site's statistics on your dashboard.
|
21 |
+
|
22 |
+
Read the authors [review of Clicky Analytics](http://yoast.com/clicky-analytics-review/) if you want to see a bit more of the cool integration this plugin provides.
|
23 |
|
24 |
== Installation ==
|
25 |
|
26 |
1. Upload the `clicky` folder to the `/wp-content/plugins/` directory
|
27 |
1. Activate the plugin through the 'Plugins' menu in WordPress
|
28 |
+
1. Enter your Site ID, Key and Admin Key.
|
29 |
+
1. You're done, getClicky should start working.
|
30 |
|
31 |
== Screenshots ==
|
32 |
|
33 |
1. The Clicky WordPress plugin settings panel.
|
34 |
+
2. The Clicky metabox on posts and pages.
|
35 |
|
36 |
== Changelog ==
|
37 |
|
38 |
+
= 1.2.1 =
|
39 |
+
|
40 |
+
* Made the admin class load conditionally instead of always.
|
41 |
+
* Added donation button.
|
42 |
+
* Updated documentation.
|
43 |
+
|
44 |
= 1.2 =
|
45 |
|
46 |
* Update to work with the new CDN per [this post](http://getclicky.com/blog/264/important-were-moving-to-a-real-cdn-soon-depending-on-how-youve-set-up-tracking-you-may-need-to-take-action).
|
screenshot-1.jpg
CHANGED
Binary file
|
screenshot-2.jpg
ADDED
Binary file
|
yst_plugin_tools.css
CHANGED
@@ -68,4 +68,15 @@ div.inside .button:hover, div.inside .button-primary:hover {
|
|
68 |
|
69 |
.button, .button-primary {
|
70 |
margin-top: 10px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
}
|
68 |
|
69 |
.button, .button-primary {
|
70 |
margin-top: 10px;
|
71 |
+
}
|
72 |
+
|
73 |
+
.postbox#donate {
|
74 |
+
border-color: green;
|
75 |
+
border-width: 2px;
|
76 |
+
}
|
77 |
+
|
78 |
+
strong.red {
|
79 |
+
color: green;
|
80 |
+
font-weight: bold;
|
81 |
+
font-size: 105%;
|
82 |
}
|
yst_plugin_tools.php
CHANGED
@@ -167,7 +167,7 @@ if (!class_exists('Clicky_Base_Plugin_Admin')) {
|
|
167 |
if (empty($hook)) {
|
168 |
$hook = $this->hook;
|
169 |
}
|
170 |
-
$content = '<p>If you\'ve found a bug in this plugin, please submit it in the <a href="http://yoast.com/
|
171 |
$this->postbox($this->hook.'support', __('Found a bug?','ystplugin'), $content);
|
172 |
}
|
173 |
|
@@ -175,23 +175,38 @@ if (!class_exists('Clicky_Base_Plugin_Admin')) {
|
|
175 |
* Box with latest news from GetClicky
|
176 |
*/
|
177 |
function news( ) {
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
$content .= '<a class="rsswidget" href="'.clean_url( $item['link'], $protocolls=null, 'display' ).'">'. htmlentities($item['title']) .'</a> ';
|
185 |
-
$content .= '</li>';
|
186 |
-
}
|
187 |
-
$content .= '<li class="rss"><a href="http://yoast.com/feed/">Subscribe with RSS</a></li>';
|
188 |
-
$content .= '<li class="email"><a href="http://yoast.com/email-blog-updates/">Subscribe by email</a></li>';
|
189 |
-
$this->postbox('yoastlatest', 'Latest news from Clicky', $content);
|
190 |
} else {
|
191 |
-
|
192 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
193 |
}
|
194 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
195 |
function text_limit( $text, $limit, $finish = ' […]') {
|
196 |
if( strlen( $text ) > $limit ) {
|
197 |
$text = substr( $text, 0, $limit );
|
167 |
if (empty($hook)) {
|
168 |
$hook = $this->hook;
|
169 |
}
|
170 |
+
$content = '<p>If you\'ve found a bug in this plugin, please submit it in the <a href="http://yoast.com/bugs/clicky/">Yoast Bug Tracker</a> with a clear description.</p>';
|
171 |
$this->postbox($this->hook.'support', __('Found a bug?','ystplugin'), $content);
|
172 |
}
|
173 |
|
175 |
* Box with latest news from GetClicky
|
176 |
*/
|
177 |
function news( ) {
|
178 |
+
include_once(ABSPATH . WPINC . '/feed.php');
|
179 |
+
$rss = fetch_feed( $this->feed );
|
180 |
+
$rss_items = $rss->get_items( 0, $rss->get_item_quantity(5) );
|
181 |
+
$content = '<ul>';
|
182 |
+
if ( !$rss_items ) {
|
183 |
+
$content .= '<li class="yoast">no news items, feed might be broken...</li>';
|
|
|
|
|
|
|
|
|
|
|
|
|
184 |
} else {
|
185 |
+
foreach ( $rss_items as $item ) {
|
186 |
+
$content .= '<li class="yoast">';
|
187 |
+
$content .= '<a class="rsswidget" href="'.esc_url( $item->get_permalink(), $protocolls=null, 'display' ).'">'. htmlentities($item->get_title()) .'</a> ';
|
188 |
+
$content .= '</li>';
|
189 |
+
}
|
190 |
+
}
|
191 |
+
$content .= '<li class="rss"><a href="http://yoast.com/feed/">Subscribe with RSS</a></li>';
|
192 |
+
$content .= '<li class="email"><a href="http://yoast.com/email-blog-updates/">Subscribe by email</a></li>';
|
193 |
+
$content .= '</ul>';
|
194 |
+
$this->postbox('yoastlatest', 'Latest news from Clicky', $content);
|
195 |
}
|
196 |
|
197 |
+
/**
|
198 |
+
* Donation box
|
199 |
+
*/
|
200 |
+
function donate() {
|
201 |
+
$this->postbox('donate','<strong class="red">Donate $10, $20 or $50!</strong>','<p>This plugin has cost me countless hours of work, if you use it, please donate a token of your appreciation!</p><br/>
|
202 |
+
<form style="margin-left:50px;" action="https://www.paypal.com/cgi-bin/webscr" method="post">
|
203 |
+
<input type="hidden" name="cmd" value="_s-xclick">
|
204 |
+
<input type="hidden" name="hosted_button_id" value="KWQT234DEG7KY">
|
205 |
+
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
|
206 |
+
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
|
207 |
+
</form>');
|
208 |
+
}
|
209 |
+
|
210 |
function text_limit( $text, $limit, $finish = ' […]') {
|
211 |
if( strlen( $text ) > $limit ) {
|
212 |
$text = substr( $text, 0, $limit );
|