Changeset 1191825
- Timestamp:
- 07/03/2015 01:36:52 PM (11 years ago)
- Location:
- expresscurate/trunk
- Files:
-
- 3 added
- 24 edited
-
ExpressCurate.php (modified) (1 diff)
-
ExpressCurate_Actions.php (modified) (23 diffs)
-
ExpressCurate_AjaxExportAPI.php (modified) (13 diffs)
-
ExpressCurate_ContentManager.php (modified) (1 diff)
-
ExpressCurate_HtmlParser.php (modified) (1 diff)
-
ExpressCurate_Keywords.php (modified) (3 diffs)
-
ExpressCurate_SmartPublish.php (modified) (1 diff)
-
ExpressCurate_SocialManager.php (modified) (2 diffs)
-
ExpressCurate_Tags.php (modified) (3 diffs)
-
css/expresscurate.css (modified) (8 diffs)
-
css/menu-style-3.8.css (modified) (1 diff)
-
css/quotes-style.css (modified) (1 diff)
-
images/facebookEmbedPlaceholder.png (added)
-
images/select.svg (added)
-
js/Buttons.js (modified) (8 diffs)
-
js/bookmarks.js (modified) (5 diffs)
-
js/feed/contentFeed.js (modified) (6 diffs)
-
js/socialPostWidget.js (modified) (4 diffs)
-
readme.txt (modified) (3 diffs)
-
templates/bookmarks.php (modified) (3 diffs)
-
templates/dashboard.php (modified) (2 diffs)
-
templates/dashboard/welcome_widget.php (added)
-
templates/faq.php (modified) (1 diff)
-
templates/feed_list.php (modified) (7 diffs)
-
templates/settings.php (modified) (3 diffs)
-
templates/social_posts_widget.php (modified) (3 diffs)
-
templates/support.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
expresscurate/trunk/ExpressCurate.php
r1179598 r1191825 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.1. 27 Version: 2.1.3 8 8 Author: ExpressCurate 9 9 Author URI: http://www.expresscurate.com -
expresscurate/trunk/ExpressCurate_Actions.php
r1179063 r1191825 60 60 $this->feedManager = new ExpressCurate_FeedManager(); 61 61 $this->socialManager = new ExpressCurate_SocialManager(); 62 63 add_shortcode('facebook', array(&$this, 'facebook_post')); 62 64 63 65 // register actions … … 75 77 add_action('init', array(&$this, 'buttons')); //'wpc_buttons' 76 78 add_action('init', array(&$this, 'include_api')); 77 add_action('init', array(&$this, 'add_oembed_facebook')); 79 //add_action('init', array(&$this, 'add_oembed_facebook')); 80 add_action('init', array(&$this, 'add_social_post_type')); 81 82 add_action('add_meta_boxes_expresscurate_spost', array(&$this, 'add_spost_widget')); 83 84 add_action('admin_head-post.php', array(&$this, 'hide_publishing_actions')); 85 add_action('admin_head-post-new.php', array(&$this, 'hide_publishing_actions')); 78 86 79 87 add_filter('manage_edit-post_columns', array(&$this, 'curated_column_register')); … … 91 99 add_action('wp_head', array(&$this, 'advanced_seo_update_canonical_url')); 92 100 add_filter('wp_title', array(&$this, 'advanced_seo_update_title')); 93 94 101 } 95 102 … … 130 137 add_action('wp_ajax_expresscurate_export_api_download_images', array($this->ajaxExportAPI, 'download_images')); 131 138 add_action('wp_ajax_expresscurate_export_api_save_post', array($this->ajaxExportAPI, 'save_post')); 139 add_action('wp_ajax_expresscurate_export_api_save_social_post', array($this->ajaxExportAPI, 'save_social_post')); 132 140 add_action('wp_ajax_expresscurate_export_api_check_source', array($this->ajaxExportAPI, 'check_source')); 133 141 add_action('wp_ajax_expresscurate_export_api_send_google_key', array($this->ajaxExportAPI, 'send_google_key')); … … 252 260 } 253 261 254 function add_oembed_facebook() 255 { 256 wp_oembed_add_provider('http://www.facebook.com/', 'http://www.facebook.com/*'); 257 //wp_oembed_add_provider('https://www.facebook.com/*', 'https://www.facebook.com/oembedprovider'); 262 /*public function add_oembed_facebook() 263 { 264 wp_oembed_add_provider('https://www.facebook.com/*', 'http://api.embed.ly/v1/api/oembed'); 265 }*/ 266 267 public function facebook_post($atts,$content="") 268 { 269 /* $atts = shortcode_atts(array( 270 'src' => ' ' 271 ), $atts, 'facebook');*/ 272 $href=$content; 273 $iframe='<div id="fb-root"></div> 274 <script>(function(d, s, id) { 275 var js, fjs = d.getElementsByTagName(s)[0]; 276 if (d.getElementById(id)) return; 277 js = d.createElement(s); js.id = id; 278 js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&appId=1015040711858893&version=v2.0"; 279 fjs.parentNode.insertBefore(js, fjs); 280 }(document, "script", "facebook-jssdk"));</script> 281 <div class="fb-post" data-href="'.$href.'" data-width="100%"></div>'; 282 283 return $iframe; 258 284 } 259 285 … … 262 288 //open dialog 263 289 global $pagenow; 290 264 291 //make sure we are on the backend 265 292 if (!is_admin()) 266 293 return false; 267 294 if ($pagenow == 'post-new.php' && isset($_REQUEST['expresscurate_load_source'])) { //check for new post page 268 echo '<script type="text/javascript"> 269 window.expresscurate_load_url = "' . urldecode(base64_decode($_REQUEST['expresscurate_load_source'])) . '"; 295 if (get_post_type() === 'expresscurate_spost') { 296 echo '<script type="text/javascript"> 297 window.expresscurate_socialPostUrl="' . urldecode(base64_decode($_REQUEST['expresscurate_load_source'])) . '"; 270 298 </script>'; 299 } else { 300 echo '<script type="text/javascript"> 301 window.expresscurate_load_url ="' . urldecode(base64_decode($_REQUEST['expresscurate_load_source'])) . '"; 302 </script>'; 303 } 271 304 } 272 305 } … … 276 309 $smart_publishing = ''; 277 310 278 if ($GLOBALS['post']->post_status !== 'publish' ) {311 if ($GLOBALS['post']->post_status !== 'publish' && $GLOBALS['post']->post_type !== 'expresscurate_spost') { 279 312 if (get_option('expresscurate_manually_approve_smart', '') == '' || get_post_meta($GLOBALS['post']->ID, '_expresscurate_smart_publish', true) == '1') { 280 313 $checked = 'checked="checked"'; … … 291 324 add_filter("mce_external_plugins", array(&$this, 'add_plugins')); 292 325 add_filter('mce_buttons', array(&$this, 'register_buttons')); 326 add_filter('tiny_mce_before_init', array(&$this, 'change_mce_buttons')); 293 327 } 294 328 … … 298 332 $plugin_array['expresscurate'] = $pluginUrl . 'js/Buttons.js'; 299 333 return $plugin_array; 334 } 335 336 public function change_mce_buttons($buttons) 337 { 338 $my_post_type = 'expresscurate_spost'; 339 global $pagenow; 340 if (('post.php' === $pagenow || 'post-new.php' === $pagenow) && (get_post_type() === $my_post_type || $my_post_type === get_post_type($_GET['post']))) { 341 $buttons['toolbar1'] = 'addSocialPost'; 342 $buttons['toolbar2'] = ''; 343 $buttons['toolbar3'] = ''; 344 $buttons['toolbar4'] = ''; 345 } 346 return $buttons; 300 347 } 301 348 … … 361 408 foreach ($post_types as $post_type) { 362 409 if (get_post_type() == $post_type) { 363 $display = true; 410 if ($post_type != 'expresscurate_spost') { 411 $display = true; 412 } else { 413 ?> 414 <div id="expresscurate_loading"> 415 <img src="<?php echo plugin_dir_url(__FILE__); ?>/images/loading.gif" id="img-load"/> 416 </div> 417 <?php 418 } 364 419 } 365 420 } … … 524 579 } 525 580 581 526 582 //register "curated" post status 527 583 public function register_curated_post_status() … … 537 593 } 538 594 595 public function add_social_post_type() 596 { 597 if (get_option('expresscurate_social_publishing', '') == "on" && strlen(get_option('expresscurate_buffer_access_token')) > 2) { 598 register_post_type('expresscurate_spost', 599 array( 600 'labels' => array( 601 'name' => __('Social Posts'), 602 'singular_name' => __('Social Posts') 603 ), 604 'public' => true, 605 'has_archive' => false 606 ) 607 ); 608 } 609 } 610 611 public function hide_publishing_actions() 612 { 613 $my_post_type = 'expresscurate_spost'; 614 global $post; 615 if ($post->post_type == $my_post_type) { 616 echo ' 617 <style type="text/css"> 618 #misc-publishing-actions, 619 #minor-publishing-actions{ 620 display:none; 621 } 622 </style> 623 '; 624 remove_all_actions('media_buttons'); 625 } 626 } 627 539 628 public function add_inner_meta_boxes($post) 540 629 { 541 630 include(sprintf("%s/templates/dialog.php", dirname(__FILE__))); 542 631 } 543 544 632 545 633 public function generate_tags($post) … … 566 654 $post_tags[$tag->term_id] = $tag->name; 567 655 if (strpos($tag->name, "[ ]") > 0) { 568 $post_tags[$tag->term_id] = str_replace("[ ]", " ", $tag->name); 569 wp_update_term($tag->term_id, $tag->taxonomy, array( 570 'name' => $post_tags[$tag->term_id] 571 )); 656 $post_tags[$tag->term_id] = preg_replace("/[[]?\s[]]?/ui", " ", $tag->name); 572 657 } 573 658 $ptags[] = $post_tags[$tag->term_id]; … … 577 662 $content_tags = array(); 578 663 // Find all hashtags in text 579 preg_match_all('/\s(?!<\w)(?=[^>]*(<|$))#\w+/iu', $post_content, $content_tags); 580 664 preg_match_all('/(#\w+)(?![^<]*<\/a)/iu', $post_content, $content_tags); 581 665 foreach ($content_tags[0] as $content_tag) { 582 666 583 $content_tag_insert = str_replace("#", " ", trim($content_tag));667 $content_tag_insert = str_replace("#", " ", trim($content_tag)); 584 668 //adding content tag to post tags if not exists 585 669 if (!in_array($content_tag_insert, $post_tags)) { … … 590 674 if ($defined_tags && count($defined_tags)) { 591 675 foreach ($defined_tags as $defined_tag) { 592 $defined_tag_insert = trim($defined_tag);676 $defined_tag_insert = trim($defined_tag); 593 677 //adding defined tag to post tags if tag exists in posttitle or post content 594 preg_match("/(?!<\w)(?=[^>]*(<|$))" . $defined_tag_insert . "(\W|$)/i", $post_content, $tag_in_content);678 preg_match("/(?!<\w)(?=[^>]*(<|$))". $defined_tag_insert . "(\W|$)/i", $post_content, $tag_in_content); 595 679 if ((isset($tag_in_content[0]) || strpos($post->title, $defined_tag_insert)) && !in_array($defined_tag_insert, $post_tags) && !in_array($defined_tag_insert, $ptags)) { 596 680 $ptags[] = $defined_tag_insert; … … 749 833 update_post_meta($post_id, '_expresscurate_advanced_seo_social_shortdesc', esc_attr($expresscurate_advanced_seo_social_shortdesc)); 750 834 update_post_meta($post_id, '_expresscurate_advanced_seo_social_desc', esc_attr($expresscurate_advanced_seo_social_desc)); 751 752 //social posts753 // $expresscurate_social_post_messages = isset($_POST['expresscurate_social_post_messages']) ? $_POST['expresscurate_social_post_messages'] : '';754 755 // update_post_meta($post_id, '_expresscurate_social_post_messages', esc_attr($expresscurate_social_post_messages));756 835 757 836 //post analysis notification … … 1066 1145 } 1067 1146 1147 public function add_spost_widget() 1148 { 1149 global $wp_meta_boxes; 1150 $priorities = array('high', 'core', 'default', 'low'); 1151 foreach ($wp_meta_boxes['expresscurate_spost'] as $key => $metaBox) { 1152 foreach ($priorities as $priority) { 1153 if (!empty($metaBox[$priority])) { 1154 foreach ($metaBox[$priority] as $widget) { 1155 if (!empty($widget)) { 1156 if ($widget['id'] !== 'expresscurate_social_publishing' && $widget['id'] !== 'submitdiv') { 1157 remove_meta_box($widget['id'], 'expresscurate_spost', $key); 1158 } 1159 } 1160 } 1161 } 1162 } 1163 } 1164 } 1165 1068 1166 //Add widget 1069 1167 public function add_widget() … … 1074 1172 $post_types = array_merge($post_types, get_post_types(array('_builtin' => false, 'public' => true), 'names')); 1075 1173 foreach ($post_types as $post_type) { 1076 add_meta_box('expresscurate_sources_collection', ' Sources', array(&$this, 'sources_collection'), $post_type, 'normal', 'high'); 1077 add_meta_box('expresscurate', ' SEO Control Center', array(&$this, 'meta_box'), $post_type, 'side', 'high'); 1078 if ($seo) { 1079 add_meta_box('expresscurate_advanced_seo', ' Advanced SEO', array(&$this, 'advanced_seo'), $post_type, 'normal', 'high'); 1174 if ($post_type !== 'expresscurate_spost') { 1175 add_meta_box('expresscurate_sources_collection', ' Sources', array(&$this, 'sources_collection'), $post_type, 'normal', 'high'); 1176 add_meta_box('expresscurate', ' SEO Control Center', array(&$this, 'meta_box'), $post_type, 'side', 'high'); 1177 if ($seo) { 1178 add_meta_box('expresscurate_advanced_seo', ' Advanced SEO', array(&$this, 'advanced_seo'), $post_type, 'normal', 'high'); 1179 } 1180 } else { 1181 remove_meta_box('linktargetdiv', 'link', 'normal'); 1182 remove_meta_box('linkxfndiv', 'link', 'normal'); 1183 remove_meta_box('linkadvanceddiv', 'link', 'normal'); 1184 remove_meta_box('postexcerpt', 'expresscurate_spost', 'normal'); 1185 remove_meta_box('trackbacksdiv', 'expresscurate_spost', 'normal'); 1186 remove_meta_box('postcustom', 'expresscurate_spost', 'normal'); 1187 remove_meta_box('commentstatusdiv', 'expresscurate_spost', 'normal'); 1188 remove_meta_box('commentsdiv', 'expresscurate_spost', 'normal'); 1189 remove_meta_box('revisionsdiv', 'expresscurate_spost', 'normal'); 1190 remove_meta_box('authordiv', 'expresscurate_spost', 'normal'); 1191 remove_meta_box('slugdiv', 'expresscurate_spost', 'normal'); 1080 1192 } 1081 1193 if ($social) { … … 1083 1195 } 1084 1196 } 1085 } 1086 1197 1198 } 1199 1200 public function get_meta_boxes($screen = null, $context = 'advanced') 1201 { 1202 global $wp_meta_boxes; 1203 1204 if (empty($screen)) 1205 $screen = get_current_screen(); 1206 elseif (is_string($screen)) 1207 $screen = convert_to_screen($screen); 1208 1209 $page = $screen->id; 1210 1211 return $wp_meta_boxes[$page][$context]; 1212 } 1087 1213 1088 1214 public function meta_box() … … 1236 1362 $authorTwitter = esc_attr(get_the_author_meta('expresscurate_twitter')); 1237 1363 1364 /*if (!empty($categories)) { 1365 $cat = $categories[0]; 1366 $categoryName = esc_attr($cat->name); 1367 } 1368 }*/ 1238 1369 $categories = wp_get_post_categories($post_id); 1370 $categoryMeta = ""; 1239 1371 if (!empty($categories)) { 1240 $cat = $categories[0]; 1241 $categoryName = esc_attr($cat->name); 1372 foreach ($categories as $category) { 1373 $cat = get_category($category); 1374 $categoryName = esc_attr($cat->name); 1375 $categoryMeta .= '<meta property="article:section" content="' . $categoryName . '" />'; 1376 } 1242 1377 } 1243 1378 1244 1379 $tags = wp_get_post_tags($post_id); 1380 $tagsMeta = ""; 1245 1381 if (!empty($tags)) { 1246 $tagNames = array();1382 //$tagNames = array(); 1247 1383 foreach ($tags as $tag) { 1248 $tag Names[] = $tag->name;1384 $tagsMeta .= '<meta property="article:tag" content="' . $tag->name . '" />'; 1249 1385 } 1250 1386 } … … 1280 1416 $meta_string .= '<meta property="article:published_time" content="' . get_post_time('Y-m-d\Tg:i:s', true, $post_id) . '" />'; 1281 1417 //$meta_string .= '<meta property="article:modified_time" content="' . get_post_time('Y-m-d\Tg:i:s', true, $post_id) . '" />'; 1282 $meta_string .= '<meta property="article:section" content="' . $categoryName . '" />'; 1283 $meta_string .= '<meta property="article:tag" content="' . $tagNames . '" />'; 1418 /*$meta_string .= '<meta property="article:section" content="' . $categoryName . '" />'; 1419 $meta_string .= '<meta property="article:tag" content="' . $tagNames . '" />';*/ 1420 $meta_string .= $categoryMeta . $tagsMeta; 1284 1421 //$meta_string .= '<meta property="fb:admins" content="Facebook numberic ID" />'; 1285 1422 } … … 1522 1659 public function add_dashboard_widgets() 1523 1660 { 1661 add_meta_box('dashboard_widget_welcome', 'Welcome to ExpressCurate!', array(&$this, 'welcome_widget'), get_current_screen(), 'side', 'high'); 1524 1662 add_meta_box('dashboard_widget_keywords', 'Keywords Summary', array(&$this, 'keywords_widget'), get_current_screen(), 'side', 'high'); 1525 1663 add_meta_box('dashboard_widget_keywords_interest_over_time', 'Keywords Interest Over Time', array(&$this, 'keywords_interest_over_time_widget'), get_current_screen(), 'side', 'high'); … … 1536 1674 add_meta_box('dashboard_widget_feed', 'Feed', array(&$this, 'feed_widget'), get_current_screen(), 'side', 'high'); 1537 1675 add_meta_box('dashboard_widget_bookmarks', 'Bookmarks', array(&$this, 'bookmarks_widget'), get_current_screen(), 'side', 'high'); 1676 } 1677 1678 public function welcome_widget() 1679 { 1680 ?> 1681 <div id="expresscurate_welcome_widget" class="expresscurate_welcome_widget"> 1682 <?php include(sprintf("%s/templates/dashboard/welcome_widget.php", dirname(__FILE__))); ?> 1683 </div> 1684 <?php 1538 1685 } 1539 1686 -
expresscurate/trunk/ExpressCurate_AjaxExportAPI.php
r1165036 r1191825 33 33 { 34 34 $data = array(); 35 $data["title"] = get_bloginfo('name'); 36 $data["categories"] = array(); 37 $data["keywords"] = array(); 38 $data["featured_image"] = 0; 39 $data["smart_publishing"] = get_option('expresscurate_publish', '') == 'on' ? get_option('expresscurate_manually_approve_smart', 'off') : 'off'; 40 $data["curated_from_prefix"] = get_option("expresscurate_curated_text", 'See full story on'); 41 $data["curated_link_target"] = get_option("expresscurate_curated_link_target", 'on'); 35 $data['title'] = get_bloginfo('name'); 36 $data['categories'] = array(); 37 $data['keywords'] = array(); 38 $data['featured_image'] = 0; 39 $data['smart_publishing'] = get_option('expresscurate_publish', '') == 'on' ? get_option('expresscurate_manually_approve_smart', 'off') : 'off'; 40 $data['curated_from_prefix'] = get_option('expresscurate_curated_text', 'See full story on'); 41 $data['curated_link_target'] = get_option('expresscurate_curated_link_target', 'on'); 42 43 if (get_option('expresscurate_social_publishing', '') == "on") { 44 $buffer = new ExpressCurate_BufferClient(); 45 $profiles = $buffer->getProfiles(); 46 47 $socialPublishingProfiles = get_option('expresscurate_social_publishing_profiles', ''); 48 $profilesStatus = $socialPublishingProfiles ? 49 json_decode(stripslashes(urldecode($socialPublishingProfiles))) : 50 array(); 51 52 $sppResult = array(); 53 foreach ($profiles as $profile) { 54 $profileId = $profile->id; 55 if ($profilesStatus->$profileId == 'on' || empty($profilesStatus->$profileId)) { 56 $sppResult[] = array( 57 'id' => $profileId, 58 'title' => $profile->formatted_service . '/' . $profile->formatted_username); 59 } 60 } 61 62 $data['social_publishing'] = $sppResult; 63 } else { 64 $data['social_publishing'] = false; 65 } 66 42 67 if (current_user_can('edit_posts')) { 43 $categories = get_categories(array( "hide_empty"=> 0));68 $categories = get_categories(array('hide_empty' => 0)); 44 69 foreach ($categories as $i => $category) { 45 70 if ($category->category_nicename != 'uncategorized') { 46 $data[ "categories"][$i]["term_id"] = $category->term_id;47 $data[ "categories"][$i]["name"] = $category->name;71 $data['categories'][$i]['term_id'] = $category->term_id; 72 $data['categories'][$i]['name'] = $category->name; 48 73 } 49 74 } 50 $defined_tags = get_option( "expresscurate_defined_tags", '');75 $defined_tags = get_option('expresscurate_defined_tags', ''); 51 76 if ($defined_tags) { 52 $defined_tags = explode( ",", $defined_tags);77 $defined_tags = explode(',', $defined_tags); 53 78 foreach ($defined_tags as $tag) { 54 $data[ "keywords"][] = trim($tag);79 $data['keywords'][] = trim($tag); 55 80 } 56 81 } 57 if (get_option('expresscurate_featured', '')) { 58 $data["featured_image"] = get_option('expresscurate_featured', ''); 82 $featuredImage = get_option('expresscurate_featured', ''); 83 if ($featuredImage) { 84 $data['featured_image'] = $featuredImage; 59 85 } 60 86 } … … 92 118 93 119 if ($content_manager->isHTTPStatusOK() === false) { 94 $data_check = array('status' => "error", 'msg' => "Images not found!");120 $data_check = array('status' => 'error', 'msg' => 'Images not found!'); 95 121 } else { 96 122 $statusCode = $content_manager->getHTTPStatusCode(); … … 157 183 $data = $_REQUEST; 158 184 if (!$data['url']) { 159 $data_check = array('status' => "error", 'msg' => "Data is empty!");185 $data_check = array('status' => 'error', 'msg' => 'Data is empty!'); 160 186 } 161 187 $curated_urls = $this->get_meta_values('_expresscurate_link_', $data['url']); … … 172 198 { 173 199 if (!current_user_can('edit_posts')) { 174 $result = json_encode(array('status' => "error", 'msg' => __('You do not have sufficient permissions to access this page.')));200 $result = json_encode(array('status' => 'error', 'msg' => __('You do not have sufficient permissions to access this page.'))); 175 201 echo $result; 176 202 die(); … … 203 229 if ($post_id) { 204 230 $post = get_post($post_id, ARRAY_A); 205 $result = json_encode(array('status' => "success", 'post_status' => $post_status, 'post_id' => $post_id, 'postUrl' => post_permalink($post_id), 'post_categories' => $post_categories, 'post_tags' => $post_tags, 'post_modified' => $post['post_modified'], 'post_modified_gmt' => $post['post_modified_gmt'], 'msg' => "Post saved as " . $post_status . ".")); 206 } else { 207 $result = json_encode(array('status' => "error", 'msg' => "Something went wrong!")); 208 } 209 } else { 210 $result = json_encode(array('status' => "error", 'msg' => "Data is empty!")); 231 $result = json_encode(array('status' => 'success', 'post_status' => $post_status, 'post_id' => $post_id, 'postUrl' => post_permalink($post_id), 'post_categories' => $post_categories, 'post_tags' => $post_tags, 'post_modified' => $post['post_modified'], 'post_modified_gmt' => $post['post_modified_gmt'], 'msg' => "Post saved as " . $post_status . ".")); 232 } else { 233 $result = json_encode(array('status' => 'error', 'msg' => 'Something went wrong!')); 234 } 235 } else { 236 $result = json_encode(array('status' => 'error', 'msg' => 'Data is empty!')); 237 } 238 239 echo $result; 240 die; 241 } 242 243 public function save_social_post() 244 { 245 if (!current_user_can('edit_posts')) { 246 $result = json_encode(array('status' => 'error', 'msg' => __('You do not have sufficient permissions to access this page.'))); 247 echo $result; 248 die(); 249 } 250 $result = false; 251 $data = $_REQUEST; 252 253 if(isset($data['publishing']) && (($publishingType = $data['publishing']) == 'date' || $publishingType == 'hour')) { 254 $post_status = 'future'; 255 } else { 256 $post_status = get_option('expresscurate_post_status', 'draft'); 257 } 258 if (isset($data['url'])) { 259 $domain = parse_url($data['url']); 260 261 $post_id = $this->insert_update_post($data, $post_status); 262 263 $socialManager = new ExpressCurate_SocialManager(); 264 $socialManager->savePostMessages($post_id, $data['socialPosts']); 265 266 if ($post_id) { 267 $post = get_post($post_id, ARRAY_A); 268 $result = json_encode(array('status' => 'success', 'post_status' => $post_status, 'post_id' => $post_id, 'postUrl' => post_permalink($post_id), 'msg' => "Social Post saved as " . $post_status . ".")); 269 } else { 270 $result = json_encode(array('status' => 'error', 'msg' => 'Something went wrong!')); 271 } 272 } else { 273 $result = json_encode(array('status' => 'error', 'msg' => 'Data is empty!')); 211 274 } 212 275 … … 256 319 $data = $_REQUEST; 257 320 if (!isset($data['id'])) { 258 $result = array('status' => "error", 'msg' => "ID is empty!");321 $result = array('status' => 'error', 'msg' => 'ID is empty!'); 259 322 } else { 260 323 $post = get_post($data['id'], ARRAY_A); 261 324 if ($post) { 262 $result = array('status' => "success", 'post_modified' => $post['post_modified'], 'post_modified_gmt' => $post['post_modified_gmt']);263 } else { 264 $result = array('status' => "error", 'msg' => "Post not found");325 $result = array('status' => 'success', 'post_modified' => $post['post_modified'], 'post_modified_gmt' => $post['post_modified_gmt']); 326 } else { 327 $result = array('status' => 'error', 'msg' => 'Post not found'); 265 328 } 266 329 } … … 269 332 } 270 333 271 private function insert_update_post($data, $post_status )334 private function insert_update_post($data, $post_status, $post_type = null) 272 335 { 273 336 $post_cats = array(); … … 288 351 $post_date = strtotime('+' . $publishingValue . ' hours'); 289 352 } 353 354 $post_type = $post_type ? $post_type : get_option('expresscurate_def_post_type', 'post'); 290 355 291 356 $details = array( … … 295 360 'post_status' => $post_status, 296 361 'post_category' => $post_cats, 297 'post_type' => get_option('expresscurate_def_post_type', 'post'),362 'post_type' => $post_type, 298 363 'post_date_gmt' => gmdate('Y-m-d H:i:s', $post_date) 299 364 ); … … 314 379 update_post_meta($post_id, '_expresscurate_description', $data['description']); 315 380 } 316 if ($post_status == 'draft' && get_option('expresscurate_publish', '') == 'on' ) {381 if ($post_status == 'draft' && get_option('expresscurate_publish', '') == 'on' && $post_type !== 'expresscurate_spost') { 317 382 $smartPublish = 1; 318 383 … … 327 392 // add source 328 393 if(isset($data['source'])) { 329 330 394 $expresscurate_sources_meta_value = array(); 331 395 $expresscurate_sources_meta_value[0]['title'] = $source['original_title']; … … 384 448 if ($data['refresh_token']) { 385 449 update_option('expresscurate_google_refresh_token', $data['refresh_token']); 386 $result = array('status' => true, 'msg' => "Key is set");450 $result = array('status' => true, 'msg' => 'Key is set'); 387 451 wp_redirect('admin.php?page=expresscurate_settings', 301); 388 452 } else { … … 398 462 if ($data['buffer_token']) { 399 463 update_option('expresscurate_buffer_access_token', $data['buffer_token']); 400 $result = array('status' => true, 'msg' => "Buffer Access Token Accepted.");464 $result = array('status' => true, 'msg' => 'Buffer Access Token Accepted.'); 401 465 wp_redirect('admin.php?page=expresscurate_settings', 301); 402 466 } else { 403 $result = array('status' => false, 'msg' => "Buffer Access Token was not found.");467 $result = array('status' => false, 'msg' => 'Buffer Access Token was not found.'); 404 468 } 405 469 echo json_encode($result); -
expresscurate/trunk/ExpressCurate_ContentManager.php
r1162493 r1191825 40 40 die; 41 41 } else { 42 42 43 if (!$url) { 43 44 $url = $this->_post('expresscurate_source', ''); -
expresscurate/trunk/ExpressCurate_HtmlParser.php
r1179598 r1191825 988 988 $title = (!empty($title)) ? $title : $this->title; 989 989 $content = (!empty($content)) ? $content : $this->data; 990 $keyword=preg_quote($keyword,'/'); 990 991 preg_match_all("/(?<!\w)(?=[^>]*(<|$))" . $keyword . "/i", $title, $tag_in_title); 991 992 preg_match_all("/(?<!\w)(?=[^>]*(<|$))" . $keyword . "/i", $content, $tag_in_content); -
expresscurate/trunk/ExpressCurate_Keywords.php
r1137344 r1191825 215 215 $keyword = str_replace("\\\\", '', $keyword); 216 216 $keyword_in[$keyword]['added_count'] = 0; 217 preg_replace('/\b' . $keyword . '\b/iu', '', $post_content['content'], -1, $keyword_in[$keyword]['count']); 217 $keywordReg=preg_quote($keyword,'/'); 218 preg_replace('/\b' . $keywordReg . '\b/iu', '', $post_content['content'], -1, $keyword_in[$keyword]['count']); 218 219 //str_ireplace(" ".$keyword." ", '', $post_content['content'], $keyword_in[$keyword]['count']); 219 220 $keyword_in[$keyword]['title'] = 0; … … 223 224 if ($get_posts_count) { 224 225 foreach ($post_content['posts'] as $post) { 225 preg_match_all('/\b' . $keyword . '\b/iu', $post, $matches, PREG_OFFSET_CAPTURE);226 preg_match_all('/\b' . $keywordReg . '\b/iu', $post, $matches, PREG_OFFSET_CAPTURE); 226 227 if (isset($matches[0][0][0])) { 227 228 $keyword_in[$keyword]['added_count'] = 1; … … 234 235 } 235 236 $count = 0; 236 preg_replace('/\b' . $keyword . '\b/iu', '', $post_content['titles'], -1, $count);237 preg_replace('/\b' . $keywordReg . '\b/iu', '', $post_content['titles'], -1, $count); 237 238 $keyword_in[$keyword]['title_matches'] = $count; 238 239 if ($count > 0) { -
expresscurate/trunk/ExpressCurate_SmartPublish.php
r1106118 r1191825 44 44 if ($hourdiff >= get_option("expresscurate_hours_interval")) { 45 45 wp_update_post(array('ID' => $posts[0]->ID, 'post_status' => 'publish')); 46 update_post_meta($posts[0]->ID, 'smart_publish_date', $now);46 update_post_meta($posts[0]->ID, 'smart_publish_date', $now); 47 47 update_option('expresscurate_publish_mail_sent', 0); 48 48 } 49 } elseif (!count($posts) && get_settings('admin_email') && get_option('expresscurate_publish_mail_sent', '0') == "0") {49 } elseif (!count($posts) && get_settings('admin_email') && get_option('expresscurate_publish_mail_sent', '0') == '0') { 50 50 $subject = "ExpressCurate Smart Publishing Status"; 51 51 $blogName = get_bloginfo('Name'); -
expresscurate/trunk/ExpressCurate_SocialManager.php
r1179063 r1191825 102 102 } 103 103 104 public function savePostMessages( )104 public function savePostMessages($post_id = null, $messages = null) 105 105 { 106 107 106 $data = $_REQUEST; 108 $post_id = $ data['post_id'];109 $messages = json_decode(stripslashes($data['messages']), true);107 $post_id = $post_id ? $post_id : $data['post_id']; 108 $messages = $messages ? $messages : json_decode(stripslashes($data['messages']), true); 110 109 111 110 if (empty($post_id)) { … … 143 142 144 143 $buffer = new ExpressCurate_BufferClient(); 144 $permalink = ' ' . get_permalink($post_id); 145 145 146 146 foreach ($approvedPostMessages as $messageId => $message) { 147 147 $data = array(); 148 $data[ExpressCurate_BufferClient::POST_FIELD_TEXT] = $message[self::MESSAGE] . ' ' . get_permalink($post_id);148 $data[ExpressCurate_BufferClient::POST_FIELD_TEXT] = $message[self::MESSAGE] . $permalink; 149 149 $data[ExpressCurate_BufferClient::POST_FIELD_PROFILE] = $message[self::PROFILE]; 150 150 -
expresscurate/trunk/ExpressCurate_Tags.php
r1179063 r1191825 14 14 private function checkOpenTag($matches) 15 15 { 16 17 if ((strpos($matches[3], '</a') < strpos($matches[3], '<a')) || strpos($matches[3], '.') !== false){18 return '<a class="expresscurate_contentTags" href="' . get_tag_link($this->tag_id) . '">#' . $matches[0]. '</a>';19 } else {20 return $matches[0];21 }16 //if ((strpos($matches[4], '</a') < strpos($matches[4], '<a')) || strpos($matches[4], '.') !== false) { 17 //if(!empty($matches[3])){ 18 return '<a class="expresscurate_contentTags" href="' . get_tag_link($this->tag_id) . '">#' . $matches[0]. '</a>'; 19 //} else { 20 // return $matches[0]; 21 // } 22 22 } 23 23 … … 25 25 { 26 26 // TODO for multiline use /m 27 return preg_replace_callback('/(\b' . $this->word . '\b)(?=[^>]*(<|$))(?=(.*?>))/Uuis', array(&$this, 'checkOpenTag'), $html,1); 27 return preg_replace_callback('/(?![^<]*<\/a)(\b' . $this->word . '\b)(?=[^>]*(<|$))(?=(.*?))/uUis', array(&$this, 'checkOpenTag'), $html,1); 28 //return preg_replace_callback('/(#?)(\b' . $this->word . '\b)(?=[^>]*(<|$))(?=(.*?))/Uuis', array(&$this, 'checkOpenTag'), $html,1); 28 29 } 29 30 … … 41 42 $tagLinks = '/<a class="expresscurate_contentTags".*?>(.*?)<\/a>/i'; 42 43 $html = preg_replace($tagLinks, '$1', $html); 43 preg_match_all('/ \s(?<!\w)(?=[^>]*(<|$))#\w+/iu', $html, $tags);44 preg_match_all('/(?<!\w)(?=[^>]*(<|$))#\w+/iu', $html, $tags); 44 45 foreach ($tags[0] as $tag) { 45 46 $html = str_replace($tag, str_replace('#', '', $tag), $html); -
expresscurate/trunk/css/expresscurate.css
r1179063 r1191825 986 986 padding-bottom: 25px; 987 987 } 988 .expresscurate_welcome_widget .expresscurate_dashboard > div{ 989 text-align: left; 990 } 991 .expresscurate_welcome_widget .expresscurate_dashboard > div ul{ 992 list-style: disc; 993 padding-left: 25px; 994 } 995 #dashboard_widget_welcome .inside{ 996 padding: 0 0 12px 0; 997 } 998 .expresscurate_dashboard_welcome > div{ 999 padding: 0 10px; 1000 } 988 1001 989 1002 .expresscurate_dashboard .settingsLink { … … 1966 1979 cursor: pointer; 1967 1980 } 1968 1981 #expresscurate_loading #img-load , 1969 1982 .expresscurate_dialog #expresscurate_loading #img-load { 1970 1983 position: absolute; … … 1973 1986 } 1974 1987 1988 #expresscurate_loading , 1975 1989 .expresscurate_dialog #expresscurate_loading { 1976 1990 display: none; … … 3782 3796 height: 32px; 3783 3797 } 3784 3785 3798 .expresscurate_controls li{ 3786 3799 display: inline-block; … … 3794 3807 position: relative; 3795 3808 border: solid 1px #dddddd; 3796 /*transition: background-color 400ms; 3797 -webkit-transition: background-color 400ms; 3798 -moz-transition: background-color 400ms; 3799 -o-transition: background-color 400ms; 3800 -ms-transition: background-color 400ms;*/ 3801 3809 } 3810 .expresscurate_controls select { 3811 display: inline-block; 3812 width: 170px; 3813 height: 32px !important; 3814 margin: 0; 3815 background-repeat: no-repeat; 3816 cursor: default; 3817 border: solid 1px #25bfa1; 3818 vertical-align: top; 3819 box-sizing: border-box; 3820 -moz-box-sizing: border-box; 3821 -webkit-box-sizing: border-box; 3822 background-color: transparent; 3823 -webkit-appearance: none; 3824 -moz-appearance: none; 3825 appearance: none; 3826 line-height: 20px; 3827 overflow: hidden; 3828 text-overflow: ellipsis; 3829 background-image: url("../images/select.svg"); 3830 background-size: 13px auto; 3831 background-position: 150px -17px; 3832 padding: 0px 20px 0 5px; 3833 } 3834 .expresscurate_controls select option.expresscurate_filterOption{ 3835 display: block; 3836 height: 30px; 3837 max-width: 100%; 3838 overflow: hidden; 3839 text-overflow: ellipsis; 3840 } 3841 /*target Internet Explorer 9 and Internet Explorer 10:*/ 3842 @media screen and (min-width:0\0) { 3843 select { 3844 background:none; 3845 padding: 5px; 3846 } 3802 3847 } 3803 3848 .expresscurate_controls li.layout{ … … 3817 3862 height: 30px; 3818 3863 width: 50px; 3819 margin -left:10px;3864 margin: 0 7px 0 10px; 3820 3865 background-image: url("../images/feed_icons.svg"); 3821 3866 background-color: transparent; … … 4873 4918 } 4874 4919 /**/ 4920 @media (min-width: 467px) { 4921 .expresscurate_controls br.second{ 4922 display: none; 4923 } 4924 } 4925 @media (max-width: 467px) { 4926 .expresscurate_controls br.second{ 4927 display: block; 4928 clear: both; 4929 } 4930 .expresscurate_controls li{ 4931 margin-top: 5px; 4932 } 4933 } 4934 @media (min-width: 1064px) { 4935 .expresscurate_controls br.first{ 4936 display: none; 4937 } 4938 } 4939 @media (max-width: 1064px) { 4940 .expresscurate_controls br.first{ 4941 display: block; 4942 } 4943 } 4875 4944 @media (max-width: 1050px) { 4876 4945 .expresscurate_feed_dashboard .addFeed, … … 4939 5008 } 4940 5009 .expresscurate_supportBlock, 5010 .expresscurate_welcomeBlock, 4941 5011 .expresscurate_keywordsBlock, 4942 5012 .expresscurate_smartPublishBlock, -
expresscurate/trunk/css/menu-style-3.8.css
r1053405 r1191825 1 1 #adminmenu #toplevel_page_expresscurate div.wp-menu-image:before { 2 content: "";2 content: ""; 3 3 } 4 4 5 .wp-not-current-submenu#toplevel_page_expresscurate div.wp-menu-image, 5 6 .wp-not-current-submenu#toplevel_page_expresscurate:hover div.wp-menu-image, 6 .wp-menu-open#toplevel_page_expresscurate div.wp-menu-image {7 background-image: url("../images/wp_quotes.svg") !important;7 .wp-menu-open#toplevel_page_expresscurate div.wp-menu-image { 8 background-image: url("../images/wp_quotes.svg") !important; 8 9 background-size: 11px auto; 9 10 background-repeat: no-repeat; 10 11 } 11 .wp-not-current-submenu#toplevel_page_expresscurate div.wp-menu-image{ 12 content: ""; 13 background-position: 12px 10px !important;14 margin-top: 2px;12 13 .wp-not-current-submenu#toplevel_page_expresscurate div.wp-menu-image { 14 content: ""; 15 background-position: 12px 12px !important; 15 16 } 16 17 17 18 .wp-not-current-submenu#toplevel_page_expresscurate:hover div.wp-menu-image { 18 background-position: 12px -23px !important; 19 margin-top: 2px; 19 background-position: 12px -21px !important; 20 20 } 21 21 22 .wp-menu-open#toplevel_page_expresscurate div.wp-menu-image{ 23 content: ""; 24 background-position: 12px -56px !important; 25 margin-top: 2px; 22 .wp-menu-open#toplevel_page_expresscurate div.wp-menu-image { 23 content: ""; 24 background-position: 12px -54px !important; 26 25 } 27 26 28 #toplevel_page_expresscurate > ul > li.wp-first-item { 29 display: none;27 #toplevel_page_expresscurate > ul > li.wp-first-item { 28 display: none; 30 29 } 31 #expresscurate_keywords, #expresscurate_description 32 {33 background-color:#fdfdfd;34 border-style:solid;35 border-width:1px;36 border-color:#dfdfdf;30 31 #expresscurate_keywords, #expresscurate_description { 32 background-color: #fdfdfd; 33 border-style: solid; 34 border-width: 1px; 35 border-color: #dfdfdf; 37 36 } 38 .dashicons-before{ 39 clear:both; 37 38 .dashicons-before { 39 clear: both; 40 40 } -
expresscurate/trunk/css/quotes-style.css
r1129694 r1191825 51 51 clear: both; 52 52 } 53 .expresscurate_FacebookEmbed{ 54 display: block; 55 width: 450px; 56 height: 62px; 57 background: url("../images/facebookEmbedPlaceholder.png") #3B5998 no-repeat; 58 background-size: auto 25px; 59 background-position: center center; 60 } -
expresscurate/trunk/js/Buttons.js
r1179063 r1191825 98 98 } 99 99 100 function getInfo() {101 return {102 longname: "Recent Posts",103 author: 'Konstantinos Kouratoras',104 authorurl: 'http://www.kouratoras.gr',105 infourl: 'http://www.smashingmagazine.com',106 version: "1.0"107 };108 }109 110 100 function postAnalysis(ed, scroll) { 111 101 var $postAnalysisTab = $('.expresscurate_advancedSEO_widget .postAnalysisTab'), … … 127 117 case (wordsCount >= 700 && wordsCount <= 1600): 128 118 lengthColor = 'green'; 129 lengthMessage = 'Post length is ' + wordsCount + ' . Good work! (The recommended length is 700-1600 words).';119 lengthMessage = 'Post length is ' + wordsCount + ' words. Good work! (The recommended length is 700-1600 words).'; 130 120 break; 131 121 case wordsCount > 1600: … … 184 174 185 175 /*social post*/ 186 if ($('#expresscurate_social_publishing').length){187 if ($('.expresscurate_socialPostBlock').length<1){188 messageHtml +='<p class="lengthSuggestion blue">You currently have no social posts. Add a couple of them to get more exposure.</p>';176 if ($('#expresscurate_social_publishing').length) { 177 if ($('.expresscurate_socialPostBlock').length < 1) { 178 messageHtml += '<p class="lengthSuggestion blue">You currently have no social posts. Add a couple of them to get more exposure.</p>'; 189 179 } 190 180 } … … 327 317 if (myRegExp.test(content)) { 328 318 $tabs.removeClass('current'); 329 if (tab=='youtu'){330 tab ='youtube';319 if (tab == 'youtu') { 320 tab = 'youtube'; 331 321 } 332 322 $('.expresscurate_socialDialog .tabs li.' + tab).addClass('current'); … … 334 324 }); 335 325 } 326 336 327 337 328 function setupButtons() { … … 342 333 }); 343 334 $page.on('hover', '#publish', function () { 344 postAnalysis(tinymce.activeEditor, false); 335 if (!$('.post-type-expresscurate_spost').length) { 336 postAnalysis(tinymce.activeEditor, false); 337 } 345 338 }); 346 339 $('.expresscurate_advancedSEO_widget .postAnalysisLink').on('click', function () { … … 371 364 var $input = $('#expresscurate_socialEmbed'), 372 365 insertedValue = $input.val().trim(), 373 selectedTab = $('.expresscurate_socialDialog .tabs li.current').data('tab'); 374 /*if inserted content is URL*/ 375 if (!insertedValue.match(/(<([^>]+)>)/gi) && selectedTab) { 366 selectedTab = $('.expresscurate_socialDialog .tabs li.current').data('tab'), 367 existedContent, 368 contentToInsert = ''; 369 if (selectedTab === 'facebook') { 370 if (!insertedValue.match(/(<([^>]+)>)/gi)) { 371 contentToInsert = insertedValue; 372 } else { 373 $elem = $(insertedValue)[2]; 374 contentToInsert = $($elem).data('href'); 375 } 376 376 if ($contentWrap.css("display") === "block") { 377 var existedContent = $contentWrap.val(); 378 $contentWrap.val(existedContent + '[embed]' + insertedValue + '[/embed]'); 379 ed.windowManager.close(); 377 existedContent = $contentWrap.val(); 378 $contentWrap.val(existedContent + '[facebook]' + contentToInsert + '[/facebook]'); 380 379 } else { 381 ed.insertContent('[embed]' + insertedValue + '[/embed]'); 382 ed.windowManager.close(); 380 ed.insertContent('[facebook]' + contentToInsert + '[/facebook]'); 383 381 } 382 ed.windowManager.close(); 383 384 384 } else { 385 var $elem, 386 url = ''; 387 switch (selectedTab) { 388 case 'facebook': 389 $elem = $(insertedValue)[2]; 390 url = $($elem).data('href'); 391 break; 392 case 'twitter': 393 $elem = $(insertedValue).find('> a'); 394 url = $($elem).attr('href'); 395 break; 396 case 'youtube': 397 $elem = $(insertedValue); 398 url = $($elem).attr('src'); 399 break; 400 case 'vimeo': 401 $elem = $(insertedValue); 402 url = $($elem).attr('src'); 403 break; 404 } 405 ExpressCurateUtils.track('/post/embed-dialog/insert' + selectedTab); 406 if (url) { 385 /*if inserted content is URL*/ 386 if (!insertedValue.match(/(<([^>]+)>)/gi) && selectedTab) { 407 387 if ($contentWrap.css("display") === "block") { 408 var existedText = $contentWrap.val();409 $contentWrap.val(existed Text + '[embed]' + url+ '[/embed]');388 existedContent = $contentWrap.val(); 389 $contentWrap.val(existedContent + '[embed]' + insertedValue + '[/embed]'); 410 390 ed.windowManager.close(); 411 391 } else { 412 ed.insertContent('[embed]' + url+ '[/embed]');392 ed.insertContent('[embed]' + insertedValue + '[/embed]'); 413 393 ed.windowManager.close(); 414 394 } 415 395 } else { 416 var message = 'Embed code you have provided is wrong. Please check.'; 417 ExpressCurateUtils.validationMessages(message, $('.expresscurate_socialDialog .expresscurate_errorMessage'), $input); 418 /*The tab/ URL/ embed code you have provided is wrong. Please check.*/ 396 var $elem, 397 url = ''; 398 switch (selectedTab) { 399 case 'facebook': 400 $elem = $(insertedValue)[2]; 401 url = $($elem).data('href'); 402 break; 403 case 'twitter': 404 $elem = $(insertedValue).find('> a'); 405 url = $($elem).attr('href'); 406 break; 407 case 'youtube': 408 $elem = $(insertedValue); 409 url = $($elem).attr('src'); 410 break; 411 case 'vimeo': 412 $elem = $(insertedValue); 413 url = $($elem).attr('src'); 414 break; 415 } 416 ExpressCurateUtils.track('/post/embed-dialog/insert' + selectedTab); 417 if (url) { 418 if ($contentWrap.css("display") === "block") { 419 var existedText = $contentWrap.val(); 420 $contentWrap.val(existedText + '[embed]' + url + '[/embed]'); 421 ed.windowManager.close(); 422 } else { 423 ed.insertContent('[embed]' + url + '[/embed]'); 424 ed.windowManager.close(); 425 } 426 } else { 427 var message = 'Embed code you have provided is wrong. Please check.'; 428 ExpressCurateUtils.validationMessages(message, $('.expresscurate_socialDialog .expresscurate_errorMessage'), $input); 429 } 419 430 } 420 431 } … … 437 448 */ 438 449 450 visualizeShortcode: function (co) { 451 return co.replace(/\[facebook\]([^\]]*)\[\/facebook\]/g, function (a, b) { 452 return '<img src="" class="expresscurate_FacebookEmbed" title="' + tinymce.DOM.encode(a) + '"'; 453 }); 454 }, 455 456 recoverShortcode: function (co) { 457 function getAttr(s, n) { 458 n = new RegExp(n + '=\"([^\"]+)\"', 'g').exec(s); 459 return n ? tinymce.DOM.decode(n[1]) : ''; 460 } 461 462 return co.replace(/(?:<p[^>]*>)*(<img[^>]+>)(?:<\/p>)*/g, function (a, im) { 463 var cls = getAttr(im, 'class'); 464 if (cls.indexOf('expresscurate_FacebookEmbed') != -1) { 465 return '<p>' + tinymce.trim(getAttr(im, 'title')) + '</p>'; 466 } 467 return a; 468 }); 469 }, 470 471 439 472 init: function (ed, url) { 473 474 var t = this; 475 t.url = url; 476 //replace shortcode before editor content set 477 ed.onBeforeSetContent.add(function (ed, o) { 478 o.content = t.visualizeShortcode(o.content); 479 }); 480 //replace shortcode as its inserted into editor 481 ed.onExecCommand.add(function (ed, cmd) { 482 if (cmd === 'mceInsertContent') { 483 tinyMCE.activeEditor.setContent(t.visualizeShortcode(tinyMCE.activeEditor.getContent())); 484 } 485 }); 486 //replace the image back to shortcode on save 487 ed.onPostProcess.add(function (ed, o) { 488 if (o.get) 489 o.content = t.recoverShortcode(o.content); 490 }); 491 440 492 // Register buttons - trigger above command when clicked 441 493 ed.addButton('sochalPost', { -
expresscurate/trunk/js/bookmarks.js
r1140784 r1191825 14 14 if (!link.match(myRegExp)) { 15 15 message = 'Invalid URL'; 16 ExpressCurateUtils.validationMessages(message, $errorMessage,$input);16 ExpressCurateUtils.validationMessages(message, $errorMessage, $input); 17 17 } else { 18 18 ExpressCurateUtils.startLoading($input, $elemToRotate); … … 25 25 if (data.status === 'success') { 26 26 /*if (data.result === null) { 27 liHTML = '';28 message = 'Article does not exists.';29 } else {*/30 $.extend(data.result, {31 'id': $bookmarkBoxes.find('> li').length32 });33 liHTML = ExpressCurateUtils.getTemplate('bookmarksItem', data.result);34 35 $bookmarkBoxes.append(liHTML);36 var $lastLi = $bookmarkBoxes.find('> li').last();37 38 $bookmarkBoxes.find('.addNewBookmark').after($lastLi);39 $bookmarkBoxes.masonry('destroy').masonry({40 itemSelector: '.expresscurate_masonryItem',41 isResizable: true,42 isAnimated: true,43 columnWidth: '.expresscurate_masonryItem',44 gutter: 1045 });46 47 ExpressCurateUtils.notDefinedMessage($notDefMessage, $bookmarkBoxes.find(' > li'));48 $lastLi.addClass('expresscurate_transparent');49 $input.val('');50 setTimeout(function () {51 $lastLi.removeClass('expresscurate_transparent');52 }, 700);27 liHTML = ''; 28 message = 'Article does not exists.'; 29 } else {*/ 30 $.extend(data.result, { 31 'id': $bookmarkBoxes.find('> li').length 32 }); 33 liHTML = ExpressCurateUtils.getTemplate('bookmarksItem', data.result); 34 35 $bookmarkBoxes.append(liHTML); 36 var $lastLi = $bookmarkBoxes.find('> li').last(); 37 38 $bookmarkBoxes.find('.addNewBookmark').after($lastLi); 39 $bookmarkBoxes.masonry('destroy').masonry({ 40 itemSelector: '.expresscurate_masonryItem', 41 isResizable: true, 42 isAnimated: true, 43 columnWidth: '.expresscurate_masonryItem', 44 gutter: 10 45 }); 46 47 ExpressCurateUtils.notDefinedMessage($notDefMessage, $bookmarkBoxes.find(' > li')); 48 $lastLi.addClass('expresscurate_transparent'); 49 $input.val(''); 50 setTimeout(function () { 51 $lastLi.removeClass('expresscurate_transparent'); 52 }, 700); 53 53 //} 54 54 } else if (data.status === 'error' && data.msg !== null) { … … 56 56 } 57 57 if (message !== '') { 58 ExpressCurateUtils.validationMessages(message, $errorMessage,$input);58 ExpressCurateUtils.validationMessages(message, $errorMessage, $input); 59 59 } 60 60 ExpressCurateUtils.endLoading($input, $elemToRotate); … … 228 228 ExpressCurateUtils.checkControls($controls); 229 229 }); 230 230 /*share*/ 231 $bookmarkBoxes.on('click', '.controls .share', function () { 232 var $elem = $(this).parents('.expresscurate_masonryItem'), 233 url = $elem.find('a.url').data('encodedurl'); 234 $.when(bookmarkDelete($elem)).done(function () { 235 window.location.href = $('#adminUrl').val() + 'post-new.php?post_type=expresscurate_spost&expresscurate_load_source=' + url; 236 }); 237 }); 231 238 /*curate*/ 232 239 $('.expresscurate_bookmarks .quotes').on('click', function () { … … 237 244 var $elem = $($checked[0]).parent().find('a'), 238 245 title = $elem.html(), 239 url = window.btoa(encodeURIComponent($elem.attr('href')));246 url = $($checked[0]).parent().find('a.url').data('encodedurl'); 240 247 window.location.href = $('#adminUrl').val() + 'post-new.php?expresscurate_load_source=' + url + '&expresscurate_load_title=' + title; 241 248 } else if ($checked.length > 1) { -
expresscurate/trunk/js/feed/contentFeed.js
r1165036 r1191825 80 80 }).done(function (res) { 81 81 var data = $.parseJSON(res); 82 if (data) { 82 if (data) { 83 83 $("#expresscurate_feedBoxes").load("admin-ajax.php?action=expresscurate_show_content_feed_items #expresscurate_feedBoxes > li", function () { 84 84 $('.pullTime p').text('in ' + data.minutes_to_next_pull); … … 99 99 } 100 100 101 function filterContent(keyword, domain) { 102 var $wrap = $('.expresscurate_masonryWrap'), 103 $items = $wrap.find(' > li'); 104 $wrap.masonry('destroy'); 105 106 $items.addClass('expresscurate_displayNone').removeClass('expresscurate_masonryItem'); 107 108 $.each($items, function (index, value) { 109 var $block = $(value), 110 $keywords, 111 $domain, 112 matchKeyword = keyword == 'none' ? true : false, 113 matchDomain = domain == 'none' ? true : false; 114 115 $keywords = $block.find('.keywords li.expresscurate_keyword'); 116 if ($keywords.length) { 117 $.each($keywords, function (index, value) { 118 var text = ExpressCurateKeywordUtils.justText($(value)); 119 if (text.trim() == keyword.trim()) { 120 matchKeyword = true; 121 } 122 }); 123 } 124 125 $domain = $block.find('.url').text(); 126 if ($domain.length) { 127 if ($domain.trim() == domain.trim()) { 128 matchDomain = true; 129 130 } 131 } 132 133 if (matchDomain && matchKeyword) { 134 $block.removeClass('expresscurate_displayNone').addClass('expresscurate_masonryItem'); 135 } 136 137 }); 138 $wrap.masonry({ 139 itemSelector: '.expresscurate_masonryItem', 140 isResizable: true, 141 isAnimated: true, 142 columnWidth: '.expresscurate_masonryItem', 143 gutter: 10 144 }); 145 } 146 101 147 function setupFeed() { 148 var $blogFilter = $('#expresscurate_blogFilter'), 149 $keywordFilter = $('#expresscurate_keywordFilter'); 102 150 $notDefFeed = $('.expresscurate_feed_list .expresscurate_notDefined'); 103 151 $feedControls = $('.feedListControls li'); … … 168 216 }); 169 217 218 /*share*/ 219 $feedBoxes.on('click', '.controls .share', function () { 220 var $elem = $(this).parents('.expresscurate_feedBoxes > li'), 221 url = $elem.find('a.url').data('encodedurl'); 222 $.when(deleteFeedItems($elem)).done(function () { 223 window.location.href = $('#adminUrl').val() + 'post-new.php?post_type=expresscurate_spost&expresscurate_load_source=' + url; 224 }); 225 }); 170 226 /*curate*/ 171 227 $('.expresscurate_feed_list .quotes').on('click', function () { … … 173 229 174 230 var $checked = $feedBoxes.find('li input:checkbox:checked'); 175 176 231 if ($checked.length === 1) { 177 232 var $elem = $($checked[0]).parent().find('a'), 178 233 title = $elem.html(), 179 url = window.btoa(encodeURIComponent($elem.attr('href')));234 url = $($checked[0]).parent().find('a.url').data('encodedurl'); 180 235 window.location.href = $('#adminUrl').val() + 'post-new.php?expresscurate_load_source=' + url + '&expresscurate_load_title=' + title; 181 236 } else if ($checked.length > 1) { … … 185 240 }); 186 241 242 /*filters*/ 243 $keywordFilter.on('change', function () { 244 filterContent($(this).val(), $blogFilter.val()); 245 }); 246 247 $blogFilter.on('change', function () { 248 filterContent($keywordFilter.val(), $(this).val()); 249 }); 250 251 /*layout*/ 187 252 $(window).on('load', function () { 188 253 $masonryWrap.masonry(); … … 202 267 } 203 268 } 204 })(window.jQuery); 269 }) 270 (window.jQuery); 205 271 206 272 ExpressCurateFeedWall.setup(); -
expresscurate/trunk/js/socialPostWidget.js
r1179063 r1191825 54 54 55 55 function createSocialPost(data) { 56 57 56 var blockId = (data && data.id) ? data.id : uniqueId(), 58 57 message = data ? data.message : '', … … 68 67 updatePosts(posts); 69 68 $('.mainControls').after(ExpressCurateUtils.getTemplate('socialPostWidget', post)); 70 71 69 } 72 70 … … 96 94 } 97 95 96 /*social post type*/ 97 function getArticle(urlList) { 98 ExpressCurateUtils.track('/post/socialpost/load'); 99 var $url = $('#expresscurate_source').val(urlList), 100 errorHTML = ''; 101 $("#expresscurate_loading").fadeIn('fast'); 102 $.ajax({ 103 type: 'POST', 104 url: 'admin-ajax.php?action=expresscurate_get_article&check=1', 105 data: $url.serialize() 106 }).done(function (res) { 107 var data = $.parseJSON(res); 108 if (data.status === 'notification') { 109 //@todo show notification 110 } 111 }); 112 $.ajax({ 113 type: 'POST', 114 url: 'admin-ajax.php?action=expresscurate_get_article&cloned=1', 115 data: $url.serialize() 116 }).done(function (res) { 117 var data = $.parseJSON(res); 118 if (data) { 119 if (data.status === 'error') { 120 errorHTML = '<div class="error">' + data.error + '</div>'; 121 } else if (data.status === 'success') { 122 var title = data.result.titles[0]; 123 if (title && title.length > 0) { 124 $('#titlewrap').find('#title').val(title).text(title).focus(); 125 } 126 var $editor = tinyMCE.get('content'); 127 if ($editor) { 128 $editor.execCommand("mceInsertContent", true, data.result.article_html[0]); 129 } 130 } 131 } else { 132 errorHTML = '<div class="error">Can\'t load from this page</div>'; 133 } 134 if (errorHTML.length > 2) { 135 $('#title-prompt-text').before(errorHTML); 136 } 137 $("#expresscurate_loading").fadeOut('fast'); 138 }); 139 140 } 141 142 /*share link*/ 143 144 $('.expresscurate_bookmarkBoxes').on('click', '.controls .share', function () { 145 var $elem = $(this).parents('.expresscurate_masonryItem'); 146 bookmarkDelete($elem); 147 }); 148 /**/ 98 149 function setupSocial() { 99 150 var $metaTag = $('#expresscurate_social_post_messages'); … … 282 333 setupSocial(); 283 334 isSetup = true; 335 if (window.expresscurate_socialPostUrl) { 336 getArticle(window.expresscurate_socialPostUrl); 337 } 284 338 }); 285 339 } -
expresscurate/trunk/readme.txt
r1179598 r1191825 5 5 Requires at least: 3.9 6 6 Tested up to: 4.2.2 7 Stable tag: 2.1. 27 Stable tag: 2.1.3 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.1. 2.zip "Your favorite content marketing tools") for WordPress.83 [Download ExpressCurate plugin](http://downloads.wordpress.org/plugin/expresscurate.2.1.3.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 … … 132 132 == Changelog == 133 133 134 = 2.1.3 = 135 * Welcome to ExpressCurate! widget with useful getting started links and resources. 136 * New Social Posts: Share and promote posts from Content Feed and Bookmarks, create and organize social messages better. 137 * Filtering by keywords & RSS Feeds in Content Feed 138 * Auto-hashtagging issues: multiple ### symbols, multi-word tags with [], nested tags, etc are all fixed now. 139 * Miscellaneous bug fixes and improvements. 140 134 141 = 2.1.2 = 135 142 * Miscellaneous bug fixes and improvements. -
expresscurate/trunk/templates/bookmarks.php
r1137344 r1191825 98 98 <a class="postTitle" href="<?php echo $item['link'] ?>" 99 99 target="_blank"><?php echo $item['title'] ?></a><br/> 100 <a class="url" target="_blank" href="<?php echo $item['link'] ?>"><?php echo $item['domain'] ?></a> 100 <a target="_blank"><?php echo $item['title'] ?></a><br/> 101 <a data-encodedurl="<?php echo base64_encode(urlencode($item['link'])) ?>" class="url" target="_blank" href="<?php echo $item['link'] ?>"><?php echo $item['domain'] ?></a> 101 102 <!--<span class="curatedBy">/<?php /*echo $item['curated'] ? 'curated by' : 'author'; */ ?> <span><?php /*echo $item['author']; */ ?></span> /</span>--> 102 103 <span class="curatedBy">/ by <span><?php echo $item['user']; ?></span> /</span> … … 117 118 href="<?php echo esc_url(get_admin_url() . "post-new.php?expresscurate_load_source=" . base64_encode(urlencode($item['link'])) . "&expresscurate_load_title=" . urlencode($item['title'])); ?>">Curate</a> 118 119 </li> 120 <li class="separator">-</li> 121 <li class="share">Share </li> 119 122 <li class="separator">-</li> 120 123 <li class="copyURL">Copy URL</li> … … 165 168 <li><a class="curate" href="post-new.php?expresscurate_load_source={{data.curateLink}}">Curate</a></li> 166 169 <li class="separator">-</li> 170 <li class="share">Share</li> 171 <li class="separator">-</li> 167 172 <li class="copyURL">Copy URL</li> 168 173 <li class="separator">-</li> 169 174 <li class="hide">Delete</li> 175 170 176 </ul> 171 177 <div class="expresscurate_clear"></div> -
expresscurate/trunk/templates/dashboard.php
r1179063 r1191825 28 28 <?php 29 29 $dashboard_order = get_option('dashboard_items_order') ? get_option('dashboard_items_order') : array(); 30 $allWidgets = array(' keyWords', 'keyWordsIntOverTime', 'keyWordsRelTopics', 'smartPublish', 'socialPublish', 'feedWidget', 'bookmarks', 'support');30 $allWidgets = array('welcome', 'keyWords', 'keyWordsIntOverTime', 'keyWordsRelTopics', 'smartPublish', 'socialPublish', 'feedWidget', 'bookmarks', 'support'); 31 31 foreach ($allWidgets as $item) { 32 32 if (!in_array($item, $dashboard_order)) { … … 36 36 if (!empty($dashboard_order)) { 37 37 foreach ($dashboard_order as $ordered_item): 38 if ($ordered_item == "welcome"): 39 echo '<div id="welcome" class="expresscurate_welcomeBlock expresscurate_masonryItem"> 40 <label class="label">Welcome to ExpressCurate!</label>'; 41 $this->welcome_widget(); 42 echo '</div>'; 43 endif; 38 44 if ($ordered_item == "keyWords"): 39 45 echo '<div id="keyWords" class="expresscurate_keywordsBlock expresscurate_masonryItem"> -
expresscurate/trunk/templates/faq.php
r1129694 r1191825 69 69 placeholder="Email" 70 70 value="<?php echo $user_email ?>"/> 71 <span>Please make sure to provide a working email address so that we can respond back to your support issue.</span> 71 72 <span id="expresscurate_support_email_validation" class="expresscurate_errorMessage"></span> 72 73 </div> -
expresscurate/trunk/templates/feed_list.php
r1165036 r1191825 14 14 15 15 if (!empty($contentList)) { 16 $domains=array(); 17 $keywords=array(); 16 18 $feed_content = $contentList['content']; 17 19 if (is_array($feed_content) && count($feed_content) > 0) { … … 21 23 $content['title'] = str_replace(""","'",$content['title']); 22 24 array_push($sorted_feeds, $content); 25 26 //filter data 27 array_push($domains,$content['domain']); 28 if (!empty($content['keywords'])) { 29 foreach ($content['keywords'] as $keyword => $stats) { 30 array_push($keywords,$keyword); 31 } 32 } 23 33 } 24 34 } 35 $domains=array_unique($domains); 36 $keywords=array_unique($keywords); 37 25 38 array_sort_by_column($sorted_feeds, 'date'); 26 39 } … … 49 62 <span class="tooltip">select / deselect</span> 50 63 </li> 64 <select name="expresscurate_keywordFilter" id="expresscurate_keywordFilter"> 65 <option value="none" selected>Fillter by keyword</option> 66 <?php foreach($keywords as $keyword){ ?> 67 <option class="expresscurate_filterOption" value="<?php echo $keyword; ?>"><?php echo $keyword; ?></option> 68 <?php } ?> 69 </select> 70 <br class="second"/> 71 <select name="expresscurate_blogFilter" id="expresscurate_blogFilter"> 72 <option value="none" selected>Filter by blog</option> 73 <?php foreach($domains as $domain){ ?> 74 <option class="expresscurate_filterOption" value="<?php echo $domain; ?>"><?php echo $domain; ?></option> 75 <?php } ?> 76 </select> 77 <br class="first"/> 51 78 <li class="remove expresscurate_floatRight"> 52 79 <span class="tooltip">delete</span> … … 58 85 <span class="tooltip">curate</span> 59 86 </li> 87 <br class="second"/> 60 88 <?php if (strlen(get_option('expresscurate_links_rss', '')) > 2) { ?> 61 89 <li class="pull active expresscurate_floatRight"> … … 111 139 } 112 140 ?> 113 <li class=" <?php echo $color ?>"><?php echo $keyword; ?>141 <li class="expresscurate_keyword <?php echo $color ?>"><?php echo $keyword; ?> 114 142 <span class="tooltip"> 115 143 <div class="<?php echo $color ?>">Keyword match</div> … … 124 152 <a data-link="<?php echo $item['link']; ?>" class="postTitle" href="<?php echo $item['link'] ?>" 125 153 target="_blank"><?php echo $item['title'] ?></a><br/> 126 <a class="url" href="<?php echo $item['link'] ?>"><?php echo $item['domain'] ?></a>154 <a data-encodedurl="<?php echo base64_encode(urlencode($item['link'])) ?>" class="url" href="<?php echo $item['link'] ?>"><?php echo $item['domain'] ?></a> 127 155 <?php if (isset($item['author']) && '' != $item['author']) { ?> 128 156 <span class="curatedBy">/<?php echo $item['curated'] ? 'curated by' : 'author'; ?> … … 137 165 </li> 138 166 <li class="separator">-</li> 167 <li class="share">Share</li> 168 <li class="separator">-</li> 139 169 <li class="bookmark">Bookmark</li> 140 170 <li class="separator">-</li> 141 171 <li class="hide">Delete</li> 172 142 173 </ul> 143 174 <div class="expresscurate_clear"></div> -
expresscurate/trunk/templates/settings.php
r1179063 r1191825 100 100 </label> 101 101 <input type="text" id="expresscurate_max_tags" class="controls" value="<?php 102 if (get_option('expresscurate_max_tags') !== false) { 103 echo get_option('expresscurate_max_tags'); 102 $maxTag = get_option('expresscurate_max_tags'); 103 if ($maxTag !== false && $maxTag !== '') { 104 echo $maxTag; 104 105 } else { 105 106 echo '3'; 107 update_option('expresscurate_max_tags', 3); 106 108 } 107 109 ?>" name="expresscurate_max_tags" size="1"/> … … 112 114 <br/><span> The default value is 5</span></label> 113 115 <input type="text" id="expresscurate_autosummary" class="controls" value="<?php 114 if (get_option('expresscurate_autosummary') !== false) { 115 echo get_option('expresscurate_autosummary'); 116 $autosummary = get_option('expresscurate_autosummary'); 117 if ($autosummary !== false && $autosummary !== '') { 118 echo $autosummary; 116 119 } else { 117 120 echo '5'; 121 update_option('expresscurate_autosummary', 5); 118 122 } 119 123 ?>" name="expresscurate_autosummary" size="1"/> … … 313 317 <?php 314 318 $blogName = urlencode(urlencode(get_bloginfo('url'))); 315 $socialPublishingStatus = get_option('expresscurate_social_publishing', '') == 'On' ? 'On' : 'Off';319 $socialPublishingStatus = get_option('expresscurate_social_publishing', '') == 'On' ? 'On' : 'Off'; 316 320 ?> 317 321 318 <a id="expresscurateBufferAccessToken" class="getApiKey <?php if (strlen(get_option('expresscurate_buffer_access_token')) > 2 || $socialPublishingStatus=='Off') { 319 echo 'expresscurate_displayNone defined'; 320 } ?>" 322 <a id="expresscurateBufferAccessToken" 323 class="getApiKey <?php if (strlen(get_option('expresscurate_buffer_access_token')) > 2 || $socialPublishingStatus == 'Off') { 324 echo 'expresscurate_displayNone defined'; 325 } ?>" 321 326 href="https://www.expresscurate.com/api/connector/buffer/accesstoken/<?php echo $blogName ?>">Authorize 322 327 access to Buffer</a> -
expresscurate/trunk/templates/social_posts_widget.php
r1179063 r1191825 5 5 6 6 $profilesStatus = array(); 7 if (get_option('expresscurate_social_publishing_profiles', '')) { 8 $profilesStatus = json_decode(stripslashes(urldecode(get_option('expresscurate_social_publishing_profiles', '')))); 7 $socialPublishingProfiles = get_option('expresscurate_social_publishing_profiles', ''); 8 if ($socialPublishingProfiles) { 9 $profilesStatus = json_decode(stripslashes(urldecode($socialPublishingProfiles))); 9 10 } 10 11 12 $socialPost = get_post_type() === 'expresscurate_spost' ? true : false; 11 13 $publishedPosts = get_post_meta($post->ID, '_expresscurate_social_published_post_messages', true); 12 14 $posts = get_post_meta($post->ID, '_expresscurate_social_post_messages', true); 13 15 ?> 16 14 17 <div class="expresscurate_social_post_widget"> 15 18 <input id="expresscurate_postId" type="hidden" value="<?php echo $post->ID; ?>"/> … … 17 20 <input type="hidden" id="expresscurate_social_post_messages" name="expresscurate_social_post_messages" 18 21 value="<?php echo htmlspecialchars(json_encode($posts), ENT_QUOTES); ?>"/> 22 <?php if ($socialPost) { ?> 23 <input type="hidden" class="expresscurate_source" 24 placeholder="" 25 id="expresscurate_source" name="expresscurate_source" 26 value=""> 19 27 28 <?php } ?> 20 29 21 30 <ul class="mainControls"> … … 26 35 <li data-header="h3" class="expresscurate_headerTweet expresscurate_social_widget_buttons">H3</li> 27 36 28 <li id="expresscurate_socialTitlePost" class="expresscurate_social_widget_buttons">Social Title</li> 29 <li id="expresscurate_socialDescriptionPost" class="expresscurate_social_widget_buttons">Social Description</li> 30 <li id="expresscurate_socialShortDescriptionPost" class="expresscurate_social_widget_buttons">Social Short 31 Description 32 </li> 37 <?php if (!$socialPost) { ?> 38 <li id="expresscurate_socialTitlePost" class="expresscurate_social_widget_buttons">Social Title</li> 39 <li id="expresscurate_socialDescriptionPost" class="expresscurate_social_widget_buttons">Social 40 Description 41 </li> 42 <li id="expresscurate_socialShortDescriptionPost" class="expresscurate_social_widget_buttons">Social Short 43 Description 44 </li> 45 <?php } ?> 33 46 </ul> 34 47 -
expresscurate/trunk/templates/support.php
r1129694 r1191825 56 56 placeholder="Email" 57 57 value="<?php echo $user_email ?>"/> 58 <label>Please make sure to provide a working email address so that we can respond back to your support issue.</label> 58 59 <span id="expresscurate_support_email_validation" class="expresscurate_errorMessage"></span> 59 60 </div>
Note: See TracChangeset
for help on using the changeset viewer.