Version Description
- Fixed locale problem with facebook js
- Fixed lang setting for Twitter Shortcode
- Removed text attribute of Twitter Shortcode because is not longer supported by Twitter
- Changed method for aligning shortcodes for better compatibility
Download this release
Release Info
Developer | timersys |
Plugin | Popups – WordPress Popup |
Version | 1.0.6 |
Comparing to | |
See all releases |
Code changes from version 1.0.5 to 1.0.6
- README.txt +9 -1
- admin/views/metabox-help.php +1 -2
- includes/class-spu-helper.php +1 -1
- popups.php +1 -1
- public/assets/css/public.css +0 -19
- public/assets/js/min/public-ck.js +1 -1
- public/assets/js/public.js +44 -0
- public/class-social-popup.php +3 -4
README.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
|
|
4 |
Tags: twitter,google+, facebook,Popups, twitter follow, facebook like, google plus,social boost, social splash, popup, facebook popup, scroll popups, popups, wordpress popup, wp popups
|
5 |
Requires at least: 3.6
|
6 |
Tested up to: 3.9.1
|
7 |
-
Stable tag: 1.0.
|
8 |
Text Domain: spucpt
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -84,6 +84,14 @@ Yes if you need to debug you can use uncompressed javascript by addings ([this c
|
|
84 |
|
85 |
== Changelog ==
|
86 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
87 |
= 1.0.5 =
|
88 |
|
89 |
* Changed to only admins users can edit/create popups
|
4 |
Tags: twitter,google+, facebook,Popups, twitter follow, facebook like, google plus,social boost, social splash, popup, facebook popup, scroll popups, popups, wordpress popup, wp popups
|
5 |
Requires at least: 3.6
|
6 |
Tested up to: 3.9.1
|
7 |
+
Stable tag: 1.0.6
|
8 |
Text Domain: spucpt
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
84 |
|
85 |
== Changelog ==
|
86 |
|
87 |
+
= 1.0.6 =
|
88 |
+
|
89 |
+
* Fixed locale problem with facebook js
|
90 |
+
* Fixed lang setting for Twitter Shortcode
|
91 |
+
* Removed text attribute of Twitter Shortcode because is not longer supported by Twitter
|
92 |
+
* Changed method for aligning shortcodes for better compatibility
|
93 |
+
|
94 |
+
|
95 |
= 1.0.5 =
|
96 |
|
97 |
* Changed to only admins users can edit/create popups
|
admin/views/metabox-help.php
CHANGED
@@ -29,7 +29,7 @@ if ( !defined( 'ABSPATH' ) ) exit;
|
|
29 |
</ul>
|
30 |
<p><strong>Twitter:</strong></p>
|
31 |
<p>
|
32 |
-
[spu-twitter user="" show_count="" size="" lang=""
|
33 |
</p>
|
34 |
<a href="tw-opts" onclick="jQuery('#tw-opts').slideToggle();return false;"><?php _e( 'View Twitter Options', $this->plugin_slug );?></a>
|
35 |
<ul id="tw-opts" style="display:none;">
|
@@ -37,5 +37,4 @@ if ( !defined( 'ABSPATH' ) ) exit;
|
|
37 |
<li><b>show_count:</b> <?php _e( 'false Default value: true', $this->plugin_slug );?></li>
|
38 |
<li><b>size:</b> <?php _e( 'large <b>Default value:</b> ""', $this->plugin_slug );?></li>
|
39 |
<li><b>lang:</b> </li>
|
40 |
-
<li><b>text:</b> <?php _e( 'The button text <b>Default value:</b> Follow @chifliiiii', $this->plugin_slug );?></li>
|
41 |
</ul>
|
29 |
</ul>
|
30 |
<p><strong>Twitter:</strong></p>
|
31 |
<p>
|
32 |
+
[spu-twitter user="" show_count="" size="" lang=""]
|
33 |
</p>
|
34 |
<a href="tw-opts" onclick="jQuery('#tw-opts').slideToggle();return false;"><?php _e( 'View Twitter Options', $this->plugin_slug );?></a>
|
35 |
<ul id="tw-opts" style="display:none;">
|
37 |
<li><b>show_count:</b> <?php _e( 'false Default value: true', $this->plugin_slug );?></li>
|
38 |
<li><b>size:</b> <?php _e( 'large <b>Default value:</b> ""', $this->plugin_slug );?></li>
|
39 |
<li><b>lang:</b> </li>
|
|
|
40 |
</ul>
|
includes/class-spu-helper.php
CHANGED
@@ -371,7 +371,7 @@ class Spu_Helper {
|
|
371 |
'bgopacity' => '0.5',
|
372 |
'background_color' => '#eeeeee',
|
373 |
'color' => '#333',
|
374 |
-
'width' => '
|
375 |
'border_color' => '#555',
|
376 |
'border_width' => '8',
|
377 |
),
|
371 |
'bgopacity' => '0.5',
|
372 |
'background_color' => '#eeeeee',
|
373 |
'color' => '#333',
|
374 |
+
'width' => '600px',
|
375 |
'border_color' => '#555',
|
376 |
'border_width' => '8',
|
377 |
),
|
popups.php
CHANGED
@@ -11,7 +11,7 @@
|
|
11 |
* @socialpopup
|
12 |
* Plugin Name: Popups
|
13 |
* Plugin URI: http://www.timersys.com/free-plugins/social-popup/
|
14 |
-
* Version: 1.0.
|
15 |
* Description: This plugin will display a popup or splash screen when a new user visit your site showing a Google+, twitter and facebook follow links. This will increase you followers ratio in a 40%. Popup will be close depending on your settings. Check readme.txt for full details.
|
16 |
* Author: Damian Logghe
|
17 |
* Author URI: http://wp.timersys.com
|
11 |
* @socialpopup
|
12 |
* Plugin Name: Popups
|
13 |
* Plugin URI: http://www.timersys.com/free-plugins/social-popup/
|
14 |
+
* Version: 1.0.6
|
15 |
* Description: This plugin will display a popup or splash screen when a new user visit your site showing a Google+, twitter and facebook follow links. This will increase you followers ratio in a 40%. Popup will be close depending on your settings. Check readme.txt for full details.
|
16 |
* Author: Damian Logghe
|
17 |
* Author URI: http://wp.timersys.com
|
public/assets/css/public.css
CHANGED
@@ -102,22 +102,3 @@ body {
|
|
102 |
.spu-shortcode iframe{
|
103 |
max-width: 1200px;
|
104 |
}
|
105 |
-
.spu-total-4 .spu-shortcode{
|
106 |
-
width:24%;
|
107 |
-
margin-left:.5%;
|
108 |
-
}
|
109 |
-
|
110 |
-
.spu-total-3 .spu-shortcode{
|
111 |
-
width:28%;
|
112 |
-
margin-left:5.3%;
|
113 |
-
}
|
114 |
-
|
115 |
-
.spu-total-2 .spu-shortcode{
|
116 |
-
width:14%;
|
117 |
-
margin-left:20%;
|
118 |
-
}
|
119 |
-
|
120 |
-
.spu-total-1 .spu-shortcode{
|
121 |
-
margin:0 37.5%;
|
122 |
-
width:auto;
|
123 |
-
}
|
102 |
.spu-shortcode iframe{
|
103 |
max-width: 1200px;
|
104 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public/assets/js/min/public-ck.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
function createCookie(t,n
|
1 |
+
function createCookie(t,i,n){if(n){var e=new Date;e.setTime(e.getTime()+24*n*60*60*1e3);var o="; expires="+e.toGMTString()}else var o="";document.cookie=t+"="+i+o+"; path=/"}function readCookie(t){for(var i=t+"=",n=document.cookie.split(";"),e=0;e<n.length;e++){for(var o=n[e];" "==o.charAt(0);)o=o.substring(1,o.length);if(0==o.indexOf(i))return o.substring(i.length,o.length)}return null}jQuery(window).load(function(){window.SPU=function($){function t(t){var i=o[t],n=$(window).width(),e=$(window).height(),a=i.height(),s=i.width();i.css({position:"fixed",top:e/2-a/2,left:n/2-s/2})}function i(t,i){var n=o[t],e=$("#spu-bg-"+t),a=n.data("bgopa");if(n.is(":animated"))return!1;if(i===!0&&n.is(":visible")||i===!1&&n.is(":hidden"))return!1;if(i===!1){var s=parseInt(n.data("cookie"));s>0&&createCookie("spu_box_"+t,!0,s)}var r=n.data("animation");return"fade"===r?n.fadeToggle("slow"):n.slideToggle("slow"),i===!0&&a>0?e.fadeIn():e.fadeOut(),i}var n=$(window).height(),e=spuvar.is_admin,o=[];return $(".spu-content").children().first().css({"margin-top":0,"padding-top":0}).end().last().css({"margin-bottom":0,"padding-bottom":0}),$(".spu-box").each(function(){var a=$(this),s=a.data("trigger"),r=0,d=1===parseInt(a.data("test-mode")),c=a.data("box-id"),u=1===parseInt(a.data("auto-hide")),h=1===parseInt(a.data("advanced-close")),f=parseInt(a.data("seconds-close"));$(".spu-google").width($(".spu-google").width()-20),$(".spu-twitter").width($(".spu-twitter").width()-12);var l=0,g=0,w=$(this).find(".spu-content").width(),p=a.data("total");if(p&&($(this).find(".spu-shortcode").each(function(){l+=$(this).width()}),g=w-l),g>0&&($(this).find(".spu-shortcode").each(function(){3==p?$(this).css("margin-left",g/(p-1)):$(this).css("margin-left",g/2)}),2==p?$(this).find(".spu-shortcode").last().css("margin-left",0):3==p&&$(this).find(".spu-shortcode").first().css("margin-left",0)),h){$(document).keyup(function(t){27==t.keyCode&&i(c,!1)});var m=navigator.userAgent,v=m.match(/iPad/i)||m.match(/iPhone/i)?"touchstart":"click";$("body").on(v,function(t){console.log(v.target),i(c,!1)}),$(".spu-box").on(v,function(t){t.stopPropagation()})}if(a.hide().css("left",""),o[c]=a,"seconds"==s)var b=parseInt(a.data("trigger-number"),10);else var k="percentage"==s?parseInt(a.data("trigger-number"),10)/100:.8,T=k*$(document).height();var x=function(){r&&clearTimeout(r),r=window.setTimeout(function(){var e=$(window).scrollTop(),o=e+n>=T;o?(u||$(window).unbind("scroll",x),a.hasClass("spu-centered")&&t(c),i(c,!0)):i(c,!1)},100)},I=function(){r&&clearTimeout(r),r=window.setTimeout(function(){a.hasClass("spu-centered")&&t(c),i(c,!0)},1e3*b)},C=readCookie("spu_box_"+c);if((void 0==C||e&&d)&&("seconds"==s?I():($(window).bind("scroll",x),x()),window.location.hash&&window.location.hash.length>0)){var y=window.location.hash,_;y.substring(1)===a.attr("id")&&setTimeout(function(){i(c,!0)},100)}a.find(".spu-close").click(function(){i(c,!1),"percentage"==s&&$(window).unbind("scroll",x)}),$('a[href="#'+a.attr("id")+'"]').click(function(){return i(c,!0),!1})}),{show:function(t){return i(t,!0)},hide:function(t){return i(t,!1)}}}(window.jQuery)});
|
public/assets/js/public.js
CHANGED
@@ -28,6 +28,50 @@ jQuery(window).load(function() {
|
|
28 |
var autoHide = (parseInt($box.data('auto-hide')) === 1);
|
29 |
var advancedClose = (parseInt($box.data('advanced-close')) === 1);
|
30 |
var secondsClose = parseInt($box.data('seconds-close'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
|
32 |
if ( advancedClose ) {
|
33 |
//close with esc
|
28 |
var autoHide = (parseInt($box.data('auto-hide')) === 1);
|
29 |
var advancedClose = (parseInt($box.data('advanced-close')) === 1);
|
30 |
var secondsClose = parseInt($box.data('seconds-close'));
|
31 |
+
|
32 |
+
//correct widths of sharing icons
|
33 |
+
$('.spu-google').width($('.spu-google').width()-20);
|
34 |
+
$('.spu-twitter').width($('.spu-twitter').width()-12);
|
35 |
+
//center spu-shortcodes
|
36 |
+
var swidth = 0;
|
37 |
+
var free_width = 0;
|
38 |
+
var cwidth = $(this).find(".spu-content").width();
|
39 |
+
var total = $box.data('total'); //total of shortcodes used
|
40 |
+
if( total ){
|
41 |
+
|
42 |
+
//calculate total width of shortcodes all togheter
|
43 |
+
$(this).find(".spu-shortcode").each(function(){
|
44 |
+
swidth = swidth + $(this).width();
|
45 |
+
});
|
46 |
+
//available space to split margins
|
47 |
+
free_width = cwidth - swidth;
|
48 |
+
|
49 |
+
}
|
50 |
+
if( free_width > 0 ) {
|
51 |
+
//leave some margin
|
52 |
+
$(this).find(".spu-shortcode").each(function(){
|
53 |
+
if( total == 3) {
|
54 |
+
|
55 |
+
$(this).css('margin-left',(free_width / (total-1)));
|
56 |
+
|
57 |
+
} else {
|
58 |
+
|
59 |
+
$(this).css('margin-left',(free_width / 2 ));
|
60 |
+
|
61 |
+
}
|
62 |
+
|
63 |
+
});
|
64 |
+
//remove margin when neccesary
|
65 |
+
if( total == 2) {
|
66 |
+
|
67 |
+
$(this).find(".spu-shortcode").last().css('margin-left',0);
|
68 |
+
|
69 |
+
} else if( total == 3) {
|
70 |
+
|
71 |
+
$(this).find(".spu-shortcode").first().css('margin-left',0);
|
72 |
+
|
73 |
+
}
|
74 |
+
}
|
75 |
|
76 |
if ( advancedClose ) {
|
77 |
//close with esc
|
public/class-social-popup.php
CHANGED
@@ -23,7 +23,7 @@ class SocialPopup {
|
|
23 |
*
|
24 |
* @var string
|
25 |
*/
|
26 |
-
const VERSION = '1.0.
|
27 |
|
28 |
/**
|
29 |
* Popups to use acrros files
|
@@ -330,7 +330,7 @@ class SocialPopup {
|
|
330 |
|
331 |
if( ! defined( 'SPU_UNLOAD_FB_JS') ) {
|
332 |
|
333 |
-
wp_register_script( 'spu-facebook', 'http://connect.facebook.net/'.
|
334 |
|
335 |
}
|
336 |
if( ! defined( 'SPU_UNLOAD_TW_JS') ) {
|
@@ -459,10 +459,9 @@ class SocialPopup {
|
|
459 |
'show_count' => 'true', // false
|
460 |
'size' => '', // large
|
461 |
'lang' => '',
|
462 |
-
'text' => 'Follow @chifliiiii',
|
463 |
), $atts ) );
|
464 |
|
465 |
-
return '<div class="spu-twitter spu-shortcode"><a href="https://twitter.com/'.$user.'" class="twitter-follow-button" data-show-count="'.strtolower( trim( $show_count ) ).'" data-size="'.strtolower( trim( $size ) ).'"></a></div>';
|
466 |
|
467 |
}
|
468 |
|
23 |
*
|
24 |
* @var string
|
25 |
*/
|
26 |
+
const VERSION = '1.0.6';
|
27 |
|
28 |
/**
|
29 |
* Popups to use acrros files
|
330 |
|
331 |
if( ! defined( 'SPU_UNLOAD_FB_JS') ) {
|
332 |
|
333 |
+
wp_register_script( 'spu-facebook', 'http://connect.facebook.net/'.get_locale().'/all.js#xfbml=1', array('jquery'), self::VERSION, FALSE);
|
334 |
|
335 |
}
|
336 |
if( ! defined( 'SPU_UNLOAD_TW_JS') ) {
|
459 |
'show_count' => 'true', // false
|
460 |
'size' => '', // large
|
461 |
'lang' => '',
|
|
|
462 |
), $atts ) );
|
463 |
|
464 |
+
return '<div class="spu-twitter spu-shortcode"><a href="https://twitter.com/'.$user.'" class="twitter-follow-button" data-show-count="'.strtolower( trim( $show_count ) ).'" data-size="'.strtolower( trim( $size ) ).'" data-lang="'.$lang.'"></a></div>';
|
465 |
|
466 |
}
|
467 |
|