AddToAny Share Buttons - Version 0.9.4

Version Description

Download this release

Release Info

Developer micropat
Plugin Icon 128x128 AddToAny Share Buttons
Version 0.9.4
Comparing to
See all releases

Code changes from version 0.9.3 to 0.9.4

Files changed (2) hide show
  1. README.txt +8 -12
  2. add-to-any.php +61 -22
README.txt CHANGED
@@ -3,27 +3,27 @@ Contributors: micropat
3
  Donate link: http://www.addtoany.com/contact/
4
  Tags: bookmarking, social, social bookmarking, bookmark, bookmarks, sharing, share, saving, save, Post, posts, page, pages, images, image, admin, statistics, stats, links, plugin, widget, e-mail, email, seo, button, delicious, google, digg, reddit, facebook, myspace, addtoany, add, any
5
  Requires at least: 2.0
6
- Tested up to: 2.5.1
7
- Stable tag: 0.9.3
8
 
9
- Lets readers share, save, and bookmark your posts and pages using any service, such as Delicious, Digg, Facebook, MySpace, and all the rest.
10
 
11
  == Description ==
12
 
13
- Lets readers share, save, and bookmark your posts and pages using any service, such as Delicious, Digg, Facebook, MySpace, and all the rest. The button comes with a drop-down menu that appears on rollover.
14
 
15
  Within the menu, users are additionally given an e-mail option, and an option to bookmark in-browser (Internet Explorer, Firefox, Opera, Safari, etc.), with directions on how to bookmark if their browser does not support auto-bookmarking from links/shortcuts.
16
 
17
- * Works instantly on mouse-over
18
  * Includes all services
19
- * Searchable on key-down
20
  * Services updated automatically
 
21
  * Keyboard navigation
22
  * Google Analytics integration
23
 
24
- Demo: <a href="http://www.addtoany.com/">http://www.addtoany.com/</a>
25
 
26
- See also, the <a href="/extend/plugins/add-to-any-subscribe/">Subscribe button</a> plugin.
27
 
28
  == Installation ==
29
 
@@ -32,10 +32,6 @@ See also, the <a href="/extend/plugins/add-to-any-subscribe/">Subscribe button</
32
 
33
  == Frequently Asked Questions ==
34
 
35
- = How long will this service be around? =
36
-
37
- Forever.
38
-
39
  = How often is the list of services updated? =
40
 
41
  Constantly... and it's done automatically, without having to upgrade the plugin!
3
  Donate link: http://www.addtoany.com/contact/
4
  Tags: bookmarking, social, social bookmarking, bookmark, bookmarks, sharing, share, saving, save, Post, posts, page, pages, images, image, admin, statistics, stats, links, plugin, widget, e-mail, email, seo, button, delicious, google, digg, reddit, facebook, myspace, addtoany, add, any
5
  Requires at least: 2.0
6
+ Tested up to: 2.6
7
+ Stable tag: 0.9.4
8
 
9
+ Helps readers share, save, and bookmark your posts and pages using any service, such as Delicious, Digg, Facebook, MySpace, and all the rest.
10
 
11
  == Description ==
12
 
13
+ Helps readers **share**, **save**, and **bookmark** your posts and pages using **any service**, such as Delicious, Digg, Facebook, MySpace, and all the rest. The button comes with Add to Any's customizable **Smart Menu**, which **places the services visitors use at the top of the menu**, based on each visitor's browsing history.
14
 
15
  Within the menu, users are additionally given an e-mail option, and an option to bookmark in-browser (Internet Explorer, Firefox, Opera, Safari, etc.), with directions on how to bookmark if their browser does not support auto-bookmarking from links/shortcuts.
16
 
17
+ * Add to Any Smart Menu
18
  * Includes all services
 
19
  * Services updated automatically
20
+ * Searchable on key-down
21
  * Keyboard navigation
22
  * Google Analytics integration
23
 
24
+ Demo: <a href="http://www.addtoany.com/" title="Share, Save, Subscribe buttons">http://www.addtoany.com/</a>
25
 
26
+ See also, the <a href="/extend/plugins/add-to-any-subscribe/" title="WordPress RSS Subscribe plugin">Subscribe button</a> plugin.
27
 
28
  == Installation ==
29
 
32
 
33
  == Frequently Asked Questions ==
34
 
 
 
 
 
35
  = How often is the list of services updated? =
36
 
37
  Constantly... and it's done automatically, without having to upgrade the plugin!
add-to-any.php CHANGED
@@ -2,8 +2,8 @@
2
  /*
3
  Plugin Name: Add to Any: Share/Save/Bookmark Button
4
  Plugin URI: http://www.addtoany.com/
5
- Description: Lets readers share, save, and bookmark your posts and pages using any service. [<a href="options-general.php?page=add-to-any.php">Settings</a>]
6
- Version: .9.3
7
  Author: MicroPat
8
  Author URI: http://www.addtoany.com/contact/
9
  */
@@ -73,14 +73,15 @@ function ADDTOANY_SHARE_SAVE_BUTTON($output_buffering=false) {
73
  $button = '<img src="'.trailingslashit(get_option('siteurl')).PLUGINDIR.'/add-to-any/'.$button_fname.'" width="'.$button_width.'" height="'.$button_height.'" border="0" alt="Share/Save/Bookmark"/>';
74
  ?>
75
 
76
- <a name="a2a_dd" onmouseover="a2a_show_dropdown(this)" onmouseout="a2a_onMouseOut_delay()" href="http://www.addtoany.com/bookmark?sitename=<?php echo $sitename_enc; ?>&amp;siteurl=<?php echo $siteurl_enc; ?>&amp;linkname=<?php echo $linkname_enc; ?>&amp;linkurl=<?php echo $linkurl_enc; ?>"<?php echo $style; ?>><?php echo $button; ?></a>
77
  <script type="text/javascript">
78
  a2a_linkname="<?php echo str_replace('"', '\\"', $linkname); ?>";
79
  a2a_linkurl="<?php echo $linkurl; ?>";
80
  <?php echo (get_option('A2A_SHARE_SAVE_hide_embeds')=='-1') ? 'a2a_hide_embeds=0;' : ''; ?>
81
  <?php echo (get_option('A2A_SHARE_SAVE_show_title')=='1') ? 'a2a_show_title=1;' : ''; ?>
 
82
  </script>
83
- <script type="text/javascript" src="http://www.addtoany.com/menu/page.js"></script>
84
 
85
  <?php
86
  if($output_buffering) {
@@ -126,7 +127,9 @@ function A2A_SHARE_SAVE_options_page() {
126
  update_option( 'A2A_SHARE_SAVE_display_in_pages', ($_POST['A2A_SHARE_SAVE_display_in_pages']=='1') ? '1':'-1' );
127
  update_option( 'A2A_SHARE_SAVE_hide_embeds', ($_POST['A2A_SHARE_SAVE_hide_embeds']=='1') ? '1':'-1' );
128
  update_option( 'A2A_SHARE_SAVE_show_title', ($_POST['A2A_SHARE_SAVE_show_title']=='1') ? '1':'-1' );
 
129
  update_option( 'A2A_SHARE_SAVE_button', $_POST['A2A_SHARE_SAVE_button'] );
 
130
 
131
  ?>
132
  <div class="updated fade"><p><strong><?php _e('Settings saved.', 'A2A_SHARE_SAVE_trans_domain' ); ?></strong></p></div>
@@ -149,36 +152,36 @@ function A2A_SHARE_SAVE_options_page() {
149
  <table class="form-table">
150
  <tr valign="top">
151
  <th scope="row">Button</th>
152
- <td>
153
  <label>
154
  <input name="A2A_SHARE_SAVE_button" value="favicon.png|16|16" type="radio"<?php if(get_option('A2A_SHARE_SAVE_button')=='favicon.png|16|16') echo ' checked="checked"'; ?>
155
- style="margin:9px 0">
156
- <img src="<?php echo trailingslashit(get_option('siteurl')).PLUGINDIR.'/add-to-any/favicon.png'; ?>" width="16" height="16" border="0" style="padding:9px" alt="+ Share/Save" title="+ Share/Save"
157
  onclick="this.parentNode.firstChild.checked=true"/>
158
  </label><br>
159
  <label>
160
  <input name="A2A_SHARE_SAVE_button" value="share_save_120_16.gif|120|16" type="radio"<?php if( !get_option('A2A_SHARE_SAVE_button') || get_option('A2A_SHARE_SAVE_button' )=='share_save_120_16.gif|120|16') echo ' checked="checked"'; ?>
161
- style="margin:9px 0">
162
- <img src="<?php echo trailingslashit(get_option('siteurl')).PLUGINDIR.'/add-to-any/share_save_120_16.gif'; ?>" width="120" height="16" border="0" style="padding:9px"
163
  onclick="this.parentNode.firstChild.checked=true"/>
164
  </label><br>
165
  <label>
166
  <input name="A2A_SHARE_SAVE_button" value="share_save_171_16.gif|171|16" type="radio"<?php if(get_option('A2A_SHARE_SAVE_button')=='share_save_171_16.gif|171|16') echo ' checked="checked"'; ?>
167
- style="margin:9px 0">
168
- <img src="<?php echo trailingslashit(get_option('siteurl')).PLUGINDIR.'/add-to-any/share_save_171_16.gif'; ?>" width="171" height="16" border="0" style="padding:9px"
169
  onclick="this.parentNode.firstChild.checked=true"/>
170
  </label><br>
171
  <label>
172
  <input name="A2A_SHARE_SAVE_button" value="share_save_256_24.gif|256|24" type="radio"<?php if(get_option('A2A_SHARE_SAVE_button')=='share_save_256_24.gif|256|24') echo ' checked="checked"'; ?>
173
- style="margin:9px 0">
174
- <img src="<?php echo trailingslashit(get_option('siteurl')).PLUGINDIR.'/add-to-any/share_save_256_24.gif'; ?>" width="256" height="24" border="0" style="padding:9px"
175
  onclick="this.parentNode.firstChild.checked=true"/>
176
  </label>
177
- </td>
178
  </tr>
179
  <tr valign="top">
180
- <th scope="row">Placement</th>
181
- <td>
182
  <label>
183
  <input name="A2A_SHARE_SAVE_display_in_posts"
184
  onclick="e=getElementsByName('A2A_SHARE_SAVE_display_in_posts_on_front_page')[0];if(!this.checked){e.checked=false;e.disabled=true}else{e.checked=true;e.disabled=false}"
@@ -201,22 +204,58 @@ function A2A_SHARE_SAVE_options_page() {
201
  <br/><br/>
202
  <strong>*</strong> If unchecked, be sure to place the following code in <a href="theme-editor.php">your template pages</a> (within <code>index.php</code>, <code>single.php</code>, and/or <code>page.php</code>):<br/>
203
  <code>&lt;?php if( function_exists('ADDTOANY_SHARE_SAVE_BUTTON') ) { ADDTOANY_SHARE_SAVE_BUTTON(); } ?&gt;</code>
204
- </td>
205
  </tr>
206
  <tr valign="top">
207
- <th scope="row">Options</th>
208
- <td>
 
 
 
 
 
 
 
 
 
 
 
209
  <label>
210
  <input name="A2A_SHARE_SAVE_hide_embeds"
211
  type="checkbox"<?php if(get_option('A2A_SHARE_SAVE_hide_embeds')!='-1') echo ' checked="checked"'; ?> value="1"/>
212
- Hide embedded objects (Flash, video, etc.) when the menu is displayed
213
  </label><br />
214
  <label>
215
  <input name="A2A_SHARE_SAVE_show_title"
216
  type="checkbox"<?php if(get_option('A2A_SHARE_SAVE_show_title')=='1') echo ' checked="checked"'; ?> value="1"/>
217
- Show the title of the post within the menu
 
 
 
 
 
218
  </label>
219
- </td>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
220
  </tr>
221
  </table>
222
 
2
  /*
3
  Plugin Name: Add to Any: Share/Save/Bookmark Button
4
  Plugin URI: http://www.addtoany.com/
5
+ Description: Helps readers share, save, and bookmark your posts and pages using any service. [<a href="options-general.php?page=add-to-any.php">Settings</a>]
6
+ Version: .9.4
7
  Author: MicroPat
8
  Author URI: http://www.addtoany.com/contact/
9
  */
73
  $button = '<img src="'.trailingslashit(get_option('siteurl')).PLUGINDIR.'/add-to-any/'.$button_fname.'" width="'.$button_width.'" height="'.$button_height.'" border="0" alt="Share/Save/Bookmark"/>';
74
  ?>
75
 
76
+ <a class=".addtoany_share_save" name="a2a_dd" <?php echo (get_option('A2A_SHARE_SAVE_onclick')=='1') ? 'onclick="a2a_show_dropdown(this);return false"' : 'onmouseover="a2a_show_dropdown(this)"'; ?> onmouseout="a2a_onMouseOut_delay()" href="http://www.addtoany.com/share_save?sitename=<?php echo $sitename_enc; ?>&amp;siteurl=<?php echo $siteurl_enc; ?>&amp;linkname=<?php echo $linkname_enc; ?>&amp;linkurl=<?php echo $linkurl_enc; ?>"<?php echo $style; ?>><?php echo $button; ?></a>
77
  <script type="text/javascript">
78
  a2a_linkname="<?php echo str_replace('"', '\\"', $linkname); ?>";
79
  a2a_linkurl="<?php echo $linkurl; ?>";
80
  <?php echo (get_option('A2A_SHARE_SAVE_hide_embeds')=='-1') ? 'a2a_hide_embeds=0;' : ''; ?>
81
  <?php echo (get_option('A2A_SHARE_SAVE_show_title')=='1') ? 'a2a_show_title=1;' : ''; ?>
82
+ <?php echo stripslashes(get_option('A2A_SHARE_SAVE_additional_js_variables')); ?>
83
  </script>
84
+ <script type="text/javascript" src="http://static.addtoany.com/menu/page.js"></script>
85
 
86
  <?php
87
  if($output_buffering) {
127
  update_option( 'A2A_SHARE_SAVE_display_in_pages', ($_POST['A2A_SHARE_SAVE_display_in_pages']=='1') ? '1':'-1' );
128
  update_option( 'A2A_SHARE_SAVE_hide_embeds', ($_POST['A2A_SHARE_SAVE_hide_embeds']=='1') ? '1':'-1' );
129
  update_option( 'A2A_SHARE_SAVE_show_title', ($_POST['A2A_SHARE_SAVE_show_title']=='1') ? '1':'-1' );
130
+ update_option( 'A2A_SHARE_SAVE_onclick', ($_POST['A2A_SHARE_SAVE_onclick']=='1') ? '1':'-1' );
131
  update_option( 'A2A_SHARE_SAVE_button', $_POST['A2A_SHARE_SAVE_button'] );
132
+ update_option( 'A2A_SHARE_SAVE_additional_js_variables', trim($_POST['A2A_SHARE_SAVE_additional_js_variables']) );
133
 
134
  ?>
135
  <div class="updated fade"><p><strong><?php _e('Settings saved.', 'A2A_SHARE_SAVE_trans_domain' ); ?></strong></p></div>
152
  <table class="form-table">
153
  <tr valign="top">
154
  <th scope="row">Button</th>
155
+ <td><fieldset>
156
  <label>
157
  <input name="A2A_SHARE_SAVE_button" value="favicon.png|16|16" type="radio"<?php if(get_option('A2A_SHARE_SAVE_button')=='favicon.png|16|16') echo ' checked="checked"'; ?>
158
+ style="margin:9px 0;vertical-align:middle">
159
+ <img src="<?php echo trailingslashit(get_option('siteurl')).PLUGINDIR.'/add-to-any/favicon.png'; ?>" width="16" height="16" border="0" style="padding:9px;vertical-align:middle" alt="+ Share/Save" title="+ Share/Save"
160
  onclick="this.parentNode.firstChild.checked=true"/>
161
  </label><br>
162
  <label>
163
  <input name="A2A_SHARE_SAVE_button" value="share_save_120_16.gif|120|16" type="radio"<?php if( !get_option('A2A_SHARE_SAVE_button') || get_option('A2A_SHARE_SAVE_button' )=='share_save_120_16.gif|120|16') echo ' checked="checked"'; ?>
164
+ style="margin:9px 0;vertical-align:middle">
165
+ <img src="<?php echo trailingslashit(get_option('siteurl')).PLUGINDIR.'/add-to-any/share_save_120_16.gif'; ?>" width="120" height="16" border="0" style="padding:9px;vertical-align:middle"
166
  onclick="this.parentNode.firstChild.checked=true"/>
167
  </label><br>
168
  <label>
169
  <input name="A2A_SHARE_SAVE_button" value="share_save_171_16.gif|171|16" type="radio"<?php if(get_option('A2A_SHARE_SAVE_button')=='share_save_171_16.gif|171|16') echo ' checked="checked"'; ?>
170
+ style="margin:9px 0;vertical-align:middle">
171
+ <img src="<?php echo trailingslashit(get_option('siteurl')).PLUGINDIR.'/add-to-any/share_save_171_16.gif'; ?>" width="171" height="16" border="0" style="padding:9px;vertical-align:middle"
172
  onclick="this.parentNode.firstChild.checked=true"/>
173
  </label><br>
174
  <label>
175
  <input name="A2A_SHARE_SAVE_button" value="share_save_256_24.gif|256|24" type="radio"<?php if(get_option('A2A_SHARE_SAVE_button')=='share_save_256_24.gif|256|24') echo ' checked="checked"'; ?>
176
+ style="margin:9px 0;vertical-align:middle">
177
+ <img src="<?php echo trailingslashit(get_option('siteurl')).PLUGINDIR.'/add-to-any/share_save_256_24.gif'; ?>" width="256" height="24" border="0" style="padding:9px;vertical-align:middle"
178
  onclick="this.parentNode.firstChild.checked=true"/>
179
  </label>
180
+ </fieldset></td>
181
  </tr>
182
  <tr valign="top">
183
+ <th scope="row">Button Placement</th>
184
+ <td><fieldset>
185
  <label>
186
  <input name="A2A_SHARE_SAVE_display_in_posts"
187
  onclick="e=getElementsByName('A2A_SHARE_SAVE_display_in_posts_on_front_page')[0];if(!this.checked){e.checked=false;e.disabled=true}else{e.checked=true;e.disabled=false}"
204
  <br/><br/>
205
  <strong>*</strong> If unchecked, be sure to place the following code in <a href="theme-editor.php">your template pages</a> (within <code>index.php</code>, <code>single.php</code>, and/or <code>page.php</code>):<br/>
206
  <code>&lt;?php if( function_exists('ADDTOANY_SHARE_SAVE_BUTTON') ) { ADDTOANY_SHARE_SAVE_BUTTON(); } ?&gt;</code>
207
+ </fieldset></td>
208
  </tr>
209
  <tr valign="top">
210
+ <th scope="row">Menu Style</th>
211
+ <td><fieldset>
212
+ Using Add to Any's Menu Styler, you can customize the colors of your Share/Save menu! When you're done, be sure to paste the generated code in the <a href="#" onclick="document.getElementById('A2A_SHARE_SAVE_additional_js_variables').focus();return false">Additional Options</a> box below.
213
+ <p>
214
+ <a href="http://www.addtoany.com/buttons/share_save/menu_style/wordpress" class="button-secondary" title="Open the Add to Any Menu Styler in a new window" target="_blank"
215
+ onclick="document.getElementById('A2A_SHARE_SAVE_additional_js_variables').focus();
216
+ document.getElementById('A2A_SHARE_SAVE_menu_styler_note').style.display='';">Open Menu Styler</a>
217
+ </p>
218
+ </fieldset></td>
219
+ </tr>
220
+ <tr valign="top">
221
+ <th scope="row">Menu Options</th>
222
+ <td><fieldset>
223
  <label>
224
  <input name="A2A_SHARE_SAVE_hide_embeds"
225
  type="checkbox"<?php if(get_option('A2A_SHARE_SAVE_hide_embeds')!='-1') echo ' checked="checked"'; ?> value="1"/>
226
+ Hide embedded objects (Flash, video, etc.) that intersect with the menu when displayed
227
  </label><br />
228
  <label>
229
  <input name="A2A_SHARE_SAVE_show_title"
230
  type="checkbox"<?php if(get_option('A2A_SHARE_SAVE_show_title')=='1') echo ' checked="checked"'; ?> value="1"/>
231
+ Show the title of the post (or page) within the menu
232
+ </label><br />
233
+ <label>
234
+ <input name="A2A_SHARE_SAVE_onclick"
235
+ type="checkbox"<?php if(get_option('A2A_SHARE_SAVE_onclick')=='1') echo ' checked="checked"'; ?> value="1"/>
236
+ Only show the menu when the user clicks the Share/Save button
237
  </label>
238
+ </fieldset></td>
239
+ </tr>
240
+ <tr valign="top">
241
+ <th scope="row">Additional Options</th>
242
+ <td><fieldset>
243
+ <p id="A2A_SHARE_SAVE_menu_styler_note" style="display:none">
244
+ <label for="A2A_SHARE_SAVE_additional_js_variables">
245
+ <strong>Paste the code from Add to Any's Menu Styler in the box below!</strong>
246
+ </label>
247
+ </p>
248
+ <label for="A2A_SHARE_SAVE_additional_js_variables">
249
+ Below you can set special JavaScript variables to apply to each Share/Save menu.
250
+ Advanced users might want to check out the code generated by Add to Any's general <a href="http://www.addtoany.com/buttons/share_save">Share/Save button generator</a>.
251
+ </label>
252
+ <p>
253
+ <textarea name="A2A_SHARE_SAVE_additional_js_variables" id="A2A_SHARE_SAVE_additional_js_variables" class="code" style="width: 98%; font-size: 12px;" rows="5" cols="50"><?php echo stripslashes(get_option('A2A_SHARE_SAVE_additional_js_variables')); ?></textarea>
254
+ </p>
255
+ <?php if( get_option('A2A_SHARE_SAVE_additional_js_variables')!='' ) { ?>
256
+ <label for="A2A_SHARE_SAVE_additional_js_variables"><strong>Note</strong>: If you're adding new code, be careful not to accidentally overwrite any previous code.</label>
257
+ <?php } ?>
258
+ </fieldset></td>
259
  </tr>
260
  </table>
261