AddToAny Share Buttons - Version 0.9.2

Version Description

Download this release

Release Info

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

Code changes from version 0.9.1 to 0.9.2

Files changed (4) hide show
  1. README.txt +8 -4
  2. add-to-any.php +76 -6
  3. share_save_171_16.gif +0 -0
  4. share_save_256_24.gif +0 -0
README.txt CHANGED
@@ -4,15 +4,15 @@ 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.1
8
 
9
- Lets readers share, save, and bookmark your posts using any service.
10
 
11
  == Description ==
12
 
13
- Lets readers share, save, and bookmark your posts 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 a link 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
@@ -48,6 +48,10 @@ If your button isn't already set up to appear (it is by default), type the follo
48
 
49
  Type the following tag into the page or post that you do not want the button to appear in: `<!--nosharesave-->`
50
 
 
 
 
 
51
  == Screenshots ==
52
 
53
  1. This is the Add to Any Share/Save button!
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.2
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
48
 
49
  Type the following tag into the page or post that you do not want the button to appear in: `<!--nosharesave-->`
50
 
51
+ = Why do embedded objects (like Flash) disappear when hovering over the button? =
52
+
53
+ This is done to overcome browser limitations that prevent the drop-down menu from displaying on top of embedded objects. If you would like to disable this, uncheck the `Hide embedded objects (Flash, video, etc.) when the menu is displayed ` option on the plugin's settings page.
54
+
55
  == Screenshots ==
56
 
57
  1. This is the Add to Any Share/Save button!
add-to-any.php CHANGED
@@ -1,9 +1,9 @@
1
  <?
2
  /*
3
  Plugin Name: Add to Any: Share/Save/Bookmark Button
4
- Plugin URI: http://www.addtoany.com/buttons/
5
- Description: Lets readers share, save, and bookmark your posts using any service and browser. [<a href="options-general.php?page=add-to-any.php">Settings</a>]
6
- Version: .9.1
7
  Author: MicroPat
8
  Author URI: http://www.addtoany.com/contact/
9
  */
@@ -53,10 +53,33 @@ function ADDTOANY_SHARE_SAVE_BUTTON($output_buffering=false) {
53
  $linkname_enc = rawurlencode( $linkname );
54
  $linkurl = get_permalink($post->ID);
55
  $linkurl_enc = rawurlencode( $linkurl );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56
  ?>
57
 
58
- <a name="a2a_dd" onmouseover="a2a_show_dropdown(this)" onmouseout="a2a_onMouseOut_delay()" href="http://www.addtoany.com/bookmark?sitename=<?=$sitename_enc?>&amp;siteurl=<?=$siteurl_enc?>&amp;linkname=<?=$linkname_enc?>&amp;linkurl=<?=$linkurl_enc?>"><img src="<?=trailingslashit(get_option('siteurl')).PLUGINDIR.'/add-to-any/share_save_120_16.gif'?>" width="120" height="16" border="0" alt="Share/Save/Bookmark"/></a>
59
- <script type="text/javascript">a2a_linkname="<?=str_replace('"', '\\"', $linkname)?>";a2a_linkurl="<?=$linkurl?>";</script>
 
 
 
 
 
60
  <script type="text/javascript" src="http://www.addtoany.com/menu/page.js"></script>
61
 
62
  <?
@@ -101,6 +124,9 @@ function A2A_SHARE_SAVE_options_page() {
101
  update_option( 'A2A_SHARE_SAVE_display_in_posts_on_front_page', ($_POST['A2A_SHARE_SAVE_display_in_posts_on_front_page']=='1') ? '1':'-1' );
102
  update_option( 'A2A_SHARE_SAVE_display_in_posts', ($_POST['A2A_SHARE_SAVE_display_in_posts']=='1') ? '1':'-1' );
103
  update_option( 'A2A_SHARE_SAVE_display_in_pages', ($_POST['A2A_SHARE_SAVE_display_in_pages']=='1') ? '1':'-1' );
 
 
 
104
 
105
  ?>
106
  <div class="updated fade"><p><strong><?php _e('Settings saved.', 'A2A_SHARE_SAVE_trans_domain' ); ?></strong></p></div>
@@ -121,6 +147,35 @@ function A2A_SHARE_SAVE_options_page() {
121
  <input type="hidden" name="A2A_SHARE_SAVE_submit_hidden" value="Y">
122
 
123
  <table class="form-table">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
124
  <tr valign="top">
125
  <th scope="row">Placement</th>
126
  <td>
@@ -148,8 +203,23 @@ function A2A_SHARE_SAVE_options_page() {
148
  <code>&lt;? if( function_exists('ADDTOANY_SHARE_SAVE_BUTTON') ) { ADDTOANY_SHARE_SAVE_BUTTON(); } ?&gt;</code>
149
  </td>
150
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
151
  </table>
152
-
153
  <p class="submit">
154
  <input type="submit" name="Submit" value="<?php _e('Save Changes', 'A2A_SHARE_SAVE_trans_domain' ) ?>" />
155
  </p>
1
  <?
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.2
7
  Author: MicroPat
8
  Author URI: http://www.addtoany.com/contact/
9
  */
53
  $linkname_enc = rawurlencode( $linkname );
54
  $linkurl = get_permalink($post->ID);
55
  $linkurl_enc = rawurlencode( $linkurl );
56
+
57
+ if( !get_option('A2A_SHARE_SAVE_button') ) {
58
+ $button_fname = 'share_save_120_16.gif';
59
+ $button_width = '120';
60
+ $button_height = "16";
61
+ } else {
62
+ $button_attrs = explode( '|', get_option('A2A_SHARE_SAVE_button') );
63
+ $button_fname = $button_attrs[0];
64
+ $button_width = $button_attrs[1];
65
+ $button_height = $button_attrs[2];
66
+ }
67
+ if( $button_attrs[0] == 'favicon.png' ) {
68
+ $style_bg = 'background:url('.trailingslashit(get_option('siteurl')).PLUGINDIR.'/add-to-any/'.$button_fname.') no-repeat scroll 0px 0px';
69
+ $style_bg = ';' . $style_bg . ' !important;';
70
+ $style = ' style="'.$style_bg.'padding:1px 5px 5px 22px"';
71
+ $button = 'Share/Save';
72
+ } else
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=<?=$sitename_enc?>&amp;siteurl=<?=$siteurl_enc?>&amp;linkname=<?=$linkname_enc?>&amp;linkurl=<?=$linkurl_enc?>"<?=$style?>><?=$button?></a>
77
+ <script type="text/javascript">
78
+ a2a_linkname="<?=str_replace('"', '\\"', $linkname)?>";
79
+ a2a_linkurl="<?=$linkurl?>";
80
+ <?=(get_option('A2A_SHARE_SAVE_hide_embeds')=='-1') ? 'a2a_hide_embeds=0;' : '' ?>
81
+ <?=(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
  <?
124
  update_option( 'A2A_SHARE_SAVE_display_in_posts_on_front_page', ($_POST['A2A_SHARE_SAVE_display_in_posts_on_front_page']=='1') ? '1':'-1' );
125
  update_option( 'A2A_SHARE_SAVE_display_in_posts', ($_POST['A2A_SHARE_SAVE_display_in_posts']=='1') ? '1':'-1' );
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>
147
  <input type="hidden" name="A2A_SHARE_SAVE_submit_hidden" value="Y">
148
 
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"<? if(get_option('A2A_SHARE_SAVE_button')=='favicon.png|16|16') echo ' checked="checked"'; ?>
155
+ style="margin:9px 0">
156
+ <img src="<?=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"<? 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="<?=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"<? 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="<?=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"<? 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="<?=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>
203
  <code>&lt;? 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"<? 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"<? 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
+
223
  <p class="submit">
224
  <input type="submit" name="Submit" value="<?php _e('Save Changes', 'A2A_SHARE_SAVE_trans_domain' ) ?>" />
225
  </p>
share_save_171_16.gif ADDED
Binary file
share_save_256_24.gif ADDED
Binary file