Changeset 884705
- Timestamp:
- 03/30/2014 05:08:38 PM (12 years ago)
- Location:
- profit-button/trunk
- Files:
-
- 2 edited
-
probtn.php (modified) (2 diffs)
-
readme.txt (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
profit-button/trunk/probtn.php
r875562 r884705 78 78 } 79 79 80 function probtninit_function() { 81 $options = get_option( 'probtn_settings' ); 82 if (($options['state']==null) || ($options['state']=='')) { 83 $options['state'] = 'on'; 84 }; 85 if (($options['probtn_image']==null) || ($options['probtn_image']=='')) { 86 $options['probtn_image'] = 'http://admin.probtn.com/eqwid_btn_nonpress.png'; 87 }; 88 if (($options['source']==null) || ($options['source']=='')) { 89 $options['source'] = 'probtn.com'; 90 $source = 1; 91 } else { 92 $source = 0; 93 } 94 95 $mainStyleCss = parse_url('https://pizzabtn.herokuapp.com/stylesheets/probtn.css'); 96 $jqueryPepPath = parse_url("https://pizzabtn.herokuapp.com/javascripts/jquery.pep.min.js"); 97 98 if ($options['state']=="off") { 99 $output = ' 100 <script> 101 FloatingButtonFunc(); 102 103 function runYourFunctionWhenJQueryIsLoaded() { 104 if (window.$){ 105 FloatingButtonFunc(); 106 } else { 107 setTimeout(runYourFunctionWhenJQueryIsLoaded, 50); 108 } 109 } 110 111 function FloatingButtonFunc() { 112 jQuery(document).ready(function() { 113 setTimeout(InitButton, 2500); 114 }); 115 } 116 117 function InitButton() { 118 jQuery(document).StartButton({ 119 "mainStyleCss": "https://pizzabtn.herokuapp.com/stylesheets/probtn.css", 120 '; 121 if ($source==1) { 122 $output = $output. ' 123 "jqueryPepPath": ""jqueryPepPath": "'.$jqueryPepPath["path"].'", 124 "ButtonImage": "'.$options['probtn_image'].'", 125 "ButtonDragImage": "'.$options['probtn_image'].'", 126 "ButtonOpenImage": "'.$options['probtn_image'].'", 127 "ButtonInactiveImage": "http://localhost:55737/", 128 "domain": "wordpress.plugin", 129 "ContentURL": "'.$options['probtn_contenturl'].'", 130 "HintText",": "'.$options['probtn_hinttext'].'" 131 '; 132 } else { 133 $output = $output. '"jqueryPepPath": "'.$jqueryPepPath["path"].'"'; 134 } 135 $output = $output. '}); } </script>'; 136 return $output; 137 } else { 138 return ""; 139 } 140 } 141 142 add_shortcode('floating_button', 'probtninit_function'); 143 80 144 add_action('admin_init', 'probtn_register_settings'); 81 145 … … 236 300 Floating button is a new way to add survey, ads or some other additional content without adding any changes to your design.<br/> 237 301 Functionality is implemented like floating button above your site, and after clicking on button would be opened additional modal window with nessesary content.<br/> 238 For better usability users can use admin panel with settings and button targeting, and also some detailed statistics and analytics. 302 For better usability users can use admin panel with settings and button targeting, and also some detailed statistics and analytics.<br/> 303 Shortcode to insert plugin - <strong><i>[floating_button]</i></strong> 239 304 </p> 240 305 </div> -
profit-button/trunk/readme.txt
r875562 r884705 5 5 Requires at least: 3.3 6 6 Tested up to: 3.5.1 7 Stable tag: 1.9. 47 Stable tag: 1.9.5 8 8 License: Licenced under LGPL 9 9 License URI: http://opensource.org/licenses/LGPL-3.0 … … 18 18 19 19 For better usability users can use admin panel with settings and button targeting, and also some detailed statistics and analytics. 20 21 Shortcode to insert plugin - [floating_button] 20 22 21 23 == Installation == … … 66 68 Change its value to "false" and click Save. 67 69 70 = How to show button only on some nessesary pages? = 71 72 You need to set "Button state" to off and add shortcode [floating_button] at nessesary pages, where you'd like to see button. 73 68 74 == Screenshots == 69 75 … … 75 81 76 82 == Changelog == 83 84 = 1.9.5 = 85 Added shortcode [floating_button] (require button state set to off) to add button only on nessesary pages. 77 86 78 87 = 1.9.4 =
Note: See TracChangeset
for help on using the changeset viewer.