Changeset 1032108
- Timestamp:
- 11/24/2014 09:15:38 PM (11 years ago)
- Location:
- social-metrics-tracker
- Files:
-
- 160 added
- 1 deleted
- 4 edited
-
tags/1.3.3 (added)
-
tags/1.3.3/MetricsUpdater.class.php (added)
-
tags/1.3.3/SocialMetricsDebugger.class.php (added)
-
tags/1.3.3/SocialMetricsSettings.class.php (added)
-
tags/1.3.3/SocialMetricsTrackerWidget.class.php (added)
-
tags/1.3.3/css (added)
-
tags/1.3.3/css/social-metrics-tracker.min.css (added)
-
tags/1.3.3/css/social-metrics-tracker.min.css.map (added)
-
tags/1.3.3/css/social-metrics-tracker.scss (added)
-
tags/1.3.3/data-sources (added)
-
tags/1.3.3/data-sources/FacebookUpdater.class.php (added)
-
tags/1.3.3/data-sources/GooglePlusUpdater.class.php (added)
-
tags/1.3.3/data-sources/HTTPResourceUpdater.class.php (added)
-
tags/1.3.3/data-sources/LinkedInUpdater.class.php (added)
-
tags/1.3.3/data-sources/PinterestUpdater.class.php (added)
-
tags/1.3.3/data-sources/StumbleUponUpdater.class.php (added)
-
tags/1.3.3/data-sources/TwitterUpdater.class.php (added)
-
tags/1.3.3/data-sources/WordPressCircuitBreaker.class.php (added)
-
tags/1.3.3/data-sources/google_analytics.php (added)
-
tags/1.3.3/js (added)
-
tags/1.3.3/js/social-metrics-tracker.js (added)
-
tags/1.3.3/js/social-metrics-tracker.min.js (added)
-
tags/1.3.3/lib (added)
-
tags/1.3.3/lib/Google (added)
-
tags/1.3.3/lib/Google/Auth (added)
-
tags/1.3.3/lib/Google/Auth/Abstract.php (added)
-
tags/1.3.3/lib/Google/Auth/AssertionCredentials.php (added)
-
tags/1.3.3/lib/Google/Auth/Exception.php (added)
-
tags/1.3.3/lib/Google/Auth/LoginTicket.php (added)
-
tags/1.3.3/lib/Google/Auth/OAuth2.php (added)
-
tags/1.3.3/lib/Google/Auth/Simple.php (added)
-
tags/1.3.3/lib/Google/Cache (added)
-
tags/1.3.3/lib/Google/Cache/Abstract.php (added)
-
tags/1.3.3/lib/Google/Cache/Apc.php (added)
-
tags/1.3.3/lib/Google/Cache/Exception.php (added)
-
tags/1.3.3/lib/Google/Cache/File.php (added)
-
tags/1.3.3/lib/Google/Cache/Memcache.php (added)
-
tags/1.3.3/lib/Google/Cache/Null.php (added)
-
tags/1.3.3/lib/Google/Client.php (added)
-
tags/1.3.3/lib/Google/Collection.php (added)
-
tags/1.3.3/lib/Google/Config.php (added)
-
tags/1.3.3/lib/Google/Exception.php (added)
-
tags/1.3.3/lib/Google/Http (added)
-
tags/1.3.3/lib/Google/Http/Batch.php (added)
-
tags/1.3.3/lib/Google/Http/CacheParser.php (added)
-
tags/1.3.3/lib/Google/Http/MediaFileUpload.php (added)
-
tags/1.3.3/lib/Google/Http/REST.php (added)
-
tags/1.3.3/lib/Google/Http/Request.php (added)
-
tags/1.3.3/lib/Google/IO (added)
-
tags/1.3.3/lib/Google/IO/Abstract.php (added)
-
tags/1.3.3/lib/Google/IO/Curl.php (added)
-
tags/1.3.3/lib/Google/IO/Exception.php (added)
-
tags/1.3.3/lib/Google/IO/Stream.php (added)
-
tags/1.3.3/lib/Google/IO/cacerts.pem (added)
-
tags/1.3.3/lib/Google/Model.php (added)
-
tags/1.3.3/lib/Google/Service (added)
-
tags/1.3.3/lib/Google/Service.php (added)
-
tags/1.3.3/lib/Google/Service/Analytics.php (added)
-
tags/1.3.3/lib/Google/Service/Exception.php (added)
-
tags/1.3.3/lib/Google/Service/Resource.php (added)
-
tags/1.3.3/lib/Google/Signer (added)
-
tags/1.3.3/lib/Google/Signer/Abstract.php (added)
-
tags/1.3.3/lib/Google/Signer/P12.php (added)
-
tags/1.3.3/lib/Google/Utils (added)
-
tags/1.3.3/lib/Google/Utils.php (added)
-
tags/1.3.3/lib/Google/Utils/URITemplate.php (added)
-
tags/1.3.3/lib/Google/Verifier (added)
-
tags/1.3.3/lib/Google/Verifier/Abstract.php (added)
-
tags/1.3.3/lib/Google/Verifier/Pem.php (added)
-
tags/1.3.3/lib/Mustache (added)
-
tags/1.3.3/lib/Mustache/Autoloader.php (added)
-
tags/1.3.3/lib/Mustache/Cache (added)
-
tags/1.3.3/lib/Mustache/Cache.php (added)
-
tags/1.3.3/lib/Mustache/Cache/AbstractCache.php (added)
-
tags/1.3.3/lib/Mustache/Cache/FilesystemCache.php (added)
-
tags/1.3.3/lib/Mustache/Cache/NoopCache.php (added)
-
tags/1.3.3/lib/Mustache/Compiler.php (added)
-
tags/1.3.3/lib/Mustache/Context.php (added)
-
tags/1.3.3/lib/Mustache/Engine.php (added)
-
tags/1.3.3/lib/Mustache/Exception (added)
-
tags/1.3.3/lib/Mustache/Exception.php (added)
-
tags/1.3.3/lib/Mustache/Exception/InvalidArgumentException.php (added)
-
tags/1.3.3/lib/Mustache/Exception/LogicException.php (added)
-
tags/1.3.3/lib/Mustache/Exception/RuntimeException.php (added)
-
tags/1.3.3/lib/Mustache/Exception/SyntaxException.php (added)
-
tags/1.3.3/lib/Mustache/Exception/UnknownFilterException.php (added)
-
tags/1.3.3/lib/Mustache/Exception/UnknownHelperException.php (added)
-
tags/1.3.3/lib/Mustache/Exception/UnknownTemplateException.php (added)
-
tags/1.3.3/lib/Mustache/HelperCollection.php (added)
-
tags/1.3.3/lib/Mustache/LambdaHelper.php (added)
-
tags/1.3.3/lib/Mustache/Loader (added)
-
tags/1.3.3/lib/Mustache/Loader.php (added)
-
tags/1.3.3/lib/Mustache/Loader/ArrayLoader.php (added)
-
tags/1.3.3/lib/Mustache/Loader/CascadingLoader.php (added)
-
tags/1.3.3/lib/Mustache/Loader/FilesystemLoader.php (added)
-
tags/1.3.3/lib/Mustache/Loader/InlineLoader.php (added)
-
tags/1.3.3/lib/Mustache/Loader/MutableLoader.php (added)
-
tags/1.3.3/lib/Mustache/Loader/StringLoader.php (added)
-
tags/1.3.3/lib/Mustache/Logger (added)
-
tags/1.3.3/lib/Mustache/Logger.php (added)
-
tags/1.3.3/lib/Mustache/Logger/AbstractLogger.php (added)
-
tags/1.3.3/lib/Mustache/Logger/StreamLogger.php (added)
-
tags/1.3.3/lib/Mustache/Parser.php (added)
-
tags/1.3.3/lib/Mustache/Template.php (added)
-
tags/1.3.3/lib/Mustache/Tokenizer.php (added)
-
tags/1.3.3/lib/class-wp-list-table.php (added)
-
tags/1.3.3/lib/wp-settings-framework.php (added)
-
tags/1.3.3/readme.txt (added)
-
tags/1.3.3/settings (added)
-
tags/1.3.3/settings/smt-gapi.php (added)
-
tags/1.3.3/settings/smt-general.php (added)
-
tags/1.3.3/smt-dashboard-debug.php (added)
-
tags/1.3.3/smt-dashboard.php (added)
-
tags/1.3.3/smt-export.php (added)
-
tags/1.3.3/social-metrics-tracker.php (added)
-
tags/1.3.3/templates (added)
-
tags/1.3.3/templates/example.mustache (added)
-
tags/1.3.3/uninstall.php (added)
-
trunk/css/social-metrics-tracker.min.css (added)
-
trunk/css/social-metrics-tracker.min.css.map (added)
-
trunk/css/social-metrics-tracker.scss (added)
-
trunk/css/social_metrics.css (deleted)
-
trunk/js/social-metrics-tracker.min.js (added)
-
trunk/lib/Mustache (added)
-
trunk/lib/Mustache/Autoloader.php (added)
-
trunk/lib/Mustache/Cache (added)
-
trunk/lib/Mustache/Cache.php (added)
-
trunk/lib/Mustache/Cache/AbstractCache.php (added)
-
trunk/lib/Mustache/Cache/FilesystemCache.php (added)
-
trunk/lib/Mustache/Cache/NoopCache.php (added)
-
trunk/lib/Mustache/Compiler.php (added)
-
trunk/lib/Mustache/Context.php (added)
-
trunk/lib/Mustache/Engine.php (added)
-
trunk/lib/Mustache/Exception (added)
-
trunk/lib/Mustache/Exception.php (added)
-
trunk/lib/Mustache/Exception/InvalidArgumentException.php (added)
-
trunk/lib/Mustache/Exception/LogicException.php (added)
-
trunk/lib/Mustache/Exception/RuntimeException.php (added)
-
trunk/lib/Mustache/Exception/SyntaxException.php (added)
-
trunk/lib/Mustache/Exception/UnknownFilterException.php (added)
-
trunk/lib/Mustache/Exception/UnknownHelperException.php (added)
-
trunk/lib/Mustache/Exception/UnknownTemplateException.php (added)
-
trunk/lib/Mustache/HelperCollection.php (added)
-
trunk/lib/Mustache/LambdaHelper.php (added)
-
trunk/lib/Mustache/Loader (added)
-
trunk/lib/Mustache/Loader.php (added)
-
trunk/lib/Mustache/Loader/ArrayLoader.php (added)
-
trunk/lib/Mustache/Loader/CascadingLoader.php (added)
-
trunk/lib/Mustache/Loader/FilesystemLoader.php (added)
-
trunk/lib/Mustache/Loader/InlineLoader.php (added)
-
trunk/lib/Mustache/Loader/MutableLoader.php (added)
-
trunk/lib/Mustache/Loader/StringLoader.php (added)
-
trunk/lib/Mustache/Logger (added)
-
trunk/lib/Mustache/Logger.php (added)
-
trunk/lib/Mustache/Logger/AbstractLogger.php (added)
-
trunk/lib/Mustache/Logger/StreamLogger.php (added)
-
trunk/lib/Mustache/Parser.php (added)
-
trunk/lib/Mustache/Template.php (added)
-
trunk/lib/Mustache/Tokenizer.php (added)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/settings/smt-general.php (modified) (2 diffs)
-
trunk/smt-dashboard.php (modified) (4 diffs)
-
trunk/social-metrics-tracker.php (modified) (4 diffs)
-
trunk/templates (added)
-
trunk/templates/example.mustache (added)
Legend:
- Unmodified
- Added
- Removed
-
social-metrics-tracker/trunk/readme.txt
r1027510 r1032108 5 5 Requires at least: 3.5 6 6 Tested up to: 4.0 7 Stable tag: 1.3. 27 Stable tag: 1.3.3 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 84 84 85 85 == Changelog == 86 87 = 1.3.3 = 88 * Optimize reporting dashboard load speed 89 * Improved pagination on reporting dashboard (fixes an issue where only 30 posts were displayed) 86 90 87 91 = 1.3.2 = … … 145 149 == Upgrade Notice == 146 150 151 = 1.3.3 = 152 Optimize pagination on reporting dashboard 153 147 154 = 1.3.2 = 148 155 Hotfix for specific server configurations -
social-metrics-tracker/trunk/settings/smt-general.php
r1001451 r1032108 1 1 <?php 2 2 3 $smt_post_types = get_post_types( array('public'=>true, 'show_ui'=>true), 'names' ); 3 $smt_post_types = get_post_types( array('public'=>true, 'show_ui'=>true), 'names' ); 4 4 5 5 // Do not allow attachments … … 96 96 ), 97 97 array( 98 'id' => 'default_posts_per_page', 99 'title' => 'Default Posts per Page', 100 'desc' => 'Number of posts per page to display in reports', 101 'type' => 'select', 102 'std' => '10', 103 'choices' => array( 104 '10' => '10', 105 '20' => '20', 106 '30' => '30', 107 '40' => '40', 108 '50' => '50', 109 '100' => '100' 110 ) 111 ), 112 array( 98 113 'id' => 'debug_mode', 99 114 'title' => 'Enable Debug Mode', -
social-metrics-tracker/trunk/smt-dashboard.php
r1026007 r1032108 213 213 global $wpdb; //This is used only if making any database queries 214 214 215 $per_page = 10;215 $per_page = empty( $this->smt->options[ 'smt_options_default_posts_per_page' ] ) ? 10 : $this->smt->options[ 'smt_options_default_posts_per_page' ]; 216 216 217 217 $columns = $this->get_columns(); … … 226 226 $post_types = $this->smt->tracked_post_types(); 227 227 228 $limit = 30;229 230 228 // Filter our query results 231 229 add_filter( 'posts_where', array($this, 'date_range_filter') ); … … 233 231 234 232 $querydata = new WP_Query(array( 235 'posts_per_page'=> $limit, 233 'posts_per_page'=> $per_page, 234 'offset' => ($this->get_pagenum()-1) * $per_page, 236 235 'post_status' => 'publish', 237 236 'post_type' => $post_types … … 273 272 274 273 array_push($data, $item); 274 275 275 endwhile; 276 276 endif; 277 277 278 /**279 * REQUIRED for pagination.280 */281 $current_page = $this->get_pagenum();282 283 $total_items = count($data);284 285 $data = array_slice($data,(($current_page-1)*$per_page),$per_page);286 287 278 $this->items = $data; 288 279 289 $this->set_pagination_args( array( 290 'total_items' => $total_items, //WE have to calculate the total number of items 291 'per_page' => $per_page, //WE have to determine how many items to show on a page 292 'total_pages' => ceil($total_items/$per_page) //WE have to calculate the total number of pages 293 ) ); 280 // Pagination 281 $this->set_pagination_args(array( 282 'total_items' => $querydata->found_posts, // Calculate the total number of items 283 'per_page' => $per_page, // Determine how many items to show on a page 284 'total_pages' => ceil($querydata->found_posts/$per_page) // Calculate the total number of pages 285 )); 294 286 } 295 287 -
social-metrics-tracker/trunk/social-metrics-tracker.php
r1027453 r1032108 4 4 Plugin URI: https://github.com/ChapmanU/wp-social-metrics-tracker 5 5 Description: Collect and display social network shares, likes, tweets, and view counts of posts. 6 Version: 1.3. 26 Version: 1.3.3 7 7 Author: Ben Cole, Chapman University 8 8 Author URI: http://www.bencole.net … … 30 30 include_once('SocialMetricsTrackerWidget.class.php'); 31 31 include_once('SocialMetricsDebugger.class.php'); 32 require_once('lib/Mustache/Autoloader.php'); 33 32 34 33 35 class SocialMetricsTracker { 34 36 35 public $version = '1.3. 2'; // for db upgrade comparison37 public $version = '1.3.3'; // for db upgrade comparison 36 38 public $updater; 37 39 public $options; … … 77 79 } 78 80 81 /*************************************************** 82 * Renders a template using the Mustache Engine 83 ***************************************************/ 84 public function renderTemplate($tpl, $data) { 85 86 if (!isset($this->mustache_engine)) { 87 Mustache_Autoloader::register(); 88 $this->mustache_engine = new Mustache_Engine(array( 89 'loader' => new Mustache_Loader_FilesystemLoader(dirname(__FILE__).'/templates'), 90 )); 91 } 92 93 return $this->mustache_engine->render($tpl, $data); 94 } 95 79 96 // Determines if we are on a development or staging environment 80 97 public function is_development_server() { … … 109 126 public function adminHeaderScripts() { 110 127 111 wp_register_style( 'smt-css', plugins_url( 'css/social _metrics.css' , __FILE__ ), false, $this->version );128 wp_register_style( 'smt-css', plugins_url( 'css/social-metrics-tracker.min.css' , __FILE__ ), false, $this->version ); 112 129 wp_enqueue_style( 'smt-css' ); 113 130 114 wp_register_script( 'smt-js', plugins_url( 'js/social-metrics-tracker. js' , __FILE__ ), 'jquery', $this->version );131 wp_register_script( 'smt-js', plugins_url( 'js/social-metrics-tracker.min.js' , __FILE__ ), 'jquery', $this->version ); 115 132 wp_enqueue_script( 'smt-js' ); 116 133
Note: See TracChangeset
for help on using the changeset viewer.