Changeset 233405
- Timestamp:
- 04/25/2010 11:04:00 AM (16 years ago)
- Location:
- wp-facebook-like-button/trunk
- Files:
-
- 1 added
- 3 edited
-
facebook-like-button.php (modified) (15 diffs)
-
readme.txt (modified) (2 diffs)
-
screenshot-1.jpg (modified) (previous)
-
screenshot-2.jpg (added)
Legend:
- Unmodified
- Added
- Removed
-
wp-facebook-like-button/trunk/facebook-like-button.php
r233192 r233405 4 4 Plugin URI: http://www.dolcebita.com/wordpress/facebook-like-button/ 5 5 Description: The Like button enables users to make connections to your pages and share content back to their friends on Facebook with one click. 6 Version: 0. 26 Version: 0.3 7 7 Author: Marcos Esperon 8 8 Author URI: http://www.dolcebita.com/ … … 35 35 $colorscheme = (get_option('fl_colorscheme') == null) ? 'light' : get_option('fl_colorscheme'); 36 36 $locale = (get_option('fl_locale') == null) ? '' : get_option('fl_locale'); 37 $style = (get_option('fl_style') == null) ? '' : get_option('fl_style'); 37 38 38 $output = '< iframe src="http://www.facebook.com/plugins/like.php?href='.$url.'&layout='.$layout.'&show_faces='.$show_faces.'&width='.$width.'&action='.$action.'&font='.$font.'&colorscheme='.$colorscheme.'&locale='.$locale.'" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:'.$width.'px; height:'.$height.'px"></iframe>';39 $output = '<div id="fb-like" style="'.$style.'"><iframe src="http://www.facebook.com/plugins/like.php?href='.$url.'&layout='.$layout.'&show_faces='.$show_faces.'&width='.$width.'&action='.$action.'&font='.$font.'&colorscheme='.$colorscheme.'&locale='.$locale.'" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:'.$width.'px; height:'.$height.'px"></iframe></div>'; 39 40 40 41 return $output; … … 99 100 ?> 100 101 <input type="hidden" name="action" value="update" /> 101 <input type="hidden" name="page_options" value="fl_display_post,fl_display_page,fl_display_front,fl_where,fl_layout,fl_show_faces,fl_width,fl_height,fl_action,fl_font,fl_colorscheme,fl_locale " />102 <input type="hidden" name="page_options" value="fl_display_post,fl_display_page,fl_display_front,fl_where,fl_layout,fl_show_faces,fl_width,fl_height,fl_action,fl_font,fl_colorscheme,fl_locale,fl_style" /> 102 103 <?php 103 104 } 104 105 ?> 105 <p><em>If you have any problem or suggestion please leave your comment at <a href="http://www.dolcebita.com/wordpress/facebook-like-button/">dolcebita.com</a> .</em></p>106 <p><em>If you have any problem or suggestion please leave your comment at <a href="http://www.dolcebita.com/wordpress/facebook-like-button/">dolcebita.com</a> or visit <a href="http://developers.facebook.com/docs/reference/plugins/like">http://developers.facebook.com/docs/reference/plugins/like</a>.</em></p> 106 107 <h3>Options</h3> 107 108 <table class="form-table" cellspacing="2" cellpadding="5" width="100%"> … … 112 113 </th> 113 114 <td> 114 <p> 115 <input type="checkbox" value="1" <?php if (get_option('fl_display_post') == '1') echo 'checked="checked"'; ?> name="fl_display_post" id="fl_display_post" group="fl_display"/> 116 <label for="fl_display_post">Display the URL on posts</label> 117 </p> 118 <p> 119 <input type="checkbox" value="1" <?php if (get_option('fl_display_page') == '1') echo 'checked="checked"'; ?> name="fl_display_page" id="fl_display_page" group="fl_display"/> 120 <label for="fl_display_page">Display the URL on pages</label> 121 </p> 122 <p> 123 <input type="checkbox" value="1" <?php if (get_option('fl_display_front') == '1') echo 'checked="checked"'; ?> name="fl_display_front" id="fl_display_front" group="fl_display"/> 124 <label for="fl_display_front">Display the URL on the front page (home)</label> 125 </p> 115 <input type="checkbox" value="1" <?php if (get_option('fl_display_post') == '1') echo 'checked="checked"'; ?> name="fl_display_post" id="fl_display_post" group="fl_display" onblur="preview();"/> 116 <label for="fl_display_post">Display the URL on posts</label> 117 <br /> 118 <input type="checkbox" value="1" <?php if (get_option('fl_display_page') == '1') echo 'checked="checked"'; ?> name="fl_display_page" id="fl_display_page" group="fl_display" onblur="preview();"/> 119 <label for="fl_display_page">Display the URL on pages</label> 120 <br /> 121 <input type="checkbox" value="1" <?php if (get_option('fl_display_front') == '1') echo 'checked="checked"'; ?> name="fl_display_front" id="fl_display_front" group="fl_display" onblur="preview();"/> 122 <label for="fl_display_front">Display the URL on the front page (home)</label> 126 123 </td> 127 124 </tr> … … 130 127 </th> 131 128 <td> 132 <p> 133 <select name="fl_where"> 134 <option <?php if (get_option('fl_where') == 'before') echo 'selected="selected"'; ?> value="before">Before</option> 135 <option <?php if (get_option('fl_where') == 'after') echo 'selected="selected"'; ?> value="after">After</option> 136 <option <?php if (get_option('fl_where') == 'beforeandafter') echo 'selected="selected"'; ?> value="beforeandafter">Before and After</option> 137 </select> 138 </p> 129 <select name="fl_where" id="fl_where" onchange="preview();"> 130 <option <?php if (get_option('fl_where') == 'before') echo 'selected="selected"'; ?> value="before">Before</option> 131 <option <?php if (get_option('fl_where') == 'after') echo 'selected="selected"'; ?> value="after">After</option> 132 <option <?php if (get_option('fl_where') == 'beforeandafter') echo 'selected="selected"'; ?> value="beforeandafter">Before and After</option> 133 </select> 139 134 </td> 140 135 </tr> … … 144 139 </th> 145 140 <td> 146 <p> 147 <select name="fl_layout"> 148 <option <?php if (get_option('fl_layout') == 'standard') echo 'selected="selected"'; ?> value="standard">Standard</option> 149 <option <?php if (get_option('fl_layout') == 'button_count') echo 'selected="selected"'; ?> value="button_count">Button Count</option> 150 </select> 151 </p> 141 <select name="fl_layout" id="fl_layout" onchange="preview();"> 142 <option <?php if (get_option('fl_layout') == 'standard') echo 'selected="selected"'; ?> value="standard">Standard</option> 143 <option <?php if (get_option('fl_layout') == 'button_count') echo 'selected="selected"'; ?> value="button_count">Button Count</option> 144 </select> 152 145 </td> 153 146 </tr> … … 157 150 </th> 158 151 <td> 159 <p> 160 <input type="checkbox" value="1" <?php if (get_option('fl_show_faces') == '1') echo 'checked="checked"'; ?> name="fl_show_faces" id="fl_show_faces" /> 161 </p> 152 <input type="checkbox" value="1" <?php if (get_option('fl_show_faces') == '1') echo 'checked="checked"'; ?> name="fl_show_faces" id="fl_show_faces" onclick="preview();" /> 162 153 </td> 163 154 </tr> … … 167 158 </th> 168 159 <td> 169 <p> 170 <input type="text" value="<?php echo get_option('fl_width'); ?>" name="fl_width" id="fl_width" size="5" /> px 171 </p> 160 <input type="text" value="<?php echo get_option('fl_width'); ?>" name="fl_width" id="fl_width" size="5" onblur="preview();" /> px 172 161 </td> 173 162 </tr> … … 177 166 </th> 178 167 <td> 179 <p> 180 <input type="text" value="<?php echo get_option('fl_height'); ?>" name="fl_height" id="fl_height" size="5" /> px 181 </p> 168 <input type="text" value="<?php echo get_option('fl_height'); ?>" name="fl_height" id="fl_height" size="5" onblur="preview();" /> px 182 169 </td> 183 170 </tr> … … 186 173 Verb to Display 187 174 </th> 188 <td> 189 <p> 190 <select name="fl_action"> 191 <option <?php if (get_option('fl_action') == 'like') echo 'selected="selected"'; ?> value="like">Like</option> 192 <option <?php if (get_option('fl_action') == 'recommend') echo 'selected="selected"'; ?> value="recommend">Recommend</option> 193 </select> 194 </p> 175 <td> 176 <select name="fl_action" id="fl_action" onchange="preview();"> 177 <option <?php if (get_option('fl_action') == 'like') echo 'selected="selected"'; ?> value="like">Like</option> 178 <option <?php if (get_option('fl_action') == 'recommend') echo 'selected="selected"'; ?> value="recommend">Recommend</option> 179 </select> 195 180 </td> 196 181 </tr> … … 200 185 </th> 201 186 <td> 202 <p> 203 <select name="fl_font"> 204 <option <?php if (get_option('fl_font') == '') echo 'selected="selected"'; ?> value=""></option> 205 <option <?php if (get_option('fl_font') == 'arial') echo 'selected="selected"'; ?> value="arial">Arial</option> 206 <option <?php if (get_option('fl_font') == 'lucida grande') echo 'selected="selected"'; ?> value="lucida grande">Lucida Grande</option> 207 <option <?php if (get_option('fl_font') == 'segoe ui') echo 'selected="selected"'; ?> value="segoe ui">Segoe UI</option> 208 <option <?php if (get_option('fl_font') == 'tahoma') echo 'selected="selected"'; ?> value="tahoma">Tahoma</option> 209 <option <?php if (get_option('fl_font') == 'trebuchet+ms') echo 'selected="selected"'; ?> value="trebuchet+ms">Trebuchet MS</option> 210 <option <?php if (get_option('fl_font') == 'verdana') echo 'selected="selected"'; ?> value="verdana">Verdana</option> 211 </select> 212 </p> 187 <select name="fl_font" id="fl_font" onchange="preview();"> 188 <option <?php if (get_option('fl_font') == '') echo 'selected="selected"'; ?> value=""></option> 189 <option <?php if (get_option('fl_font') == 'arial') echo 'selected="selected"'; ?> value="arial">Arial</option> 190 <option <?php if (get_option('fl_font') == 'lucida grande') echo 'selected="selected"'; ?> value="lucida grande">Lucida Grande</option> 191 <option <?php if (get_option('fl_font') == 'segoe ui') echo 'selected="selected"'; ?> value="segoe ui">Segoe UI</option> 192 <option <?php if (get_option('fl_font') == 'tahoma') echo 'selected="selected"'; ?> value="tahoma">Tahoma</option> 193 <option <?php if (get_option('fl_font') == 'trebuchet+ms') echo 'selected="selected"'; ?> value="trebuchet+ms">Trebuchet MS</option> 194 <option <?php if (get_option('fl_font') == 'verdana') echo 'selected="selected"'; ?> value="verdana">Verdana</option> 195 </select> 213 196 </td> 214 197 </tr> … … 218 201 </th> 219 202 <td> 220 <p> 221 <select name="fl_colorscheme"> 222 <option <?php if (get_option('fl_colorscheme') == 'light') echo 'selected="selected"'; ?> value="light">Light</option> 223 <option <?php if (get_option('fl_colorscheme') == 'dark') echo 'selected="selected"'; ?> value="dark">Dark</option> 224 </select> 225 </p> 203 <select name="fl_colorscheme" id="fl_colorscheme" onchange="preview();"> 204 <option <?php if (get_option('fl_colorscheme') == 'light') echo 'selected="selected"'; ?> value="light">Light</option> 205 <option <?php if (get_option('fl_colorscheme') == 'dark') echo 'selected="selected"'; ?> value="dark">Dark</option> 206 </select> 226 207 </td> 227 208 </tr> … … 231 212 </th> 232 213 <td> 233 <p> 234 <input type="text" value="<?php echo get_option('fl_locale'); ?>" name="fl_locale" id="fl_locale" size="5" /> (en_US, es_ES, gl_ES, it_IT, fr_FR...) 235 </p> 214 <input type="text" value="<?php echo get_option('fl_locale'); ?>" name="fl_locale" id="fl_locale" size="5" onblur="preview();" /> (en_US, es_ES, gl_ES, it_IT, fr_FR...) 215 </td> 216 </tr> 217 <tr> 218 <th scope="row"> 219 CSS Style 220 </th> 221 <td> 222 <input type="text" value="<?php echo get_option('fl_style'); ?>" name="fl_style" id="fl_style" onblur="preview();" /> 223 <span class="description">Add additional CSS style to the div.</span> 236 224 </td> 237 225 </tr> … … 241 229 </p> 242 230 </form> 231 <h3>Preview</h3> 232 <div id="fl_preview"></div> 243 233 </div> 244 234 <?php 245 235 } 236 237 function fl_admin_head() { ?> 238 239 <script type="text/javascript"> 240 jQuery(document).ready(function() { 241 preview(); 242 }); 243 244 function preview() { 245 var style = jQuery('#fl_style').val(); 246 var layout = jQuery('#fl_layout').val(); 247 var faces = jQuery('#fl_show_faces').is(':checked') ? true : false; 248 var width = jQuery('#fl_width').val(); 249 var height = jQuery('#fl_height').val(); 250 var verb = jQuery('#fl_action').val(); 251 var font = jQuery('#fl_font').val(); 252 var color = jQuery('#fl_colorscheme').val(); 253 var locale = jQuery('#fl_locale').val(); 254 255 var output = '<div class="fl-like" style="'+ style +'"><iframe src="http://www.facebook.com/plugins/like.php?href=&layout='+ layout +'&show_faces='+ faces +'&width='+ width +'&action='+ verb +'&font='+ font +'&colorscheme='+ color +'&locale='+ locale +'" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:'+ width +'px; height:'+ height +'px"></iframe></div>'; 256 257 jQuery('#fl_preview').html(output); 258 } 259 </script> 260 261 <?php } 246 262 247 263 function fl_init(){ … … 265 281 add_action('admin_init', 'fl_init'); 266 282 add_action('admin_menu', 'fl_option_page'); 283 add_action('admin_head', 'fl_admin_head'); 267 284 } 268 285 -
wp-facebook-like-button/trunk/readme.txt
r233247 r233405 4 4 Requires at least: 2.0.0 5 5 Tested up to: 2.9 6 Stable tag: 0. 26 Stable tag: 0.3 7 7 8 8 The Like button enables users to make connections to your pages and share content back to their friends on Facebook with one click. 9 10 More info at: http://www.dolcebita.com/wordpress/facebook-like-button/ 9 11 10 12 == Description == … … 24 26 25 27 == Screenshots == 26 1. Facebook Like Button 28 1. Options 29 30 2. Facebook Like Button 27 31 28 32 == Changelog == 33 34 = 0.3 = 35 * Additional CSS support. 36 * Live preview in the Settings page. 29 37 30 38 = 0.2 =
Note: See TracChangeset
for help on using the changeset viewer.