HEX
Server: Apache
System: Linux msm5694.mjhst.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: camjab_ssh (1000)
PHP: 5.3.29
Disabled: NONE
Upload Files
File: /home/httpd/html/stoptube.com/wp-content/JUNK/addthis_social_widget.php
<?php
/*
Plugin Name: AddThis Social Bookmarking Widget
Plugin URI: http://www.addthis.com
Description: Help your visitor promote your website or blog. Put the AddThis Social Bookmarking Widget on your site or blog, so any visitor can easily bookmark it. The widget works with all popular bookmarking services.
Version: 1.0
Author: AddThis.com
Author URI: http://www.addthis.com
*/



class addthis_social_widget{


  //=====================================
  //Want stats with your AddThis plugin? 
  //Put your AddThis username in this variable 

    var $addthis_username = "";
  //===================================== 


  function addthis_social_widget(){
     add_filter('the_content', array(&$this, 'social_widget'));
  }

  function social_widget_doposts($content){  

     for ($i=0; $i<10; $i++){
         $content .= $this->social_widget_post($i);
     }
     return $content;
  }

  function social_widget($content){  
     $link  = urlencode(get_permalink());
     $title = urlencode(get_the_title($id));

     return $content . $this->social_widget_badge($link, $title);
  }

  function social_widget_post($entry){
     $link  = urlencode(get_permalink());
     $title = urlencode(get_the_title($id));
     if (!isset($link)){
       $widget_post  = $this->social_widget_badge($link, $title);
       $widget_post .= $this->social_widget_postit($entry);
     }
     return $widget_post;
  }


  function social_widget_badge($link, $title){
    $pub = $this->addthis_username;
    return "<div><a href=\"http://www.addthis.com/bookmark.php\" onclick=\"window.open('http://www.addthis.com/bookmark.php?pub=$pub&amp;url=$link&amp;title=$title', 'addthis', 'scrollbars=yes,menubar=no,width=620,height=520,resizable=yes,toolbar=no,location=no,status=no'); return false;\" title=\"Bookmark using any bookmark manager!\" target=\"_blank\"><img src=\"http://s3.addthis.com/button1-bm.gif\" width=\"125\" height=\"16\" border=\"0\" /></a></div>";
  }


  function social_widget_postit($i){
     add_filter('the_content', array(&$this, 'social_widget'));
     $content = $this->social_widget($content);

     $cut = explode("|", $content);
     $post = $cut[0];
     $link  = $cut[1]; 
     return content . "<br />$link";
  }

}

$addthis &= new addthis_social_widget();

?>