Changeset 1109426
- Timestamp:
- 03/10/2015 12:41:14 PM (11 years ago)
- Location:
- expresscurate/trunk
- Files:
-
- 17 edited
-
ExpressCurate.php (modified) (1 diff)
-
ExpressCurate_FeedManager.php (modified) (1 diff)
-
ExpressCurate_HtmlParser.php (modified) (4 diffs)
-
ExpressCurate_Tracker.php (modified) (2 diffs)
-
css/expresscurate.css (modified) (1 diff)
-
css/quotes-style.css (modified) (1 diff)
-
js/Buttons.js (modified) (5 diffs)
-
js/Dialog.js (modified) (2 diffs)
-
js/Utils.js (modified) (2 diffs)
-
js/keywords/SEOControlCenter.js (modified) (1 diff)
-
readme.txt (modified) (3 diffs)
-
templates/dashboard.php (modified) (2 diffs)
-
templates/dashboard/bookmarks_widget.php (modified) (2 diffs)
-
templates/dashboard/feed_widget.php (modified) (2 diffs)
-
templates/faq.php (modified) (1 diff)
-
templates/support.php (modified) (1 diff)
-
templates/widget.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
expresscurate/trunk/ExpressCurate.php
r1106118 r1109426 5 5 Plugin URI: http://www.expresscurate.com/products 6 6 Description: ExpressCurate plugin is a content curation tool for WordPress. It enables you to create and publish high quality content within minutes. 7 Version: 2.0. 67 Version: 2.0.7 8 8 Author: ExpressCurate 9 9 Author URI: http://www.expresscurate.com -
expresscurate/trunk/ExpressCurate_FeedManager.php
r1106118 r1109426 781 781 foreach ($bookmarks as $key => $bookmark) { 782 782 $date_array = date_parse($bookmark['bookmark_date']); 783 $bookmark_date = strtotime(date('Y-m-d', mktime( $date_array['month'], $date_array['day'], $date_array['year'])));783 $bookmark_date = strtotime(date('Y-m-d', mktime(0,0,0,$date_array['month'], $date_array['day'], $date_array['year']))); 784 784 if ($bookmark_date >= $start && $bookmark_date <= $end) { 785 785 $count++; -
expresscurate/trunk/ExpressCurate_HtmlParser.php
r1106118 r1109426 15 15 private $domain; 16 16 private $fragment; 17 private $protocol; 17 18 private $path; 18 19 private $html; … … 30 31 $this->path = 'http://' . parse_url($this->url, PHP_URL_HOST) . "/" . $path . "/"; 31 32 $this->fragment = parse_url($this->url, PHP_URL_FRAGMENT); 33 $this->protocol = parse_url($this->url, PHP_URL_SCHEME); 32 34 } 33 35 … … 125 127 //$this->html = preg_replace('/[\r|\n]+/msi', '', $this->html); 126 128 $this->html = preg_replace('/<--[\S\s]*?-->/msi', '', $this->html); 127 $this->html = preg_replace('/<noscript[^>]*>[\S\s]*?' . 129 /*$this->html = preg_replace('/<noscript[^>]*>[\S\s]*?' . 130 '<\/noscript>/msi', '', $this->html);*/ 131 $this->html = preg_replace('/<noscript[^>]*>[\s]*?' . 128 132 '<\/noscript>/msi', '', $this->html); 129 133 $this->html = preg_replace('~>\s+<~', '><', $this->html); … … 157 161 $src = $src; 158 162 } else if (strpos($src, '//') === 0) { 159 $src = $this->fragment . $src; 163 if(isset($this->fragment)){ 164 $src = $this->fragment . $src; 165 } 166 else{ 167 $src = $this->protocol.":" . $src; 168 } 160 169 } elseif (strpos($src, '/') === 0) { 161 170 $src = $this->domain . $src; -
expresscurate/trunk/ExpressCurate_Tracker.php
r1106118 r1109426 9 9 */ 10 10 11 class ExpressCurate_Tracker { 11 class ExpressCurate_Tracker 12 { 12 13 13 14 private static $instance; … … 17 18 private $hash; 18 19 19 function __construct() { 20 function __construct() 21 { 20 22 $this->hash = site_url(); 21 23 } 22 24 23 public static function getInstance() { 24 if ( ! ( self::$instance instanceof self ) ) { 25 public static function getInstance() 26 { 27 if (!(self::$instance instanceof self)) { 25 28 self::$instance = new self(); 26 29 } 27 30 28 31 return self::$instance; 29 32 } 30 31 public function getSiteHash() { 33 34 public function getSiteHash() 35 { 32 36 return $this->hash; 33 37 } 34 35 public function trackPage($page) { 38 39 public function trackPage($page) 40 { 36 41 $this->pages[] = $page; 37 42 } 38 39 public function trackPath($path) { 43 44 public function trackPath($path) 45 { 40 46 $this->paths[] = $path; 41 47 } 42 48 43 public function track() { 44 global $expresscurate_track_page; 45 global $pagenow; 46 // create hash to keep tracking anonymous 47 48 ?> 49 50 <script type="text/javascript"> 51 var expresscurate_track_hash = '<?php echo $hash; ?>'; 49 public function track() 50 { 51 global $expresscurate_track_page; 52 global $pagenow; 53 // create hash to keep tracking anonymous 52 54 53 if (typeof ga !== 'function') { 54 (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ 55 (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), 56 m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) 57 })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); 58 } 59 60 ga('create', 'UA-47364718-4', 'auto', { 61 'name': 'expresscurate', 62 //'cookieDomain': 'none', 63 'cookieDomain': 'tracking.expresscurate.com', 64 'cookieName': 'expresscurate', 65 'cookieExpires': 20000 66 }); 67 ga('expresscurate.set', 'forceSSL', true); 68 ga('expresscurate.set', 'anonymizeIp', true); 69 ga('expresscurate.send', 'pageview', { 70 'page': '/site/<?php echo $this->hash; ?>' 71 }); 72 ga('expresscurate.send', 'pageview', { 73 'page': '/site/wp/<?php echo $this->hash; ?>' 74 }); 75 <?php if ($expresscurate_track_page) {?> 76 ga('expresscurate.send', 'pageview', { 77 'page': '/page/<?php echo $expresscurate_track_page; ?>' 78 }); 79 <?php } ?> 80 81 <?php 82 if (!empty($this->pages)) { 83 foreach($this->pages as $page) { 84 ?> 85 ga('expresscurate.send', 'pageview', { 86 'page': '/page/<?php echo $page; ?>' 87 }); 88 ga('expresscurate.send', 'pageview',{ 89 'page': '/action/wp/<?php echo $page; ?>/open'; 90 }); 91 <?php } } ?> 92 93 <?php 94 if (!empty($this->paths)) { 95 foreach($this->paths as $path) { 96 ?> 97 ga('expresscurate.send', 'pageview', { 98 'page': '<?php echo $path; ?>' 99 }); 100 <?php } } 101 if((get_option('expresscurate_post_status') && get_option('expresscurate_post_status')=="publish") && ($pagenow=="post-new.php" || $pagenow=="post.php")){ 102 ?> 103 ga('expresscurate.send', 'pageview', { 104 'page': '/post-edit/publish' 105 }); 106 <?php 107 update_option('expresscurate_post_status',''); 108 } 109 ?> 110 </script> 111 <?php 55 ?> 56 57 <script type="text/javascript"> 58 var expresscurate_track_hash = '<?php echo $hash; ?>', 59 siteSendAnalytics = false, 60 siteWpSendAnalytics = false; 61 62 if (typeof ga !== 'function') { 63 (function (i, s, o, g, r, a, m) { 64 i['GoogleAnalyticsObject'] = r; 65 i[r] = i[r] || function () { 66 (i[r].q = i[r].q || []).push(arguments) 67 }, i[r].l = 1 * new Date(); 68 a = s.createElement(o), 69 m = s.getElementsByTagName(o)[0]; 70 a.async = 1; 71 a.src = g; 72 m.parentNode.insertBefore(a, m) 73 })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga'); 74 } 75 76 ga('create', 'UA-47364718-4', 'auto', { 77 'name': 'expresscurate', 78 //'cookieDomain': 'none', 79 'cookieDomain': 'tracking.expresscurate.com', 80 'cookieName': 'expresscurate', 81 'cookieExpires': 20000 82 }); 83 ga('expresscurate.set', 'forceSSL', true); 84 ga('expresscurate.set', 'anonymizeIp', true); 85 ga('expresscurate.send', 'pageview', { 86 'page': '/site/<?php echo $this->hash; ?>', 87 'hitCallback': function () { 88 siteSendAnalytics = true; 89 } 90 }); 91 ga('expresscurate.send', 'pageview', { 92 'page': '/site/wp/<?php echo $this->hash; ?>', 93 'hitCallback': function () { 94 siteWpSendAnalytics = true; 95 } 96 }); 97 <?php if ($expresscurate_track_page) {?> 98 ga('expresscurate.send', 'pageview', { 99 'page': '/page/<?php echo $expresscurate_track_page; ?>' 100 }); 101 <?php } ?> 102 103 <?php 104 if (!empty($this->pages)) { 105 foreach($this->pages as $page) { 106 ?> 107 ga('expresscurate.send', 'pageview', { 108 'page': '/page/<?php echo $page; ?>' 109 }); 110 ga('expresscurate.send', 'pageview', { 111 'page': '/action/wp/<?php echo $page; ?>/open'; 112 }) 113 ; 114 <?php } } ?> 115 116 <?php 117 if (!empty($this->paths)) { 118 foreach($this->paths as $path) { 119 ?> 120 ga('expresscurate.send', 'pageview', { 121 'page': '<?php echo $path; ?>' 122 }); 123 <?php } } 124 if((get_option('expresscurate_post_status') && get_option('expresscurate_post_status')=="publish") && ($pagenow=="post-new.php" || $pagenow=="post.php")){ 125 ?> 126 ga('expresscurate.send', 'pageview', { 127 'page': '/post-edit/publish' 128 }); 129 <?php 130 update_option('expresscurate_post_status',''); 131 } 132 ?> 133 </script> 134 <?php 112 135 } 113 136 } -
expresscurate/trunk/css/expresscurate.css
r1106118 r1109426 2511 2511 } 2512 2512 #expresscurate_wordCount_dialog{ 2513 max-height: 210px !important;2514 2513 height: auto !important; 2515 2514 max-width: 700px !important; -
expresscurate/trunk/css/quotes-style.css
r1066998 r1109426 23 23 position: absolute; 24 24 display: inline-block; 25 background-position: 0 0;25 background-position: 0 10px; 26 26 content: ""; 27 27 clear: both; -
expresscurate/trunk/js/Buttons.js
r1106118 r1109426 160 160 messageHtml += $('.attachment-post-thumbnail').length ? '' : '<p class="lengthSuggestion red">Your post currently doesn’t have a featured image. Adding a featured image is a good way to improve conversion rates by creating visual associations with your posts.</p>'; 161 161 162 var arrOutboundLinks = false, 163 arrInboundLink = false; 164 $(tinyMCE.activeEditor.dom.getRoot()).find('a').each( 165 function () { 166 var link = getRootUrl($(this).attr("href")), 167 patIfRelative = /^https?:\/\//i; 168 if (!patIfRelative.test(link) || link == getRootUrl(window.location)) { 169 arrInboundLink = true; 170 } else { 171 arrOutboundLinks = true; 172 } 173 }); 174 messageHtml += arrInboundLink ? '' : '<p class="lengthSuggestion blue">This page contains no inbound links, add some where appropriate.</p>'; 175 messageHtml += arrOutboundLinks ? '' : '<p class="lengthSuggestion blue">This page contains no outbound links, add some where appropriate.</p>'; 176 162 177 ed.windowManager.open({ 163 178 title: 'Post Analysis', … … 166 181 html: messageHtml 167 182 }); 183 } 184 185 function getRootUrl(url) { 186 return url.toString().replace(/^(.*\/\/[^\/?#]*).*$/, "$1"); 168 187 } 169 188 … … 207 226 return co.replace(/(?:<p[^>]*>)*(<img[^>]+>)(?:<\/p>)*/g, function (a, im) { 208 227 var cls = getAttr(im, 'class'); 209 if (cls.indexOf('expresscurate_FacebookEmbed') != -1) {228 if (cls.indexOf('expresscurate_FacebookEmbed') != -1) { 210 229 return '<p>[' + tinymce.trim(getAttr(im, 'title')) + ']</p>'; 211 230 } … … 214 233 }, 215 234 init: function (ed, url) { 216 /* var t = this;217 t.url = url;218 //replace shortcode before editor content set219 ed.onBeforeSetContent.add(function (ed, o) {220 o.content = t.visualizeShortcode(o.content);221 });222 //replace shortcode as its inserted into editor223 ed.onExecCommand.add(function (ed, cmd) {224 if (cmd === 'mceInsertContent') {225 tinyMCE.activeEditor.setContent(t.visualizeShortcode(tinyMCE.activeEditor.getContent()));226 }227 });228 //replace the image back to shortcode on save229 ed.onPostProcess.add(function (ed, o) {230 if (o.get)231 o.content = t.recoverShortcode(o.content);232 });*/235 /* var t = this; 236 t.url = url; 237 //replace shortcode before editor content set 238 ed.onBeforeSetContent.add(function (ed, o) { 239 o.content = t.visualizeShortcode(o.content); 240 }); 241 //replace shortcode as its inserted into editor 242 ed.onExecCommand.add(function (ed, cmd) { 243 if (cmd === 'mceInsertContent') { 244 tinyMCE.activeEditor.setContent(t.visualizeShortcode(tinyMCE.activeEditor.getContent())); 245 } 246 }); 247 //replace the image back to shortcode on save 248 ed.onPostProcess.add(function (ed, o) { 249 if (o.get) 250 o.content = t.recoverShortcode(o.content); 251 });*/ 233 252 234 253 // Register buttons - trigger above command when clicked … … 278 297 classes: "btn expresscurateCostom expresscurateAddKeyword" 279 298 }); 280 /* ed.addButton('sochalPost', {281 title: 'Add post',282 icon: 'icon expresscurateSocial mce-expresscurateCostom',283 type: 'menubutton',284 cmd: 'sochalPost',285 menu: [286 {287 text: 'facebook',288 icon: 'icon expresscurateSocial mce-expresscurateCostom',289 onclick: function () {290 ed.windowManager.open({291 title: 'Facebook embed',292 body: [{293 type: 'textbox',294 name: 'facebookEmbed'295 }],296 onsubmit: function (e) {297 var $elem=$(e.data.facebookEmbed)[2],298 url=$($elem).data('href');299 ed.insertContent('[facebook src="'+url+'"]');300 }301 });302 }303 },304 {305 text: 'twitter',306 icon: 'icon expresscurateSocial mce-expresscurateCostom',307 onclick: function () {308 ed.windowManager.open({309 title: 'Twitter embed',310 body: [{311 type: 'textbox',312 name: 'twitterEmbed'313 }],314 onsubmit: function (e) {315 var $elem=$(e.data.twitterEmbed)[0],316 url=$($elem).find('> a').attr('href');317 ed.insertContent('[embed]'+url+'[/embed]');318 }319 });320 }321 }322 ]323 });*/324 299 ed.onKeyDown.add(function (ed, e) { 325 300 if (e.altKey && e.keyCode === 75) { -
expresscurate/trunk/js/Dialog.js
r1106118 r1109426 79 79 $.each(paragraphs, function (index, value) { 80 80 if (value['value'].length > shortestParagraphLength) { 81 $sorted [index] = value['value'];81 $sorted.push(value['value']); 82 82 } 83 83 }); … … 568 568 $("#expresscurate_loading").show(); 569 569 submitExpresscurateForm(); 570 $(document).ajaxComplete(function () {571 572 });573 570 }); 574 571 $('#expresscurate_source').keypress(function (e) { 575 572 if (e.keyCode === 13 || e.keyCode === 40) { 573 $("#expresscurate_loading").show(); 576 574 submitExpresscurateForm(); 577 575 return false; -
expresscurate/trunk/js/Utils.js
r1106118 r1109426 152 152 153 153 function track(action, curate) { 154 /*ga('expresscurate.send', 'pageview', { 155 'page': '/site/' + expresscurate_track_hash 156 }); 157 ga('expresscurate.send', 'pageview', { 158 'page': '/site/wp/' + expresscurate_track_hash 159 });*/ 154 if (!siteSendAnalytics) { 155 ga('expresscurate.send', 'pageview', { 156 'page': '/site/' + expresscurate_track_hash 157 }); 158 } 159 if (!siteWpSendAnalytics) { 160 ga('expresscurate.send', 'pageview', { 161 'page': '/site/wp/' + expresscurate_track_hash 162 }); 163 } 160 164 if (curate) { 161 165 ga('expresscurate.send', 'pageview', { … … 185 189 186 190 } 191 /*support submit*/ 192 $('#expresscurate_support_form').on('click', '.feedbackButton, .askButton', function () { 193 expresscurateSupportSubmit(); 194 }); 187 195 /*settings page tabs*/ 188 196 if ($('.expresscurate_settings').length) { -
expresscurate/trunk/js/keywords/SEOControlCenter.js
r1106118 r1109426 250 250 } 251 251 }); 252 $('#expresscurate_widget_wrapper .mark').on('click', function (e) { 253 ExpressCurateKeywords.markEditorKeywords(); 254 }); 252 255 253 256 /*insert keyword in content*/ -
expresscurate/trunk/readme.txt
r1106118 r1109426 5 5 Requires at least: 3.9 6 6 Tested up to: 4.1 7 Stable tag: 2.0. 67 Stable tag: 2.0.7 8 8 License: GPLv3 or later 9 9 License URI: http://www.gnu.org/licenses/gpl.html … … 81 81 82 82 = How To Get Started = 83 [Download ExpressCurate plugin](http://downloads.wordpress.org/plugin/expresscurate.2.0. 6.zip "Your favorite content marketing tools") for WordPress.83 [Download ExpressCurate plugin](http://downloads.wordpress.org/plugin/expresscurate.2.0.7.zip "Your favorite content marketing tools") for WordPress. 84 84 You can also [download](http://www.expresscurate.com/p/products/wordpress-theme "Your favorite WordPress Theme") a **free** [ExpressCurate WordPress theme](http://www.expresscurate.com/p/products/wordpress-theme "Your favorite WordPress Theme"). It will give your curated content a modern online news look. 85 85 … … 129 129 == Changelog == 130 130 131 = 2.0.7 = 132 * Miscellaneous bug fixes and improvements. 133 131 134 = 2.0.6 = 132 135 * Miscellaneous bug fixes and improvements. -
expresscurate/trunk/templates/dashboard.php
r1106118 r1109426 79 79 placeholder="Message"></textarea> 80 80 <label for="expresscurate_support_message" class="expresscurate_errorMessage"></label> 81 <a class="feedbackButton send greenBackground" href="#" onclick="ExpressCurateUtils.expresscurateSupportSubmit();">Send</a>81 <a class="feedbackButton send greenBackground" href="#">Send</a> 82 82 </form> 83 83 </div> … … 142 142 placeholder="Message"></textarea> 143 143 <label for="expresscurate_support_message" class="expresscurate_errorMessage"></label> 144 <a class="feedbackButton send greenBackground" href="#" onclick="ExpressCurateUtils.expresscurateSupportSubmit();">Send</a>144 <a class="feedbackButton send greenBackground" href="#">Send</a> 145 145 </form> 146 146 </div> -
expresscurate/trunk/templates/dashboard/bookmarks_widget.php
r1106118 r1109426 2 2 $feedManager = new ExpressCurate_FeedManager(); 3 3 $bookmarks = $feedManager->get_bookmarks(); 4 if (!empty($bookmarks)){ 5 $sorted_bookmarks = array_reverse($bookmarks); 6 } 4 7 $last_7_days = $feedManager->count_bookmarks_by_days($bookmarks, 7); 5 8 $bookmarks_count = count($bookmarks); 6 $bookmarks = array_slice($bookmarks, 0, 5); 9 $sorted_bookmarks = array_slice($sorted_bookmarks, 0, 5); 10 7 11 ?> 8 12 <div class="expresscurate_dashboard expresscurate_Styles expresscurate_dashboard_bookmarks "> … … 20 24 <ul class="list"> 21 25 <?php 22 if (!empty($ bookmarks)) {26 if (!empty($sorted_bookmarks)) { 23 27 $i = 0; 24 foreach ($ bookmarks as $key => $item) {28 foreach ($sorted_bookmarks as $key => $item) { 25 29 ?> 26 30 <li> -
expresscurate/trunk/templates/dashboard/feed_widget.php
r1106118 r1109426 7 7 <?php 8 8 $feeds = $feedManager->get_feed_list(); 9 if(!empty($feeds) ){9 if(!empty($feeds) && !empty($feeds['content'])){ 10 10 $content_list = array_slice($feeds['content'], 0, 5); 11 11 $i = 0; … … 23 23 ?> 24 24 </ul> 25 26 <a class="settingsLink" href="admin.php?page=expresscurate_feed_list">More Content</a> 25 <?php if(!empty($feeds) && !empty($feeds['content'])){ ?> 26 <a class="settingsLink" href="admin.php?page=expresscurate_feed_list">More Content(<?php echo count($feeds['content']); ?>)</a> 27 <?php } ?> 27 28 </div> -
expresscurate/trunk/templates/faq.php
r1106118 r1109426 69 69 placeholder="Question"></textarea> 70 70 <label for="expresscurate_support_message" class="expresscurate_errorMessage"></label> 71 <a class="askButton send greenBackground" href="#" onclick="ExpressCurateUtils.expresscurateSupportSubmit();">Ask</a>71 <a class="askButton send greenBackground" href="#">Ask</a> 72 72 </form> 73 73 </div> -
expresscurate/trunk/templates/support.php
r1106118 r1109426 56 56 placeholder="<?php echo $msg_placeholder?>"></textarea> 57 57 <label for="expresscurate_support_message" class="expresscurate_errorMessage"></label> 58 <a class="feedbackButton send greenBackground" href="#" onclick="ExpressCurateUtils.expresscurateSupportSubmit();">Send</a>58 <a class="feedbackButton send greenBackground" href="#">Send</a> 59 59 </form> 60 60 </div> -
expresscurate/trunk/templates/widget.php
r1106118 r1109426 6 6 class="expresscurate_widget_wrapper expresscurate_Styles expresscurate_preventTextSelection"> 7 7 <label>Keywords <span class="rotate"><a href="#"></a></span> 8 <span class="mark" onclick="ExpressCurateKeywords.markEditorKeywords();return false;"><span>mark keywords</span></span>8 <span class="mark"><span>mark keywords</span></span> 9 9 </label> 10 10 <?php
Note: See TracChangeset
for help on using the changeset viewer.