Plugin Directory

Changeset 925284


Ignore:
Timestamp:
06/02/2014 06:15:42 PM (12 years ago)
Author:
Social Exchange
Message:

2.9.0 update

Location:
social-exchange-plugin/trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • social-exchange-plugin/trunk/css/style.css

    r849177 r925284  
    99.sx-table{  width:100%;}.sx-box{    border:1px solid;   border-radius:5px;  padding:10px;}
    1010.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;}
    1212.skip-like,.skip-share{ font-size:15px; font-weight:bold;   color:#333333;  text-decoration:none;   padding: 15px;}
    1313.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  
    4242            require_once $sxpath."/layouts/main_page.php";
    4343            //Still show form
    44             if ($subscribed == 'no') 
     44            if ($subscribed == 'no')
    4545                require_once $sxpath."/layouts/optin_form.php";
    4646        }
     
    4949        }
    5050
    51        
     51
    5252    }
    5353    function get_sxdata(){
     
    7979        <p>Points available: <b> <?php echo $sxoptions['points']; ?></b>&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://moresharesforyou.com/get-more-points/" class="sx-get-more">How to get more points?</a></p>
    8080        <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/>
    8282        Maximum shares: <?php ?>
    8383        <?php if($likes['active'] == 'no') : ?>
     
    9898
    9999        <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>
    102102
    103103        <div class="sx-clear"></div>
     
    108108        <?php endif; ?>
    109109        </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>
    111113        <?php
    112114    }
     
    142144            );
    143145    }
     146
    144147    $sxdone = 0;
     148
    145149    add_action( 'save_post', 'sx_save_likes',1,2 );
    146150    function sx_save_likes( $id ) {
     151    global $sxdone;
    147152    if ( 'post' == @$_POST['post_type'] || 'page' == @$_POST['post_type']) {
    148153        if ( ! current_user_can( 'edit_page', $id ) )
     
    412417    if($hook == 'edit.php'){
    413418        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() );
    415420        }
    416421    }
     
    421426    }
    422427    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() );
    424429        wp_enqueue_script( 'sx_optin', sx("plugin_url") . 'js/sxoptin.js' );
    425430    }
    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() );
    427432    wp_enqueue_script( 'sx_bind-first', sx("plugin_url") . 'js/bind-first.js' );
    428433}
  • social-exchange-plugin/trunk/js/bind-first.js

    r849177 r925284  
    11(function($) {
    2 
    3 
    4 
    5 
    62        var splitVersion = $.fn.jquery.split(".");
    7 
    8 
    9 
    10 
    113        var major = parseInt(splitVersion[0]);
    12 
    13 
    14 
    15 
    164        var minor = parseInt(splitVersion[1]);
    175
    18 
    19 
    20 
    21 
    22 
    23 
    24 
    25 
    266        var JQ_LT_17 = (major < 1) || (major == 1 && minor < 7);
    27 
    28 
    29 
    30 
    317       
    32 
    33 
    34 
    35 
    368        function eventsData($el) {
    37 
    38 
    39 
    40 
    419                return JQ_LT_17 ? $el.data('events') : $._data($el[0]).events;
    42 
    43 
    44 
    45 
    4610        }
    47 
    48 
    49 
    50 
    5111       
    52 
    53 
    54 
    55 
    5612        function moveHandlerToTop($el, eventName, isDelegated) {
    57 
    58 
    59 
    60 
    6113                var data = eventsData($el);
    62 
    63 
    64 
    65 
    6614                var events = data[eventName];
    6715
    68 
    69 
    70 
    71 
    72 
    73 
    74 
    75 
    7616                if (!JQ_LT_17) {
    77 
    78 
    79 
    80 
    8117                        var handler = isDelegated ? events.splice(events.delegateCount - 1, 1)[0] : events.pop();
    82 
    83 
    84 
    85 
    8618                        events.splice(isDelegated ? 0 : (events.delegateCount || 0), 0, handler);
    8719
    88 
    89 
    90 
    91 
    92 
    93 
    94 
    95 
    9620                        return;
    97 
    98 
    99 
    100 
    10121                }
    10222
     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();
    10343
    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);
    13147                }
    13248
     49                return this;
     50        };
    13351
     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                }
    13461
     62                return this;
     63        };
    13564
    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() {
    20166                var args = $.makeArray(arguments);
    20267
    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);
    24071
    24172                return this;
    242 
    243 
    244 
    245 
    24673        };
    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 document
    337 
    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 
    36674       
    367 
    368 
    369 
    370 
    37175        if (!JQ_LT_17) {
    372 
    373 
    374 
    375 
    37676                $.fn.onFirst = function(types, selector) {
    377 
    378 
    379 
    380 
    38177                        var $el = $(this);
    382 
    383 
    384 
    385 
    38678                        var isDelegated = typeof selector === 'string';
    387 
    388 
    389 
    390 
    391 
    392 
    393 
    394 
    39579
    39680                        $.fn.on.apply($el, arguments);
    39781
    398 
    399 
    400 
    401 
    402 
    403 
    404 
    405 
    40682                        // events map
    407 
    408 
    409 
    410 
    41183                        if (typeof types === 'object') {
    412 
    413 
    414 
    415 
    41684                                for (type in types)
    417 
    418 
    419 
    420 
    42185                                        if (types.hasOwnProperty(type)) {
    422 
    423 
    424 
    425 
    42686                                                moveEventHandlers($el, type, isDelegated);
    427 
    428 
    429 
    430 
    43187                                        }
    432 
    433 
    434 
    435 
    43688                        } else if (typeof types === 'string') {
    437 
    438 
    439 
    440 
    44189                                moveEventHandlers($el, types, isDelegated);
    442 
    443 
    444 
    445 
    44690                        }
    44791
    448 
    449 
    450 
    451 
    452 
    453 
    454 
    455 
    45692                        return $el;
    457 
    458 
    459 
    460 
    46193                };
    462 
    463 
    464 
    465 
    46694        }
    46795
    468 
    469 
    470 
    471 
    472 
    473 
    474 
    475 
    47696})(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 })
     1jQuery(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+" &nbsp;&nbsp;<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 })
     1function SXshowError(msg){  jQuery("#sx-error-label").html(msg).show();}function SXshowNotice(msg){ jQuery("#sx-error-label").hide();   jQuery("#sx-notice-label").html(msg+" &nbsp;&nbsp;<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  
    1515    jQuery(".share-loader").fadeIn(200,function(){
    1616    });
    17 } 
     17}
    1818
    1919function sxRefreshData(){
     
    2727                        dataType:"json",
    2828                        success:function(r){
    29                             jQuery(".share-loader").fadeOut(100,function(){ 
     29                            jQuery(".share-loader").fadeOut(100,function(){
    3030                                jQuery("#sxpoints").html(r.points);
    3131                                jQuery(".shares-result").html(r.next);
    3232                            });
    33                                        
     33
    3434                        }
    3535                    });
    3636                });
    3737             }) ;
    38 } 
     38}
    3939jQuery(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                    }
    5657            });
     58            })
     59        });
    5760        return false;
    58     });
     61    }
    5962})
     63
     64
    6065</script>
    6166<div id="sx-container">
     
    7479        <div class="sx-left">
    7580                MoreSharesForYou <strong>v<?php echo get_option('sx_version'); ?></strong><br/>
    76                 Total shares made: <?php 
     81                Total shares made: <?php
    7782                    $res = sx_get_response('getTotalShares',array('site'=>get_site_url()));
    7883                    echo $res['data']['done']; ?><br/>
     
    8590                        ?><a href="http://www.moresharesforyou.com/info"><img src="http://www.moresharesforyou.com/panelbanner.jpg" alt="" /></a><br/><?php
    8691                    }
    87                 ?>                 
     92                ?>
    8893        </div>
    8994</fieldset>
     
    110115                    <tr>
    111116                    <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/>
    113118                        Maximum shares: <?php ?>
    114                             <?php 
     119                            <?php
    115120                                if($likes['active'] == 'no') {
    116121                                    $display1="inline";
     
    135140                    <td width ="25%"><div class="main-campaign-wrapper aligncenter" id="sxen_0">
    136141                            <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>
    139144
    140145                        </div><div class="clear"></div>
     
    151156
    152157                        <?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>
    153161                    </p>
    154162                    </td>
     
    156164            </tbody>
    157165            </table>
    158     </div> 
     166    </div>
    159167</fieldset>
    160168<fieldset class="sx_box"><legend>Gain points by sharing other posts</legend>
     
    180188                <div class="share-loader"></div>
    181189            </div>
    182     </div> 
     190    </div>
    183191</fieldset>
    184192
  • social-exchange-plugin/trunk/readme.txt

    r912702 r925284  
    22Contributors: Social Exchange
    33Donate 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
     4Tags: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
    55Requires at least: 3.3
    66Tested up to: 3.8.2
     
    1313== Description ==
    1414
     15The MoreSharesForYou Plugin helps you achieve 4 goals:
    1516
    16 Do you dream of your content being shared by others?
     171.    share and distribute your content: **the discovery effect**
     182.    show the world your content is liked (distributed): **the social proof effect**
     193.    improve your SEO efforts. Your SERP results will increase: **the SEO effect**
     204.    generate new traffic, both directly and from Facebook users: **the traffic effect**
    1721
    18 This is precisely what The MoreSharesForYou Plugin helps you accomplish: **increase 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.
     22MoreSharesForYou 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.
    1923
    2024The 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.
     
    8488== Changelog ==
    8589
     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
    8697= 2.7.2 - 2014-05-12 =
    8798* Fixing wrong version displayed after update
  • social-exchange-plugin/trunk/social-exchange.php

    r912715 r925284  
    44        Plugin URI: http://www.MoreSharesForYou.com/
    55        Description: MoreSharesForYou is a content discovery and promotion tool that gets your content viewed and shared by other people.
    6         Version: 2.7.2
     6        Version: 2.9.0
    77        Author: MoreSharesForYou team
    88        Author URI: http://www.MoreSharesForYou.com/
     
    1717        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>.');
    1818    }
    19     update_option('sx_version','2.7.2');
     19    update_option('sx_version','2.9.0');
    2020    if (get_option('sx_active_campaigns') === FALSE)
    2121        add_option('sx_active_campaigns',array());
Note: See TracChangeset for help on using the changeset viewer.