Array( 'favicon' => 'barrapunto.png', 'url' => 'http://barrapunto.com/submit.pl?subj=TITLE&story=PERMALINK', ), 'Bitacoras.com' => Array( 'favicon' => 'bitacoras.png', 'url' => 'http://bitacoras.com/anotaciones/PERMALINK', ), 'BlinkList' => Array( 'favicon' => 'blinklist.png', 'url' => 'http://www.blinklist.com/index.php?Action=Blink/addblink.php&Url=PERMALINK&Title=TITLE', ), 'BlogMemes Fr' => Array( 'favicon' => 'blogmemes.png', 'url' => 'http://www.blogmemes.fr/post.php?url=PERMALINK&title=TITLE', ), 'BlogMemes Sp' => Array( 'favicon' => 'blogmemes.png', 'url' => 'http://www.blogmemes.com/post.php?url=PERMALINK&title=TITLE', ), 'blogmarks' => Array( 'favicon' => 'blogmarks.png', 'url' => 'http://blogmarks.net/my/new.php?mini=1&simple=1&url=PERMALINK&title=TITLE', ), 'Blogosphere News' => Array( 'favicon' => 'blogospherenews.png', 'url' => 'http://www.blogospherenews.com/submit.php?url=PERMALINK&title=TITLE', ), 'blogtercimlap' => Array( 'favicon' => 'blogter.png', 'url' => 'http://cimlap.blogter.hu/index.php?action=suggest_link&title=TITLE&url=PERMALINK', ), 'Faves' => Array( 'favicon' => 'bluedot.png', 'url' => 'http://faves.com/Authoring.aspx?u=PERMALINK&title=TITLE', ), 'co.mments' => Array( 'favicon' => 'co.mments.png', 'url' => 'http://co.mments.com/track?url=PERMALINK&title=TITLE', ), 'connotea' => Array( 'favicon' => 'connotea.png', 'url' => 'http://www.connotea.org/addpopup?continue=confirm&uri=PERMALINK&title=TITLE&description=EXCERPT', ), 'Current' => Array( 'favicon' => 'current.png', 'url' => 'http://current.com/clipper.htm?url=PERMALINK&title=TITLE' ), 'del.icio.us' => Array( 'favicon' => 'delicious.png', 'url' => 'http://delicious.com/post?url=PERMALINK&title=TITLE&notes=EXCERPT', ), 'Design Float' => Array( 'favicon' => 'designfloat.png', 'url' => 'http://www.designfloat.com/submit.php?url=PERMALINK&title=TITLE', ), 'Digg' => Array( 'favicon' => 'digg.png', 'url' => 'http://digg.com/submit?phase=2&url=PERMALINK&title=TITLE&bodytext=EXCERPT', 'description' => 'Digg', ), 'Diigo' => Array( 'favicon' => 'diigo.png', 'url' => 'http://www.diigo.com/post?url=PERMALINK&title=TITLE', ), 'DotNetKicks' => Array( 'favicon' => 'dotnetkicks.png', 'url' => 'http://www.dotnetkicks.com/kick/?url=PERMALINK&title=TITLE', ), 'DZone' => Array( 'favicon' => 'dzone.png', 'url' => 'http://www.dzone.com/links/add.html?url=PERMALINK&title=TITLE', ), 'eKudos' => Array( 'favicon' => 'ekudos.png', 'url' => 'http://www.ekudos.nl/artikel/nieuw?url=PERMALINK&title=TITLE&desc=EXCERPT', ), 'email' => Array( 'favicon' => 'email_link.png', 'url' => 'mailto:?subject=TITLE&body=PERMALINK', 'awesm_channel' => 'mailto', 'description' => __('E-mail this story to a friend!','sociable'), ), 'Facebook' => Array( 'favicon' => 'facebook.png', 'awesm_channel' => 'facebook-post', 'url' => 'http://www.facebook.com/share.php?u=PERMALINK&t=TITLE', ), 'Fark' => Array( 'favicon' => 'fark.png', 'url' => 'http://cgi.fark.com/cgi/fark/farkit.pl?h=TITLE&u=PERMALINK', ), 'Fleck' => Array( 'favicon' => 'fleck.png', 'url' => 'http://beta3.fleck.com/bookmarklet.php?url=PERMALINK&title=TITLE', ), 'FriendFeed' => Array( 'favicon' => 'friendfeed.png', 'url' => 'http://www.friendfeed.com/share?title=TITLE&link=PERMALINK', ), 'FSDaily' => Array( 'favicon' => 'fsdaily.png', 'url' => 'http://www.fsdaily.com/submit?url=PERMALINK&title=TITLE', ), 'Global Grind' => Array ( 'favicon' => 'globalgrind.png', 'url' => 'http://globalgrind.com/submission/submit.aspx?url=PERMALINK&type=Article&title=TITLE' ), 'Google' => Array ( 'favicon' => 'googlebookmark.png', 'url' => 'http://www.google.com/bookmarks/mark?op=edit&bkmk=PERMALINK&title=TITLE&annotation=EXCERPT', 'description' => 'Google Bookmarks' ), 'Gwar' => Array( 'favicon' => 'gwar.png', 'url' => 'http://www.gwar.pl/DodajGwar.html?u=PERMALINK', ), 'HackerNews' => Array( 'favicon' => 'hackernews.png', 'url' => 'http://news.ycombinator.com/submitlink?u=PERMALINK&t=TITLE', ), 'Haohao' => Array( 'favicon' => 'haohao.png', 'url' => 'http://www.haohaoreport.com/submit.php?url=PERMALINK&title=TITLE', ), 'HealthRanker' => Array( 'favicon' => 'healthranker.png', 'url' => 'http://healthranker.com/submit.php?url=PERMALINK&title=TITLE', ), 'HelloTxt' => Array( 'favicon' => 'hellotxt.png', 'url' => 'http://hellotxt.com/?status=TITLE+PERMALINK', ), 'Hemidemi' => Array( 'favicon' => 'hemidemi.png', 'url' => 'http://www.hemidemi.com/user_bookmark/new?title=TITLE&url=PERMALINK', ), 'Hyves' => Array( 'favicon' => 'hyves.png', 'url' => 'http://www.hyves.nl/profilemanage/add/tips/?name=TITLE&text=EXCERPT+PERMALINK&rating=5', ), 'Identi.ca' => Array( 'favicon' => 'identica.png', 'url' => 'http://identi.ca/notice/new?status_textarea=PERMALINK', ), 'IndianPad' => Array( 'favicon' => 'indianpad.png', 'url' => 'http://www.indianpad.com/submit.php?url=PERMALINK', ), 'Internetmedia' => Array( 'favicon' => 'im.png', 'url' => 'http://internetmedia.hu/submit.php?url=PERMALINK' ), 'Kirtsy' => Array( 'favicon' => 'kirtsy.png', 'url' => 'http://www.kirtsy.com/submit.php?url=PERMALINK&title=TITLE', ), 'laaik.it' => Array( 'favicon' => 'laaikit.png', 'url' => 'http://laaik.it/NewStoryCompact.aspx?uri=PERMALINK&headline=TITLE&cat=5e082fcc-8a3b-47e2-acec-fdf64ff19d12', ), 'LinkArena' => Array( 'favicon' => 'linkarena.png', 'url' => 'http://linkarena.com/bookmarks/addlink/?url=PERMALINK&title=TITLE', ), 'LinkaGoGo' => Array( 'favicon' => 'linkagogo.png', 'url' => 'http://www.linkagogo.com/go/AddNoPopup?url=PERMALINK&title=TITLE', ), 'LinkedIn' => Array( 'favicon' => 'linkedin.png', 'url' => 'http://www.linkedin.com/shareArticle?mini=true&url=PERMALINK&title=TITLE&source=BLOGNAME&summary=EXCERPT', ), 'Linkter' => Array( 'favicon' => 'linkter.png', 'url' => 'http://www.linkter.hu/index.php?action=suggest_link&url=PERMALINK&title=TITLE', ), 'Live' => Array( 'favicon' => 'live.png', 'url' => 'https://favorites.live.com/quickadd.aspx?marklet=1&url=PERMALINK&title=TITLE', ), 'Meneame' => Array( 'favicon' => 'meneame.png', 'url' => 'http://meneame.net/submit.php?url=PERMALINK', ), 'MisterWong' => Array( 'favicon' => 'misterwong.png', 'url' => 'http://www.mister-wong.com/addurl/?bm_url=PERMALINK&bm_description=TITLE&plugin=soc', ), 'MisterWong.DE' => Array( 'favicon' => 'misterwong.png', 'url' => 'http://www.mister-wong.de/addurl/?bm_url=PERMALINK&bm_description=TITLE&plugin=soc', ), 'Mixx' => Array( 'favicon' => 'mixx.png', 'url' => 'http://www.mixx.com/submit?page_url=PERMALINK&title=TITLE', ), 'muti' => Array( 'favicon' => 'muti.png', 'url' => 'http://www.muti.co.za/submit?url=PERMALINK&title=TITLE', ), 'MyShare' => Array( 'favicon' => 'myshare.png', 'url' => 'http://myshare.url.com.tw/index.php?func=newurl&url=PERMALINK&desc=TITLE', ), 'MySpace' => Array( 'favicon' => 'myspace.png', 'awesm_channel' => 'myspace', 'url' => 'http://www.myspace.com/Modules/PostTo/Pages/?u=PERMALINK&t=TITLE', ), 'MSNReporter' => Array( 'favicon' => 'msnreporter.png', 'url' => 'http://reporter.nl.msn.com/?fn=contribute&Title=TITLE&URL=PERMALINK&cat_id=6&tag_id=31&Remark=EXCERPT', 'description' => 'MSN Reporter' ), 'N4G' => Array( 'favicon' => 'n4g.png', 'url' => 'http://www.n4g.com/tips.aspx?url=PERMALINK&title=TITLE', ), 'Netvibes' => Array( 'favicon' => 'netvibes.png', 'url' => 'http://www.netvibes.com/share?title=TITLE&url=PERMALINK', ), 'NewsVine' => Array( 'favicon' => 'newsvine.png', 'url' => 'http://www.newsvine.com/_tools/seed&save?u=PERMALINK&h=TITLE', ), 'Netvouz' => Array( 'favicon' => 'netvouz.png', 'url' => 'http://www.netvouz.com/action/submitBookmark?url=PERMALINK&title=TITLE&popup=no', ), 'NuJIJ' => Array( 'favicon' => 'nujij.png', 'url' => 'http://nujij.nl/jij.lynkx?t=TITLE&u=PERMALINK&b=EXCERPT', ), 'Ping.fm' => Array( 'favicon' => 'ping.png', 'awesm_channel' => 'pingfm', 'url' => 'http://ping.fm/ref/?link=PERMALINK&title=TITLE&body=EXCERPT', ), 'Posterous' => Array( 'favicon' => 'posterous.png', 'url' => 'http://posterous.com/share?linkto=PERMALINK&title=TITLE&selection=EXCERPT', ), 'ppnow' => Array( 'favicon' => 'ppnow.png', 'url' => 'http://www.ppnow.net/submit.php?url=PERMALINK', ), 'PDF' => Array( 'favicon' => 'pdf.png', 'url' => 'http://www.printfriendly.com/print?url=PERMALINK&partner=sociable', 'description' => __('Turn this article into a PDF!', 'sociable'), ), 'Print' => Array( 'favicon' => 'printfriendly.png', 'url' => 'http://www.printfriendly.com/print?url=PERMALINK&partner=sociable', 'description' => __('Print this article!', 'sociable'), ), 'Propeller' => Array( 'favicon' => 'propeller.png', 'url' => 'http://www.propeller.com/submit/?url=PERMALINK', ), 'Ratimarks' => Array( 'favicon' => 'ratimarks.png', 'url' => 'http://ratimarks.org/bookmarks.php/?action=add&address=PERMALINK&title=TITLE', ), 'Rec6' => Array( 'favicon' => 'rec6.png', 'url' => 'http://rec6.via6.com/link.php?url=PERMALINK&=TITLE', ), 'Reddit' => Array( 'favicon' => 'reddit.png', 'url' => 'http://reddit.com/submit?url=PERMALINK&title=TITLE', ), 'RSS' => Array( 'favicon' => 'rss.png', 'url' => 'FEEDLINK', ), 'Scoopeo' => Array( 'favicon' => 'scoopeo.png', 'url' => 'http://www.scoopeo.com/scoop/new?newurl=PERMALINK&title=TITLE', ), 'Segnalo' => Array( 'favicon' => 'segnalo.png', 'url' => 'http://segnalo.alice.it/post.html.php?url=PERMALINK&title=TITLE', ), 'Simpy' => Array( 'favicon' => 'simpy.png', 'url' => 'http://www.simpy.com/simpy/LinkAdd.do?href=PERMALINK&title=TITLE', ), 'Slashdot' => Array( 'favicon' => 'slashdot.png', 'url' => 'http://slashdot.org/bookmark.pl?title=TITLE&url=PERMALINK', ), 'Socialogs' => Array( 'favicon' => 'socialogs.png', 'url' => 'http://socialogs.com/add_story.php?story_url=PERMALINK&story_title=TITLE', ), 'SphereIt' => Array( 'favicon' => 'sphere.png', 'url' => 'http://www.sphere.com/search?q=sphereit:PERMALINK&title=TITLE', ), 'Sphinn' => Array( 'favicon' => 'sphinn.png', 'url' => 'http://sphinn.com/index.php?c=post&m=submit&link=PERMALINK', ), 'StumbleUpon' => Array( 'favicon' => 'stumbleupon.png', 'url' => 'http://www.stumbleupon.com/submit?url=PERMALINK&title=TITLE', ), 'Symbaloo' => Array( 'favicon' => 'symbaloo.png', 'url' => 'http://www.symbaloo.com/nl/add/url=PERMALINK&title=TITLE&icon=http%3A//static01.symbaloo.com/_img/favicon.png', ), 'Techmeme' => Array( 'favicon' => 'techmeme.png', 'awesm_channel' => 'twitter-techmeme', 'url' => 'http://twitter.com/home/?status=tip%20@Techmeme%20PERMALINK%20TITLE', 'description' => 'Suggest to Techmeme via Twitter' ), 'Technorati' => Array( 'favicon' => 'technorati.png', 'url' => 'http://technorati.com/faves?add=PERMALINK', ), 'ThisNext' => Array( 'favicon' => 'thisnext.png', 'url' => 'http://www.thisnext.com/pick/new/submit/sociable/?url=PERMALINK&name=TITLE', ), 'Tipd' => Array( 'favicon' => 'tipd.png', 'url' => 'http://tipd.com/submit.php?url=PERMALINK', ), 'Tumblr' => Array( 'favicon' => 'tumblr.png', 'url' => 'http://www.tumblr.com/share?v=3&u=PERMALINK&t=TITLE&s=EXCERPT', ), 'Twitthis' => Array( 'favicon' => 'twitter.png', 'awesm_channel' => 'twitter', 'url' => 'http://twitter.com/home?status=TITLE%20-%20PERMALINK', ), 'Twitter' => Array( 'favicon' => 'twitter.png', 'awesm_channel' => 'twitter', 'url' => 'http://twitter.com/home?status=TITLE%20-%20PERMALINK', ), 'Upnews' => Array( 'favicon' => 'upnews.png', 'url' => 'http://www.upnews.it/submit?url=PERMALINK&title=TITLE', ), 'Webnews.de' => Array( 'favicon' => 'webnews.png', 'url' => 'http://www.webnews.de/einstellen?url=PERMALINK&title=TITLE', ), 'Webride' => Array( 'favicon' => 'webride.png', 'url' => 'http://webride.org/discuss/split.php?uri=PERMALINK&title=TITLE', ), 'Wikio' => Array( 'favicon' => 'wikio.png', 'url' => 'http://www.wikio.com/vote?url=PERMALINK', ), 'Wikio FR' => Array( 'favicon' => 'wikio.png', 'url' => 'http://www.wikio.fr/vote?url=PERMALINK', ), 'Wikio IT' => Array( 'favicon' => 'wikio.png', 'url' => 'http://www.wikio.it/vote?url=PERMALINK', ), 'Wists' => Array( 'favicon' => 'wists.png', 'url' => 'http://wists.com/s.php?c=&r=PERMALINK&title=TITLE', 'class' => 'wists', ), 'Wykop' => Array( 'favicon' => 'wykop.png', 'url' => 'http://www.wykop.pl/dodaj?url=PERMALINK', ), 'Xerpi' => Array( 'favicon' => 'xerpi.png', 'url' => 'http://www.xerpi.com/block/add_link_from_extension?url=PERMALINK&title=TITLE', ), 'YahooBuzz' => Array( 'favicon' => 'yahoobuzz.png', 'url' => 'http://buzz.yahoo.com/submit/?submitUrl=PERMALINK&submitHeadline=TITLE&submitSummary=EXCERPT&submitCategory=science&submitAssetType=text', 'description' => 'Yahoo! Buzz', ), 'Yahoo! Bookmarks' => Array( 'favicon' => 'yahoomyweb.png', 'url' => 'http://bookmarks.yahoo.com/toolbar/savebm?u=PERMALINK&t=TITLE&opener=bm&ei=UTF-8&d=EXCERPT', ), 'Yigg' => Array( 'favicon' => 'yiggit.png', 'url' => 'http://yigg.de/neu?exturl=PERMALINK&exttitle=TITLE', ), ); /** * Returns the Sociable links list. * * @param array $display optional list of links to return in HTML * @global $sociable_known_sites array the list of sites that Sociable uses * @global $sociablepluginpath string the path to the plugin * @global $wp_query object the WordPress query object * @return string $html HTML for links list. */ function sociable_html($display=array()) { global $sociable_known_sites, $sociablepluginpath, $wp_query, $post; if (get_post_meta($post->ID,'_sociableoff',true)) { return ""; } /** * Make it possible for other plugins or themes to add buttons to Sociable */ $sociable_known_sites = apply_filters('sociable_known_sites',$sociable_known_sites); $active_sites = get_option('sociable_active_sites'); // If a path is specified where Sociable should find its images, use that, otherwise, // set the image path to the images subdirectory of the Sociable plugin. // Image files need to be png's. $imagepath = get_option('sociable_imagedir'); if ($imagepath == "") $imagepath = $sociablepluginpath.'images/'; // if no sites are specified, display all active // have to check $active_sites has content because WP // won't save an empty array as an option if (empty($display) and $active_sites) $display = $active_sites; // if no sites are active, display nothing if (empty($display)) return ""; // Load the post's and blog's data $blogname = urlencode(get_bloginfo('name')." ".get_bloginfo('description')); $blogrss = get_bloginfo('rss2_url'); $post = $wp_query->post; // Grab the excerpt, if there is no excerpt, create one $excerpt = urlencode(strip_tags(strip_shortcodes($post->post_excerpt))); if ($excerpt == "") { $excerpt = urlencode(substr(strip_tags(strip_shortcodes($post->post_content)),0,250)); } // Clean the excerpt for use with links $excerpt = str_replace('+','%20',$excerpt); $permalink = urlencode(get_permalink($post->ID)); $title = str_replace('+','%20',urlencode($post->post_title)); $rss = urlencode(get_bloginfo('ref_url')); // Start preparing the output $html = "\n
\n"; // If a tagline is set, display it above the links list $tagline = get_option("sociable_tagline"); if ($tagline != "") { $html .= "
\n"; $html .= stripslashes($tagline); $html .= "\n
"; } /** * Start the list of links */ $html .= "\n\n
\n"; return $html; } /** * Hook the_content to output html if we should display on any page */ $sociable_contitionals = get_option('sociable_conditionals'); if (is_array($sociable_contitionals) and in_array(true, $sociable_contitionals)) { add_filter('the_content', 'sociable_display_hook'); add_filter('the_excerpt', 'sociable_display_hook'); /** * Loop through the settings and check whether Sociable should be outputted. */ function sociable_display_hook($content='') { $conditionals = get_option('sociable_conditionals'); if ((is_home() and $conditionals['is_home']) or (is_single() and $conditionals['is_single']) or (is_page() and $conditionals['is_page']) or (is_category() and $conditionals['is_category']) or (is_tag() and $conditionals['is_tag']) or (is_date() and $conditionals['is_date']) or (is_author() and $conditionals['is_author']) or (is_search() and $conditionals['is_search'])) { $content .= sociable_html(); } elseif ((is_feed() and $conditionals['is_feed'])) { $sociable_html = sociable_html(); $sociable_html = strip_tags($sociable_html,""); $content .= $sociable_html . "

"; } return $content; } } /** * Set the default settings on activation on the plugin. */ function sociable_activation_hook() { global $wpdb; $wpdb->query("DELETE FROM $wpdb->postmeta WHERE meta_key = 'sociableoff'"); return sociable_restore_config(false); } register_activation_hook(__FILE__, 'sociable_activation_hook'); /** * Add the Sociable menu to the Settings menu * @param boolean $force if set to true, force updates the settings. */ function sociable_restore_config($force=false) { global $sociable_known_sites; if ($force or !is_array(get_option('sociable_active_sites'))) update_option('sociable_active_sites', array( 'Print', 'Digg', 'Sphinn', 'del.icio.us', 'Facebook', 'Mixx', 'Google', )); if ($force or !is_string(get_option('sociable_tagline'))) update_option('sociable_tagline', "" . __("Share and Enjoy:", 'sociable') . ""); if ($force or !is_array(get_option('sociable_conditionals'))) update_option('sociable_conditionals', array( 'is_home' => False, 'is_single' => True, 'is_page' => True, 'is_category' => False, 'is_tag' => False, 'is_date' => False, 'is_search' => False, 'is_author' => False, 'is_feed' => False, )); if ( $force OR !( get_option('sociable_usecss') ) ) update_option('sociable_usecss', true); } /** * Add the Sociable menu to the Settings menu */ function sociable_admin_menu() { add_options_page('Sociable', 'Sociable', 8, 'Sociable', 'sociable_submenu'); } add_action('admin_menu', 'sociable_admin_menu'); /** * Make sure the required javascript files are loaded in the Sociable backend, and that they are only * loaded in the Sociable settings page, and nowhere else. */ function sociable_admin_js() { if (isset($_GET['page']) && $_GET['page'] == 'Sociable') { global $sociablepluginpath; wp_enqueue_script('jquery'); wp_enqueue_script('jquery-ui-core',false,array('jquery')); wp_enqueue_script('jquery-ui-sortable',false,array('jquery','jquery-ui-core')); wp_enqueue_script('sociable-js',$sociablepluginpath.'sociable-admin.js', array('jquery','jquery-ui-core','jquery-ui-sortable')); } } add_action('admin_print_scripts', 'sociable_admin_js'); /** * Make sure the required stylesheet is loaded in the Sociable backend, and that it is only * loaded in the Sociable settings page, and nowhere else. */ function sociable_admin_css() { global $sociablepluginpath; if (isset($_GET['page']) && $_GET['page'] == 'Sociable') wp_enqueue_style('sociable-css',$sociablepluginpath.'sociable-admin.css'); } add_action('admin_print_styles', 'sociable_admin_css'); /** * If Wists is active, load it's js file. This is the only site that historically has had a JS file * in Sociable. For all other sites this has so far been refused. */ function sociable_js() { if (in_array('Wists', get_option('sociable_active_sites'))) { global $sociablepluginpath; wp_enqueue_script('sociable-wists',$sociablepluginpath.'wists.js'); } } add_action('wp_print_scripts', 'sociable_js'); /** * If the user has the (default) setting of using the Sociable CSS, load it. */ function sociable_css() { if (get_option('sociable_usecss') == true) { global $sociablepluginpath; wp_enqueue_style('sociable-front-css',$sociablepluginpath.'sociable.css'); } } add_action('wp_print_styles', 'sociable_css'); /** * Update message, used in the admin panel to show messages to users. */ function sociable_message($message) { echo "

$message

\n"; } /** * Displays a checkbox that allows users to disable Sociable on a * per post or page basis. */ function sociable_meta() { global $post; $sociableoff = false; if (get_post_meta($post->ID,'_sociableoff',true)) { $sociableoff = true; } ?> /> ID,'_sociableoff',true)) add_post_meta($pID, '_sociableoff', true, true); } else { if (get_post_meta($post->ID,'_sociableoff',true)) delete_post_meta($pID, '_sociableoff'); } } add_action('wp_insert_post', 'sociable_insert_post'); /** * Displays the Sociable admin menu, first section (re)stores the settings. */ function sociable_submenu() { global $sociable_known_sites, $sociable_date, $sociablepluginpath; $sociable_known_sites = apply_filters('sociable_known_sites',$sociable_known_sites); if (isset($_REQUEST['restore']) && $_REQUEST['restore']) { check_admin_referer('sociable-config'); sociable_restore_config(true); sociable_message(__("Restored all settings to defaults.", 'sociable')); } else if (isset($_REQUEST['save']) && $_REQUEST['save']) { check_admin_referer('sociable-config'); $active_sites = Array(); if (!$_REQUEST['active_sites']) $_REQUEST['active_sites'] = Array(); foreach($_REQUEST['active_sites'] as $sitename=>$dummy) $active_sites[] = $sitename; update_option('sociable_active_sites', $active_sites); /** * Have to delete and re-add because update doesn't hit the db for identical arrays * (sorting does not influence associated array equality in PHP) */ delete_option('sociable_active_sites', $active_sites); add_option('sociable_active_sites', $active_sites); foreach ( array('usetargetblank', 'awesmenable', 'usecss', 'usetextlinks') as $val ) { if ( isset($_POST[$val]) && $_POST[$val] ) update_option('sociable_'.$val,true); else update_option('sociable_'.$val,false); } foreach ( array('awesmapikey', 'tagline', 'imagedir') as $val ) { if ( !$_POST[$val] ) update_option( 'sociable_'.$val, ''); else update_option( 'sociable_'.$val, $_POST[$val] ); } /** * Update conditional displays */ $conditionals = Array(); if (!$_POST['conditionals']) $_POST['conditionals'] = Array(); $curconditionals = get_option('sociable_conditionals'); if (!array_key_exists('is_feed',$curconditionals)) { $curconditionals['is_feed'] = false; } foreach($curconditionals as $condition=>$toggled) $conditionals[$condition] = array_key_exists($condition, $_POST['conditionals']); update_option('sociable_conditionals', $conditionals); sociable_message(__("Saved changes.", 'sociable')); } /** * Show active sites first and in the right order. */ $active_sites = get_option('sociable_active_sites'); $active = Array(); $disabled = $sociable_known_sites; foreach( $active_sites as $sitename ) { $active[$sitename] = $disabled[$sitename]; unset($disabled[$sitename]); } uksort($disabled, "strnatcasecmp"); /** * Display options. */ ?>

:
    $site) { ?>
  • "> /> <?php echo $site['description'] ?>
sociable.css in the Sociable plugin directory to your theme's style.css and disable the use of the sociable stylesheet below.", 'sociable'); ?>


/>
/>
/>
/>
/>
/>
/>
/>
/>
/>
/>

/> target=_blank on links? (Forces links to open a new window)", "sociable"); ?>

/>
  " type="submit" /> " type="submit"/>

Support forums.', 'sociable'); ?>

Sociable was originally developed by Peter Harkins and has been maintained by Joost de Valk since the beginning of 2008. It\'s released under the GNU GPL version 2.','Sociable'); ?>

' . __('Settings') . ''; array_unshift( $links, $settings_link ); // before other links } return $links; } add_filter( 'plugin_action_links', 'sociable_filter_plugin_actions', 10, 2 ); /** * Add the Yoast.com RSS feed to the WordPress dashboard */ if (!function_exists('yst_db_widget')) { function yst_text_limit( $text, $limit, $finish = ' […]') { if( strlen( $text ) > $limit ) { $text = substr( $text, 0, $limit ); $text = substr( $text, 0, - ( strlen( strrchr( $text,' ') ) ) ); $text .= $finish; } return $text; } function yst_db_widget($image = 'normal', $num = 3, $excerptsize = 250, $showdate = true) { require_once(ABSPATH.WPINC.'/rss.php'); if ( $rss = fetch_rss( 'http://feeds2.feedburner.com/joostdevalk' ) ) { echo '
'; if ($image == 'normal') { echo 'Yoast'; } else { echo 'Yoast'; } echo ''; echo '
'; echo ' Subscribe with RSS'; if ($image == 'normal') { echo '       '; } else { echo '
'; } echo ' Subscribe by email'; echo '
'; echo '
'; } } function yst_widget_setup() { wp_add_dashboard_widget( 'yst_db_widget' , 'The Latest news from Yoast' , 'yst_db_widget'); } add_action('wp_dashboard_setup', 'yst_widget_setup'); } ?>