Location: PHPKode > scripts > karatag Sozial Bookmark > karatag-sozial-bookmark/bookmarks.class.php
<?php
/**
* Sozial Bookmarks 1.0
*
* Copyright (C) 2007 Özgür Karatag <hide@address.com>
*
* 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
*
* @class        sozialBookmarks
* @version      V1.0 09 Mai 2007
* @author       Özgür Karatag <hide@address.com>
* @copyright    2007 Özgür Karatag
*/

class sozialBookmarks {

  /**
   * @var string imagesFolder
   * @access private
   */
  var $imagesFolder = 'simages';

  /**
   * @var string imageWidth
   * @access private
   */
  var $imageWidth = 91;

  /**
   * @var string imageHeight
   * @access private
   */
  var $imageHeight = 17;

  /**
   * @var string url
   * @access private
   */
  var $url;

  /**
   * @var string target
   * @access private
   */
  var $target = '_blank';

  /**
   * @var string siteTitle
   * @access private
   */
  var $siteTitle;

  /**
   * @var string siteKeywords
   * @access private
   */
  var $siteKeywords;

  /**
  * @constructor
  * @param string url
  * @param string siteTitle
  * @param string siteKeywords
  * @author Özgür Karatag
  * @description Constructor
  */
  function sozialBookmarks($url = '', $siteTitle = '', $siteKeywords = '') {

    $this->url = $url;
    $this->siteTitle = $siteTitle;
    $this->siteKeywords = $siteKeywords;
  }

  /**
  * @function setcode
  * @author Özgür Karatag
  * @description Sets the value
  */
  function setcode() {
    $SBCode = '';
    $SBCode .= ' <a href="http://www.google.com/reader/preview/*/feed/'.$this->url.'" target="'.$this->target.'" title=" &#64; to Google Reader "><img src="./'.$this->imagesFolder.'/bookmark_google_reader.png" width="'.$this->imageWidth.'" height="'.$this->imageHeight.'" alt="add to Google Reader" title=" &#64; to Google Reader " /></a>';
    $SBCode .= ' <a href="http://www.google.com/bookmarks/mark?op=add&amp;hl=de&amp;bkmk='.$this->url.'&amp;annotation=&amp;labels='.$this->siteKeywords.'&amp;title='.$this->siteTitle.'" target="'.$this->target.'" title=" &#64; to Google Bookmark "><img src="./'.$this->imagesFolder.'/bookmark_google_bookmark.png" width="'.$this->imageWidth.'" height="'.$this->imageHeight.'" alt="add to Google Bookmark" title=" &#64; to Google Bookmark " /></a>';
    $SBCode .= ' <a href="http://www.bloglines.com/sub/'.$this->url.'" target="'.$this->target.'" title=" &#64; to bloglines "><img src="./'.$this->imagesFolder.'/bookmark_bloglines.png" width="'.$this->imageWidth.'" height="'.$this->imageHeight.'" alt="add to bloglines" title=" &#64; to bloglines " /></a>';
    $SBCode .= ' <a href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url='.$this->url.'" target="'.$this->target.'" title=" &#64; to newsgator "><img src="./'.$this->imagesFolder.'/bookmark_newsgator.png" width="'.$this->imageWidth.'" height="'.$this->imageHeight.'" alt="add to newsgator" title=" &#64; to newsgator " /></a>';
    $SBCode .= ' <a href="http://www.furl.net/storeIt.jsp?u='.$this->url.'&amp;keywords='.$this->siteKeywords.'&amp;t='.$this->siteTitle.'" target="'.$this->target.'" title=" &#64; to FURL "><img src="./'.$this->imagesFolder.'/bookmark_furl.png" width="'.$this->imageWidth.'" height="'.$this->imageHeight.'" alt="add to FURL" title=" &#64; to FURL " /></a>';
    $SBCode .= ' <a href="http://digg.com/submit?phase=2&amp;url='.$this->url.'" target="'.$this->target.'" title=" &#64; to digg "><img src="./'.$this->imagesFolder.'/bookmark_digg.png" width="'.$this->imageWidth.'" height="'.$this->imageHeight.'" alt="add to digg" title=" &#64; to digg " /></a>';
    $SBCode .= ' <a href="http://www.webnews.de/einstellen?url='.$this->url.'&amp;title='.$this->siteTitle.'" target="'.$this->target.'" title=" &#64; to webnews "><img src="./'.$this->imagesFolder.'/bookmark_webnews.png" width="'.$this->imageWidth.'" height="'.$this->imageHeight.'" alt="add to webnews" title=" &#64; to webnews " /></a>';
    $SBCode .= ' <a href="http://www.netscape.com/submit/?U='.$this->url.'&amp;T='.$this->siteTitle.'" target="'.$this->target.'" title=" &#64; to Netscape "><img src="./'.$this->imagesFolder.'/bookmark_netscape.png" width="'.$this->imageWidth.'" height="'.$this->imageHeight.'" alt="add to Netscape" title=" &#64; to Netscape " /></a>';
    $SBCode .= ' <a href="http://myweb2.search.yahoo.com/myresults/bookmarklet?t='.$this->siteTitle.'&amp;d=&amp;tag=&amp;u='.$this->url.'" target="'.$this->target.'" title=" &#64; to Yahoo MyWeb "><img src="./'.$this->imagesFolder.'/bookmark_yahoo.png" width="'.$this->imageWidth.'" height="'.$this->imageHeight.'" alt="add to Yahoo MyWeb" title=" &#64; to Yahoo MyWeb " /></a>';
    $SBCode .= ' <a href="http://www.spurl.net/spurl.php?v=3&amp;tags=&amp;title='.$this->siteTitle.'&amp;url='.$this->url.'" target="'.$this->target.'" title=" &#64; to spurl.net "><img src="./'.$this->imagesFolder.'/bookmark_spurl.png" width="'.$this->imageWidth.'" height="'.$this->imageHeight.'" alt="add to spurl.net" title=" &#64; to spurl.net " /></a>';
    $SBCode .= ' <a href="http://www.diigo.com/post?url='.$this->url.'&amp;title='.$this->siteTitle.'&amp;tag=&amp;comments=" target="'.$this->target.'" title=" &#64; to diigo "><img src="./'.$this->imagesFolder.'/bookmark_diigo.png" width="'.$this->imageWidth.'" height="'.$this->imageHeight.'" alt="add to diigo" title=" &#64; to diigo " /></a>';
    $SBCode .= ' <a href="http://www.newsvine.com/_wine/save?popoff=1&amp;u='.$this->url.'&amp;tags=&amp;blurb='.$this->siteTitle.'" target="'.$this->target.'" title=" Bookmark &#64; newsvine "><img src="./'.$this->imagesFolder.'/bookmark_newsvine.png" width="'.$this->imageWidth.'" height="'.$this->imageHeight.'" alt="Bookmark newsvine" title=" Bookmark &#64; newsvine " /></a>';
    $SBCode .= ' <a href="http://del.icio.us/post?url='.$this->url.'" target="'.$this->target.'" title=" Bookmark &#64; del.icio.us "><img src="./'.$this->imagesFolder.'/bookmark_del_icio_us.png" width="'.$this->imageWidth.'" height="'.$this->imageHeight.'" alt="Bookmark del.icio.us" title=" Bookmark &#64; del.icio.us " /></a>';
    $SBCode .= ' <a href="http://www.simpy.com/simpy/LinkAdd.do?href='.$this->url.'" target="'.$this->target.'" title=" Bookmark &#64; SIMPIFY "><img src="./'.$this->imagesFolder.'/bookmark_simpify.png" width="'.$this->imageWidth.'" height="'.$this->imageHeight.'" alt="Bookmark &#64; SIMPIFY" title=" Bookmark SIMPIFY " /></a>';
    $SBCode .= ' <a href="http://www.mister-wong.de/add_url/" target="'.$this->target.'" title=" Bookmark &#64; Mister Wong "><img src="./'.$this->imagesFolder.'/bookmark_mister_wong.png" width="'.$this->imageWidth.'" height="'.$this->imageHeight.'" alt="Bookmark MISTER WONG" title=" Bookmark &#64; MISTER WONG " /></a>';
    $SBCode .= ' <a href="http://linkarena.com/bookmarks/addlink/?url='.$this->url.'" target="'.$this->target.'" title=" Bookmark &#64; Linkarena "><img src="./'.$this->imagesFolder.'/bookmark_linkarena.png" width="'.$this->imageWidth.'" height="'.$this->imageHeight.'" alt="Bookmark Linkarena" title=" Bookmark &#64; Linkarena " /></a>';
    $SBCode .= ' <a href="http://www.icio.de/add.php?url='.$this->url.'" target="'.$this->target.'" title=" Bookmark &#64; isio.de "><img src="./'.$this->imagesFolder.'/bookmark_icio.png" width="'.$this->imageWidth.'" height="'.$this->imageHeight.'" alt="Bookmark icio.de" title=" Bookmark &#64; icio.de " /></a>';
    $SBCode .= ' <a href="http://beta.oneview.de:80/quickadd/neu/addBookmark.jsf?URL='.$this->url.'&amp;title='.$this->siteTitle.'" target="'.$this->target.'" title=" Bookmark &#64; oneview "><img src="./'.$this->imagesFolder.'/bookmark_oneview.png" width="'.$this->imageWidth.'" height="'.$this->imageHeight.'" alt="Bookmark oneview" title=" Bookmark &#64; oneview " /></a>';
    $SBCode .= ' <a href="http://www.folkd.com/submit/'.$this->url.'" target="'.$this->target.'" title=" Bookmark &#64; folkd.com "><img src="./'.$this->imagesFolder.'/bookmark_folkd.png" width="'.$this->imageWidth.'" height="'.$this->imageHeight.'" alt="Bookmark folkd.com" title=" Bookmark &#64; folkd.com " /></a>';
    $SBCode .= ' <a href="http://yigg.de/neu?exturl='.$this->url.'" target="'.$this->target.'" title=" Bookmark &#64; yigg.de "><img src="./'.$this->imagesFolder.'/bookmark_yigg.png" width="'.$this->imageWidth.'" height="'.$this->imageHeight.'" alt="Bookmark yigg.de" title=" Bookmark &#64; yigg.de " /></a>';
    $SBCode .= ' <a href="http://reddit.com/submit?url='.$this->url.'&amp;title='.$this->siteTitle.'" target="'.$this->target.'" title=" Bookmark &#64; reddit "><img src="./'.$this->imagesFolder.'/bookmark_reddit.png" width="'.$this->imageWidth.'" height="'.$this->imageHeight.'" alt="Bookmark reddit" title=" Bookmark &#64; reddit " /></a>';
    $SBCode .= ' <a href="http://www.stumbleupon.com/submit?url='.$this->url.'&amp;title='.$this->siteTitle.'" target="'.$this->target.'" title=" Bookmark &#64; StumbleUpon "><img src="./'.$this->imagesFolder.'/bookmark_stumbleupon.png" width="'.$this->imageWidth.'" height="'.$this->imageHeight.'" alt="Bookmark StumbleUpon" title=" Bookmark &#64; StumbleUpon " /></a>';
    $SBCode .= ' <a href="http://slashdot.org/bookmark.pl?url='.$this->url.'&amp;title='.$this->siteTitle.'" target="'.$this->target.'" title=" Bookmark &#64; Slashdot "><img src="./'.$this->imagesFolder.'/bookmark_slashdot.png" width="'.$this->imageWidth.'" height="'.$this->imageHeight.'" alt="Bookmark Slashdot" title=" Bookmark &#64; Slashdot " /></a>';
    $SBCode .= ' <a href="http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Description=&amp;Tag=&amp;Url='.$this->url.'&amp;Title='.$this->siteTitle.'" target="'.$this->target.'" title=" Bookmark &#64; blinklist "><img src="./'.$this->imagesFolder.'/bookmark_blinklist.png" width="'.$this->imageWidth.'" height="'.$this->imageHeight.'" alt="Bookmark blinklist" title=" Bookmark &#64; blinklist " /></a>';
    $SBCode .= ' <a href="http://technorati.com/faves?add='.$this->url.'&amp;tag=" target="'.$this->target.'" title=" Bookmark &#64; technorati "><img src="./'.$this->imagesFolder.'/bookmark_technorati.png" width="'.$this->imageWidth.'" height="'.$this->imageHeight.'" alt="Bookmark technorati" title=" Bookmark &#64; technorati " /></a>';
    $SBCode .= ' <a href="http://blogmarks.net/my/new.php?mini=1&amp;simple=1&amp;url='.$this->url.'&amp;content=&amp;public-tags=&amp;title='.$this->siteTitle.'" target="'.$this->target.'" title=" &#64; to blogmarks "><img src="./'.$this->imagesFolder.'/bookmark_blogmarks.png" width="'.$this->imageWidth.'" height="'.$this->imageHeight.'" alt="add to blogmarks" title=" &#64; to blogmarks " /></a>';
    $SBCode .= ' <a href="http://www.blinkbits.com/bookmarklets/save.php?v=1&amp;title='.$this->siteTitle.'&amp;source_url='.$this->url.'&amp;source_image_url=&amp;rss_feed_url=&amp;rss_feed_url=&amp;rss2member=&amp;body=" target="'.$this->target.'" title=" &#64; to blinkbits "><img src="./'.$this->imagesFolder.'/bookmark_blinkbits.png" width="'.$this->imageWidth.'" height="'.$this->imageHeight.'" alt="add to blinkbits" title=" &#64; to blinkbits " /></a>';
    $SBCode .= ' <a href="http://ma.gnolia.com/bookmarklet/add?url='.$this->url.'&amp;title='.$this->siteTitle.'&amp;description=&amp;tags=" target="'.$this->target.'" title=" &#64; to ma.gnolia "><img src="./'.$this->imagesFolder.'/bookmark_magnolia.png" width="'.$this->imageWidth.'" height="'.$this->imageHeight.'" alt="add to ma.gnolia" title=" &#64; to ma.gnolia " /></a>';
    $SBCode .= ' <a href="http://smarking.com/editbookmark/?url='.$this->url.'&amp;description='.$this->siteTitle.'&amp;tags=" target="'.$this->target.'" title=" &#64; to smarking.com "><img src="./'.$this->imagesFolder.'/bookmark_smarking.png" width="'.$this->imageWidth.'" height="'.$this->imageHeight.'" alt="add to smarking.com" title=" &#64; to smarking.com " /></a>';
    $SBCode .= ' <a href="http://www.netvouz.com/action/submitBookmark?url='.$this->url.'&amp;description=&amp;tags=&amp;title='.$this->siteTitle.'&amp;popup=yes" target="'.$this->target.'" title=" &#64; to netvouz "><img src="./'.$this->imagesFolder.'/bookmark_netvouz.png" width="'.$this->imageWidth.'" height="'.$this->imageHeight.'" alt="add to netvouz" title=" &#64; to netvouz " /></a>';
    $SBCode .= ' <a href="http://co.mments.com/track?url='.$this->url.'" target="'.$this->target.'" title=" &#64; to co.mments "><img src="./'.$this->imagesFolder.'/bookmark_co.mments.png" width="'.$this->imageWidth.'" height="'.$this->imageHeight.'" alt="add to co.mments" title=" &#64; to co.mments " /></a>';
    $SBCode .= ' <a href="http://www.connotea.org/addpopup?continue=confirm&uri='.$this->url.'" target="'.$this->target.'" title=" &#64; to Connotea "><img src="./'.$this->imagesFolder.'/bookmark_connotea.png" width="'.$this->imageWidth.'" height="'.$this->imageHeight.'" alt="add to Connotea" title=" &#64; to connotea " /></a>';
    $SBCode .= ' <a href="http://de.lirio.us/rubric/post?uri='.$this->url.'" target="'.$this->target.'" title=" &#64; to de.lirio.us "><img src="./'.$this->imagesFolder.'/bookmark_de.lirio.us.png" width="'.$this->imageWidth.'" height="'.$this->imageHeight.'" alt="add to de.lirio.us" title=" &#64; to de.lirio.us " /></a>';
    return $SBCode;
  }

  /**
  * @function GetCode
  * @author Özgür Karatag
  * @description Gets the HTML code with the links to the Sozial Bookmark websites
  */
  function GetCode() {

    return $this->setcode();
  }

  /*
  * @function     setVar
  * @returns      mixed
  * @param        $name
  * @param        $value
  * @author       Özgür Karatag
  * @description  Sets the value of $name
  */
  function setVar($name, $value)
  {
    $this->{$name} = $value;
  }
}
?>
Return current item: karatag Sozial Bookmark