maxpower.ca. Based on the work of Paul Stamatiou (visit his blog -- its good). Author: Kirk Montgomery Author URI: http://www.maxpower.ca */ /* Copyright 2006 Kirk Montgomery (email : webmaster@maxpower.ca) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ // If you do modify it and come up with something worth sharing, by all means contact the author function wp_sociable($wpsoc_var_1 = 1, $wpsoc_var_2 = 1, $wpsoc_var_3 = 1, $wpsoc_var_4 = 1, $wpsoc_var_5 = 1, $wpsoc_var_6 = 1, $wpsoc_var_7 = 1, $wpsoc_var_8 = 1, $wpsoc_var_9 = 1, $wpsoc_var_10 = 1, $wpsoc_var_11 = 1, $wpsoc_var_12 = 1) { // First set up the variables that will be needed to generate the links // You can edit the default category a post will be submitted to by changing // the wpsoc_the_fark_cat to one of several options. These options are all of // listed in the drop down box labled "Link Type" at // http://cgi.fark.com/cgi/fark/submit.pl. // Examples include Business, Game, News, Politics, Sports, Science/Technology, // Website, Weird News, etc... // // For example, if you wanted all posts submited to fark to be in the Sports // category, then you would change the following line like so: // // $wpsoc_the_fark_cat = "Sports"; $wpsoc_the_fark_cat = "Misc"; // This is the default image location, you shouldn't need to change this unless // you can think of a good reason to... $wpsoc_the_imgpath = "/wp-content/plugins/sociable/images/"; // // // You shouldn't need to mess around with anything below here // // // [Hack!] the userinput together $wpsoc_sites_wanted = $wpsoc_var_1.$wpsoc_var_2.$wpsoc_var_3.$wpsoc_var_4.$wpsoc_var_5.$wpsoc_var_6.$wpsoc_var_7.$wpsoc_var_8.$wpsoc_var_9.$wpsoc_var_10; $wpsoc_sites_wanted_mathcheck = $wpsoc_var_1 + $wpsoc_var_2 + $wpsoc_var_3 + $wpsoc_var_4 + $wpsoc_var_5 + $wpsoc_var_6 + $wpsoc_var_7 + $wpsoc_var_8 + $wpsoc_var_9 + $wpsoc_var_10 + $wpsoc_var_11 + $wpsoc_var_12; // Destroy all unwanted characters [for safety's sake] $wpsoc_sites_wanted = ereg_replace("[^A-Za-z0-9]", "", $wpsoc_sites_wanted); // Convert it all to lowercase $wpsoc_sites_wanted = strtolower($wpsoc_sites_wanted); // if no options are set, then set the default to display all if ($wpsoc_sites_wanted_mathcheck == 12) { $wpsoc_sites_wanted = "deliciousdiggblinklistfurlredditfarkyahoospurlsimpynewsvinewistsblogmarks"; } // Set up the other variables, use urlencode to make xhtml valid global $wp_query; $wpsoc_the_blogurl = get_bloginfo('url'); $wpsoc_the_blogname_plain = get_bloginfo('name'); $wpsoc_the_blogname_urlencode = urlencode($wpsoc_the_blogname_plain); // Combine the URL and image directory $wpsoc_the_imgurl = $wpsoc_the_blogurl.$wpsoc_the_imgpath; // Query the current post/page and set the info equal to $post [thanks Kafkaesqui!] $post = $wp_query->post; // Now extract the needed information $wpsoc_the_perm = get_permalink($post->ID); $wpsoc_the_title_plain = $post->post_title; $wpsoc_the_title_urlencode = urlencode($wpsoc_the_title_plain); // // Now get down to business // // Check to see if user wants delicious if(strstr($wpsoc_sites_wanted,"delicious")) { // if so, Do the Delicious echo "    "; echo ""; echo ""; //Delicious done } // Check to see if user wants digg if(strstr($wpsoc_sites_wanted,"digg")) { // Do the Digg |aside, if anyone can figure out how to pass the title too it would be great echo "    "; echo ""; echo ""; //Digg done (diggit?) } // Check to see if user wants Spurl if(strstr($wpsoc_sites_wanted,"spurl")) { // Spurl this badboy echo "    "; echo ""; echo ""; //Spurl done } // Check to see if user wants wists if(strstr($wpsoc_sites_wanted,"wists")) { // if so, Do some wisting echo "    "; echo ""; echo ""; //wists done } // Check to see if user wants Simpy if(strstr($wpsoc_sites_wanted,"simpy")) { // Simpify! echo "    "; echo ""; echo ""; //Simpy done } if(strstr($wpsoc_sites_wanted,"newsvine")) { // if so, newsvine echo "    "; echo ""; echo ""; //Newsvine done } // Check to see if user wants blinklist if(strstr($wpsoc_sites_wanted,"blinklist")) { // Do BlinkList echo "    "; echo ""; echo ""; //Blinklist done } // Check to see if user wants Furl if(strstr($wpsoc_sites_wanted,"furl")) { // Furl this badboy echo "    "; echo ""; echo ""; //Furl done } // Check to see if user wants reddit if(strstr($wpsoc_sites_wanted,"reddit")) { // Reddit? echo "    "; echo ""; echo ""; //Reddit done } // Check to see if user wants to fark [heh] if(strstr($wpsoc_sites_wanted,"fark")) { // Fark This echo "    "; echo ""; echo ""; //Fark'd it good } // Check to see if user wants blogmarks if(strstr($wpsoc_sites_wanted,"blogmarks")) { // if so, Do some wisting echo "    "; echo ""; echo ""; //blogmarks done } // Check to see if user wants yahoo if(strstr($wpsoc_sites_wanted,"yahoo")) { // Yahoo-ify echo "    "; echo ""; echo ""; //Yahoo'd } // thats all doc } ?>