Changeset 1140784
- Timestamp:
- 04/21/2015 02:52:21 PM (11 years ago)
- Location:
- expresscurate/trunk
- Files:
-
- 3 added
- 1 deleted
- 19 edited
-
ExpressCurate.php (modified) (2 diffs)
-
ExpressCurate_Actions.php (modified) (13 diffs)
-
ExpressCurate_BufferClient.php (added)
-
ExpressCurate_ContentManager.php (modified) (1 diff)
-
ExpressCurate_FeedManager.php (modified) (12 diffs)
-
ExpressCurate_GoogleAuth.php (deleted)
-
ExpressCurate_GoogleClient.php (added)
-
ExpressCurate_HtmlParser.php (modified) (8 diffs)
-
ExpressCurate_Sitemap.php (modified) (3 diffs)
-
autoload.php (modified) (1 diff)
-
css/expresscurate.css (modified) (3 diffs)
-
js/Buttons.js (modified) (7 diffs)
-
js/Dialog.js (modified) (7 diffs)
-
js/Settings.js (modified) (6 diffs)
-
js/bookmarks.js (modified) (2 diffs)
-
js/feed/contentFeed.js (modified) (1 diff)
-
readme.txt (modified) (3 diffs)
-
templates/advanced_seo_widget.php (modified) (2 diffs)
-
templates/dialog.php (modified) (2 diffs)
-
templates/feed_list.php (modified) (2 diffs)
-
templates/settings.php (modified) (1 diff)
-
templates/sitemap.php (modified) (1 diff)
-
templates/social_posts_widget.php (added)
Legend:
- Unmodified
- Added
- Removed
-
expresscurate/trunk/ExpressCurate.php
r1137344 r1140784 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.1 17 Version: 2.0.12 8 8 Author: ExpressCurate 9 9 Author URI: http://www.expresscurate.com … … 117 117 } 118 118 119 120 121 function extract_google_feed_url($url,$row=null){122 if(strpos(parse_url($url,PHP_URL_SCHEME)."://www.google.com/url",$url)==0 && !empty($row)) {123 $url_query = explode("&",parse_url($url,PHP_URL_QUERY));124 foreach($url_query as $param) {125 if(strpos($param, 'url=') === 0) {126 if (!array_key_exists(str_replace("url=", "", $param), $row)){127 $output_url = str_replace("url=", "", $param);128 }129 else{130 unset($row[$url]);131 }132 break;133 }134 }135 }136 return $output_url;137 }138 139 119 function cron_add_5min($schedules) { 140 120 $schedules['5min'] = array( -
expresscurate/trunk/ExpressCurate_Actions.php
r1137344 r1140784 71 71 add_action('init', array(&$this, 'buttons')); //'wpc_buttons' 72 72 add_action('init', array(&$this, 'include_api')); 73 add_action('init', array(&$this,'add_oembed_facebook'));73 add_action('init', array(&$this, 'add_oembed_facebook')); 74 74 75 75 add_filter('manage_edit-post_columns', array(&$this, 'curated_column_register')); … … 125 125 add_action('wp_ajax_expresscurate_export_api_send_google_key', array($this->ajaxExportAPI, 'send_google_key')); 126 126 127 add_action('wp_ajax_expresscurate_get_article', array($this->contentManager, 'get _article'));127 add_action('wp_ajax_expresscurate_get_article', array($this->contentManager, 'getArticle')); 128 128 add_action('wp_ajax_expresscurate_keywords_get_post_keyword_stats', array($this->keywords, 'get_post_keyword_stats')); 129 129 add_action('wp_ajax_expresscurate_keywords_add_post_keyword', array($this->keywords, 'add_post_keyword')); … … 216 216 register_setting('expresscurate-smartpublish-group', 'expresscurate_manually_approve_smart'); 217 217 register_setting('expresscurate-smartpublish-group', 'expresscurate_hours_interval'); 218 register_setting('expresscurate-smartpublish-group', 'expresscurate_social_publishing'); 218 219 register_setting('expresscurate-sitemap-group', 'expresscurate_sitemap_generation_interval'); 219 220 register_setting('expresscurate-sitemap-group', 'expresscurate_sitemap_include_new_posts'); … … 236 237 } 237 238 238 function add_oembed_facebook(){ 239 wp_oembed_add_provider( 'http://www.facebook.com/*', 'http://api.embed.ly/v1/api/oembed'); 239 function add_oembed_facebook() 240 { 241 wp_oembed_add_provider('http://www.facebook.com/*', 'http://api.embed.ly/v1/api/oembed'); 240 242 } 241 243 … … 293 295 array_push($buttons, 'righttextbox'); 294 296 array_push($buttons, 'noFollow'); 295 if (get_option('expresscurate_seo', '') == "on"){297 if (get_option('expresscurate_seo', '') == "on") { 296 298 array_push($buttons, 'wordCount'); 297 299 } 298 300 array_push($buttons, 'addKeyword'); 301 array_push($buttons, 'clearContent'); 299 302 return $buttons; 300 303 } … … 377 380 return; 378 381 $curated = get_post_meta($post_id, '_is_expresscurate', true); 379 //$cloned = get_post_meta($post_id, '_expresscurate_advanced_seo_post_copy', true);380 //if($cloned=='on'){381 //$curated = '<em>' . __('Cloned', self::PLUGIN_FOLDER) . '</em>';382 // }else{382 $cloned = get_post_meta($post_id, '_expresscurate_advanced_seo_post_copy', true); 383 if ($cloned == 'on') { 384 $curated = '<em>' . __('Cloned', self::PLUGIN_FOLDER) . '</em>'; 385 } else { 383 386 if ($curated == 1) { 384 387 $curated = '<em>' . __('Yes', self::PLUGIN_FOLDER) . '</em>'; … … 386 389 $curated = '<em>' . __('No', self::PLUGIN_FOLDER) . '</em>'; 387 390 } 388 //}391 } 389 392 echo $curated; 390 393 } … … 619 622 $this->generate_sitemap(); 620 623 } 621 if ("publish" == $new_status && "publish" != $old_status && (!empty($_POST['expresscurate_sources']) || get_post_meta($post->ID, '_is_expresscurate', true) ==1)) {624 if ("publish" == $new_status && "publish" != $old_status && (!empty($_POST['expresscurate_sources']) || get_post_meta($post->ID, '_is_expresscurate', true) == 1)) { 622 625 update_option('expresscurate_changed_post_status', 'publish'); 623 626 } … … 1027 1030 { 1028 1031 $seo = get_option('expresscurate_seo', '') == 'on'; 1032 $social = get_option('expresscurate_social_publishing', '') == 'on'; 1029 1033 $post_types = array('post', 'page'); 1030 1034 $post_types = array_merge($post_types, get_post_types(array('_builtin' => false, 'public' => true), 'names')); … … 1035 1039 add_meta_box('expresscurate_advanced_seo', ' Advanced SEO', array(&$this, 'advanced_seo'), $post_type, 'normal', 'high'); 1036 1040 } 1041 /*if($social) { 1042 add_meta_box('expresscurate_social_publishing', ' Social Posts', array(&$this, 'social_posts'), $post_type, 'normal', 'high'); 1043 }*/ 1037 1044 } 1038 1045 } … … 1057 1064 1058 1065 <?php 1066 } 1067 1068 public function social_posts() 1069 { 1070 ?> 1071 <div id="expresscurate_social_posts_widget" class="expresscurate_social_posts_widget"> 1072 <?php include(sprintf("%s/templates/social_posts_widget.php", dirname(__FILE__))); ?> 1073 </div> 1074 <?php 1059 1075 } 1060 1076 … … 1238 1254 } 1239 1255 $_SESSION['sitemap_token'] = false; 1240 /* if(get_option('expresscurate_seo', '' == "on") && get_option('expresscurate_sitemap_submit_webmasters') == 'on'){1241 // $googleAuth = new ExpressCurate_GoogleAuth();1242 // $responseToken = $googleAuth->getGoogleToken();1243 $responseToken = get_option('expresscurate_google_refresh_token');1244 if($responseToken){1245 $_SESSION['sitemap_token'] = true;1246 }1247 }*/1248 1256 1249 1257 // Render the settings template … … 1608 1616 $expresscurateWebsiteUrl = self::EXPRESSCURATE_URL; 1609 1617 if (strlen(get_option('expresscurate_google_refresh_token')) < 3 && get_option('expresscurate_sitemap_submit') == 'on') { 1610 $warnings[] = '<p>Authorise access to Google Webmaster s. <a class="expresscurateLink" href="' . $expresscurateWebsiteUrl . 'api/getsitemapkey/' . $blogName . '">Authorize </a> | <a class="expresscurateLink" href="options-general.php?page=expresscurate_settings"> Sitemap Settings </a></p>';1618 $warnings[] = '<p>Authorise access to Google Webmaster Tools. <a class="expresscurateLink" href="' . $expresscurateWebsiteUrl . 'api/connector/google/webmasters/refreshtoken/' . $blogName . '">Authorize </a> | <a class="expresscurateLink" href="options-general.php?page=expresscurate_settings"> Sitemap Settings </a></p>'; 1611 1619 } 1612 1620 -
expresscurate/trunk/ExpressCurate_ContentManager.php
r1137344 r1140784 35 35 } 36 36 37 public function get _article($url = false, $echo = true) {38 if(!ExpressCurate_HtmlParser::supportsDownload()) {37 public function getArticle($url = false, $echo = true) { 38 if(!ExpressCurate_HtmlParser::supportsDownload()) { 39 39 echo json_encode(array('status' => 'error', 'error' => 'You should activate either curl extension or allow_url_fopen setting.')); 40 40 die; 41 } else{41 } else { 42 42 if (!$url) { 43 43 $url = $this->_post('expresscurate_source', ''); -
expresscurate/trunk/ExpressCurate_FeedManager.php
r1137344 r1140784 69 69 70 70 // construct the rss data 71 $curated_links_rss[$ link]['feed_url'] = $result['feed_url'] = $rssUrl;72 $curated_links_rss[$ link]['link'] = $result['link'] = $link;73 $curated_links_rss[$ link]['post_count'] = $result['post_count'] = count($metas);74 $curated_links_rss[$ link]['feed_title'] = $result['feed_title'] = $feedMeta['title'];71 $curated_links_rss[$rssUrl]['feed_url'] = $result['feed_url'] = $rssUrl; 72 $curated_links_rss[$rssUrl]['link'] = $result['link'] = $link; 73 $curated_links_rss[$rssUrl]['post_count'] = $result['post_count'] = count($metas); 74 $curated_links_rss[$rssUrl]['feed_title'] = $result['feed_title'] = $feedMeta['title']; 75 75 76 76 // save … … 425 425 // save the latest feed 426 426 $feed_content = json_encode(array('date' => date('Y-m-d H:i:s'), 'content' => $feed_array)); 427 //update_option('expresscurate_feed_content', $feed_content);427 update_option('expresscurate_feed_content', $feed_content); 428 428 return $feed_content; 429 429 } … … 454 454 $protocol = $parsedLink['scheme']; 455 455 if (strpos($protocol . "://www.google.com/url", $url) == 0) { 456 $query = $parsedLink['query']; 456 457 $url_query = explode("&", $query); 457 458 foreach ($url_query as $param) { … … 525 526 526 527 // reschedule the cronjob 527 if(!empty($feeds['content'])) {528 wp_clear_scheduled_hook('expresscurate_pull_feeds');529 $pull_feed_interval = (get_option('expresscurate_pull_hours_interval')) ? get_option('expresscurate_pull_hours_interval') : 1;530 wp_schedule_event(strtotime("+" . $pull_feed_interval . " hour"), 'hourly', 'expresscurate_pull_feeds');531 $feeds["minutes_to_next_pull"] = human_time_diff(wp_next_scheduled('expresscurate_pull_feeds'), time());532 }528 //if(!empty($feeds['content'])) { 529 wp_clear_scheduled_hook('expresscurate_pull_feeds'); 530 $pull_feed_interval = (get_option('expresscurate_pull_hours_interval')) ? get_option('expresscurate_pull_hours_interval') : 1; 531 wp_schedule_event(strtotime("+" . $pull_feed_interval . " hour"), 'hourly', 'expresscurate_pull_feeds'); 532 $feeds["minutes_to_next_pull"] = human_time_diff(wp_next_scheduled('expresscurate_pull_feeds'), time()); 533 //} 533 534 534 535 // return … … 638 639 $bookmarks = array(); 639 640 } 640 $exists_url = array(); 641 foreach ($bookmarks as $bookmark) { 642 $exists_url[] = $bookmark['link']; 643 } 641 644 642 foreach ($items as $item) { 645 646 if (!in_array($item['link'], $exists_url)) { 643 $bookmarkURL = $item['link']; 644 if (isset($bookmarks[$bookmarkURL])) { 645 $result[$bookmarkURL]['status'] = 'warning'; 646 }else { 647 647 $current_user = wp_get_current_user(); 648 648 $item['user'] = $current_user->display_name; 649 $this->collect_bookmark($bookmarks, $item); 650 $result[$item['link']]['status'] = 'success'; 651 } else { 652 if ($bookmark['comment']) { 653 $bookmarks[$item['link']]['comment'] = $bookmark['comment']; 654 $result[$item['link']]['status'] = 'success'; 655 } else { 656 $result[$item['link']]['status'] = 'warning'; 657 } 658 } 659 } 660 $bookmarks = json_encode($bookmarks); 661 update_option('expresscurate_bookmarks', $bookmarks); 649 650 $this->collectBookmark($bookmarks, $item); 651 652 $result[$bookmarkURL]['status'] = 'success'; 653 } 654 } 655 656 // save the updated bookmarks 657 update_option('expresscurate_bookmarks', json_encode($bookmarks)); 662 658 } else { 663 659 $result['status'] = 'error'; … … 671 667 $data = $_REQUEST; 672 668 $result = array(); 673 if(!ExpressCurate_HtmlParser::supportsDownload()) {669 if(!ExpressCurate_HtmlParser::supportsDownload()) { 674 670 $result['status'] = 'error'; 675 671 $result['msg'] = 'You should activate either curl extension or allow_url_fopen setting.'; 676 }else { 672 } else { 673 // check if the url to bookmark is specified 677 674 if (isset($data['url'])) { 675 // get the url 676 $bookmarkURL = $data['url']; 677 678 // clean-up the provided url 679 // parse the post url 680 $parsedLink = parse_url($bookmarkURL); 681 682 // google alerts supportbookmarkURL // check for google redirect urls and pick up the original post link 683 $protocol = $parsedLink['scheme']; 684 if (strpos($protocol . "://www.google.com/url", $bookmarkURL) == 0) { 685 $query = $parsedLink['query']; 686 $url_query = explode("&", $query); 687 foreach ($url_query as $param) { 688 if (strpos($param, 'url=') === 0) { 689 $bookmarkURL = str_replace("url=", "", $param); 690 $bookmarkURL = urldecode($bookmarkURL); 691 break; 692 } 693 } 694 } 695 696 // read the existing bookmarks 678 697 $bookmarks = get_option('expresscurate_bookmarks', ''); 679 $data_url = $data['url'];680 698 if ($bookmarks) { 681 699 $bookmarks = json_decode($bookmarks, true); … … 683 701 $bookmarks = array(); 684 702 } 685 $exists_url = array(); 686 foreach ($bookmarks as $bookmark) { 687 $exists_url[] = $bookmark['link']; 688 } 689 690 $extracted_url = extract_google_feed_url($data_url, $bookmarks); 691 if ($extracted_url) { 692 $data_url = $extracted_url; 693 } 694 $data_url = expresscurate_normalise_url($data_url, true); 695 696 if (!in_array($data_url, $exists_url)) { 697 703 704 // check if the provided url is already bookmarked 705 if (isset($bookmarks[$bookmarkURL])) { 706 // is a new comment provided? 707 if (isset($data['comment'])) { 708 // save the new comment 709 $bookmarks[$bookmarkURL]['comment'] = $data['comment']; 710 711 // construct the result 712 $result['status'] = 'success'; 713 $result['result'] = $bookmarkURL; 714 715 // save the updated bookmarks 716 update_option('expresscurate_bookmarks', json_encode($bookmarks)); 717 } else { 718 // construct the result 719 // nothing to do, and url is already bookmarked 720 $result['status'] = 'error'; 721 $result['msg'] = 'This page is already bookmarked.'; 722 } 723 } else { 724 // the page is new, bookmark 725 // load the article 698 726 $contentManager = new ExpressCurate_ContentManager(); 699 $article = $contentManager->get_article($data_url, false); 727 $article = $contentManager->getArticle($bookmarkURL, false); 728 729 // check if the article is loaded successfully 700 730 if (isset($article['status']) && $article['status'] == 'success') { 731 // get the comment 701 732 $comment = isset($data['comment']) ? $data['comment'] : ''; 733 734 // set the type and author 702 735 $article['type'] = isset($data['type']) ? $data['type'] : 'user'; 703 736 $current_user = wp_get_current_user(); 704 737 $article['result']['user'] = $current_user->display_name; 705 $this->collect_bookmark($bookmarks, $article, $data_url, $comment); 738 739 // ... 740 $this->collectBookmark($bookmarks, $article, $bookmarkURL, $comment); 741 742 // construct the result 706 743 $result['status'] = 'success'; 707 $result['result'] = $bookmarks[$data_url]; 708 $result['result']['curateLink'] = base64_encode(urlencode($data_url)); 709 $bookmarks = json_encode($bookmarks); 710 update_option('expresscurate_bookmarks', $bookmarks); 744 $result['result'] = $bookmarks[$bookmarkURL]; 745 $result['result']['curateLink'] = base64_encode(urlencode($bookmarkURL)); 746 747 // save the updated bookmarks 748 update_option('expresscurate_bookmarks', json_encode($bookmarks)); 711 749 } else { 712 750 if (isset($article['status'])) { … … 717 755 $result['msg'] = 'Article does not exists.'; 718 756 } 719 720 }721 } else {722 if (isset($data['comment'])) {723 $bookmarks[$data['url']]['comment'] = $data['comment'];724 $result['result'] = $bookmarks[$data_url];725 $bookmarks = json_encode($bookmarks);726 update_option('expresscurate_bookmarks', $bookmarks);727 $result['status'] = 'success';728 } else {729 $result['status'] = 'error';730 $result['msg'] = 'This page is already bookmarked.';731 757 } 732 758 } 733 759 } else { 734 760 $result['status'] = 'error'; 761 $result['msg'] = 'Please, provide URL to bookmark.'; 735 762 } 736 763 } … … 738 765 die; 739 766 } 740 741 public function get_bookmark() 742 { 743 $data = $_REQUEST; 744 $result = array(); 745 $bookmark = ''; 746 if (isset($data['url'])) { 747 $bookmarks = get_option('expresscurate_bookmarks', ''); 748 if ($bookmarks) { 749 $bookmarks = json_decode(stripslashes($bookmarks), true); 750 } else { 751 $bookmarks = array(); 752 } 753 if (isset($bookmarks[$data['url']])) { 754 $bookmark = $bookmarks[$data['url']]; 755 if ($bookmark) { 756 $result['status'] = 'success'; 757 $result['data'] = $bookmark; 758 } else { 759 $result['status'] = 'warning'; 760 $result['msg'] = 'Bookmark not found'; 761 } 762 } 763 } else { 764 $result['status'] = 'error'; 765 $result['msg'] = 'Url is empty'; 766 } 767 echo json_encode($result,JSON_UNESCAPED_SLASHES); 768 die; 769 } 770 771 private function collect_bookmark(&$bookmarks, $item, $url = null, $comment = '') 772 { 767 768 private function collectBookmark(&$bookmarks, $item, $url = null, $comment = '') { 773 769 if ($url) { 774 770 if (isset($item['result']) && isset($item['result']['title'])) { 775 $url = expresscurate_normalise_url($url, true);771 // create the new bookmark 776 772 $bookmark = array(); 777 773 $bookmark['link'] = $url; … … 784 780 $bookmark['keywords'] = array(); 785 781 $bookmark['media'] = $item['result']['media']; 786 $bookmark['type'] = isset($item['result']['type']) ? $item['type'] : 'user';787 782 $bookmark['comment'] = $comment; 788 783 $bookmark['curated'] = 0; 784 785 $bookmark['type'] = isset($item['result']['type']) ? $item['type'] : 'user'; 786 787 // add the bookmark to the list 789 788 $bookmarks[$url] = $bookmark; 790 789 } … … 796 795 $item['comment'] = $comment; 797 796 $item['bookmark_date'] = date('Y-m-d H:i:s'); 797 798 798 $bookmarks[$item['link']] = $item; 799 799 } 800 800 } 801 } 802 803 public function get_bookmark() 804 { 805 $data = $_REQUEST; 806 $result = array(); 807 $bookmark = ''; 808 if (isset($data['url'])) { 809 $bookmarks = get_option('expresscurate_bookmarks', ''); 810 if ($bookmarks) { 811 $bookmarks = json_decode(stripslashes($bookmarks), true); 812 } else { 813 $bookmarks = array(); 814 } 815 if (isset($bookmarks[$data['url']])) { 816 $bookmark = $bookmarks[$data['url']]; 817 if ($bookmark) { 818 $result['status'] = 'success'; 819 $result['data'] = $bookmark; 820 } else { 821 $result['status'] = 'warning'; 822 $result['msg'] = 'Bookmark not found'; 823 } 824 } 825 } else { 826 $result['status'] = 'error'; 827 $result['msg'] = 'Url is empty'; 828 } 829 echo json_encode($result,JSON_UNESCAPED_SLASHES); 830 die; 801 831 } 802 832 … … 928 958 } else { 929 959 $contentManager = new ExpressCurate_ContentManager(); 930 $article = $contentManager->get _article($data['url'], false);960 $article = $contentManager->getArticle($data['url'], false); 931 961 $result['status'] = $article['status']; 932 962 if ($article['status'] == 'success') { -
expresscurate/trunk/ExpressCurate_HtmlParser.php
r1137344 r1140784 304 304 private static function sanitizeContent($content) 305 305 { 306 $content = preg_replace('#<script(.*?)>(.*?)</script>#is', '', $content);307 $content = preg_replace('/<--[\S\s]*?-->/msi', '', $content);308 $content = preg_replace('/(<noscript[^>]*>|<\/noscript>)/msi', '', $content);309 $content = preg_replace('~>\s+<~', '><', $content);310 $content = preg_replace("/(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+/", "\n", $content);306 //$content = preg_replace('#<script(.*?)>(.*?)</script>#is', '', $content); 307 //$content = preg_replace('/<--[\S\s]*?-->/msi', '', $content); 308 //$content = preg_replace('/(<noscript[^>]*>|<\/noscript>)/msi', '', $content); 309 //$content = preg_replace('~>\s+<~', '><', $content); 310 //$content = preg_replace("/(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+/", "\n", $content); 311 311 312 312 $content = preg_replace('/^.*(?=<html>)/i', '', $content); … … 327 327 $this->removeElementsByTagName('style', $dom); 328 328 $this->removeElementsByTagName('link', $dom); 329 $this->removeElementsByTagName('nocript', $dom); 329 330 330 331 // assign … … 569 570 570 571 // TODO this is a new xpath with the new modified dom, not sure if this is required if dom is passed with a reference 571 $imgTags = $this->xpath->query(".//img", $this->article);572 $imgTags = $this->xpath->query(".//img", $this->article); 572 573 $i = 0; 573 574 foreach ($imgTags as $t) { … … 598 599 } 599 600 //get H1 600 $h1Tag = $this->xpath->query(".//h1", $this->article);601 $h1Tag = $this->xpath->query(".//h1", $this->article); 601 602 foreach ($h1Tag as $h1) { 602 603 if (strlen($h1->nodeValue) > 3) { … … 605 606 $h1->parentNode->removeChild($h1); 606 607 } 608 // TODO add bullets 607 609 //get H2 608 $h2Tag = $this->xpath->query(".//h2", $this->article);610 $h2Tag = $this->xpath->query(".//h2", $this->article); 609 611 foreach ($h2Tag as $h2) { 610 612 if (strlen($h2->nodeValue) > 3) { … … 614 616 } 615 617 //get H3 616 $h3Tag = $this->xpath->query(".//h3", $this->article);618 $h3Tag = $this->xpath->query(".//h3", $this->article); 617 619 foreach ($h3Tag as $h3) { 618 620 if (strlen($h3->nodeValue) > 3) { … … 621 623 $h3->parentNode->removeChild($h3); 622 624 } 623 //get text 624 /*$i = 0; 625 $articleTags = $this->xpath->query('/html/body/article'); 626 foreach ($articleTags as $t) { 627 $result_paragraphs[$i]['value'] = strip_tags(trim($t->nodeValue)); 628 $result_paragraphs[$i]['tag'] = 'article'; 629 $t->parentNode->removeChild($t); 625 626 // reset cursor for paragraphs 627 $i = 0; 628 629 // get blockquotes 630 $blockquoteTag = $this->xpath->query(".//blockquote", $this->article); 631 foreach ($blockquoteTag as $blockquote) { 632 $result_paragraphs[$i]['value'] = trim(strip_tags($blockquote->nodeValue)); 633 $result_paragraphs[$i]['tag'] = 'blockquote'; 630 634 $i++; 631 }*/ 632 633 634 $textTags = $this->xpath->query('//text()',$this->article); 635 636 $blockquote->parentNode->removeChild($blockquote); 637 } 638 639 // get paragraphs 640 $paragraphTag = $this->xpath->query(".//p", $this->article); 641 foreach ($paragraphTag as $paragraph) { 642 $result_paragraphs[$i]['value'] = trim(strip_tags($paragraph->nodeValue)); 643 $result_paragraphs[$i]['tag'] = 'p'; 644 $i++; 645 646 $paragraph->parentNode->removeChild($paragraph); 647 } 648 649 // get to floating texts 650 $textTags = $this->xpath->query('//text()', $this->article); 635 651 foreach ($textTags as $t) { 636 if ($t->length > 15 && $t->parentNode->tagName != 'a' && $t->parentNode->tagName != 'h1' && $t->parentNode->tagName != 'h2' && $t->parentNode->tagName != 'h3') { 637 if ($t->parentNode->nodeName == "blockquote" || $t->parentNode->parentNode->nodeName == "blockquote" || $t->parentNode->parentNode->parentNode->nodeName == "blockquote") { 638 if ($t->parentNode->nodeName == "blockquote") { 639 $result_paragraphs[$i]['value'] = strip_tags($t->parentNode->nodeValue); 640 } elseif ($t->parentNode->parentNode && $t->parentNode->parentNode->nodeName == "blockquote") { 641 $result_paragraphs[$i]['value'] = strip_tags($t->parentNode->parentNode->nodeValue); 642 } elseif ($t->parentNode->parentNode->parentNode && $t->parentNode->parentNode->parentNode->nodeName == "blockquote") { 643 $result_paragraphs[$i]['value'] = strip_tags($t->parentNode->parentNode->parentNode->nodeValue); 644 } 645 $result_paragraphs[$i]['tag'] = "blockquote"; 646 } else { 647 $result_paragraphs[$i]['value'] = strip_tags($t->nodeValue); 648 $result_paragraphs[$i]['tag'] = $t->parentNode->nodeName; 649 } 650 $i++; 651 } 652 $result_paragraphs[$i]['value'] = strip_tags($t->nodeValue); 653 $result_paragraphs[$i]['tag'] = $t->parentNode->nodeName; 654 $i++; 652 655 } 653 656 654 657 //author 655 658 $article_author = ''; 656 $author = $this->xpath->query('.//*[@rel="author"][1]', $this->article)->item(0);659 $author = $this->xpath->query('.//*[@rel="author"][1]', $this->article)->item(0); 657 660 if ($author) { 658 661 $article_author = $author->nodeValue; … … 660 663 //date 661 664 $article_date = ''; 662 $date = $this->xpath->query('.//*[@datetime][1]', $this->article)->item(0);665 $date = $this->xpath->query('.//*[@datetime][1]', $this->article)->item(0); 663 666 if ($date) { 664 667 $article_date = $date->nodeValue; 665 668 } 666 667 669 668 670 //smart tags -
expresscurate/trunk/ExpressCurate_Sitemap.php
r1137344 r1140784 45 45 $this->generateSitemap(); 46 46 } 47 48 49 47 } 50 48 … … 67 65 $this->submitToGoogle(); 68 66 } 69 70 71 67 } 72 68 … … 151 147 public function submitToGoogle() 152 148 { 153 $googleAuth = new ExpressCurate_Google Auth();149 $googleAuth = new ExpressCurate_GoogleClient(); 154 150 $submitToWebmastersStatus = get_option('expresscurate_sitemap_submit'); 155 151 if ($submitToWebmastersStatus) { 156 $response = $googleAuth->getAccessToken(); 152 //$response = $googleAuth->getAccessToken(); 153 $response = $googleAuth->accessToken(); 157 154 if ($response) { 158 $response = $googleAuth->submit_sitemap(get_site_url(), get_site_url() . '/sitemap.xml'); 159 return $response; 155 $response = $googleAuth->submitSitemap(get_site_url(), get_site_url() . '/sitemap.xml'); 156 echo json_encode($response); 157 die; 160 158 } else { 161 // @TODO notify user to get key159 $response = array('status'=> 3,'message' => 'ExpressCurate shall be authorized to access to Google Webmaster Tools.'); 162 160 } 163 161 } -
expresscurate/trunk/autoload.php
r1137344 r1140784 37 37 //require_once 'ExpressCurate_HtmlParser.php'; 38 38 //require_once 'ExpressCurate_Date.php'; 39 //require_once 'ExpressCurate_Google Auth.php';39 //require_once 'ExpressCurate_GoogleClient.php'; 40 40 //require_once 'ExpressCurate_SmartPublish.php'; 41 41 //require_once 'ExpressCurate_Tracker.php'; -
expresscurate/trunk/css/expresscurate.css
r1137344 r1140784 1935 1935 height: 39px; 1936 1936 width: 153px; 1937 margin-left: 10px; 1937 1938 cursor: pointer; 1938 1939 } … … 2892 2893 .expresscurate .tab-content > div{ 2893 2894 min-height: 70vh; 2894 max-width: 700px;2895 max-width: 800px; 2895 2896 } 2896 2897 .expresscurate_advancedSEO_widget .tab-link.disabled, … … 5046 5047 } 5047 5048 5049 .expresscurate_SettingsError{ 5050 font-size: 11px; 5051 color: #e85e50; 5052 margin: 0; 5053 } 5054 .expresscurate_SettingsSuccess{ 5055 font-size: 11px; 5056 color: #1cbb9f; 5057 margin: 0; 5058 } -
expresscurate/trunk/js/Buttons.js
r1129694 r1140784 305 305 } 306 306 } 307 function checkSocialTab(){ 307 308 function checkSocialTab() { 308 309 var $this = $('#expresscurate_socialEmbed'), 309 310 content = $this.val().trim(), … … 318 319 }); 319 320 } 321 320 322 function setupButtons() { 321 323 var $page = $('html'); … … 351 353 onclick: function () { 352 354 checkSocialTab(); 353 var $input =$('#expresscurate_socialEmbed'),355 var $input = $('#expresscurate_socialEmbed'), 354 356 insertedValue = $input.val().trim(), 355 357 selectedTab = $('.expresscurate_socialDialog .tabs li.current').data('tab'); … … 366 368 } else { 367 369 var $elem, 368 url ='';370 url = ''; 369 371 switch (selectedTab) { 370 372 case 'facebook': … … 395 397 } 396 398 } else { 397 var message ='Embed code you have provided is wrong. Please check.';398 ExpressCurateUtils.validationMessages(message, $('.expresscurate_socialDialog .expresscurate_errorMessage'),$input);399 var message = 'Embed code you have provided is wrong. Please check.'; 400 ExpressCurateUtils.validationMessages(message, $('.expresscurate_socialDialog .expresscurate_errorMessage'), $input); 399 401 /*The tab/ URL/ embed code you have provided is wrong. Please check.*/ 400 402 } … … 405 407 }); 406 408 /*$page.on('click', '.expresscurate_socialDialog .tabs li', function () { 407 $('.expresscurate_socialDialog .tabs li').removeClass('current');408 $(this).addClass('current');409 });*/409 $('.expresscurate_socialDialog .tabs li').removeClass('current'); 410 $(this).addClass('current'); 411 });*/ 410 412 tinymce.create('tinymce.plugins.expresscurate', { 411 413 /** … … 465 467 classes: "btn expresscurateCostom expresscurateAddKeyword" 466 468 }); 469 /*console.log(tinymce.EditorManager.get('expresscurate_dialog_content_editor')); 470 tinymce.EditorManager.get('expresscurate_dialog_content_editor').addButton('clearContent', { 471 title: 'Clear editor content', 472 cmd: 'clearContent', 473 classes: "btn expresscurateCostom expresscurateAnnotate" 474 });*/ 467 475 ed.onKeyDown.add(function (ed, e) { 468 476 if (e.altKey && e.keyCode === 75) { -
expresscurate/trunk/js/Dialog.js
r1137344 r1140784 4 4 shortestParagraphLength = 150, 5 5 paragraphWidth = 93, 6 html; 6 html, 7 alignImg, 8 imgSize; 7 9 8 10 function sendWPEditor(html, insertedTags) { … … 388 390 } 389 391 392 function insertContent(clone, addAndContinue) { 393 var ed = tinyMCE.activeEditor, 394 $dialog = $('#expresscurate_dialog'), 395 highlightedElems = $(ed.getBody()).find('span.expresscurate_keywordsHighlight'); 396 if (clone) { 397 ExpressCurateUtils.track('/post/content-dialog/cloneintopost', true); 398 } else { 399 ExpressCurateUtils.track('/post/content-dialog/curateintopost', true); 400 } 401 if (highlightedElems.length > 0) { 402 highlightedElems.each(function (index, val) { 403 $(val).replaceWith(this.childNodes); 404 }); 405 } 406 var insertedTagsTextarea = "", 407 sourceVal = $('#expresscurate_source').val(), 408 postTag = $("#tax-input-post_tag"); 409 insertedTagsTextarea = postTag.val(); 410 $('#curated_tags').find('li').each(function () { 411 insertedTagsTextarea += "," + $(this).find('span.tag').text(); 412 }); 413 postTag.val(insertedTagsTextarea); 414 $(".tagadd").trigger('click'); 415 $('.expresscurate_sources_coll_widget .addSource input').val(sourceVal); 416 ExpressCurateSourceCollection.addNew(); 417 var html = "", 418 bg = $('.img').css('background-image'); 419 420 bg = bg.replace(/^url\(["']?/, '').replace(/["']?\)$/, ''); 421 if (bg.indexOf('images/noimage.png') === -1 && bg.length > 5) { 422 html += '<img class="' + alignImg + ' ' + imgSize + '" src="' + bg + '" data-img-curated-from="' + sourceVal + '">' 423 } 424 425 if (clone) { 426 html += tinyMCE.get('expresscurate_dialog_content_clone_editor').getContent() + '<br />'; 427 } else { 428 html += '<blockquote cite = "' + sourceVal + '">' + tinyMCE.get('expresscurate_dialog_content_editor').getContent() + '<br />'; 429 } 430 431 if (html.length > 0) { 432 if (sourceVal.length > 0) { 433 var domain = sourceVal; 434 if (domain.indexOf('http://') === -1 && domain.indexOf('https://') === -1) { 435 domain = 'http://' + domain; 436 } 437 var title = $("#curated_title").val(); 438 domain = domain.match(/^(http|https)/) ? domain : 'http://' + domain; 439 440 if (domain) { 441 if (clone) { 442 html += '<footer><p class="expresscurate_source">Originally published at <cite><a class="expresscurated" rel="nofollow" data-cloned-url="' + 443 domain + '" href = "' + domain + 444 '"' + ($("#expresscurate_from_target").val() == 'on' ? ' target="_blank"' : '') + '>' + 445 title + '</a></cite></p></footer><br/>'; 446 } else { 447 html += '<footer><p class="expresscurate_source">' + $("#expresscurate_from").val() + 448 ' <cite><a class="expresscurated" rel="nofollow" data-curated-url="' + domain + '" href = "' + domain + 449 '"' + ($("#expresscurate_from_target").val() == 'on' ? ' target="_blank"' : '') + '>' + 450 title + '</a></cite></p></footer><br/>'; 451 } 452 } 453 } 454 455 if (clone) { 456 var $canonicalURL = $('#expresscurate_advanced_seo_canonical_url'), 457 $noFollow = $('#expresscurate_advanced_seo_nofollow'), 458 $noIndex = $('#expresscurate_advanced_seo_noindex'), 459 $copyCheck = $('#expresscurate_advanced_seo_post_copy'), 460 $copyCheckVal = $('#expresscurate_advanced_seo_post_copy_value'), 461 $noIndexVal = $('#expresscurate_advanced_seo_noindex_value'), 462 $noFollowVal = $('#expresscurate_advanced_seo_nofollow_value'), 463 $copyControlWrap = $('#expresscurate_ClonePostWrap'); 464 if ($canonicalURL.length) { 465 $copyControlWrap.removeClass('expresscurate_displayNone'); 466 $copyCheckVal.val('on'); 467 $canonicalURL.attr('value', domain).attr('readonly', true); 468 $noFollow.add($noIndex).attr('checked', false).attr('disabled', true); 469 $noFollowVal.add($noIndexVal).val('off'); 470 $copyCheck.attr('checked', true).attr('disabled', false); 471 } 472 } else { 473 html += '</blockquote><br />'; 474 } 475 var $title = $('#titlewrap').find('#title'); 476 if ($title.val().length === 0) { 477 $title.trigger('focus'); 478 $title.val($("#curated_title").val()); 479 } 480 sendWPEditor(html, insertedTagsTextarea); 481 if (!addAndContinue) { 482 $dialog.dialog('close'); 483 } else { 484 $('#expresscurate_source').val('').text(''); 485 clearExpresscurateForm(); 486 } 487 488 } else { 489 return false; 490 } 491 } 492 390 493 function setupDialog() { 391 494 var $dialog = $('#expresscurate_dialog'); … … 513 616 514 617 515 varimgSize = 'sizeX';618 imgSize = 'sizeX'; 516 619 $('.sizeS, .sizeM, .sizeX').on('click', function () { 517 620 var $this = $(this); … … 521 624 }); 522 625 523 varalignImg = 'alignnone';626 alignImg = 'alignnone'; 524 627 $('.alignleft , .alignright , .alignnone').on('click', function () { 525 628 var $this = $(this); … … 537 640 }); 538 641 $dialog.on('click', '#expresscurate_insert , #expresscurate_cloneInsert', function () { 539 var clone = $(this).is('#expresscurate_cloneInsert') ? true : false, 540 ed = tinyMCE.activeEditor, 541 highlightedElems = $(ed.getBody()).find('span.expresscurate_keywordsHighlight'); 542 if (clone) { 543 ExpressCurateUtils.track('/post/content-dialog/cloneintopost', true); 544 } else { 545 ExpressCurateUtils.track('/post/content-dialog/curateintopost', true); 546 } 547 if (highlightedElems.length > 0) { 548 highlightedElems.each(function (index, val) { 549 $(val).replaceWith(this.childNodes); 550 }); 551 } 552 var insertedTagsTextarea = "", 553 sourceVal = $('#expresscurate_source').val(), 554 postTag = $("#tax-input-post_tag"); 555 insertedTagsTextarea = postTag.val(); 556 $('#curated_tags').find('li').each(function () { 557 insertedTagsTextarea += "," + $(this).find('span.tag').text(); 558 }); 559 postTag.val(insertedTagsTextarea); 560 $(".tagadd").trigger('click'); 561 $('.expresscurate_sources_coll_widget .addSource input').val(sourceVal); 562 ExpressCurateSourceCollection.addNew(); 563 var html = "", 564 bg = $('.img').css('background-image'); 565 566 bg = bg.replace(/^url\(["']?/, '').replace(/["']?\)$/, ''); 567 if (bg.indexOf('images/noimage.png') === -1 && bg.length > 5) { 568 html += '<img class="' + alignImg + ' ' + imgSize + '" src="' + bg + '" data-img-curated-from="' + sourceVal + '">' 569 } 570 571 if (clone) { 572 html += tinyMCE.get('expresscurate_dialog_content_clone_editor').getContent() + '<br />'; 573 } else { 574 html += '<blockquote cite = "' + sourceVal + '">' + tinyMCE.get('expresscurate_dialog_content_editor').getContent() + '<br />'; 575 } 576 577 if (html.length > 0) { 578 if (sourceVal.length > 0) { 579 var domain = sourceVal; 580 if (domain.indexOf('http://') === -1 && domain.indexOf('https://') === -1) { 581 domain = 'http://' + domain; 582 } 583 var title = $("#curated_title").val(); 584 domain = domain.match(/^(http|https)/) ? domain : 'http://' + domain; 585 586 if (domain) { 587 if (clone) { 588 html += '<footer><p class="expresscurate_source">Originally published at <cite><a class="expresscurated" rel="nofollow" data-cloned-url="' + 589 domain + '" href = "' + domain + 590 '"' + ($("#expresscurate_from_target").val() == 'on' ? ' target="_blank"' : '') + '>' + 591 title + '</a></cite></p></footer><br/>'; 592 } else { 593 html += '<footer><p class="expresscurate_source">' + $("#expresscurate_from").val() + 594 ' <cite><a class="expresscurated" rel="nofollow" data-curated-url="' + domain + '" href = "' + domain + 595 '"' + ($("#expresscurate_from_target").val() == 'on' ? ' target="_blank"' : '') + '>' + 596 title + '</a></cite></p></footer><br/>'; 597 } 598 } 599 } 600 601 if (clone) { 602 var $canonicalURL = $('#expresscurate_advanced_seo_canonical_url'), 603 $noFollow = $('#expresscurate_advanced_seo_nofollow'), 604 $noIndex = $('#expresscurate_advanced_seo_noindex'), 605 $copyCheck = $('#expresscurate_advanced_seo_post_copy'), 606 $copyCheckVal = $('#expresscurate_advanced_seo_post_copy_value'), 607 $noIndexVal = $('#expresscurate_advanced_seo_noindex_value'), 608 $noFollowVal = $('#expresscurate_advanced_seo_nofollow_value'), 609 $copyControlWrap = $('#expresscurate_ClonePostWrap'); 610 if ($canonicalURL.length) { 611 $copyControlWrap.removeClass('expresscurate_displayNone'); 612 $copyCheckVal.val('on'); 613 $canonicalURL.attr('value', domain).attr('readonly', true); 614 $noFollow.add($noIndex).attr('checked', false).attr('disabled', true); 615 $noFollowVal.add($noIndexVal).val('off'); 616 $copyCheck.attr('checked', true).attr('disabled', false); 617 } 618 } else { 619 html += '</blockquote><br />'; 620 } 621 var $title = $('#titlewrap').find('#title'); 622 if ($title.val().length === 0) { 623 $title.trigger('focus'); 624 $title.val($("#curated_title").val()); 625 } 626 sendWPEditor(html, insertedTagsTextarea); 627 $dialog.dialog('close'); 628 } else { 629 return false; 630 } 642 var clone = $(this).is('#expresscurate_cloneInsert') ? true : false; 643 insertContent(clone, false); 644 }); 645 $dialog.on('click', '#expresscurate_continue', function () { 646 insertContent(false, true); 631 647 }); 632 648 } … … 732 748 $load = $dialog.find('#expresscurate_submit'), 733 749 $clone = $dialog.find('#expresscurate_clone'), 734 $insert = $dialog.find('# expresscurate_insert'),750 $insert = $dialog.find('#curateControlsWrap'), 735 751 $insertClone = $dialog.find('#expresscurate_cloneInsert'), 736 752 $contenttextarea = $dialog.find('#expresscurate_dialog_content_editor_container'), … … 764 780 ExpressCurateUtils.track('/post/content-dialog/startcurate'); 765 781 } 782 766 783 $dialog.dialog('open'); 767 784 } -
expresscurate/trunk/js/Settings.js
r1106118 r1140784 41 41 }); 42 42 /*settings page traching*/ 43 $('#tab-1').on('change', 'input',function(){43 $('#tab-1').on('change', 'input', function () { 44 44 ExpressCurateUtils.track('/settings/general'); 45 45 }); 46 $('#tab-2').on('change', 'input, select',function(){46 $('#tab-2').on('change', 'input, select', function () { 47 47 ExpressCurateUtils.track('/settings/smartpublishing'); 48 48 }); 49 $('#tab-3').on('change', 'input, select',function(){49 $('#tab-3').on('change', 'input, select', function () { 50 50 ExpressCurateUtils.track('/settings/sitemap'); 51 51 }); 52 $('#tab-4').on('change', 'input',function(){52 $('#tab-4').on('change', 'input', function () { 53 53 ExpressCurateUtils.track('/settings/extension'); 54 54 }); 55 $('#tab-5').on('change', 'input, select',function(){55 $('#tab-5').on('change', 'input, select', function () { 56 56 ExpressCurateUtils.track('/settings/feed'); 57 57 }); … … 74 74 var status = '', 75 75 $submitSitemap = $('.expresscurate #submitSiteMap'), 76 $autorize =$('.getApiKey');77 status =($(this).is(':checked'))?'on':'off';76 $autorize = $('.getApiKey'); 77 status = ($(this).is(':checked')) ? 'on' : 'off'; 78 78 if ($(this).is(':checked') && $submitSitemap.hasClass('generated')) { 79 79 $submitSitemap.removeClass('expresscurate_displayNone'); … … 81 81 $submitSitemap.addClass('expresscurate_displayNone'); 82 82 } 83 if ($submitSitemap.hasClass('generated')){83 if ($submitSitemap.hasClass('generated')) { 84 84 $autorize.addClass('expresscurate_displayNone'); 85 } else{85 } else { 86 86 $autorize.removeClass('expresscurate_displayNone'); 87 87 } … … 106 106 }); 107 107 $submitSitemap.on('click', function () { 108 $('.expresscurate_Error').remove(); 109 var message = '', 110 className = ''; 108 111 $.ajax({ 109 112 type: 'POST', … … 111 114 }).done(function (res) { 112 115 var data = $.parseJSON(res); 113 if (data.status === 'success') { 114 $submitSitemap.removeClass('expresscurate_displayNone').addClass('generated'); 116 if (data.status === 0) { 117 $submitSitemap.addClass('generated'); 118 message = data.message; 119 className='expresscurate_SettingsSuccess'; 120 } else if (data.status === 1) { 121 message = data.message; 122 className='expresscurate_SettingsError'; 123 } else if (data.status === 2) { 124 message = data.message; 125 className='expresscurate_SettingsError'; 126 } else if (data.status === 3) { 127 message = data.message; 128 className='expresscurate_SettingsError'; 115 129 } 130 }).always(function () { 131 $submitSitemap.after('<p class="expresscurate_Error '+className+'">' + message + '</p>'); 116 132 }); 117 133 }); … … 119 135 /*SEO settings*/ 120 136 $('#expresscurate_seo').click(function () { 121 var $this =$(this),137 var $this = $(this), 122 138 $slider = $('#publisherWrap'), 123 139 $sitemapTab = $('#sitemapTab'); 124 showHideOptions($slider, $this);140 showHideOptions($slider, $this); 125 141 if ($this.is(':checked')) { 126 142 $sitemapTab.removeClass('expresscurate_displayNone'); -
expresscurate/trunk/js/bookmarks.js
r1129694 r1140784 24 24 var data = $.parseJSON(res); 25 25 if (data.status === 'success') { 26 if (data.result === null) {26 /*if (data.result === null) { 27 27 liHTML = ''; 28 28 message = 'Article does not exists.'; 29 } else { 29 } else {*/ 30 30 $.extend(data.result, { 31 31 'id': $bookmarkBoxes.find('> li').length … … 51 51 $lastLi.removeClass('expresscurate_transparent'); 52 52 }, 700); 53 }53 //} 54 54 } else if (data.status === 'error' && data.msg !== null) { 55 55 message = data.msg; -
expresscurate/trunk/js/feed/contentFeed.js
r1137344 r1140784 48 48 49 49 $.each(els, function (index, el) { 50 var item = $(el).find('a.postTitle').data(' fulllink');50 var item = $(el).find('a.postTitle').data('link'); 51 51 items.push(item); 52 52 }); -
expresscurate/trunk/readme.txt
r1137344 r1140784 5 5 Requires at least: 3.9 6 6 Tested up to: 4.1 7 Stable tag: 2.0.1 17 Stable tag: 2.0.12 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.1 1.zip "Your favorite content marketing tools") for WordPress.83 [Download ExpressCurate plugin](http://downloads.wordpress.org/plugin/expresscurate.2.0.12.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.12 = 132 * Content Feed pull is fixed. 133 * Sitemap Submit is fixed. 134 * Other miscellaneous bug fixes and improvements. 135 131 136 = 2.0.11 = 132 137 * New Setting: Open Original Article Link in a New Window/Tab. -
expresscurate/trunk/templates/advanced_seo_widget.php
r1137344 r1140784 24 24 25 25 <div id="expresscurate_advancedSEO_widget"> 26 < div id="expresscurate_ClonePostWrap" class="<?php if(!$postCopy) {echo 'expresscurate_displayNone';}?>">26 <!--<div id="expresscurate_ClonePostWrap" class="<?php /*if(!$postCopy) {echo 'expresscurate_displayNone';} */?>"> 27 27 <div class="info"> 28 28 <label for="expresscurate_advanced_seo_canonical_url" class="label">Content cloned</label> … … 30 30 <div class="value"> 31 31 <input class="expresscurate_displayNone" id="expresscurate_advanced_seo_post_copy" 32 type='checkbox' <?php if(!$postCopy) {32 type='checkbox' <?php /*if(!$postCopy) { 33 33 echo 'disabled="disabled"'; 34 } ?>34 } */?> 35 35 name='expresscurate_advanced_seo_post_copy' 36 <?php echo ($postCopy) ? 'checked' : ''?>>36 <?php /*echo ($postCopy) ? 'checked' : '' */?>> 37 37 <label class="expresscurate_preventTextSelection" for="expresscurate_advanced_seo_post_copy"></label> 38 38 <input type="hidden" id="expresscurate_advanced_seo_post_copy_value" 39 39 name="expresscurate_advanced_seo_post_copy_value" 40 value="<?php echo ($postCopy) ? "on" : "off";?>">40 value="<?php /*echo ($postCopy) ? "on" : "off"; */?>"> 41 41 </div> 42 </div> 42 </div>--> 43 43 <div class="info"> 44 44 <label for="expresscurate_advanced_seo_title" class="label">SEO Title</label> -
expresscurate/trunk/templates/dialog.php
r1137344 r1140784 1 1 <?php 2 2 $settings = array('wpautop' => false, 'media_buttons' => false, 'teeny' => true, 'tinymce' => true, 'quicktags' => false); 3 $settingsClone = array('wpautop' => false, 'media_buttons' => false, 'teeny' => true, 'tinymce' => true, 'quicktags' => false );3 $settingsClone = array('wpautop' => false, 'media_buttons' => false, 'teeny' => true, 'tinymce' => true, 'quicktags' => false); 4 4 ?> 5 5 <div> … … 116 116 </ul> 117 117 <div class="clear"></div> 118 <button class="curate right" id="expresscurate_insert" 119 onclick="return false;"><?php echo __('Curate into post', ExpressCurate_Actions::PLUGIN_FOLDER) ?></button> 118 <div id="curateControlsWrap"> 119 <button class="curate right" id="expresscurate_insert" 120 onclick="return false;"><?php echo __('Curate into post', ExpressCurate_Actions::PLUGIN_FOLDER) ?></button> 121 <button class="curate right" id="expresscurate_continue" 122 onclick="return false;"><?php echo __('Add and continue', ExpressCurate_Actions::PLUGIN_FOLDER) ?></button> 123 </div> 120 124 <button class="curate right expresscurate_displayNone" id="expresscurate_cloneInsert" 121 125 onclick="return false;"><?php echo __('Clone Post', ExpressCurate_Actions::PLUGIN_FOLDER) ?></button> -
expresscurate/trunk/templates/feed_list.php
r1137344 r1140784 17 17 if (is_array($feed_content) && count($feed_content) > 0) { 18 18 foreach ($feed_content as $content) { 19 $content['fullLink'] = $content['link']; 20 $extracted_url = extract_google_feed_url($content['link'], $feed_content); 21 if ($extracted_url) { 22 $url = $extracted_url; 23 } else { 24 $url = $content['link']; 25 } 26 $content['link'] = $url; 27 $content['domain'] = parse_url($url, PHP_URL_SCHEME) . "://" . parse_url($url, PHP_URL_HOST); 19 $content['domain'] = parse_url($content['link'], PHP_URL_SCHEME) . "://" . parse_url($content['link'], PHP_URL_HOST); 28 20 array_push($sorted_feeds, $content); 29 21 } … … 128 120 </ul> 129 121 130 <a data- fulllink="<?php echo $item['fullLink']; ?>" class="postTitle" href="<?php echo $item['link'] ?>"122 <a data-link="<?php echo $item['link']; ?>" class="postTitle" href="<?php echo $item['link'] ?>" 131 123 target="_blank"><?php echo $item['title'] ?></a><br/> 132 124 <a class="url" href="<?php echo $item['link'] ?>"><?php echo $item['domain'] ?></a> -
expresscurate/trunk/templates/settings.php
r1137344 r1140784 300 300 </select> 301 301 </li> 302 <!--<li> 303 <p class="title">Social publishing </p> 304 <input class="expresscurate_displayNone" type="checkbox" id="expresscurate_social_publishing" 305 name="expresscurate_social_publishing" <?php 306 /* if (get_option('expresscurate_social_publishing', '') == "on") { 307 echo 'checked'; 308 } 309 */?> /> 310 <label class="controls checkboxLabel" for="expresscurate_social_publishing"></label> 311 312 <?php /* 313 $blogName = urlencode(urlencode(get_bloginfo('url'))); 314 */?> 315 <a class="getApiKey <?php /*if (strlen(get_option('expresscurate_buffer_refresh_token')) > 2) {echo 'expresscurate_displayNone';}*/?>" href="https://www.expresscurate.com/api/connector/buffer/refreshtoken/<?/*=$blogName*/?>">Authorize access to Buffer</a> 316 </li>--> 302 317 </ul> 303 318 <div class="centerSave"> -
expresscurate/trunk/templates/sitemap.php
r1106118 r1140784 166 166 </option> 167 167 </select> 168 <?php //if(!$_SESSION['sitemap_token']){168 <?php 169 169 $blogName = urlencode(urlencode(get_bloginfo('url'))); 170 170 ?> 171 <a class="getApiKey <?php if (strlen(get_option('expresscurate_google_refresh_token')) > 2) {echo 'expresscurate_displayNone';}?>" href="https://www.expresscurate.com/api/ getsitemapkey/<?=$blogName?>">Authorize</a>171 <a class="getApiKey <?php if (strlen(get_option('expresscurate_google_refresh_token')) > 2) {echo 'expresscurate_displayNone';}?>" href="https://www.expresscurate.com/api/connector/google/webmasters/refreshtoken/<?=$blogName?>">Authorize access to Google Webmaster Tools</a> 172 172 </div> 173 173 </li>
Note: See TracChangeset
for help on using the changeset viewer.