'internet-explorer', 'category' => 'desktop', 'license' => '', 'platform' => '' ), $atts)); $numberOfAlternatives = get_option('alt2_options_numberofalternatives'); $alt2license = $atts["license"]; $alt2platform = $atts["platform"]; if($alt2platform == '') { $alt2platform = get_option('alt2_options_platform'); } if($alt2license == '') { $alt2license = get_option('alt2_options_license'); } if($numberOfAlternatives == "") { $numberOfAlternatives = "5"; } $wp_alt2_theme = get_option('alt2_options_theme'); if($wp_alt2_theme == "") { $wp_alt2_theme = "default"; } if (is_single()){ $mycomma = ','; $alt2settings = $numberOfAlternatives.$mycomma.$atts["app"].$mycomma.$atts["category"].$mycomma.$wp_alt2_theme.$mycomma.is_preview().$mycomma.$alt2license.$mycomma.$alt2platform; return "
"; } } /* Add the references to the javascript and ensure that jQuery is there. */ function alt2_scripts() { if (is_single()){ $wp_alt2_plugin_url = trailingslashit( get_bloginfo('wpurl') ).PLUGINDIR.'/'. dirname( plugin_basename(__FILE__) ); wp_enqueue_script('jquery'); wp_enqueue_script('wp_alt2_script', $wp_alt2_plugin_url.'/alt2.js', array('jquery')); } } //function alt2_add_alt2url( &$links ) { // array_push($links,'http://dev.ohso.se/desktop/adobe-photoshop/'); //} // Add the CSS. function alt2_header() { $wp_alt2_theme = get_option('alt2_options_theme'); $wp_alt2_plugin_url = trailingslashit( get_bloginfo('wpurl') ).PLUGINDIR.'/'. dirname( plugin_basename(__FILE__) ); if($wp_alt2_theme == "") { $wp_alt2_theme = "default"; } if($wp_alt2_theme != "minimal") { echo '' . "\n"; } } // Hook it up add_shortcode('alt2app', 'alt2app_func'); add_action('wp_print_scripts', 'alt2_scripts'); add_action('wp_head', 'alt2_header', 1); //add_action('pre_ping', 'alt2_add_alt2url' ); // ********************** // ADMIN // ********************** function alt2_admin_menu() { add_options_page('AlternativeTo Options', 'AlternativeTo', 'administrator', 'alternativeto-options', 'alt2_admin_markup'); } function alt2_admin_markup() { ?>

AlternativeTo - Options

Use [alt2app app=internet-explorer category=desktop] to list alternatives to Internet Explorer.

License and platform filters

You can also add filter for license and platform.

  1. License filters: free,opensource and commercial. If you use free all applications that has Free, Open Source, Free with limited functionality and Free for personal use will be listed. Open Source and Commercial just list the items that has these licenses.
  2. Platform filter: You can filter by multiple platforms but they will do a OR query. So if you send in windows|linux we will give you all items that is Windows OR Linux.

More examples

Requries <?php wp_head(); ?> in the header.php file for it to work. If you have any problems at all please send a mail to hello@alternativeto.net and we try to track down any bugs.

Show number of alternatives
Default license
Default platform
Default theme