Changeset 885131
- Timestamp:
- 03/31/2014 03:21:55 PM (12 years ago)
- Location:
- surveymonkey-button/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (3 diffs)
-
survey.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
surveymonkey-button/trunk/readme.txt
r882899 r885131 5 5 Requires at least: 3.3 6 6 Tested up to: 3.5.1 7 Stable tag: 1. 07 Stable tag: 1.1 8 8 License: Licenced under LGPL 9 9 License URI: http://opensource.org/licenses/LGPL-3.0 … … 62 62 Yes, you can select menu items where survey button would be shown. 63 63 64 = How to show button only on some nessesary pages? = 65 66 You need to set "Button state" to off and add shortcode [surveymonkey_button] at nessesary pages, where you'd like to see button. 67 64 68 == Screenshots == 65 69 … … 70 74 == Changelog == 71 75 76 = 1.1 = 77 Added shortcode [surveymonkey_button] (require button state set to off) to add button only on nessesary pages. 78 72 79 = 1.0 = 73 80 Initial release -
surveymonkey-button/trunk/survey.php
r882866 r885131 4 4 * Plugin URI: http://probtn.com 5 5 * Description: Surveymonkey Button is the easiest way to add a Surveymonkey survey on your Wordpress blog. The survey is located inside a pop-up window that opens by clicking on the floating button. Using Surveymonkey Button, you can find out the opinions of users of your site and collect useful information 6 * Version: 1. 06 * Version: 1.1 7 7 * Author: hintsolutions 8 8 * Author URI: http://probtn.com … … 73 73 } 74 74 75 76 function surveyinit_function() { 77 $options = get_option( 'probtn_settings' ); 78 if (($options['state']==null) || ($options['state']=='')) { 79 $options['state'] = 'on'; 80 }; 81 if (($options['probtn_image']==null) || ($options['probtn_image']=='')) { 82 $options['probtn_image'] = 'http://admin.probtn.com/eqwid_btn_nonpress.png'; 83 }; 84 if (($options['probtn_contenturl']==null) || ($options['probtn_contenturl']=='')) { 85 $options['probtn_contenturl'] = 'https://www.surveymonkey.com/s/YQG8C2J'; 86 }; 87 if (($options['probtn_hinttext']==null) || ($options['probtn_hinttext']=='')) { 88 $options['probtn_hinttext'] = 'Survey'; 89 }; 90 91 //$mainStyleCss = plugins_url('style.css'); 92 //$jqueryPepPath = plugins_url('jquery.form.min.js'); 93 $mainStyleCss = plugins_url('surveymonkey-button/style.css'); 94 $jqueryPepPath = plugins_url('surveymonkey-button/jquery.form.min.js'); 95 $fancyboxCss = plugins_url('surveymonkey-button/fancybox/jquery.fancybox-1.3.4.css'); 96 97 if ($options['state']=="off") { 98 $output = ' 99 <script> 100 FloatingButtonFunc(); 101 102 function runYourFunctionWhenJQueryIsLoaded() { 103 if (window.$){ 104 FloatingButtonFunc(); 105 } else { 106 setTimeout(runYourFunctionWhenJQueryIsLoaded, 50); 107 } 108 } 109 110 function FloatingButtonFunc() { 111 jQuery(document).ready(function() { 112 setTimeout(InitButton, 2500); 113 }); 114 } 115 116 function InitButton() { 117 jQuery(document).StartButton({ 118 "mainStyleCss": "'.$mainStyleCss.'", 119 "fancyboxCssPath": "'.$fancyboxCss.'", 120 '; 121 $output = $output. ' 122 "jqueryPepPath": "'.$jqueryPepPath.'", 123 "ButtonImage": "'.$options['probtn_image'].'", 124 "ButtonDragImage": "'.$options['probtn_image'].'", 125 "ButtonOpenImage": "'.$options['probtn_image'].'", 126 "ButtonInactiveImage": "'.$options['probtn_image'].'", 127 "domain": "wordpress.plugin", 128 "ContentURL": "'.$options['probtn_contenturl'].'", 129 "HintText": "'.$options['probtn_hinttext'].'" 130 '; 131 $output = $output. '}); } </script>'; 132 return $output; 133 } else { 134 return ""; 135 } 136 } 137 138 add_shortcode('surveymonkey_button', 'surveyinit_function'); 139 140 75 141 function survey_start_button_script() { 76 142 $mainStyleCss = plugins_url('surveymonkey-button/style.css'); … … 87 153 }; 88 154 if (($options['probtn_contenturl']==null) || ($options['probtn_contenturl']=='')) { 89 $options['probtn_contenturl'] = 'http ://hint-survey.herokuapp.com/5278b54241624f0200000001';155 $options['probtn_contenturl'] = 'https://www.surveymonkey.com/s/YQG8C2J'; 90 156 }; 91 157 if (($options['probtn_hinttext']==null) || ($options['probtn_hinttext']=='')) {
Note: See TracChangeset
for help on using the changeset viewer.