Poll, Survey, Quiz, Slideshow, Form, Story & Landing Page - Version 7.6.0

Version Description

N/A

Download this release

Release Info

Developer assafp
Plugin Icon 128x128 Poll, Survey, Quiz, Slideshow, Form, Story & Landing Page
Version 7.6.0
Comparing to
See all releases

Code changes from version 7.5.0 to 7.6.0

opinionstage-functions.php CHANGED
@@ -13,31 +13,39 @@
13
  *
14
  */
15
  function opinionstage_add_poll($atts) {
16
- extract(shortcode_atts(array('id' => 0), $atts));
17
  if(!is_feed()) {
18
  $id = intval($id);
19
- return opinionstage_create_embed_code($id);
20
  } else {
21
  return __('Note: There is a poll embedded within this post, please visit the site to participate in this post\'s poll.', OPINIONSTAGE_WIDGET_UNIQUE_ID);
22
  }
23
  }
24
 
25
  /**
26
- * Create the The iframe HTML Tag according to the given paramters.
27
  * Either get the embed code or embeds it directly in case
28
  *
29
  * Arguments:
30
  * @param id - Id of the poll
31
  */
32
- function opinionstage_create_embed_code($id) {
33
 
34
  // Only present if id is available
35
  if (isset($id) && !empty($id)) {
36
  // Load embed code from the cache if possible
37
  $is_homepage = is_home();
38
- $transient_name = 'embed_code' . $id . '_' . ($is_homepage ? "1" : "0");
39
- if ( false === ( $code = get_transient($transient_name) ) ) {
40
- $embed_code_url = "http://".OPINIONSTAGE_SERVER_BASE."/api/debates/" . $id . "/embed_code.json";
 
 
 
 
 
 
 
 
41
  if ($is_homepage) {
42
  $embed_code_url .= "?h=1";
43
  }
@@ -118,7 +126,7 @@ function opinionstage_poll_footer_admin() {
118
  function opinionstage_poll_menu() {
119
  if (function_exists('add_menu_page')) {
120
  add_menu_page(__('Add Polls', OPINIONSTAGE_WIDGET_UNIQUE_ID), __('Social Polls', OPINIONSTAGE_WIDGET_UNIQUE_ID), 'edit_posts', OPINIONSTAGE_WIDGET_UNIQUE_LOCATION, 'opinionstage_add_poll_page',
121
- plugins_url(OPINIONSTAGE_WIDGET_UNIQUE_ID.'/images/os.png'));
122
  }
123
  }
124
 
@@ -134,8 +142,10 @@ function opinionstage_add_poll_page() {
134
  <h2>Actions</h2>
135
  <ul class="os_links_list">
136
  <li><?php echo opinionstage_create_link('Create a Poll', 'new_poll', ''); ?></li>
137
- <li><?php echo opinionstage_create_link('Manage Polls', 'dashboard', ''); ?></li>
138
- <li><a href="http://www.opinionstage.com/dashboard?tab=containers" target="_blank">Manage Containers</a></li>
 
 
139
  </ul>
140
  <h2>Help</h2>
141
  <ul class="os_links_list">
@@ -152,7 +162,7 @@ function opinionstage_add_poll_page() {
152
  * Load the js script
153
  */
154
  function opinionstage_load_scripts() {
155
- wp_enqueue_script( 'ospolls', plugins_url(OPINIONSTAGE_WIDGET_UNIQUE_ID.'/opinionstage_plugin.js'), array( 'jquery', 'thickbox' ));
156
  }
157
 
158
  /**
@@ -162,18 +172,68 @@ function opinionstage_add_poll_popup() {
162
  ?>
163
  <div id="opinionstage-insert-poll-form" style="display:none;">
164
  <div id="content">
165
- <h1><strong>Insert a Poll</strong></h1>
166
- <h3><strong>Enter Poll ID (e.g. 4567):</strong></h3>
167
- <p><input type="text" name="poll-id" id="opinionstage-poll-id" value="" /></p>
168
- <p class="submit">
169
- <input type="button" id="opinionstage-submit" class="button-primary" value="Insert Poll" name="submit" />
170
- </p>
171
- <p><strong>Haven't created a poll yet?</strong></br></br>
172
- <?php echo opinionstage_create_link('Create a new poll', 'new_poll', ''); ?>
173
- </p>
174
- <p><strong>Don't know the poll ID?</strong></br></br>
175
- <?php echo opinionstage_create_link('Find ID of an existing poll', 'dashboard', ''); ?>
176
  </p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
177
  </div>
178
  </div>
179
  <?php
@@ -184,10 +244,9 @@ function opinionstage_add_poll_popup() {
184
  */
185
  function opinionstage_create_link($caption, $page, $params = "", $options = array()) {
186
  $style = empty($options['style']) ? '' : $options['style'];
187
- $new_page = empty($options['new_page']) ? true : $options['new_page'];
188
  $params_prefix = empty($params) ? "" : "&";
189
- $link = "http://".OPINIONSTAGE_SERVER_BASE."/".$page."?o=".OPINIONSTAGE_WIDGET_API_KEY.$params_prefix.$params;
190
-
191
  return "<a href=\"".$link."\"".($new_page ? " target='_blank'" : "")." style=".$style.">".$caption."</a>";
192
  }
193
 
13
  *
14
  */
15
  function opinionstage_add_poll($atts) {
16
+ extract(shortcode_atts(array('id' => 0, 'type' => 'poll'), $atts));
17
  if(!is_feed()) {
18
  $id = intval($id);
19
+ return opinionstage_create_embed_code($id, $type);
20
  } else {
21
  return __('Note: There is a poll embedded within this post, please visit the site to participate in this post\'s poll.', OPINIONSTAGE_WIDGET_UNIQUE_ID);
22
  }
23
  }
24
 
25
  /**
26
+ * Create the The iframe HTML Tag according to the given parameters.
27
  * Either get the embed code or embeds it directly in case
28
  *
29
  * Arguments:
30
  * @param id - Id of the poll
31
  */
32
+ function opinionstage_create_embed_code($id, $type) {
33
 
34
  // Only present if id is available
35
  if (isset($id) && !empty($id)) {
36
  // Load embed code from the cache if possible
37
  $is_homepage = is_home();
38
+ $transient_name = 'embed_code' . $id . '_' . $type . '_' . ($is_homepage ? "1" : "0");
39
+ $code = get_transient($transient_name);
40
+ if ( false === $code || '' === $code ) {
41
+ if ($type == 'set') {
42
+ $embed_code_url = "http://".OPINIONSTAGE_SERVER_BASE."/api/sets/" . $id . "/embed_code.json";
43
+ } else if ($type == 'container') {
44
+ $embed_code_url = "http://".OPINIONSTAGE_SERVER_BASE."/api/containers/" . $id . "/embed_code.json";
45
+ } else {
46
+ $embed_code_url = "http://".OPINIONSTAGE_SERVER_BASE."/api/debates/" . $id . "/embed_code.json";
47
+ }
48
+
49
  if ($is_homepage) {
50
  $embed_code_url .= "?h=1";
51
  }
126
  function opinionstage_poll_menu() {
127
  if (function_exists('add_menu_page')) {
128
  add_menu_page(__('Add Polls', OPINIONSTAGE_WIDGET_UNIQUE_ID), __('Social Polls', OPINIONSTAGE_WIDGET_UNIQUE_ID), 'edit_posts', OPINIONSTAGE_WIDGET_UNIQUE_LOCATION, 'opinionstage_add_poll_page',
129
+ plugins_url(OPINIONSTAGE_WIDGET_UNIQUE_ID.'/images/os.png'), '25.234323221');
130
  }
131
  }
132
 
142
  <h2>Actions</h2>
143
  <ul class="os_links_list">
144
  <li><?php echo opinionstage_create_link('Create a Poll', 'new_poll', ''); ?></li>
145
+ <li><?php echo opinionstage_create_link('View Polls', 'dashboard', ''); ?></li>
146
+ <li><?php echo opinionstage_create_link('Create a Set', 'sets/new', ''); ?></li>
147
+ <li><?php echo opinionstage_create_link('View Sets', 'dashboard', 'tab=sets'); ?></li>
148
+ <li><?php echo opinionstage_create_link('View Containers', 'dashboard', 'tab=containers'); ?></li>
149
  </ul>
150
  <h2>Help</h2>
151
  <ul class="os_links_list">
162
  * Load the js script
163
  */
164
  function opinionstage_load_scripts() {
165
+ wp_enqueue_script( 'ospolls', plugins_url(OPINIONSTAGE_WIDGET_UNIQUE_ID.'/opinionstage_plugin.js'), array( 'jquery', 'thickbox' ), '3' );
166
  }
167
 
168
  /**
172
  ?>
173
  <div id="opinionstage-insert-poll-form" style="display:none;">
174
  <div id="content">
175
+ <h3><strong>Type:</strong></h3>
176
+ <p>
177
+ <select style="width: 100%; max-width: 300px; font-size: 20px; height: 40px; line-height: 40px;" id="opinionstage-type">
178
+ <option value="poll">Insert a Poll</option>
179
+ <option value="set">Insert a Set</option>
180
+ </select>
 
 
 
 
 
181
  </p>
182
+ <style type="text/css">
183
+ .pollWrp p, .setWrp p { padding: 1px 0 !important; }
184
+ </style>
185
+ <script type="text/javascript">
186
+ jQuery(function ($)
187
+ {
188
+ var $pollWrp = $(".pollWrp");
189
+ var $setWrp = $(".setWrp");
190
+ $("#opinionstage-type").change(function ()
191
+ {
192
+ var $this = $(this);
193
+ var val = $this.val();
194
+ if (val == "poll")
195
+ {
196
+ $setWrp.fadeOut(0, function ()
197
+ {
198
+ $pollWrp.fadeIn("fast");
199
+ });
200
+ }
201
+ else if (val == "set")
202
+ {
203
+ $pollWrp.fadeOut(0, function ()
204
+ {
205
+ $setWrp.fadeIn("fast");
206
+ });
207
+ }
208
+ }).trigger("change");
209
+ });
210
+ </script>
211
+ <div class="pollWrp" style="display: none;">
212
+ <h3><strong>Enter Poll ID (e.g. 2195036):</strong></h3>
213
+ <p><input type="text" name="poll-id" id="opinionstage-poll-id" value="" /></p>
214
+ <p class="submit">
215
+ <input type="button" class="opinionstage-submit button-primary" value="Insert Poll" name="submit" />
216
+ </p>
217
+ <p><strong>Haven't created a poll yet?</strong></br></br>
218
+ <?php echo opinionstage_create_link('Create a new poll', 'new_poll', ''); ?>
219
+ </p>
220
+ <p><strong>Don't know the poll ID?</strong></br></br>
221
+ <?php echo opinionstage_create_link('Locate ID of an existing poll', 'dashboard', ''); ?>
222
+ </p>
223
+ </div>
224
+ <div class="setWrp" style="display: none;">
225
+ <h3><strong>Enter Set ID (e.g. 2152089):</strong></h3>
226
+ <p><input type="text" name="set-id" id="opinionstage-set-id" value="" /></p>
227
+ <p class="submit">
228
+ <input type="button" class="opinionstage-submit button-primary" value="Insert Set" name="submit" />
229
+ </p>
230
+ <p><strong>Haven't created a set yet?</strong></br></br>
231
+ <?php echo opinionstage_create_link('Create a new set', 'sets/new', ''); ?>
232
+ </p>
233
+ <p><strong>Don't know the set ID?</strong></br></br>
234
+ <?php echo opinionstage_create_link('Locate ID of an existing set', 'dashboard', 'tab=sets', array()); ?>
235
+ </p>
236
+ </div>
237
  </div>
238
  </div>
239
  <?php
244
  */
245
  function opinionstage_create_link($caption, $page, $params = "", $options = array()) {
246
  $style = empty($options['style']) ? '' : $options['style'];
247
+ $new_page = empty($options['new_page']) ? true : $options['new_page'];
248
  $params_prefix = empty($params) ? "" : "&";
249
+ $link = "http://".OPINIONSTAGE_SERVER_BASE."/".$page."?" . "o=".OPINIONSTAGE_WIDGET_API_KEY.$params_prefix.$params;
 
250
  return "<a href=\"".$link."\"".($new_page ? " target='_blank'" : "")." style=".$style.">".$caption."</a>";
251
  }
252
 
opinionstage-polls.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Social Polls by OpinionStage
4
  Plugin URI: http://www.opinionstage.com
5
  Description: Adds a highly engaging social polling system to your blog. You can easily add a social poll to your blog post/page by clicking the social poll icon in the WordPress post/page text editor.
6
- Version: 7.5.0
7
  Author: OpinionStage.com
8
  Author URI: http://www.opinionstage.com
9
  */
@@ -11,7 +11,7 @@ Author URI: http://www.opinionstage.com
11
  /* --- Static initializer for Wordpress hooks --- */
12
 
13
  define('OPINIONSTAGE_SERVER_BASE', "www.opinionstage.com"); /* Don't include the protocol, added dynamically */
14
- define('OPINIONSTAGE_WIDGET_VERSION', '7.5.0');
15
  define('OPINIONSTAGE_WIDGET_PLUGIN_NAME', 'Social Polls by OpinionStage');
16
  define('OPINIONSTAGE_WIDGET_API_KEY', 'wp35e8');
17
  define('OPINIONSTAGE_WIDGET_SHORTCODE', 'socialpoll');
3
  Plugin Name: Social Polls by OpinionStage
4
  Plugin URI: http://www.opinionstage.com
5
  Description: Adds a highly engaging social polling system to your blog. You can easily add a social poll to your blog post/page by clicking the social poll icon in the WordPress post/page text editor.
6
+ Version: 7.6.0
7
  Author: OpinionStage.com
8
  Author URI: http://www.opinionstage.com
9
  */
11
  /* --- Static initializer for Wordpress hooks --- */
12
 
13
  define('OPINIONSTAGE_SERVER_BASE', "www.opinionstage.com"); /* Don't include the protocol, added dynamically */
14
+ define('OPINIONSTAGE_WIDGET_VERSION', '7.6.0');
15
  define('OPINIONSTAGE_WIDGET_PLUGIN_NAME', 'Social Polls by OpinionStage');
16
  define('OPINIONSTAGE_WIDGET_API_KEY', 'wp35e8');
17
  define('OPINIONSTAGE_WIDGET_SHORTCODE', 'socialpoll');
opinionstage-widget.php CHANGED
@@ -2,42 +2,113 @@
2
  class OpinionStageWidget extends WP_Widget {
3
  function OpinionStageWidget() {
4
  $widget_ops = array('classname' => 'opinionstage_widget', 'description' => __('Adds a highly engaging social polling system to your widget section.', OPINIONSTAGE_WIDGET_UNIQUE_ID));
5
- $this->WP_Widget('opinionstage_widget', __('Opinion Stage Poll', OPINIONSTAGE_WIDGET_UNIQUE_ID), $widget_ops);
6
  }
7
 
8
  function widget($args, $instance) {
9
  extract($args);
10
  echo $before_widget;
11
- $title = @$instance['title'];
12
- $poll_id = @$instance['poll_id'];
13
- $display = @$instance['display'];
 
14
  if (!empty($title)) echo $before_title . apply_filters('widget_title', $title) . $after_title;
15
- if (!empty($poll_id) && $display == 1) echo do_shortcode('[' . OPINIONSTAGE_WIDGET_SHORTCODE . ' id="' . $poll_id . '"]');
16
  echo $after_widget;
17
  }
18
 
19
  function update($new_instance, $old_instance) {
20
  $instance = $old_instance;
21
- $instance['title'] = strip_tags($new_instance['title']);
22
- $instance['poll_id'] = strip_tags($new_instance['poll_id']);
23
- $instance['display'] = strip_tags($new_instance['display']);
24
  return $instance;
25
  }
26
 
27
  function form($instance) {
28
- $title = isset($instance['title']) ? esc_attr($instance['title']) : '';
29
- $poll_id = isset($instance['poll_id']) ? esc_attr($instance['poll_id']) : '';
30
- $display = isset($instance['display']) ? esc_attr($instance['display']) : 1;
31
  ?>
32
  <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:', OPINIONSTAGE_WIDGET_UNIQUE_ID); ?></label>
33
  <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo $title; ?>" /></p>
34
 
35
- <p><label for="<?php echo $this->get_field_id('display'); ?>"><?php _e('Display:', OPINIONSTAGE_WIDGET_UNIQUE_ID); ?></label>
36
- <select class="widefat" name="<?php echo $this->get_field_name('display'); ?>" id="<?php echo $this->get_field_id('display'); ?>"><option value="1" <?php selected($display, 1) ?>>Display Poll</option><option value="0" <?php selected($display, 0) ?>>Do not display anything (Disable)</option></select></p>
 
 
 
 
 
 
 
37
 
38
- <p><label for="<?php echo $this->get_field_id('poll_id'); ?>"><?php _e('Poll ID:', OPINIONSTAGE_WIDGET_UNIQUE_ID); ?></label>
39
- <input class="widefat" id="<?php echo $this->get_field_id('poll_id'); ?>" name="<?php echo $this->get_field_name('poll_id'); ?>" type="text" value="<?php echo $poll_id; ?>" /></p>
40
- <p><?php echo opinionstage_create_link('Manage my polls', 'dashboard', ''); ?></p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
  <?php
42
  }
43
  }
2
  class OpinionStageWidget extends WP_Widget {
3
  function OpinionStageWidget() {
4
  $widget_ops = array('classname' => 'opinionstage_widget', 'description' => __('Adds a highly engaging social polling system to your widget section.', OPINIONSTAGE_WIDGET_UNIQUE_ID));
5
+ $this->WP_Widget('opinionstage_widget', __('Polls by Opinion Stage', OPINIONSTAGE_WIDGET_UNIQUE_ID), $widget_ops);
6
  }
7
 
8
  function widget($args, $instance) {
9
  extract($args);
10
  echo $before_widget;
11
+ $title = @$instance['title'];
12
+ $id = @$instance['id'];
13
+ $type = @$instance['type'];
14
+ $type = !isset($type) || empty($type) ? 0 : $type;
15
  if (!empty($title)) echo $before_title . apply_filters('widget_title', $title) . $after_title;
16
+ if (!empty($id) && !empty($type)) echo do_shortcode('[' . OPINIONSTAGE_WIDGET_SHORTCODE . ' id="' . $id . '" type="' . $type . '"]');
17
  echo $after_widget;
18
  }
19
 
20
  function update($new_instance, $old_instance) {
21
  $instance = $old_instance;
22
+ $instance['title'] = strip_tags($new_instance['title']);
23
+ $instance['id'] = strip_tags($new_instance['id']);
24
+ $instance['type'] = strip_tags($new_instance['type']);
25
  return $instance;
26
  }
27
 
28
  function form($instance) {
29
+ $title = isset($instance['title']) ? esc_attr($instance['title']) : '';
30
+ $id = isset($instance['id']) ? esc_attr($instance['id']) : '';
31
+ $type = isset($instance['type']) ? esc_attr($instance['type']) : 'poll';
32
  ?>
33
  <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:', OPINIONSTAGE_WIDGET_UNIQUE_ID); ?></label>
34
  <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo $title; ?>" /></p>
35
 
36
+ <p>
37
+ <label for="<?php echo $this->get_field_id('type'); ?>"><?php _e('Display:', OPINIONSTAGE_WIDGET_UNIQUE_ID); ?></label>
38
+ <select class="widefat" name="<?php echo $this->get_field_name('type'); ?>" id="<?php echo $this->get_field_id('type'); ?>">
39
+ <option value="poll" <?php selected($type, 'poll') ?>>Display Poll</option>
40
+ <option value="set" <?php selected($type, 'set') ?>>Display Set</option>
41
+ <option value="container" <?php selected($type, 'container') ?>>Display Container</option>
42
+ <option value="0" <?php selected($type, 0) ?>>Do not display anything (Disable)</option>
43
+ </select>
44
+ </p>
45
 
46
+ <p>
47
+ <label for="<?php echo $this->get_field_id('id'); ?>">
48
+ <span class="pollWrp" style="display: none;">
49
+ <?php _e('Poll ID:', OPINIONSTAGE_WIDGET_UNIQUE_ID); ?>
50
+ </span>
51
+ <span class="setWrp" style="display: none;">
52
+ <?php _e('Set ID:', OPINIONSTAGE_WIDGET_UNIQUE_ID); ?>
53
+ </span>
54
+ <span class="containerWrp" style="display: none;">
55
+ <?php _e('Container ID:', OPINIONSTAGE_WIDGET_UNIQUE_ID); ?>
56
+ </span>
57
+ </label>
58
+ <input class="widefat" id="<?php echo $this->get_field_id('id'); ?>" name="<?php echo $this->get_field_name('id'); ?>" type="text" value="<?php echo $id; ?>" />
59
+ </p>
60
+
61
+ <div class="pollWrp" style="display: none;">
62
+ <p><?php echo opinionstage_create_link('Locate the Poll ID', 'dashboard', ''); ?></p>
63
+ </div>
64
+ <div class="setWrp" style="display: none;">
65
+ <p><?php echo opinionstage_create_link('Locate the Set ID', 'dashboard', 'tab=sets'); ?></p>
66
+ </div>
67
+ <div class="containerWrp" style="display: none;">
68
+ <p><?php echo opinionstage_create_link('Locate the Container ID', 'dashboard', 'tab=containers'); ?></p>
69
+ </div>
70
+
71
+ <script type="text/javascript">
72
+ jQuery(function ($)
73
+ {
74
+ var $pollWrp = $(".pollWrp");
75
+ var $setWrp = $(".setWrp");
76
+ var $containerWrp = $(".containerWrp");
77
+ $("#<?php echo $this->get_field_id('type'); ?>").change(function (e)
78
+ {
79
+ var $this = $(this);
80
+ var val = $this.val();
81
+ if (val == "poll")
82
+ {
83
+ $containerWrp.stop(false, true).fadeOut(0);
84
+ $setWrp.stop(false, true).fadeOut(0, function ()
85
+ {
86
+ $pollWrp.stop(false, true).fadeIn(e.isTrigger ? 0 : "fast");
87
+ });
88
+ }
89
+ else if (val == "set")
90
+ {
91
+ $containerWrp.stop(false, true).fadeOut(0);
92
+ $pollWrp.stop(false, true).fadeOut(0, function ()
93
+ {
94
+ $setWrp.stop(false, true).fadeIn(e.isTrigger ? 0 : "fast");
95
+ });
96
+ }
97
+ else if (val == "container")
98
+ {
99
+ $setWrp.stop(false, true).fadeOut(0);
100
+ $pollWrp.stop(false, true).fadeOut(0, function ()
101
+ {
102
+ $containerWrp.stop(false, true).fadeIn(e.isTrigger ? 0 : "fast");
103
+ });
104
+ }
105
+ }).trigger("change");
106
+ $(window).load(function ()
107
+ {
108
+ $("#<?php echo $this->get_field_id('type'); ?>").trigger("change");
109
+ });
110
+ });
111
+ </script>
112
  <?php
113
  }
114
  }
opinionstage_plugin.js CHANGED
@@ -1 +1,28 @@
1
- (function(){jQuery(function($){$("#content_ospolls").click(function(){$("os_insert_poll").click();return false});$(document).ready(function(){$('#opinionstage-submit').click(function(){var poll_id=$('#opinionstage-poll-id').val();var ed;if(typeof(tinymce)!='undefined'&&tinymce.isIE&&(ed=tinymce.get(wpActiveEditor))&&!ed.isHidden()){ed.focus();ed.windowManager.insertimagebookmark=ed.selection.getBookmark()}l=window.dialogArguments||opener||parent||top;l.send_to_editor("[socialpoll id=\""+poll_id.toString()+"\"]");tb_remove()})})})})();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function(){
2
+ jQuery(function($){
3
+ $("#content_ospolls").click(function() {
4
+ $("os_insert_poll").click();
5
+ return false;
6
+ });
7
+ $('.opinionstage-submit').click(function(){
8
+ var ed;
9
+ if (typeof(tinymce) != 'undefined' && tinymce.isIE && ( ed = tinymce.get(wpActiveEditor) ) && !ed.isHidden()) {
10
+ ed.focus();
11
+ ed.windowManager.insertimagebookmark = ed.selection.getBookmark();
12
+ }
13
+ l = window.dialogArguments || parent || opener || top;
14
+ var $opinionstageStage = $("#opinionstage-type");
15
+ var type = $opinionstageStage.val();
16
+ $opinionstageStage.val("poll");
17
+ var id = $('#opinionstage-' + type + '-id').val();
18
+ $("#opinionstage-poll-id, #opinionstage-set-id").val("");
19
+ var showType = type != "poll";
20
+ if (typeof l != "undefined" && typeof l.send_to_editor === "function")
21
+ l.send_to_editor("[socialpoll id=\"" + id + "\"" + (showType ? " type=\"" + type + "\"" : "") + "]");
22
+ else
23
+ send_to_editor("[socialpoll id=\"" + id + "\"" + (showType ? " type=\"" + type + "\"" : "") + "]");
24
+ tb_remove();
25
+ $("#opinionstage-type").trigger("change");
26
+ });
27
+ });
28
+ })();
readme.txt CHANGED
@@ -11,10 +11,10 @@ Add a powerful & easy-to-use social polling solution to your site.
11
 
12
  == Description ==
13
 
14
- The Opinion Stage polling WordPress plug-in allows you to easily add social polls (or standard polls) to your website or Facebook page.
15
  <br>
16
  <br>
17
- Using Opinion Stage’s polling solution, you can discover opinions & people, improve engagement on your site, drive traffic from social networks, research results using social & demographic filters and more.
18
  <br>
19
  <br>
20
  Get up & going in minutes.
@@ -24,7 +24,7 @@ http://www.youtube.com/watch?v=P7xKNlWbk0s
24
 
25
  = Main Poll Features: =
26
 
27
- * Manage all your polls from one dashboard
28
  * Poll your site visitors using their social network identities or anonymously
29
  * View the full poll participant list social profiles
30
  * Filter the poll participant list according to side votes
@@ -46,7 +46,11 @@ http://www.youtube.com/watch?v=P7xKNlWbk0s
46
  * Polls works seamlessly on all platforms - Opinion Stage uses responsive design techniques to fully support all platforms & screen sizes, including desktops, tablets and mobile devices. Reach your target audience wherever they are
47
  * Easy content creation - creating polls is an easy way to produce engaging and relevant content. Deploy your first polls in minutes and easily manage all your polls from a simple and intuitive dashboard
48
 
49
- = About Opinion Stage: =
 
 
 
 
50
 
51
  Opinion Stage offers web sites a highly engaging opinion polling solution. For more details on Opinion Stage's polling solutions, visit <a href="http://www.opinionstage.com?o=wp35e8" target="_blank">the Opinion Stage site.</a>
52
 
@@ -104,18 +108,23 @@ Yes, just post the following syntax into any post/page: [socialpoll ID="xyz"], w
104
 
105
  == Screenshots ==
106
 
107
- 1. **Multiple-choice poll** - Example of a multiple-choice poll, note that you can view who voted what in the poll and view the poll voters social profile
108
- 2. **Head-to-head poll** - Example of a head-to-head poll with 2 images. In this example, you can filter the poll results by the people you follow or by the gender of the poll participants
109
- 3. **Full list of poll voters** - Click 'view all', to view the full list of poll voters and discover who supports what. You can also follow users from this screen
110
- 4. **Poll social sharing dialog** - after voting in the poll, the user is offered to share the poll vote in the social networks he uses. When creating a poll, you can set the link, text & image that are shared in social networks.
111
- 5. **Start a poll form** - Just add a question, add sides and you're ready to go. Optionally set & edit many advanced poll settings to optimize the poll display & funcionality
112
- 6. **Insert social poll icon** - From the WordPress editor, click on the social poll icon to add a poll to the post/page
 
 
113
 
114
  == Upgrade Notice ==
115
 
116
  N/A
117
 
118
  == Changelog ==
 
 
 
119
  = Version 7.5.0 =
120
  * Created a widget for easily adding polls to site
121
  = Version 7.4.0 =
11
 
12
  == Description ==
13
 
14
+ The Opinion Stage WordPress poll plug-in allows you to easily add social polls (or standard polls) to your website or Facebook page.
15
  <br>
16
  <br>
17
+ Using Opinion Stage’s WordPress polls solution, you can discover opinions & people, improve engagement on your site, drive traffic from social networks, research results using social & demographic filters, generate revenue and more.
18
  <br>
19
  <br>
20
  Get up & going in minutes.
24
 
25
  = Main Poll Features: =
26
 
27
+ * Manage all your WordPress polls from one dashboard
28
  * Poll your site visitors using their social network identities or anonymously
29
  * View the full poll participant list social profiles
30
  * Filter the poll participant list according to side votes
46
  * Polls works seamlessly on all platforms - Opinion Stage uses responsive design techniques to fully support all platforms & screen sizes, including desktops, tablets and mobile devices. Reach your target audience wherever they are
47
  * Easy content creation - creating polls is an easy way to produce engaging and relevant content. Deploy your first polls in minutes and easily manage all your polls from a simple and intuitive dashboard
48
 
49
+ = Language support =
50
+
51
+ Opinion Stage supports over 30 languages, missing a language? Let us know!
52
+
53
+ = About Opinion Stage: =
54
 
55
  Opinion Stage offers web sites a highly engaging opinion polling solution. For more details on Opinion Stage's polling solutions, visit <a href="http://www.opinionstage.com?o=wp35e8" target="_blank">the Opinion Stage site.</a>
56
 
108
 
109
  == Screenshots ==
110
 
111
+ 1. **Multiple-choice poll** - Example of a multiple-choice social poll, note that you can view who voted what and view the poll voters social profile. You can also filter the poll results by the people you follow, by gender of the poll participants and more
112
+ 2. **Head-to-head poll** - Example of a head-to-head standard poll with 2 images
113
+ 3. **Side-bar poll** - Example of a side-bar poll, note that you can fully configure the poll including poll width & height, font size & color and more
114
+ 4. **Insert poll icon** - From the WordPress editor, click on the insert poll icon to add a poll to the post/page
115
+ 5. **Add poll to side-bar** - From the widget list, add the “Polls by Opinion Stage” widget and configure which poll to display
116
+ 6. **Start a poll form** - Just add a question, add sides and you're ready to go. Optionally set & edit many advanced poll settings to optimize the poll display & functionality
117
+ 7. **Poll social sharing dialog** - after voting, the user is (optionally) offered to share the poll vote in the social networks he uses. You can set the link, text & image of the shares
118
+ 8. **Poll results** - From the Opinion Stage dashboard view the poll results and poll performance metrics
119
 
120
  == Upgrade Notice ==
121
 
122
  N/A
123
 
124
  == Changelog ==
125
+ = Version 7.6.0 =
126
+ * Added the ability to insert a shortcode of a set of polls
127
+ * Added a widget for a container and for a set of polls
128
  = Version 7.5.0 =
129
  * Created a widget for easily adding polls to site
130
  = Version 7.4.0 =
screenshot-1.png CHANGED
Binary file
screenshot-2.png CHANGED
Binary file
screenshot-3.png CHANGED
Binary file
screenshot-4.png CHANGED
Binary file
screenshot-5.png CHANGED
Binary file
screenshot-6.png CHANGED
Binary file
screenshot-7.png ADDED
Binary file
screenshot-8.png ADDED
Binary file
tinymce/plugins/polls/editor_plugin.dev.js CHANGED
@@ -9,7 +9,7 @@
9
  var width = jQuery(window).width(), H = jQuery(window).height(), W = ( 720 < width ) ? 720 : width;
10
  W = W - 80;
11
  H = H - 84;
12
- tb_show( 'Insert Poll', '#TB_inline?width=' + W + '&height=' + H + '&inlineId=opinionstage-insert-poll-form' );
13
  },
14
  image: b + "/img/os.png"
15
  });
9
  var width = jQuery(window).width(), H = jQuery(window).height(), W = ( 720 < width ) ? 720 : width;
10
  W = W - 80;
11
  H = H - 84;
12
+ tb_show( 'Insert Poll / Set', '#TB_inline?width=' + W + '&height=' + H + '&inlineId=opinionstage-insert-poll-form' );
13
  },
14
  image: b + "/img/os.png"
15
  });
tinymce/plugins/polls/editor_plugin.js CHANGED
@@ -1 +1 @@
1
- (function(){tinymce.PluginManager.requireLangPack('ospolls');tinymce.create("tinymce.plugins.OSPolls",{init:function(a,b){a.addButton("ospolls",{title:"ospolls.insert_poll",onclick:function(){var width=jQuery(window).width(),H=jQuery(window).height(),W=(720<width)?720:width;W=W-80;H=H-84;tb_show('Insert Poll','#TB_inline?width='+W+'&height='+H+'&inlineId=opinionstage-insert-poll-form')},image:b+"/img/os.png"});a.onNodeChange.add(function(d,c,e){c.setActive("ospolls",e.nodeName=="IMG")})},createControl:function(b,a){return null},getInfo:function(){return{longname:"Social-Polls-by-OpinionStage",author:"Opinion Stage",authorurl:"http://www.opinionstage.com",infourl:"http://www.opinionstage.com/about",version:"1.0"}}});tinymce.PluginManager.add("ospolls",tinymce.plugins.OSPolls)})();
1
+ (function(){tinymce.PluginManager.requireLangPack('ospolls');tinymce.create("tinymce.plugins.OSPolls",{init:function(a,b){a.addButton("ospolls",{title:"ospolls.insert_poll",onclick:function(){var width=jQuery(window).width(),H=jQuery(window).height(),W=(720<width)?720:width;W=W-80;H=H-84;tb_show('Insert Poll / Set','#TB_inline?width='+W+'&height='+H+'&inlineId=opinionstage-insert-poll-form')},image:b+"/img/os.png"});a.onNodeChange.add(function(d,c,e){c.setActive("ospolls",e.nodeName=="IMG")})},createControl:function(b,a){return null},getInfo:function(){return{longname:"Social-Polls-by-OpinionStage",author:"Opinion Stage",authorurl:"http://www.opinionstage.com",infourl:"http://www.opinionstage.com/about",version:"1.0"}}});tinymce.PluginManager.add("ospolls",tinymce.plugins.OSPolls)})();