Changeset 407610
- Timestamp:
- 07/09/2011 09:36:17 PM (15 years ago)
- Location:
- links2tabs/trunk
- Files:
-
- 3 edited
-
links2tabs.php (modified) (4 diffs)
-
links2tabs_settings_page.php (modified) (8 diffs)
-
readme.txt (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
links2tabs/trunk/links2tabs.php
r406991 r407610 7 7 Plugin URI: http://links2tabs.com/plugins/wordpress/ 8 8 Description: In addition to link bundling services <a href="http://brief.ly/" target="_blank" ><em>Brief.ly</em></a>, <a href="http://links2.me/" target="_blank" ><em>Links2.Me</em></a>, <a href="http://many.at/" target="_blank" ><em>Many.at</em></a>, Links2Tabs plugin automatically generates the list of references at the bottom of each post and/or page and bundles them into handy links that open everything with one click. If you also want your visitors to open all recent items from your RSS feed with one click, consider installing Feed2Tabs plugin. 9 Version: 0.0. 49 Version: 0.0.5 10 10 Author: Name.ly 11 11 Author URI: http://name.ly/ … … 89 89 "show_on_pages" => "yes", 90 90 //"show_on_home" => "yes", 91 "skip_double_links" => "yes", 91 92 "include_links_with_images" => "yes", 92 93 "include_internal_links" => "yes", … … 205 206 $bundles = array (); 206 207 $bundlecaptions = array (); 208 $foundlinks = array (); 207 209 $number_of_bundles = 1; 208 210 $current_link_in_current_bundle = 1; … … 338 340 } // end of if ( $clean_caption ) 339 341 } // end of if ( false !== $hrefend ) 342 343 // we have found a URL and its Caption 344 345 // check for double links, if requested 346 if ( "yes" == $links2tabs_options [ "skip_double_links" ] ) { 347 $link_key = array_search ( $url, $foundlinks ); 348 if ( false === $link_key ) { 349 // a new unique reference found, remember it and proceed further 350 $foundlinks [] = $url; 351 } else { 352 if ( "yes" == $links2tabs_options [ "add_reference_tags" ] ) { 353 $rawlinks [ $key ] .= ' [' . ( "yes" == $links2tabs_options [ "link_reference_tags" ] ? '<a href="#links2tabs">' . ( $link_key + 1 ) . '</a>' : ( $link_key + 1 ) ) . ']'; 354 } // end of if ( "yes" == $links2tabs_options [ "add_reference_tags" ] ) 355 continue; 356 } // end of if ( false === $link_key ) 357 } else { 358 $foundlinks [] = $url; 359 } // end of if ( "yes" == $links2tabs_options [ "skip_double_links" ] ) 360 340 361 // limit the tab caption length 341 362 if ( LINKS2TABS_MAX_TAB_TITLE ) { -
links2tabs/trunk/links2tabs_settings_page.php
r406764 r407610 111 111 switch ( $sid ) { 112 112 113 // Parsing & Finish 114 113 115 case "show_on_posts": 114 116 echo '<tr>' . NEW_LINE; … … 164 166 break; // end of case "show_on_home" 165 167 168 case "skip_double_links": 169 echo '<tr>' . NEW_LINE; 170 echo ' <th scope="row">' . NEW_LINE; 171 echo ' <label for="' . links2tabs_input_id_by_sid ( $sid ) . '"><strong>' . __ ( 'Skip double references:', 'links2tabs' ) . '</strong></label>' . NEW_LINE; 172 echo ' <br /><br /><i>' . __ ( 'N.B., if several double references with the same URLs are found, the title of the first one will be used in the bundle.', 'links2tabs' ) . '</i>' . NEW_LINE; 173 echo ' </th>' . NEW_LINE; 174 echo ' <td>' . NEW_LINE; 175 echo '<select name="' . links2tabs_input_id_by_sid ( $sid ) . '" id="' . links2tabs_input_id_by_sid ( $sid ) . '" >' . NEW_LINE; 176 echo ' <option ' . ( 'yes' == $value ? 'selected ' : '' ) . 'value="yes">' . __ ( 'Yes', 'links2tabs' ) . '</option>' . NEW_LINE; 177 echo ' <option ' . ( 'yes' != $value ? 'selected ' : '' ) . 'value="no">' . __ ( 'No', 'links2tabs' ) . '</option>' . NEW_LINE; 178 echo '</select><br />' . NEW_LINE; 179 echo ' </td>' . NEW_LINE; 180 echo '</tr>' . NEW_LINE; 181 break; // end of case "skip_double_links" 182 166 183 case "include_links_with_images": 167 184 echo '<tr>' . NEW_LINE; … … 213 230 echo ' <th scope="row">' . NEW_LINE; 214 231 echo ' <label for="' . links2tabs_input_id_by_sid ( $sid ) . '"><strong>' . __ ( 'Link reference tags to the bundle:', 'links2tabs' ) . '</strong></label>' . NEW_LINE; 215 echo ' <br /><br /><i>' . __ ( 'If "Add reference tags" above is <code> yes</code>, should the plugin link each added tag to the result in the page/post bottom?', 'links2tabs' ) . '</i>' . NEW_LINE;232 echo ' <br /><br /><i>' . __ ( 'If "Add reference tags" above is <code>Yes</code>, should the plugin link each added tag to the result in the page/post bottom?', 'links2tabs' ) . '</i>' . NEW_LINE; 216 233 echo ' </th>' . NEW_LINE; 217 234 echo ' <td>' . NEW_LINE; … … 223 240 echo '</tr>' . NEW_LINE; 224 241 break; // end of case "link_reference_tags" 225 226 case "open_in_tabs":227 echo '<tr>' . NEW_LINE;228 echo ' <th scope="row">' . NEW_LINE;229 echo ' ' . __ ( '', 'links2tabs' ) . NEW_LINE;230 echo ' </th>' . NEW_LINE;231 echo ' <td>' . NEW_LINE;232 echo ' <strong>' . __ ( 'Bundled Tabs', 'links2tabs' ) . '</strong>' . NEW_LINE;233 echo ' </td>' . NEW_LINE;234 echo '</tr>' . NEW_LINE;235 echo '<tr>' . NEW_LINE;236 echo ' <th scope="row">' . NEW_LINE;237 echo ' <label for="' . links2tabs_input_id_by_sid ( $sid ) . '"><strong>' . __ ( 'Open references in tabs:', 'links2tabs' ) . '</strong></label>' . NEW_LINE;238 echo ' <br /><br /><i>' . __ ( 'Enables or disables automatic link opening in separate tabs. Please mind, that if ToC is set to <code>off</code> below, tabs will be enabled anyway.', 'links2tabs' ) . '</i>' . NEW_LINE;239 echo ' </th>' . NEW_LINE;240 echo ' <td>' . NEW_LINE;241 echo '<select name="' . links2tabs_input_id_by_sid ( $sid ) . '" id="' . links2tabs_input_id_by_sid ( $sid ) . '" >' . NEW_LINE;242 echo ' <option ' . ( 'yes' == $value ? 'selected ' : '' ) . 'value="yes">' . __ ( 'Yes', 'links2tabs' ) . '</option>' . NEW_LINE;243 echo ' <option ' . ( 'yes' != $value ? 'selected ' : '' ) . 'value="no">' . __ ( 'No', 'links2tabs' ) . '</option>' . NEW_LINE;244 echo '</select><br />' . NEW_LINE;245 echo ' </td>' . NEW_LINE;246 echo '</tr>' . NEW_LINE;247 break; // end of case "open_in_tabs"248 242 249 243 case "links_per_bundle": … … 279 273 break; // end of case "min_number_of_links" 280 274 275 case "one_bundle_caption": 276 echo '<tr>' . NEW_LINE; 277 echo ' <th scope="row">' . NEW_LINE; 278 echo ' <label for="' . links2tabs_input_id_by_sid ( $sid ) . '"><strong>' . __ ( 'Text before one bundle:', 'links2tabs' ) . '</strong></label>' . NEW_LINE; 279 echo ' <br /><br /><i>' . __ ( 'Text to appear before the link in case there is only one reference bundle.', 'links2tabs' ) . '</i>' . NEW_LINE; 280 echo ' </th>' . NEW_LINE; 281 echo ' <td>' . NEW_LINE; 282 echo '<input name="' . links2tabs_input_id_by_sid ( $sid ) . '" id="' . links2tabs_input_id_by_sid ( $sid ) . '" value="' . esc_attr ( $value ) . '" size="80" />' . NEW_LINE; 283 echo ' </td>' . NEW_LINE; 284 echo '</tr>' . NEW_LINE; 285 break; // end of case "one_bundle_caption" 286 287 case "many_bundles_caption": 288 echo '<tr>' . NEW_LINE; 289 echo ' <th scope="row">' . NEW_LINE; 290 echo ' <label for="' . links2tabs_input_id_by_sid ( $sid ) . '"><strong>' . __ ( 'Text before many bundles:', 'links2tabs' ) . '</strong></label>' . NEW_LINE; 291 echo ' <br /><br /><i>' . __ ( 'Text to appear before the links in case there are several bundles.', 'links2tabs' ) . '</i>' . NEW_LINE; 292 echo ' </th>' . NEW_LINE; 293 echo ' <td>' . NEW_LINE; 294 echo '<input name="' . links2tabs_input_id_by_sid ( $sid ) . '" id="' . links2tabs_input_id_by_sid ( $sid ) . '" value="' . esc_attr ( $value ) . '" size="80" />' . NEW_LINE; 295 echo ' </td>' . NEW_LINE; 296 echo '</tr>' . NEW_LINE; 297 break; // end of case "many_bundles_caption" 298 299 case "target": 300 echo '<tr>' . NEW_LINE; 301 echo ' <th scope="row">' . NEW_LINE; 302 echo ' <label for="' . links2tabs_input_id_by_sid ( $sid ) . '"><strong>' . __ ( 'Link target:', 'links2tabs' ) . '</strong></label>' . NEW_LINE; 303 echo ' <br /><br /><i>' . __ ( 'Where to open the bundled references?', 'links2tabs' ) . '</i>' . NEW_LINE; 304 echo ' </th>' . NEW_LINE; 305 echo ' <td>' . NEW_LINE; 306 echo '<select name="' . links2tabs_input_id_by_sid ( $sid ) . '" id="' . links2tabs_input_id_by_sid ( $sid ) . '" >' . NEW_LINE; 307 echo ' <option ' . ( '_blank' == $value ? 'selected ' : '' ) . 'value="_blank">' . __ ( 'New Window', 'links2tabs' ) . '</option>' . NEW_LINE; 308 echo ' <option ' . ( '_blank' != $value ? 'selected ' : '' ) . 'value="_same">' . __ ( 'Same Window', 'links2tabs' ) . '</option>' . NEW_LINE; 309 echo '</select><br />' . NEW_LINE; 310 echo ' </td>' . NEW_LINE; 311 echo '</tr>' . NEW_LINE; 312 break; // end of case "target" 313 281 314 case "visibility": 282 315 echo '<tr>' . NEW_LINE; … … 296 329 break; // end of case "visibility" 297 330 298 case "target": 299 echo '<tr>' . NEW_LINE; 300 echo ' <th scope="row">' . NEW_LINE; 301 echo ' <label for="' . links2tabs_input_id_by_sid ( $sid ) . '"><strong>' . __ ( 'Link target:', 'links2tabs' ) . '</strong></label>' . NEW_LINE; 302 echo ' <br /><br /><i>' . __ ( 'Where to open the bundled references?', 'links2tabs' ) . '</i>' . NEW_LINE; 303 echo ' </th>' . NEW_LINE; 304 echo ' <td>' . NEW_LINE; 305 echo '<select name="' . links2tabs_input_id_by_sid ( $sid ) . '" id="' . links2tabs_input_id_by_sid ( $sid ) . '" >' . NEW_LINE; 306 echo ' <option ' . ( '_blank' == $value ? 'selected ' : '' ) . 'value="_blank">' . __ ( 'New Window', 'links2tabs' ) . '</option>' . NEW_LINE; 307 echo ' <option ' . ( '_blank' != $value ? 'selected ' : '' ) . 'value="_same">' . __ ( 'Same Window', 'links2tabs' ) . '</option>' . NEW_LINE; 308 echo '</select><br />' . NEW_LINE; 309 echo ' </td>' . NEW_LINE; 310 echo '</tr>' . NEW_LINE; 311 break; // end of case "target" 312 313 case "one_bundle_caption": 314 echo '<tr>' . NEW_LINE; 315 echo ' <th scope="row">' . NEW_LINE; 316 echo ' <label for="' . links2tabs_input_id_by_sid ( $sid ) . '"><strong>' . __ ( 'Text before one bundle:', 'links2tabs' ) . '</strong></label>' . NEW_LINE; 317 echo ' <br /><br /><i>' . __ ( 'Text to appear before the link in case there is only one reference bundle.', 'links2tabs' ) . '</i>' . NEW_LINE; 318 echo ' </th>' . NEW_LINE; 319 echo ' <td>' . NEW_LINE; 320 echo '<input name="' . links2tabs_input_id_by_sid ( $sid ) . '" id="' . links2tabs_input_id_by_sid ( $sid ) . '" value="' . esc_attr ( $value ) . '" size="80" />' . NEW_LINE; 321 echo ' </td>' . NEW_LINE; 322 echo '</tr>' . NEW_LINE; 323 break; // end of case "one_bundle_caption" 324 325 case "many_bundles_caption": 326 echo '<tr>' . NEW_LINE; 327 echo ' <th scope="row">' . NEW_LINE; 328 echo ' <label for="' . links2tabs_input_id_by_sid ( $sid ) . '"><strong>' . __ ( 'Text before many bundles:', 'links2tabs' ) . '</strong></label>' . NEW_LINE; 329 echo ' <br /><br /><i>' . __ ( 'Text to appear before the links in case there are several bundles.', 'links2tabs' ) . '</i>' . NEW_LINE; 330 echo ' </th>' . NEW_LINE; 331 echo ' <td>' . NEW_LINE; 332 echo '<input name="' . links2tabs_input_id_by_sid ( $sid ) . '" id="' . links2tabs_input_id_by_sid ( $sid ) . '" value="' . esc_attr ( $value ) . '" size="80" />' . NEW_LINE; 333 echo ' </td>' . NEW_LINE; 334 echo '</tr>' . NEW_LINE; 335 break; // end of case "many_bundles_caption" 331 // Name.ly/Frames appearance 332 333 case "open_in_tabs": 334 echo '<tr>' . NEW_LINE; 335 echo ' <th scope="row">' . NEW_LINE; 336 echo ' ' . __ ( '', 'links2tabs' ) . NEW_LINE; 337 echo ' </th>' . NEW_LINE; 338 echo ' <td>' . NEW_LINE; 339 echo ' <strong>' . __ ( 'Bundled Tabs', 'links2tabs' ) . '</strong>' . NEW_LINE; 340 echo ' </td>' . NEW_LINE; 341 echo '</tr>' . NEW_LINE; 342 echo '<tr>' . NEW_LINE; 343 echo ' <th scope="row">' . NEW_LINE; 344 echo ' <label for="' . links2tabs_input_id_by_sid ( $sid ) . '"><strong>' . __ ( 'Open references in tabs:', 'links2tabs' ) . '</strong></label>' . NEW_LINE; 345 echo ' <br /><br /><i>' . __ ( 'Enables or disables automatic link opening in separate tabs. Please mind, that if ToC is set to <code>off</code> below, tabs will be enabled anyway.', 'links2tabs' ) . '</i>' . NEW_LINE; 346 echo ' </th>' . NEW_LINE; 347 echo ' <td>' . NEW_LINE; 348 echo '<select name="' . links2tabs_input_id_by_sid ( $sid ) . '" id="' . links2tabs_input_id_by_sid ( $sid ) . '" >' . NEW_LINE; 349 echo ' <option ' . ( 'yes' == $value ? 'selected ' : '' ) . 'value="yes">' . __ ( 'Yes', 'links2tabs' ) . '</option>' . NEW_LINE; 350 echo ' <option ' . ( 'yes' != $value ? 'selected ' : '' ) . 'value="no">' . __ ( 'No', 'links2tabs' ) . '</option>' . NEW_LINE; 351 echo '</select><br />' . NEW_LINE; 352 echo ' </td>' . NEW_LINE; 353 echo '</tr>' . NEW_LINE; 354 break; // end of case "open_in_tabs" 336 355 337 356 case "default_reference_caption": … … 394 413 echo '</tr>' . NEW_LINE; 395 414 break; // end of case "toc" 415 416 // Advanced settings 396 417 397 418 case "custom_api_base": … … 446 467 echo '<input name="' . links2tabs_input_id_by_sid ( $sid ) . '" id="' . links2tabs_input_id_by_sid ( $sid ) . '" value="' . esc_attr ( implode ( " ", $value ) ) . '" size="80" /><br />' . NEW_LINE; 447 468 echo '<small>' . __ ( 'E.g., adding <code>.zip</code> will exclude all ZIP archives, <code>Domain.com</code> - all links referring to domain.com.', 'links2tabs' ) . '</small><br />' . NEW_LINE; 448 echo '<small>' . __ ( 'N.B. These checks are case irrelevant.', 'links2tabs' ) . '</small><br />' . NEW_LINE;469 echo '<small>' . __ ( 'N.B. These checks are case-insensitive.', 'links2tabs' ) . '</small><br />' . NEW_LINE; 449 470 echo '<small>' . __ ( 'N.B. It is also possible to white list certain URLs, meaning no other domain names will be allowed.<br />This should be done via Custom API bases described above.', 'links2tabs' ) . '</small><br />' . NEW_LINE; 450 471 echo ' </td>' . NEW_LINE; -
links2tabs/trunk/readme.txt
r406991 r407610 5 5 Requires at least: 2.8 6 6 Tested up to: 3.2 7 Stable tag: 0.0. 47 Stable tag: 0.0.5 8 8 License: GPLv2 or later 9 9 … … 28 28 * Show on posts 29 29 * Show on pages 30 * Skip double references (If several double references with the same URLs are found, the title of the first one will be used in the bundle.) 30 31 * Include links with images (When set to No, references with images will be skipped) 31 32 * Include internal links (Choose whether or not to bundle internal links, i.e., those referring to this site's domain). … … 107 108 == Changelog == 108 109 109 = 0.0. 1=110 = 0.0.5 = 110 111 111 * Initial version. 112 * Created and tested. 112 * Added a new option of skipping double references. 113 114 = 0.0.4 = 115 116 * By default, the plugin will now exclude mail and phone references. 117 * Added a demo page to readme.txt. 118 119 = 0.0.3 = 120 121 * Added a new option of the plugin filter priority. 122 * Changed the default value of the bundle size from 12 to 10 to make it more intuitive. 123 * Changed the default value of the threshold links from 2 to 3 to make it more practical. 124 * Added a new option allowing to black list some URLs by keyword. 113 125 114 126 = 0.0.2 = … … 116 128 * Support for WP prior to version 3.0.0 (before function get_site_url was introduced). 117 129 118 = 0.0. 3=130 = 0.0.1 = 119 131 120 * Added new option of the plugin filter priority. 121 * Changed the default value of the bundle size from 12 to 10 to make it more intuitive. 122 * Changed the default value of the threshold links from 2 to 3 to make it more practical. 123 * Added new option allowing to black list some URLs by keyword. 124 125 = 0.0.4 = 126 127 * By default, the plugin will now exclude mail and phone references. 128 * Added a demo page to readme.txt. 132 * Initial version. 133 * Created and tested. 129 134 130 135
Note: See TracChangeset
for help on using the changeset viewer.