contributions/socialbookmarking/lib/components/socialbookmark.cls.php
Go to the documentation of this file.00001 <?php 00002 /** 00003 * Holds information about a bookmark 00004 * 00005 * @author Gerd Riesselmann 00006 * @ingroup SocialBookmarking 00007 */ 00008 class SocialBookmark { 00009 public $service = ''; 00010 public $image = ''; 00011 public $url = ''; 00012 00013 public function __construct($title, $url, $image) { 00014 $this->service = $title; 00015 $this->image = $image; 00016 $this->url = $url; 00017 } 00018 00019 public function get_url($title, $url) { 00020 $ret = $this->url; 00021 $ret = str_replace('%URL%', rawurlencode($url), $ret); 00022 $ret = str_replace('%TITLE%', rawurlencode($title), $ret); 00023 return $ret; 00024 } 00025 00026 public function get_image_path() { 00027 return Config::get_value(Config::URL_BASEDIR) . 'images/bookmarking/' . $this->image; 00028 } 00029 }