Changeset 925284
- Timestamp:
- 06/02/2014 06:15:42 PM (12 years ago)
- Location:
- social-exchange-plugin/trunk
- Files:
-
- 9 edited
-
css/style.css (modified) (1 diff)
-
images/share.png (modified) (previous)
-
inc/render.php (modified) (8 diffs)
-
js/bind-first.js (modified) (1 diff)
-
js/sxlist.js (modified) (1 diff)
-
js/sxscripts.js (modified) (1 diff)
-
layouts/main_page.php (modified) (9 diffs)
-
readme.txt (modified) (3 diffs)
-
social-exchange.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
social-exchange-plugin/trunk/css/style.css
r849177 r925284 9 9 .sx-table{ width:100%;}.sx-box{ border:1px solid; border-radius:5px; padding:10px;} 10 10 .fb-like-btn{ display:block; width:76px; height:36px; background:url(../images/like.png); cursor:pointer;} 11 .fb-share-btn{ display:block; width: 76px;height:36px; background:url(../images/share.png); cursor:pointer;}11 .fb-share-btn{ display:block; width:96px; height:36px; background:url(../images/share.png); cursor:pointer;} 12 12 .skip-like,.skip-share{ font-size:15px; font-weight:bold; color:#333333; text-decoration:none; padding: 15px;} 13 13 .like-loader, .share-loader{ display:none; background:url(../images/loader.gif) no-repeat center center; height:40px; width:100%;} -
social-exchange-plugin/trunk/inc/render.php
r901737 r925284 42 42 require_once $sxpath."/layouts/main_page.php"; 43 43 //Still show form 44 if ($subscribed == 'no') 44 if ($subscribed == 'no') 45 45 require_once $sxpath."/layouts/optin_form.php"; 46 46 } … … 49 49 } 50 50 51 51 52 52 } 53 53 function get_sxdata(){ … … 79 79 <p>Points available: <b> <?php echo $sxoptions['points']; ?></b> <a href="http://moresharesforyou.com/get-more-points/" class="sx-get-more">How to get more points?</a></p> 80 80 <input type="hidden" name="sx-post-active" id="sx-post-active" value="<?php echo $likes['active']; ?>"/> <input type="hidden" name="sx-post-done" value="<?php echo intval($likes['done']) ; ?>" style=" width: 50px;" /> 81 Shares made: < b><?php echo intval($likes['done']) ; ?></b><br/>81 Shares made: <span id="sxsd_<?php echo $post->ID; ?>"><b><?php echo intval($likes['done']) ; ?></b></span><br/> 82 82 Maximum shares: <?php ?> 83 83 <?php if($likes['active'] == 'no') : ?> … … 98 98 99 99 <div class="campaign-wrapper"> 100 <a <?php if($likes['active'] == 'no') : ?> title=" Campaign is stopped" <?php endif; ?> class="campaign-btn post-page <?php if($likes['active'] == 'yes') : ?>sx-play-active<?php else: ?> sx-play-inactive<?php endif; ?>" data-value="yes" value=""></a>101 <a <?php if($likes['active'] == 'yes') : ?> title=" Campaign is running" <?php endif; ?> class=" post-page <?php if($likes['active'] == 'yes') : ?>sx-pause-inactive<?php else: ?> sx-pause-active<?php endif; ?> campaign-btn" data-value="no" value="" ></a>100 <a <?php if($likes['active'] == 'no') : ?> title="Start the campaign" <?php endif; ?> class="campaign-btn post-page <?php if($likes['active'] == 'yes') : ?>sx-play-active<?php else: ?> sx-play-inactive<?php endif; ?>" data-value="yes" value=""></a> 101 <a <?php if($likes['active'] == 'yes') : ?> title="Pause the campaign" <?php endif; ?> class=" post-page <?php if($likes['active'] == 'yes') : ?>sx-pause-inactive<?php else: ?> sx-pause-active<?php endif; ?> campaign-btn" data-value="no" value="" ></a> 102 102 103 103 <div class="sx-clear"></div> … … 108 108 <?php endif; ?> 109 109 </div><div class="sx-clear"></div></p> 110 110 <p> 111 <a href='<?php echo 'http://www.moresharesforyou.com/URL/'.get_permalink($post->ID); ?>' target="_blank">Check my Social stats</a> 112 </p> 111 113 <?php 112 114 } … … 142 144 ); 143 145 } 146 144 147 $sxdone = 0; 148 145 149 add_action( 'save_post', 'sx_save_likes',1,2 ); 146 150 function sx_save_likes( $id ) { 151 global $sxdone; 147 152 if ( 'post' == @$_POST['post_type'] || 'page' == @$_POST['post_type']) { 148 153 if ( ! current_user_can( 'edit_page', $id ) ) … … 412 417 if($hook == 'edit.php'){ 413 418 if($post->post_type == 'post' || $post->post_type == 'page' ) { 414 wp_enqueue_script( 'sx_custom_script_list', sx("plugin_url") . 'js/sxlist.js' );419 wp_enqueue_script( 'sx_custom_script_list', sx("plugin_url") . 'js/sxlist.js', array(), time() ); 415 420 } 416 421 } … … 421 426 } 422 427 if($hook == 'toplevel_page_social_exchange'){ 423 wp_enqueue_script( 'sx_custom_script_list', sx("plugin_url") . 'js/sxlist.js' );428 wp_enqueue_script( 'sx_custom_script_list', sx("plugin_url") . 'js/sxlist.js', array(), time() ); 424 429 wp_enqueue_script( 'sx_optin', sx("plugin_url") . 'js/sxoptin.js' ); 425 430 } 426 wp_enqueue_script( 'sx_custom_script', sx("plugin_url") . 'js/sxscripts.js' );431 wp_enqueue_script( 'sx_custom_script', sx("plugin_url") . 'js/sxscripts.js', array(), time() ); 427 432 wp_enqueue_script( 'sx_bind-first', sx("plugin_url") . 'js/bind-first.js' ); 428 433 } -
social-exchange-plugin/trunk/js/bind-first.js
r849177 r925284 1 1 (function($) { 2 3 4 5 6 2 var splitVersion = $.fn.jquery.split("."); 7 8 9 10 11 3 var major = parseInt(splitVersion[0]); 12 13 14 15 16 4 var minor = parseInt(splitVersion[1]); 17 5 18 19 20 21 22 23 24 25 26 6 var JQ_LT_17 = (major < 1) || (major == 1 && minor < 7); 27 28 29 30 31 7 32 33 34 35 36 8 function eventsData($el) { 37 38 39 40 41 9 return JQ_LT_17 ? $el.data('events') : $._data($el[0]).events; 42 43 44 45 46 10 } 47 48 49 50 51 11 52 53 54 55 56 12 function moveHandlerToTop($el, eventName, isDelegated) { 57 58 59 60 61 13 var data = eventsData($el); 62 63 64 65 66 14 var events = data[eventName]; 67 15 68 69 70 71 72 73 74 75 76 16 if (!JQ_LT_17) { 77 78 79 80 81 17 var handler = isDelegated ? events.splice(events.delegateCount - 1, 1)[0] : events.pop(); 82 83 84 85 86 18 events.splice(isDelegated ? 0 : (events.delegateCount || 0), 0, handler); 87 19 88 89 90 91 92 93 94 95 96 20 return; 97 98 99 100 101 21 } 102 22 23 if (isDelegated) { 24 data.live.unshift(data.live.pop()); 25 } else { 26 events.unshift(events.pop()); 27 } 28 } 29 30 function moveEventHandlers($elems, eventsString, isDelegate) { 31 var events = eventsString.split(/\s+/); 32 $elems.each(function() { 33 for (var i = 0; i < events.length; ++i) { 34 var pureEventName = $.trim(events[i]).match(/[^\.]+/i)[0]; 35 moveHandlerToTop($(this), pureEventName, isDelegate); 36 } 37 }); 38 } 39 40 $.fn.bindFirst = function() { 41 var args = $.makeArray(arguments); 42 var eventsString = args.shift(); 103 43 104 105 106 107 108 109 110 111 if (isDelegated) { 112 113 114 115 116 data.live.unshift(data.live.pop()); 117 118 119 120 121 } else { 122 123 124 125 126 events.unshift(events.pop()); 127 128 129 130 44 if (eventsString) { 45 $.fn.bind.apply(this, arguments); 46 moveEventHandlers(this, eventsString); 131 47 } 132 48 49 return this; 50 }; 133 51 52 $.fn.delegateFirst = function() { 53 var args = $.makeArray(arguments); 54 var eventsString = args[1]; 55 56 if (eventsString) { 57 args.splice(0, 2); 58 $.fn.delegate.apply(this, arguments); 59 moveEventHandlers(this, eventsString, true); 60 } 134 61 62 return this; 63 }; 135 64 136 } 137 138 139 140 141 142 143 144 145 146 function moveEventHandlers($elems, eventsString, isDelegate) { 147 148 149 150 151 var events = eventsString.split(/\s+/); 152 153 154 155 156 $elems.each(function() { 157 158 159 160 161 for (var i = 0; i < events.length; ++i) { 162 163 164 165 166 var pureEventName = $.trim(events[i]).match(/[^\.]+/i)[0]; 167 168 169 170 171 moveHandlerToTop($(this), pureEventName, isDelegate); 172 173 174 175 176 } 177 178 179 180 181 }); 182 183 184 185 186 } 187 188 189 190 191 192 193 194 195 196 $.fn.bindFirst = function() { 197 198 199 200 65 $.fn.liveFirst = function() { 201 66 var args = $.makeArray(arguments); 202 67 203 204 205 206 var eventsString = args.shift(); 207 208 209 210 211 212 213 214 215 216 if (eventsString) { 217 218 219 220 221 $.fn.bind.apply(this, arguments); 222 223 224 225 226 moveEventHandlers(this, eventsString); 227 228 229 230 231 } 232 233 234 235 236 237 238 239 68 // live = delegate to document 69 args.unshift(this.selector); 70 $.fn.delegateFirst.apply($(document), args); 240 71 241 72 return this; 242 243 244 245 246 73 }; 247 248 249 250 251 252 253 254 255 256 $.fn.delegateFirst = function() {257 258 259 260 261 var args = $.makeArray(arguments);262 263 264 265 266 var eventsString = args[1];267 268 269 270 271 272 273 274 275 276 if (eventsString) {277 278 279 280 281 args.splice(0, 2);282 283 284 285 286 $.fn.delegate.apply(this, arguments);287 288 289 290 291 moveEventHandlers(this, eventsString, true);292 293 294 295 296 }297 298 299 300 301 302 303 304 305 306 return this;307 308 309 310 311 };312 313 314 315 316 317 318 319 320 321 $.fn.liveFirst = function() {322 323 324 325 326 var args = $.makeArray(arguments);327 328 329 330 331 332 333 334 335 336 // live = delegate to document337 338 339 340 341 args.unshift(this.selector);342 343 344 345 346 $.fn.delegateFirst.apply($(document), args);347 348 349 350 351 352 353 354 355 356 return this;357 358 359 360 361 };362 363 364 365 366 74 367 368 369 370 371 75 if (!JQ_LT_17) { 372 373 374 375 376 76 $.fn.onFirst = function(types, selector) { 377 378 379 380 381 77 var $el = $(this); 382 383 384 385 386 78 var isDelegated = typeof selector === 'string'; 387 388 389 390 391 392 393 394 395 79 396 80 $.fn.on.apply($el, arguments); 397 81 398 399 400 401 402 403 404 405 406 82 // events map 407 408 409 410 411 83 if (typeof types === 'object') { 412 413 414 415 416 84 for (type in types) 417 418 419 420 421 85 if (types.hasOwnProperty(type)) { 422 423 424 425 426 86 moveEventHandlers($el, type, isDelegated); 427 428 429 430 431 87 } 432 433 434 435 436 88 } else if (typeof types === 'string') { 437 438 439 440 441 89 moveEventHandlers($el, types, isDelegated); 442 443 444 445 446 90 } 447 91 448 449 450 451 452 453 454 455 456 92 return $el; 457 458 459 460 461 93 }; 462 463 464 465 466 94 } 467 95 468 469 470 471 472 473 474 475 476 96 })(jQuery); -
social-exchange-plugin/trunk/js/sxlist.js
r901737 r925284 1 jQuery(document).ready(function(){ 2 3 var ids = []; 4 5 jQuery(".sx-activate-campaign-list ").each(function(){ 6 ids.push(jQuery(this).val()); 7 }); 8 9 jQuery.ajax({ 10 url:ajaxurl, 11 data:{action:"sx_get_posts_data",ids:ids}, 12 type:"POST", 13 dataType:"json", 14 success:function(r){ 15 jQuery.each(r,function(k,v){ 16 17 jQuery("#sxsd_"+v.id).text(v.done); 18 jQuery("#sxsn_"+v.id).val(v.likes); 19 jQuery("#sxlndw_"+v.id).text(v.likes); 20 var ftitle = ''; 21 var stitle = ''; 22 23 if(v.active == 'yes'){ 24 ftitle = ' title= "Campaign is running" '; 25 var fclass = 'sx-pause-inactive'; 26 var sclass = 'sx-play-active'; 27 jQuery("#sxlnw_"+v.id).hide(); 28 jQuery("#sxlndw_"+v.id).show(); 29 } else{ 30 stitle = ' title= "Campaign is stopped" '; 31 var fclass = 'sx-pause-active'; 32 var sclass = 'sx-play-inactive'; 33 jQuery("#sxlndw_"+v.id).hide(); 34 jQuery("#sxlnw_"+v.id).show(); 35 } 36 37 jQuery("#sxen_"+v.id).html('<a class="campaign-btn '+fclass+'" '+ftitle+' data-value="yes" value=""></a> <a class="campaign-btn '+sclass+'" '+stitle+' data-value="no" value="" ></a>'); 38 39 jQuery(".campaign-btn").on("click",sx_ToggleCampaign); 40 }); 41 42 jQuery(".sx-list-hide").fadeIn(); 43 jQuery(".sx-cmp-btns").show(); 44 } 45 }); 46 47 jQuery(".campaign-btn").on("click",sx_ToggleCampaign); 48 49 function sx_ToggleCampaign(){ 50 51 if(jQuery(this).hasClass("sx-play-active") || jQuery(this).hasClass("sx-pause-active") ) return false; 52 53 var parent = jQuery(this).parent().parent().parent(); 54 var sn = parent.find('.sx-share-need-list').val(); 55 var id = parent.find('.sx-activate-campaign-list').val(); 56 var activate ; 57 var ftitle = ''; 58 var stitle = ''; 59 60 if(jQuery(this).hasClass('sx-play-inactive')){ 61 var activate = 'yes'; 62 } 63 64 if(jQuery(this).hasClass('sx-pause-inactive')){ 65 var activate = 'no'; 66 } 67 68 var mainpage = "false"; 69 if(jQuery(this).hasClass("main-page")) { 70 mainpage = "true"; 71 } 72 73 74 if(activate == 'no'){ 75 76 if (mainpage == "true"){ 77 jQuery("#sxcmp").text("Campaign is paused"); 78 } 79 80 jQuery("#sxen_"+id).find(".sx-play-active").removeClass("sx-play-active").addClass("sx-play-inactive"); 81 82 jQuery("#sxen_"+id).find(".sx-pause-inactive").removeClass("sx-pause-inactive").addClass("sx-pause-active"); 83 84 jQuery("#sxlnw_"+id).show(); 85 86 jQuery("#sxlndw_"+id).hide(); 87 88 jQuery("#sxen_"+id).find(".sx-play-inactive").attr("title","Campaign is stopped"); 89 jQuery("#sxen_"+id).find(".sx-pause-inactive").removeAttr("title" ); 90 }else{ 91 if (mainpage == "true"){ 92 jQuery("#sxcmp").text("Campaign is running"); 93 } 94 95 jQuery("#sxlnw_"+id).hide(); 96 jQuery("#sxlndw_"+id).show(); 97 98 jQuery("#sxen_"+id).find(".sx-play-inactive").removeClass("sx-play-inactive").addClass("sx-play-active"); 99 100 jQuery("#sxen_"+id).find(".sx-pause-active").removeClass("sx-pause-active").addClass("sx-pause-inactive"); 101 jQuery("#sxen_"+id).find(".sx-play-inactive").removeAttr("title" ); 102 jQuery("#sxen_"+id).find(".sx-pause-inactive").attr("title","Campaign is running"); 103 104 } 105 106 jQuery("#sxlndw_"+id).text(sn); 107 parent.find(".sx-save-need-list").addClass("button-primary-disabled"); 108 109 var dn = parseInt(jQuery("#sxsd_"+id).text()); 110 111 if(dn>sn) return false 112 113 jQuery.ajax({ 114 url:ajaxurl, 115 data:{action:"sx_add_post_data",id:id,activate:activate,sn:sn,main:mainpage}, 116 type:"POST", 117 dataType:"json", 118 success:function(r){ 119 setTimeout(function() { parent.find(".sx-save-need-list").removeClass("button-primary-disabled") }, 120 100) ; 121 } 122 }); 123 124 return false; 125 } 126 }) 1 jQuery(document).ready(function(){ var ids = []; jQuery(".sx-activate-campaign-list ").each(function(){ ids.push(jQuery(this).val()); }); jQuery.ajax({ url:ajaxurl, data:{action:"sx_get_posts_data",ids:ids}, type:"POST", dataType:"json", success:function(r){ jQuery.each(r,function(k,v){ jQuery("#sxsd_"+v.id).text(v.done); jQuery("#sxsn_"+v.id).val(v.likes); jQuery("#sxlndw_"+v.id).text(v.likes); var ftitle = ''; var stitle = ''; if(v.active == 'yes'){ ftitle = ' title= "Campaign is running" '; var fclass = 'sx-pause-inactive'; var sclass = 'sx-play-active'; jQuery("#sxlnw_"+v.id).hide(); jQuery("#sxlndw_"+v.id).show(); } else{ stitle = ' title= "Campaign is stopped" '; var fclass = 'sx-pause-active'; var sclass = 'sx-play-inactive'; jQuery("#sxlndw_"+v.id).hide(); jQuery("#sxlnw_"+v.id).show(); } jQuery("#sxen_"+v.id).html('<a class="campaign-btn '+fclass+'" '+ftitle+' data-value="yes" value=""></a> <a class="campaign-btn '+sclass+'" '+stitle+' data-value="no" value="" ></a>'); jQuery(".campaign-btn").on("click",sx_ToggleCampaign); }); jQuery(".sx-list-hide").fadeIn(); jQuery(".sx-cmp-btns").show(); } }); jQuery(".campaign-btn").on("click",sx_ToggleCampaign); function sx_ToggleCampaign(){ jQuery("#sx-error-label").hide(); if(jQuery(this).hasClass("sx-play-active") || jQuery(this).hasClass("sx-pause-active") ) return false; var parent = jQuery(this).parent().parent().parent(); var sn = parent.find('.sx-share-need-list').val(); var id = parent.find('.sx-activate-campaign-list').val(); var dn = parseInt(jQuery("#sxsd_"+id).text()); if(dn>=sn) { SXshowError("Maximum Shares value should be greater than your current number of Shares made"); return false; } var activate ; var ftitle = ''; var stitle = ''; if(jQuery(this).hasClass('sx-play-inactive')){ var activate = 'yes'; } if(jQuery(this).hasClass('sx-pause-inactive')){ var activate = 'no'; } var mainpage = "false"; if(jQuery(this).hasClass("main-page")) { mainpage = "true"; } if(activate == 'no'){ if (mainpage == "true"){ jQuery("#sxcmp").text("Campaign is paused"); } jQuery("#sxen_"+id).find(".sx-play-active").removeClass("sx-play-active").addClass("sx-play-inactive"); jQuery("#sxen_"+id).find(".sx-pause-inactive").removeClass("sx-pause-inactive").addClass("sx-pause-active"); jQuery("#sxlnw_"+id).show(); jQuery("#sxlndw_"+id).hide(); jQuery("#sxen_"+id).find(".sx-play-inactive").attr("title","Campaign is stopped"); jQuery("#sxen_"+id).find(".sx-pause-inactive").removeAttr("title" ); }else{ if (mainpage == "true"){ jQuery("#sxcmp").text("Campaign is running"); } jQuery("#sxlnw_"+id).hide(); jQuery("#sxlndw_"+id).show(); jQuery("#sxen_"+id).find(".sx-play-inactive").removeClass("sx-play-inactive").addClass("sx-play-active"); jQuery("#sxen_"+id).find(".sx-pause-active").removeClass("sx-pause-active").addClass("sx-pause-inactive"); jQuery("#sxen_"+id).find(".sx-play-inactive").removeAttr("title" ); jQuery("#sxen_"+id).find(".sx-pause-inactive").attr("title","Campaign is running"); } jQuery("#sxlndw_"+id).text(sn); parent.find(".sx-save-need-list").addClass("button-primary-disabled"); jQuery.ajax({ url:ajaxurl, data:{action:"sx_add_post_data",id:id,activate:activate,sn:sn,main:mainpage}, type:"POST", dataType:"json", success:function(r){ setTimeout(function() { parent.find(".sx-save-need-list").removeClass("button-primary-disabled") }, 100) ; } }); return false; }}) -
social-exchange-plugin/trunk/js/sxscripts.js
r907015 r925284 1 function SXshowError(msg){ 2 jQuery("#sx-error-label").html(msg).show(); 3 } 4 5 function SXshowNotice(msg){ 6 jQuery("#sx-error-label").hide(); 7 jQuery("#sx-notice-label").html(msg+" <a class='button' id='sx-ok-notice'>OK</a>").show(); 8 } 9 10 jQuery(document).ready(function(){ 11 12 jQuery(".sx_need").on({ 13 14 "mouseenter":function(){ 15 16 if(jQuery(this).find(".sx-share-need-list").is(":visible")) { 17 jQuery(this).find(".sx-save-need-list").show(); 18 jQuery(this).find(".sx-share-need-list").width(jQuery(this).find(".sx-share-need-list").width() - jQuery(this).find(".sx-save-need-list").width()); 19 } 20 }, 21 "mouseleave":function(){ 22 if(jQuery(this).find(".sx-share-need-list").is(":visible")) { 23 jQuery(this).find(".sx-save-need-list").hide(); 24 jQuery(this).find(".sx-share-need-list").width(jQuery(this).find(".sx-share-need-list").width() +jQuery(this).find(".sx-save-need-list").width()); 25 } 26 } 27 }); 28 29 jQuery("#sx-ok-notice").on("click",function(){ 30 jQuery(this).closest("form").submit(); 31 }); 32 33 jQuery(".post-page").bindFirst("click",function(){ 34 var okn = true; 35 if(jQuery("#hidden_post_status").val() != 'publish') { 36 SXshowError("You can share only published posts"); 37 return false; 38 } 39 if(document.URL.indexOf("http://localhost") > -1) { 40 SXshowError("You can not share localhost posts"); 41 return false; 42 } 43 if(jQuery("#sample-permalink").text().indexOf("?") > -1) { 44 SXshowNotice("Ugly permalinks like \""+jQuery("#sample-permalink").text()+"\" are not search engine friendly. Are you sure this is the final URL you will use for this post?"); 45 okn = false; 46 } 47 if(jQuery(this).hasClass("sx-play-active") || jQuery(this).hasClass("sx-pause-active") ) return false; 48 49 var value = jQuery(this).attr("data-value"); 50 51 jQuery("#sx-post-active").val(value); 52 53 if(okn){ 54 jQuery(this).closest("form").submit(); 55 } 56 return false; 57 }); 58 }) 1 function SXshowError(msg){ jQuery("#sx-error-label").html(msg).show();}function SXshowNotice(msg){ jQuery("#sx-error-label").hide(); jQuery("#sx-notice-label").html(msg+" <a class='button' id='sx-ok-notice'>OK</a>").show();}jQuery(document).ready(function(){ jQuery(".sx_need").on({ "mouseenter":function(){ if(jQuery(this).find(".sx-share-need-list").is(":visible")) { jQuery(this).find(".sx-save-need-list").show(); jQuery(this).find(".sx-share-need-list").width(jQuery(this).find(".sx-share-need-list").width() - jQuery(this).find(".sx-save-need-list").width()); } }, "mouseleave":function(){ if(jQuery(this).find(".sx-share-need-list").is(":visible")) { jQuery(this).find(".sx-save-need-list").hide(); jQuery(this).find(".sx-share-need-list").width(jQuery(this).find(".sx-share-need-list").width() +jQuery(this).find(".sx-save-need-list").width()); } } }); jQuery("#sx-ok-notice").on("click",function(){ jQuery(this).closest("form").submit(); }); jQuery(".post-page").bindFirst("click",function(){ var okn = true; var sn = jQuery('input[name="sx-post-likes"]').val(); var id = jQuery('#post_ID').val(); var dn = parseInt(jQuery("#sxsd_"+id).text()); if(jQuery("#hidden_post_status").val() != 'publish') { SXshowError("You can share only published posts"); return false; } if(document.URL.indexOf("http://localhost") > -1) { SXshowError("You can not share localhost posts"); return false; } if(dn>=sn) { SXshowError("Maximum Shares value should be greater than your current number of Shares made"); return false; } if(jQuery("#sample-permalink").text().indexOf("?") > -1) { SXshowNotice("Ugly permalinks like \""+jQuery("#sample-permalink").text()+"\" are not search engine friendly. Are you sure this is the final URL you will use for this post?"); okn = false; } if(jQuery(this).hasClass("sx-play-active") || jQuery(this).hasClass("sx-pause-active") ) return false; var value = jQuery(this).attr("data-value"); jQuery("#sx-post-active").val(value); if(okn){ jQuery(this).closest("form").submit(); } return false; });}) -
social-exchange-plugin/trunk/layouts/main_page.php
r874854 r925284 15 15 jQuery(".share-loader").fadeIn(200,function(){ 16 16 }); 17 } 17 } 18 18 19 19 function sxRefreshData(){ … … 27 27 dataType:"json", 28 28 success:function(r){ 29 jQuery(".share-loader").fadeOut(100,function(){ 29 jQuery(".share-loader").fadeOut(100,function(){ 30 30 jQuery("#sxpoints").html(r.points); 31 31 jQuery(".shares-result").html(r.next); 32 32 }); 33 33 34 34 } 35 35 }); 36 36 }); 37 37 }) ; 38 } 38 } 39 39 jQuery(document).ready(function(){ 40 41 jQuery(".skip-share").on("click",function(){ 42 var parent = jQuery("#sx-share-row"); 43 parent.fadeOut(200,function(){ 44 var id = parent.attr("title"); 45 jQuery(".share-loader").fadeIn(300,function(){ 46 jQuery.ajax({ 47 url:ajaxurl, 48 data:{action:"skip_share",id:id}, 49 success:function(r){ 50 jQuery(".share-loader").fadeOut(100,function(){ 51 jQuery(".shares-result").html(r); 52 }); 53 } 54 }); 55 }) 40 41 jQuery(".skip-share").on("click",SkipShare); 42 43 function SkipShare() { 44 var parent = jQuery("#sx-share-row"); 45 parent.fadeOut(200,function(){ 46 var id = parent.attr("title"); 47 jQuery(".share-loader").fadeIn(300,function(){ 48 jQuery.ajax({ 49 url:ajaxurl, 50 data:{action:"skip_share",id:id}, 51 success:function(r){ 52 jQuery(".share-loader").fadeOut(100,function(){ 53 jQuery(".shares-result").html(r); 54 jQuery(".skip-share").on("click",SkipShare); 55 }); 56 } 56 57 }); 58 }) 59 }); 57 60 return false; 58 } );61 } 59 62 }) 63 64 60 65 </script> 61 66 <div id="sx-container"> … … 74 79 <div class="sx-left"> 75 80 MoreSharesForYou <strong>v<?php echo get_option('sx_version'); ?></strong><br/> 76 Total shares made: <?php 81 Total shares made: <?php 77 82 $res = sx_get_response('getTotalShares',array('site'=>get_site_url())); 78 83 echo $res['data']['done']; ?><br/> … … 85 90 ?><a href="http://www.moresharesforyou.com/info"><img src="http://www.moresharesforyou.com/panelbanner.jpg" alt="" /></a><br/><?php 86 91 } 87 ?> 92 ?> 88 93 </div> 89 94 </fieldset> … … 110 115 <tr> 111 116 <td width ="25%"><?php echo get_site_url();?></td> 112 <td width ="25%"><p>Shares made: < b><?php echo intval($likes['done']) ; ?></b><br/>117 <td width ="25%"><p>Shares made: <span id="sxsd_0"><b><?php echo intval($likes['done']) ; ?></b></span><br/> 113 118 Maximum shares: <?php ?> 114 <?php 119 <?php 115 120 if($likes['active'] == 'no') { 116 121 $display1="inline"; … … 135 140 <td width ="25%"><div class="main-campaign-wrapper aligncenter" id="sxen_0"> 136 141 <input type="hidden" class="sx-activate-campaign-list" value="0" /> 137 <a <?php if($likes['active'] == 'no') : ?> title=" Campaign is stopped" <?php endif; ?> class="main-page campaign-btn <?php if($likes['active'] == 'yes') : ?>sx-play-active<?php else: ?> sx-play-inactive<?php endif; ?>" data-value="yes" value=""></a>138 <a <?php if($likes['active'] == 'yes') : ?> title=" Campaign is running" <?php endif; ?> class="main-page <?php if($likes['active'] == 'yes') : ?>sx-pause-inactive<?php else: ?> sx-pause-active<?php endif; ?> campaign-btn" data-value="no" value="" ></a>142 <a <?php if($likes['active'] == 'no') : ?> title="Start the campaign" <?php endif; ?> class="main-page campaign-btn <?php if($likes['active'] == 'yes') : ?>sx-play-active<?php else: ?> sx-play-inactive<?php endif; ?>" data-value="yes" value=""></a> 143 <a <?php if($likes['active'] == 'yes') : ?> title="Pause the campaign" <?php endif; ?> class="main-page <?php if($likes['active'] == 'yes') : ?>sx-pause-inactive<?php else: ?> sx-pause-active<?php endif; ?> campaign-btn" data-value="no" value="" ></a> 139 144 140 145 </div><div class="clear"></div> … … 151 156 152 157 <?php } ?> 158 <br/><hr/> 159 <p> 160 <a href='<?php echo 'http://www.moresharesforyou.com/URL/'.get_bloginfo('url'); ?>' target="_blank">Check my Social stats</a> 153 161 </p> 154 162 </td> … … 156 164 </tbody> 157 165 </table> 158 </div> 166 </div> 159 167 </fieldset> 160 168 <fieldset class="sx_box"><legend>Gain points by sharing other posts</legend> … … 180 188 <div class="share-loader"></div> 181 189 </div> 182 </div> 190 </div> 183 191 </fieldset> 184 192 -
social-exchange-plugin/trunk/readme.txt
r912702 r925284 2 2 Contributors: Social Exchange 3 3 Donate link: 4 Tags:Facebook, share, like, sharing, social, social media,recommend, facebook like, facebook post, get shares, get likes, WordPress post, get Facebook shares, increase Facebook Shares, increase Facebook likes, social exchange, Twitter, Google, Linkedin, bookmark button, bookmarking, bookmarks, facebook recommend,google plus, social bookmarking, social shares, moresharesforyou, more shares for you 4 Tags:Facebook, share, like, sharing, social, social media,recommend, facebook like, facebook post, get shares, get likes, WordPress post, get Facebook shares, increase Facebook Shares, increase Facebook likes, social exchange, Twitter, Google, Linkedin, bookmark button, bookmarking, bookmarks, facebook recommend,google plus, social bookmarking, social shares, moresharesforyou, more shares for you, SEO, SERP, traffic 5 5 Requires at least: 3.3 6 6 Tested up to: 3.8.2 … … 13 13 == Description == 14 14 15 The MoreSharesForYou Plugin helps you achieve 4 goals: 15 16 16 Do you dream of your content being shared by others? 17 1. share and distribute your content: **the discovery effect** 18 2. show the world your content is liked (distributed): **the social proof effect** 19 3. improve your SEO efforts. Your SERP results will increase: **the SEO effect** 20 4. generate new traffic, both directly and from Facebook users: **the traffic effect** 17 21 18 This is precisely what The MoreSharesForYou Plugin helps you accomplish: **increasethe number of Facebook Likes and Shares** of your posts and pages. Through an ingenious system of content discovery and cross-promotion this plugin is your best WordPress friend when it comes to quickly grow your social-proof button counters, right after publishing your new posts.22 MoreSharesForYou Plugin helps you **increasing the number of Facebook Likes and Shares** of your posts and pages. Through an ingenious system of content discovery and cross-promotion this plugin is your best WordPress friend when it comes to quickly grow your social-proof button counters, right after publishing your new posts. 19 23 20 24 The plugin is user-friendly and extremely easy to use: just install it and press the PLAY button for the campaign to start. Then watch your stats increase. … … 84 88 == Changelog == 85 89 90 = 2.8.0 - 2014-06-02 = 91 * Adding new feature - checking URL share status(http://moresharesforyou.com/URL) 92 * Fixing skip the URLs in dashboard panel 93 * Fixing campaign not pausing 94 * Fixing blank page when sharing posts 95 96 86 97 = 2.7.2 - 2014-05-12 = 87 98 * Fixing wrong version displayed after update -
social-exchange-plugin/trunk/social-exchange.php
r912715 r925284 4 4 Plugin URI: http://www.MoreSharesForYou.com/ 5 5 Description: MoreSharesForYou is a content discovery and promotion tool that gets your content viewed and shared by other people. 6 Version: 2. 7.26 Version: 2.9.0 7 7 Author: MoreSharesForYou team 8 8 Author URI: http://www.MoreSharesForYou.com/ … … 17 17 wp_die('More Shares For You - Basic Version cannot be activated. Please deactivate the PRO version first. <br /><br />Back to the WordPress <a href="'.get_admin_url(null, 'plugins.php').'">Plugins page</a>.'); 18 18 } 19 update_option('sx_version','2. 7.2');19 update_option('sx_version','2.9.0'); 20 20 if (get_option('sx_active_campaigns') === FALSE) 21 21 add_option('sx_active_campaigns',array());
Note: See TracChangeset
for help on using the changeset viewer.