.

SocialBookmarking Class Reference
[SocialBookmarking]

Sets and services provides by the SocialBookmarking module. More...

List of all members.

Static Public Member Functions

static  create_set ($set_name)
  Create a set of Bookmark Items.
static  define_set ($name, $arr_services)
  Define a set.
static  get_all_services ()
  Returns configuration for all available services.
static  get_service ($name)
  Return service with given name - if available.

Public Attributes

const  BLOGSMARK = 'blogsmark'
const  DELICIOUS = 'del.icio.us'
const  DIGG = 'digg'
const  EMAIL = 'email'
const  FACEBOOK = 'facebook'
const  FURL = 'furl'
const  GOOGLE = 'google'
const  GOOGLE_BUZZ = 'buzz'
const  MISTER_WONG = 'misterwong'
const  MYSPACE = 'myspace'
const  NETSCAPE = 'netscape'
const  NEWSVINE = 'newsvine'
const  REDDIT = 'reddit'
const  SET_POPULAR_DE = 'set_de'
  Services popular in Germany.
const  SET_POPULAR_EN = 'set_en'
  Services popular in US.
const  SET_TECH_EN = 'set_tech_en'
  Bookmarking tools commonly found on US tech sites.
const  STUMBLEUPON = 'stumbleupon'
const  TECHNORATI = 'technarati'
const  TWITTER = 'twitter'
const  WEBNEWS = 'webnews'
const  WINDOWS_LIVE = 'live'
const  YAHOO = 'yahoo'
const  YIGG = 'yigg'

Detailed Description

Sets and services provides by the SocialBookmarking module.

Author:
Gerd Riesselmann

Definition at line 8 of file socialbookmarking.cls.php.


Member Function Documentation

static SocialBookmarking::create_set ( set_name  )  [static]

Create a set of Bookmark Items.

Parameters:
$set_name 
Returns:
array

Definition at line 99 of file socialbookmarking.cls.php.

00099                                                      {
00100                 $ret = Arr::get_item(self::$defined_sets, $set_name, false);
00101                 if ($ret === false) {
00102                         switch ($set_name) {
00103                                 case self::SET_POPULAR_EN:
00104                                         $ret = array(
00105                                                 self::EMAIL, 
00106                                                 self::FACEBOOK, self::MYSPACE, self::TWITTER, 
00107                                                 self::DIGG, self::STUMBLEUPON, self::REDDIT, self::DELICIOUS, 
00108                                                 self::GOOGLE, self::WINDOWS_LIVE, self::TECHNORATI 
00109                                         );
00110                                         break;
00111                                 case self::SET_TECH_EN:
00112                                         $ret = array(
00113                                                 self::EMAIL, 
00114                                                 self::TWITTER, self::FACEBOOK, self::GOOGLE_BUZZ,  
00115                                                 self::DIGG, self::DELICIOUS, self::STUMBLEUPON, self::REDDIT
00116                                         );
00117                                         break;
00118                                 case self::SET_POPULAR_DE:
00119                                         $ret = array(
00120                                                 self::EMAIL, 
00121                                                 self::FACEBOOK, self::MYSPACE, self::TWITTER, 
00122                                                 self::MISTER_WONG, self::YIGG, self::DELICIOUS,
00123                                                 self::WEBNEWS, 
00124                                                 self::GOOGLE, self::WINDOWS_LIVE 
00125                                         );
00126                                         break;                          
00127                                 default:
00128                                         $ret = array(self::EMAIL);
00129                                         break;
00130                         }       
00131                 }
00132                 return $ret;
00133         }
static SocialBookmarking::define_set ( name,
arr_services  
) [static]

Define a set.

Predefined sets also can be overwritten

Parameters:
string  $name Name of set
array  $arr_services Array of services in set
Returns:
void

Definition at line 144 of file socialbookmarking.cls.php.

00144                                                                 {
00145                 self::$defined_sets[$name] = $arr_services;
00146         }
static SocialBookmarking::get_all_services (  )  [static]

Returns configuration for all available services.

Returns:
array

Definition at line 59 of file socialbookmarking.cls.php.

00059                                                   {
00060                 $ret = RuntimeCache::get('socialbookmarking_services', false);
00061                 if ($ret === false) {
00062                         Load::components('socialbookmark');
00063                         $ret = array(
00064                                 self::EMAIL => new SocialBookmark(tr('Mail to a friend', 'socialbookmarking'), 'mailto:?subject=%TITLE%&body=%TITLE%: %URL%', 'email.gif'),
00065                                 self::TWITTER => new SocialBookmark(tr('Tweet it', 'socialbookmarking'), 'http://twitter.com/home?status=%TITLE%:+%URL%', 'twitter.gif'),
00066                                 self::FACEBOOK => new SocialBookmark(tr('Send to Facebook', 'socialbookmarking'), 'http://www.facebook.com/sharer.php?u=%URL%&t=%TITLE%', 'facebook.gif'),
00067                                 self::GOOGLE_BUZZ => new SocialBookmark(tr('Buzz this!', 'socialbookmarking'), 'http://www.google.com/reader/link?url=%URL%&title=%TITLE%', 'google_buzz.png'),
00068                                 self::DIGG => new SocialBookmark(tr('Digg it!', 'socialbookmarking'), 'http://digg.com/submit?phase=2&url=%URL%', 'digg.png'),
00069                                 self::MYSPACE => new SocialBookmark(tr('Add to MySpace', 'socialbookmarking'), 'http://www.myspace.com/Modules/PostTo/Pages/?c=%URL%&t=%TITLE%', 'myspace.gif'),
00070                                 self::STUMBLEUPON => new SocialBookmark(tr('Bookmark on StumbleUpon', 'socialbookmarking'), 'http://www.stumbleupon.com/submit?url=%URL%&title=%TITLE%', 'stumbleupon.gif'),
00071                                 self::REDDIT => new SocialBookmark(tr('Bookmark on Reddit', 'socialbookmarking'), 'http://reddit.com/submit?url=%URL%&title=%TITLE%', 'reddit.gif'),
00072                                 self::DELICIOUS => new SocialBookmark(tr('Add to Delicious', 'socialbookmarking'), 'http://delicious.com/post?url=%URL%&title=%TITLE%', 'delicious.png'),
00073                                 self::GOOGLE => new SocialBookmark(tr('Add to Google Bookmarks', 'socialbookmarking'), 'http://www.google.com/bookmarks/mark?op=add&bkmk=%URL%&title=%TITLE%', 'google.png'),
00074                                 self::WINDOWS_LIVE => new SocialBookmark(tr('Bookmark on Live.com', 'socialbookmarking'), 'https://favorites.live.com/quickadd.aspx?marklet=1&mkt=en-us&url=%URL%&title=%TITLE%&top=1', 'live.gif'),
00075                                 self::TECHNORATI => new SocialBookmark(tr('Add to Technorati', 'socialbookmarking'), 'http://www.technorati.com/faves?add=%URL%', 'technorati.gif'),
00076                                 // End top 10
00077                                 self::FURL => new SocialBookmark(tr('Add to Furl', 'socialbookmarking'), 'http://furl.net/storeIt.jsp?t=%TITLE%&u=%URL%', 'furl.png'),
00078                                 self::NETSCAPE => new SocialBookmark(tr('Boomark on Netscape', 'socialbookmarking'), 'http://www.netscape.com/submit/?U=%URL%&T=%TITLE%', 'netscape.png'),
00079                                 self::NEWSVINE => new SocialBookmark(tr('Bookmark on Newsvine', 'socialbookmarking'), 'http://www.newsvine.com/_wine/save?u=%URL%&h=%TITLE%', 'newsvine.gif'),
00080                                 self::BLOGSMARK => new SocialBookmark(tr('Add to BlogMarks.net', 'socialbookmarking'), 'http://blogmarks.net/my/new.php?mini=1&url=%URL%&title=%TITLE%', 'blogmarks.gif'),
00081                                 //self::MAGNOLIA => new SocialBookmark(tr('Add to Ma.gnolia', 'socialbookmarking'), 'http://ma.gnolia.com/bookmarklet/add?url=%URL%&title=%TITLE%', 'magnolia.gif'),
00082                                 // German
00083                                 self::MISTER_WONG => new SocialBookmark(tr('Bookmark at Mister Wong', 'socialbookmarking'), 'http://www.mister-wong.com/index.php?action=addurl&bm_url=%URL%&bm_description=%TITLE%', 'misterwong.gif'),
00084                                 self::YIGG => new SocialBookmark(tr('Add to Yigg', 'socialbookmarks'), 'http://yigg.de/neu?exturl=%URL%&title=%TITLE%', 'yigg.png'),
00085                                 self::WEBNEWS => new SocialBookmark(tr('Post on Webnews', 'socialbookmarks'), 'http://www.webnews.de/einstellen?url=%URL%&title=%TITLE%', 'webnews.gif'),
00086                                 
00087                         );
00088                         RuntimeCache::set('socialbookmarking_services', $ret);
00089                 }
00090                 return $ret;
00091         }
static SocialBookmarking::get_service ( name  )  [static]

Return service with given name - if available.

Parameters:
string  $name
Returns:
SocialBookmark

Definition at line 154 of file socialbookmarking.cls.php.

00154                                                   {
00155                 $all = self::get_all_services();
00156                 return Arr::get_item($all, $name, false);
00157         } 

Member Data Documentation

const SocialBookmarking::BLOGSMARK = 'blogsmark'

Definition at line 9 of file socialbookmarking.cls.php.

const SocialBookmarking::DELICIOUS = 'del.icio.us'

Definition at line 10 of file socialbookmarking.cls.php.

const SocialBookmarking::DIGG = 'digg'

Definition at line 11 of file socialbookmarking.cls.php.

const SocialBookmarking::EMAIL = 'email'

Definition at line 26 of file socialbookmarking.cls.php.

const SocialBookmarking::FACEBOOK = 'facebook'

Definition at line 12 of file socialbookmarking.cls.php.

const SocialBookmarking::FURL = 'furl'

Definition at line 13 of file socialbookmarking.cls.php.

const SocialBookmarking::GOOGLE = 'google'

Definition at line 14 of file socialbookmarking.cls.php.

Definition at line 15 of file socialbookmarking.cls.php.

const SocialBookmarking::MISTER_WONG = 'misterwong'

Definition at line 28 of file socialbookmarking.cls.php.

const SocialBookmarking::MYSPACE = 'myspace'

Definition at line 18 of file socialbookmarking.cls.php.

const SocialBookmarking::NETSCAPE = 'netscape'

Definition at line 19 of file socialbookmarking.cls.php.

const SocialBookmarking::NEWSVINE = 'newsvine'

Definition at line 20 of file socialbookmarking.cls.php.

const SocialBookmarking::REDDIT = 'reddit'

Definition at line 21 of file socialbookmarking.cls.php.

Services popular in Germany.

Definition at line 41 of file socialbookmarking.cls.php.

const SocialBookmarking::SET_TECH_EN = 'set_tech_en'

Bookmarking tools commonly found on US tech sites.

Definition at line 45 of file socialbookmarking.cls.php.

const SocialBookmarking::STUMBLEUPON = 'stumbleupon'

Definition at line 22 of file socialbookmarking.cls.php.

const SocialBookmarking::TECHNORATI = 'technarati'

Definition at line 23 of file socialbookmarking.cls.php.

const SocialBookmarking::TWITTER = 'twitter'

Definition at line 24 of file socialbookmarking.cls.php.

const SocialBookmarking::WEBNEWS = 'webnews'

Definition at line 30 of file socialbookmarking.cls.php.

Definition at line 25 of file socialbookmarking.cls.php.

const SocialBookmarking::YAHOO = 'yahoo'

Definition at line 16 of file socialbookmarking.cls.php.

const SocialBookmarking::YIGG = 'yigg'

Definition at line 29 of file socialbookmarking.cls.php.


The documentation for this class was generated from the following file: