Dotclear

Changeset 2970


Ignore:
Timestamp:
02/21/11 03:12:57 (12 years ago)
Author:
JcDenis
Message:

soCialMeLibMore 0.3

Location:
plugins/soCialMeLibMore
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • plugins/soCialMeLibMore/_define.php

    r2944 r2970  
    1717     /* Description*/         "More services for the plugin SoCialMe", 
    1818     /* Author */             "JC Denis", 
    19      /* Version */            '0.2', 
     19     /* Version */            '0.3', 
    2020     /* Permissions */        'admin' 
    2121); 
    22      /* date */          #20110213 
     22     /* date */          #20110220 
    2323?> 
  • plugins/soCialMeLibMore/_prepend.php

    r2944 r2970  
    7272$__autoload['feedMoreSoCialMeReaderService'] = dirname(__FILE__).'/inc/lib.social.reader.srv.more.php'; 
    7373$core->addBehavior('soCialMeReaderService',create_function(null,'return array("feed","feedMoreSoCialMeReaderService");')); 
    74  
    75  
    76 //ajouter RSS, flattr, sharethis... 
    7774?> 
  • plugins/soCialMeLibMore/inc/lib.social.profil.srv.more.php

    r2944 r2970  
    2222     protected $setting_ns = 'soCialMeLibMore'; 
    2323     protected $setting_id = 'soCialMe_profil_delicious'; 
    24      protected $available = true; 
    25      protected $config = array('uri' => ''); 
     24      
    2625     protected $define = array( 
    2726          'id' => 'delicious', 
     
    3029          'icon' => 'pf=soCialMeLibMore/inc/icons/delicious.png' 
    3130     ); 
     31      
    3232     protected $actions = array( 
    3333          'playIconContent'=>true, 
    3434          'playSmallContent'=>false,//have it! 
    3535          'playBigContent'=>true 
     36     ); 
     37      
     38     protected $config = array( 
     39          'uri' => '' 
    3640     ); 
    3741      
     
    6165     } 
    6266      
    63      public function init() { $this->readSettings(); return true; } 
    64      public function parseContent($img) { return empty($this->config['uri']) ? null : soCialMeUtils::preloadBox(soCialMeUtils::easyLink('http://delicious.com/'.$this->config['uri'],$this->name,$this->url.$img,'profil')); } 
     67     public function parseContent($img) 
     68     { 
     69          if (empty($this->config['uri'])) return null; 
     70           
     71          $record[0] = array( 
     72               'service' => $this->id, 
     73               'source_name' => $this->name, 
     74               'source_url' => $this->home, 
     75               'source_icon' => $this->icon, 
     76               'preload' => true, 
     77               'title' => sprintf(__('View my profil on %s'),$this->name), 
     78               'avatar' => $this->url.$img, 
     79               'url' => 'http://delicious.com/'.$this->config['uri'] 
     80          ); 
     81          return $record; 
     82     } 
     83      
     84     public function init() { $this->readSettings(); $this->available = true; return true; } 
    6585     public function playIconContent() { return $this->parseContent('pf=soCialMeLibMore/inc/icons/delicious.png'); } 
    6686     public function playSmallContent() { return $this->parseContent('pf=soCialMeLibMore/inc/icons/delicious-small.png'); } 
     
    7090class feedburnerMoreSoCialMeProfilService extends soCialMeService 
    7191{ 
    72      protected $config = array('uri' => ''); 
    7392     protected $part = 'profil'; 
    7493     protected $setting_ns = 'soCialMeLibMore'; 
    7594     protected $setting_id = 'soCialMe_profil_feedburner'; 
    76      protected $available = true; 
     95      
    7796     protected $define = array( 
    7897          'id' => 'feedburner', 
     
    81100          'icon' => 'pf=soCialMeLibMore/inc/icons/feedburner.png' 
    82101     ); 
     102      
    83103     protected $actions = array( 
    84104          'playIconContent'=>true, 
    85105          'playBigContent'=>true 
     106     ); 
     107      
     108     protected $config = array( 
     109          'uri' => '' 
    86110     ); 
    87111      
     
    111135     } 
    112136      
    113      public function init() { $this->readSettings(); return true; } 
    114      public function parseContent($img) { return empty($this->config['uri']) ? null : soCialMeUtils::preloadBox(soCialMeUtils::easyLink('http://feeds.feedburner.com/'.$this->config['uri'],$this->name,$this->url.$img,'profil')); } 
     137     public function parseContent($img) 
     138     { 
     139          if (empty($this->config['uri'])) return null; 
     140           
     141          $record[0] = array( 
     142               'service' => $this->id, 
     143               'source_name' => $this->name, 
     144               'source_url' => $this->home, 
     145               'source_icon' => $this->icon, 
     146               'preload' => true, 
     147               'title' => sprintf(__('View my profil on %s'),$this->name), 
     148               'avatar' => $this->url.$img, 
     149               'url' => 'http://feeds.feedburner.com/'.$this->config['uri'] 
     150          ); 
     151          return $record; 
     152     } 
     153      
     154     public function init() { $this->readSettings(); $this->available = true; return true; } 
    115155     public function playIconContent() { return $this->parseContent('pf=soCialMeLibMore/inc/icons/feedburner.png'); } 
    116156     public function playSmallContent() { return $this->parseContent('pf=soCialMeLibMore/inc/icons/feedburner-small.png'); } 
     
    120160class flickrMoreSoCialMeProfilService extends soCialMeService 
    121161{ 
    122      protected $config = array('uri' => ''); 
    123162     protected $part = 'profil'; 
    124163     protected $setting_ns = 'soCialMeLibMore'; 
    125164     protected $setting_id = 'soCialMe_profil_flickr'; 
    126      protected $available = true; 
     165      
    127166     protected $define = array( 
    128167          'id' => 'flickr', 
     
    131170          'icon' => 'pf=soCialMeLibMore/inc/icons/flickr.png' 
    132171     ); 
     172      
    133173     protected $actions = array( 
    134174          'playIconContent'=>true, 
    135175          'playSmallContent'=>false,//have it! 
    136176          'playBigContent'=>true 
     177     ); 
     178      
     179     protected $config = array( 
     180          'uri' => '' 
    137181     ); 
    138182      
     
    162206     } 
    163207      
    164      public function init() { $this->readSettings(); return true; } 
    165      public function parseContent($img) { return empty($this->config['uri']) ? null : soCialMeUtils::preloadBox(soCialMeUtils::easyLink('http://www.flickr.com/photos/'.$this->config['uri'],$this->name,$this->url.$img,'profil')); } 
     208     public function parseContent($img) 
     209     { 
     210          if (empty($this->config['uri'])) return null; 
     211           
     212          $record[0] = array( 
     213               'service' => $this->id, 
     214               'source_name' => $this->name, 
     215               'source_url' => $this->home, 
     216               'source_icon' => $this->icon, 
     217               'preload' => true, 
     218               'title' => sprintf(__('View my profil on %s'),$this->name), 
     219               'avatar' => $this->url.$img, 
     220               'url' => 'http://www.flickr.com/photos/'.$this->config['uri'] 
     221          ); 
     222          return $record; 
     223     } 
     224      
     225     public function init() { $this->readSettings(); $this->available = true; return true; } 
    166226     public function playIconContent() { return $this->parseContent('pf=soCialMeLibMore/inc/icons/flickr.png'); } 
    167227     public function playSmallContent() { return $this->parseContent('pf=soCialMeLibMore/inc/icons/flickr-small.png'); } 
     
    171231class netvibesMoreSoCialMeProfilService extends soCialMeService 
    172232{ 
    173      protected $config = array('uri' => ''); 
    174233     protected $part = 'profil'; 
    175234     protected $setting_ns = 'soCialMeLibMore'; 
    176235     protected $setting_id = 'soCialMe_profil_netvibes'; 
    177      protected $available = true; 
     236      
    178237     protected $define = array( 
    179238          'id' => 'netvibes', 
     
    182241          'icon' => 'pf=soCialMeLibMore/inc/icons/netvibes.png' 
    183242     ); 
     243      
    184244     protected $actions = array( 
    185245          'playIconContent'=>true, 
    186246          'playSmallContent'=>false,//have it! 
    187247          'playBigContent'=>true 
     248     ); 
     249      
     250     protected $config = array( 
     251          'uri' => '' 
    188252     ); 
    189253      
     
    213277     } 
    214278      
    215      public function init() { $this->readSettings(); return true; } 
    216      public function parseContent($img) { return empty($this->config['uri']) ? null : soCialMeUtils::preloadBox(soCialMeUtils::easyLink('http://netvibes.com/'.$this->config['uri'],$this->name,$this->url.$img,'profil')); } 
     279     public function parseContent($img) 
     280     { 
     281          if (empty($this->config['uri'])) return null; 
     282           
     283          $record[0] = array( 
     284               'service' => $this->id, 
     285               'source_name' => $this->name, 
     286               'source_url' => $this->home, 
     287               'source_icon' => $this->icon, 
     288               'preload' => true, 
     289               'title' => sprintf(__('View my profil on %s'),$this->name), 
     290               'avatar' => $this->url.$img, 
     291               'url' => 'http://netvibes.com/'.$this->config['uri'] 
     292          ); 
     293          return $record; 
     294     } 
     295      
     296     public function init() { $this->readSettings(); $this->available = true; return true; } 
    217297     public function playIconContent() { return $this->parseContent('pf=soCialMeLibMore/inc/icons/netvibes.png'); } 
    218298     public function playSmallContent() { return $this->parseContent('pf=soCialMeLibMore/inc/icons/netvibes-small.png'); } 
  • plugins/soCialMeLibMore/inc/lib.social.reader.srv.more.php

    r2944 r2970  
    1616// temporaly include in "more" soCialMe plugin 
    1717 
     18# feed 
    1819class feedMoreSoCialMeReaderService extends soCialMeService 
    1920{ 
    20      protected $config = array( 
    21           'feed' => '' 
    22      ); 
     21     protected $part = 'reader'; 
     22     protected $setting_ns = 'soCialMeLibMore'; 
     23     protected $setting_id = 'soCialMe_reader_feed'; 
     24      
    2325     protected $define = array( 
    2426          'id' => 'feed', 
     
    2729          'icon' => 'pf=soCialMeLibMore/inc/icons/feed.png' 
    2830     ); 
     31      
    2932     protected $actions = array( 
    3033          'playServerScript' => true, 
     
    3235          'playPageContent' => true 
    3336     ); 
    34      protected $setting_ns = 'soCialMeLibMore'; 
    35      protected $setting_id = 'soCialMe_reader_feed'; 
    36      protected $available = true; 
    37      protected $part = 'reader'; 
    3837      
    39      private $cache_timeout = 900; // 15 minutes 
     38     protected $config = array( 
     39          'feed' => '' 
     40     ); 
    4041      
    41      public function init() { $this->readSettings(); return true; } 
     42     public function init() { $this->readSettings(); $this->available = true; return true; } 
    4243     public function playWidgetContent() { return self::parseContent(); } 
    4344     public function playPageContent() { return self::parseContent(); } 
     
    7273          if (empty($this->config['feed'])) return ''; 
    7374           
    74           $file_feed_content = $this->core->blog->id.$this->id.'feed_content'; 
     75          $file = $this->core->blog->id.$this->id.'feed_content'; 
    7576           
    76           if(isset($available['Widget']) && in_array($this->id,$available['Widget'])   
    77           && soCialMeCacheFile::expired($file_feed_content,'enc',$this->cache_timeout)) 
     77          if(!isset($available['Widget']) || !in_array($this->id,$available['Widget'])   
     78           || soCialMeCacheFile::expired($file,'enc',$this->cache_timeout)) 
    7879          { 
    79                $records = null; 
    80                $i = 0; 
     80               return; 
     81          } 
     82           
     83          $i = 0; 
     84          $records = null; 
     85          $this->log('Get','playServerScript','feed_content'); 
     86           
     87          $feeds = explode("\n",trim($this->config['feed'])); 
     88          foreach($feeds as $feed) 
     89          { 
     90               $feed = trim($feed); 
     91               if (empty($feed)) continue; 
    8192                
    82                $feeds = explode("\n",trim($this->config['feed'])); 
    83                foreach($feeds as $feed) 
     93               try 
    8494               { 
    85                     $feed = trim($feed); 
    86                     if (empty($feed)) continue; 
     95                    $feed_reader = new feedReader; 
     96                    $feed_reader->setCacheDir(DC_TPL_CACHE); 
     97                    $feed_reader->setTimeout(2); 
     98                    $feed_reader->setUserAgent('soCialMeReader'); 
     99                    $f = $feed_reader->parse($feed); 
    87100                     
    88                     try 
     101                    if (!$f->items) continue; 
     102                     
     103                    foreach($f->items as $item) 
    89104                    { 
    90                          $feed_reader = new feedReader; 
    91                          $feed_reader->setCacheDir(DC_TPL_CACHE); 
    92                          $feed_reader->setTimeout(2); 
    93                          $feed_reader->setUserAgent('soCialMeReader'); 
    94                          $f = $feed_reader->parse($feed); 
     105                         $records[$i]['author'] = $item->creator; 
     106                         $records[$i]['service'] = $this->id; 
     107                         $records[$i]['date'] = $item->TS; 
     108                         $records[$i]['title'] = $item->title; 
     109                         $records[$i]['content'] = $item->content; 
     110                         $records[$i]['url'] = $item->link; 
     111                         $records[$i]['source_name'] = $f->title; 
     112                         $records[$i]['source_url'] = $f->link; 
     113                         $records[$i]['source_icon'] = $this->icon; 
    95114                          
    96                          if (!$f->items) continue; 
    97                           
    98                          foreach($f->items as $item) 
    99                          { 
    100                               $records[$i]['author'] = $item->creator; 
    101                               $records[$i]['service'] = $this->id; 
    102                               $records[$i]['date'] = $item->TS; 
    103                               $records[$i]['title'] = $item->title; 
    104                               $records[$i]['content'] = $item->content; 
    105                               $records[$i]['url'] = $item->link; 
    106                               $records[$i]['source_name'] = $f->title; 
    107                               $records[$i]['source_url'] = $f->link; 
    108                               $records[$i]['source_icon'] = $this->icon; 
    109                                
    110                               $i++; 
    111                          } 
     115                         $i++; 
    112116                    } 
    113                     catch (Exception $e) {} 
    114117               } 
    115                if (!empty($records)) { 
    116                     soCialMeCacheFile::write($file_feed_content,'enc',soCialMeUtils::encode($records)); 
    117                } 
     118               catch (Exception $e) {} 
     119          } 
     120           
     121          # Set cache file 
     122          if (empty($records)) { 
     123               soCialMeCacheFile::touch($file,'enc'); 
     124          } 
     125          else { 
     126               soCialMeCacheFile::write($file,'enc',soCialMeUtils::encode($records)); 
    118127          } 
    119128     } 
     
    130139     } 
    131140} 
    132  
    133141?> 
  • plugins/soCialMeLibMore/inc/lib.social.sharer.srv.more.php

    r2944 r2970  
    1919class beboMoreSoCialMeSharerService extends soCialMeService 
    2020{ 
     21     protected $part = 'sharer'; 
     22     protected $available = true; 
     23      
    2124     protected $define = array( 
    2225          'id' => 'bebo', 
     
    2528          'icon' => 'pf=soCialMeLibMore/inc/icons/bebo.png' 
    2629     ); 
    27      protected $actions = array('playIconContent' => true); 
    28      protected $available = true; 
    29      protected $part = 'sharer'; 
    30       
    31      public function playIconContent($record) 
    32      { 
    33           if (!$record || empty($record['title'])) return; 
    34            
    35           $url = !empty($record['shorturl']) ? $record['shorturl'] : $record['url']; 
    36           $title = html::clean($record['title']); 
    37            
    38           return soCialMeUtils::preloadBox(soCialMeUtils::easyLink('http://www.bebo.com/c/share?Url='.urlencode($url).'&Title='.urlencode($title),$this->name,$this->icon)); 
     30      
     31     protected $actions = array( 
     32          'playIconContent' => true 
     33     ); 
     34      
     35     public function playIconContent($post) 
     36     { 
     37          if (!$post || empty($post['title'])) return; 
     38           
     39          $url = !empty($post['shorturl']) ? $post['shorturl'] : $post['url']; 
     40          $title = html::clean($post['title']); 
     41           
     42          $record[0] = array( 
     43               'service' => $this->id, 
     44               'source_name' => $this->name, 
     45               'source_url' => $this->home, 
     46               'source_icon' => $this->icon, 
     47               'preload' => true, 
     48               'title' => sprintf(__('Share on %s'),$this->name), 
     49               'avatar' => $this->icon, 
     50               'url' => 'http://www.bebo.com/c/share?Url='.urlencode($url).'&Title='.urlencode($title) 
     51          ); 
     52          return $record; 
    3953     } 
    4054} 
     
    4256class blinklistMoreSoCialMeSharerService extends soCialMeService 
    4357{ 
     58     protected $part = 'sharer'; 
     59     protected $available = true; 
     60      
    4461     protected $define = array( 
    4562          'id' => 'blinklist', 
     
    4865          'icon' => 'pf=soCialMeLibMore/inc/icons/blinklist.png' 
    4966     ); 
    50      protected $actions = array('playIconContent' => true); 
    51      protected $available = true; 
    52      protected $part = 'sharer'; 
    53       
    54      public function playIconContent($record) 
    55      { 
    56           if (!$record || empty($record['title'])) return; 
    57            
    58           $url = !empty($record['shorturl']) ? $record['shorturl'] : $record['url']; 
    59           $title = html::clean($record['title']); 
    60            
    61           return soCialMeUtils::preloadBox(soCialMeUtils::easyLink('http://blinklist.com/blink?t='.urlencode($title).'&u='.urlencode($url),$this->name,$this->icon)); 
     67      
     68     protected $actions = array( 
     69          'playIconContent' => true 
     70     ); 
     71      
     72     public function playIconContent($post) 
     73     { 
     74          if (!$post || empty($post['title'])) return; 
     75           
     76          $url = !empty($post['shorturl']) ? $post['shorturl'] : $post['url']; 
     77          $title = html::clean($post['title']); 
     78           
     79          $record[0] = array( 
     80               'service' => $this->id, 
     81               'source_name' => $this->name, 
     82               'source_url' => $this->home, 
     83               'source_icon' => $this->icon, 
     84               'preload' => true, 
     85               'title' => sprintf(__('Share on %s'),$this->name), 
     86               'avatar' => $this->icon, 
     87               'url' => 'http://blinklist.com/blink?t='.urlencode($title).'&u='.urlencode($url) 
     88          ); 
     89          return $record; 
    6290     } 
    6391} 
     
    6593class blogmarksMoreSoCialMeSharerService extends soCialMeService 
    6694{ 
     95     protected $part = 'sharer'; 
     96     protected $available = true; 
     97      
    6798     protected $define = array( 
    6899          'id' => 'blogmarks', 
     
    71102          'icon' => 'pf=soCialMeLibMore/inc/icons/blogmarks.gif' 
    72103     ); 
    73      protected $actions = array('playIconContent' => true); 
    74      protected $available = true; 
    75      protected $part = 'sharer'; 
    76       
    77      public function playIconContent($record) 
    78      { 
    79           if (!$record || empty($record['title'])) return; 
    80            
    81           $url = !empty($record['shorturl']) ? $record['shorturl'] : $record['url']; 
    82           $title = html::clean($record['title']); 
    83            
    84           return soCialMeUtils::preloadBox(soCialMeUtils::easyLink('http://blogmarks.net/my/new.php?mini=1&simple=1&url='.urlencode($url).'&title='.urlencode($title),$this->name,$this->icon)); 
     104      
     105     protected $actions = array( 
     106          'playIconContent' => true 
     107     ); 
     108      
     109     public function playIconContent($post) 
     110     { 
     111          if (!$post || empty($post['title'])) return; 
     112           
     113          $url = !empty($post['shorturl']) ? $post['shorturl'] : $post['url']; 
     114          $title = html::clean($post['title']); 
     115           
     116          $record[0] = array( 
     117               'service' => $this->id, 
     118               'source_name' => $this->name, 
     119               'source_url' => $this->home, 
     120               'source_icon' => $this->icon, 
     121               'preload' => true, 
     122               'title' => sprintf(__('Share on %s'),$this->name), 
     123               'avatar' => $this->icon, 
     124               'url' => 'http://blogmarks.net/my/new.php?mini=1&simple=1&url='.urlencode($url).'&title='.urlencode($title) 
     125          ); 
     126          return $record; 
    85127     } 
    86128} 
     
    88130class bloglinesMoreSoCialMeSharerService extends soCialMeService 
    89131{ 
     132     protected $part = 'sharer'; 
     133     protected $available = true; 
     134      
    90135     protected $define = array( 
    91136          'id' => 'bloglines', 
     
    94139          'icon' => 'pf=soCialMeLibMore/inc/icons/bloglines.png' 
    95140     ); 
    96      protected $actions = array('playIconContent' => true); 
    97      protected $available = true; 
    98      protected $part = 'sharer'; 
    99       
    100      public function playIconContent($record) 
    101      { 
    102           if (!$record) return; 
    103            
    104           $url = !empty($record['shorturl']) ? $record['shorturl'] : $record['url']; 
    105            
    106           return soCialMeUtils::preloadBox(soCialMeUtils::easyLink('http://www.bloglines.com/sub/'.str_replace(array('http://','https://'),'',$url),$this->name,$this->icon)); 
     141      
     142     protected $actions = array( 
     143          'playIconContent' => true 
     144     ); 
     145      
     146     public function playIconContent($post) 
     147     { 
     148          if (!$post) return; 
     149           
     150          $url = !empty($post['shorturl']) ? $post['shorturl'] : $post['url']; 
     151           
     152          $record[0] = array( 
     153               'service' => $this->id, 
     154               'source_name' => $this->name, 
     155               'source_url' => $this->home, 
     156               'source_icon' => $this->icon, 
     157               'preload' => true, 
     158               'title' => sprintf(__('Share on %s'),$this->name), 
     159               'avatar' => $this->icon, 
     160               'url' => 'http://www.bloglines.com/sub/'.str_replace(array('http://','https://'),'',$url) 
     161          ); 
     162          return $record; 
    107163     } 
    108164} 
     
    110166class deliciousMoreSoCialMeSharerService extends soCialMeService 
    111167{ 
     168     protected $part = 'sharer'; 
     169     protected $available = true; 
     170      
    112171     protected $define = array( 
    113172          'id' => 'delicious', 
     
    116175          'icon' => 'pf=soCialMeLibMore/inc/icons/delicious.png' 
    117176     ); 
    118      protected $actions = array('playIconContent' => true); 
    119      protected $available = true; 
    120      protected $part = 'sharer'; 
    121       
    122      public function playIconContent($record) 
    123      { 
    124           if (!$record || empty($record['title'])) return; 
    125            
    126           $url = !empty($record['shorturl']) ? $record['shorturl'] : $record['url']; 
    127           $title = html::clean($record['title']); 
    128            
    129           return soCialMeUtils::preloadBox(soCialMeUtils::easyLink('http://delicious.com/save?url='.urlencode($url).'&title='.urlencode($title),$this->name,$this->icon)); 
     177     protected $actions = array( 
     178          'playIconContent' => true 
     179     ); 
     180      
     181     public function playIconContent($post) 
     182     { 
     183          if (!$post || empty($post['title'])) return; 
     184           
     185          $url = !empty($post['shorturl']) ? $post['shorturl'] : $post['url']; 
     186          $title = html::clean($post['title']); 
     187           
     188          $record[0] = array( 
     189               'service' => $this->id, 
     190               'source_name' => $this->name, 
     191               'source_url' => $this->home, 
     192               'source_icon' => $this->icon, 
     193               'preload' => true, 
     194               'title' => sprintf(__('Share on %s'),$this->name), 
     195               'avatar' => $this->icon, 
     196               'url' => 'http://delicious.com/save?url='.urlencode($url).'&title='.urlencode($title) 
     197          ); 
     198          return $record; 
    130199     } 
    131200} 
     
    133202class diggMoreSoCialMeSharerService extends soCialMeService 
    134203{ 
     204     protected $part = 'sharer'; 
     205     protected $available = true; 
     206      
    135207     protected $define = array( 
    136208          'id' => 'digg', 
     
    139211          'icon' => 'pf=soCialMeLibMore/inc/icons/digg.png' 
    140212     ); 
     213      
    141214     protected $actions = array( 
    142215          'playPublicScript' => true, 
     
    145218          'playBigContent' => true 
    146219     ); 
    147      protected $available = true; 
    148      protected $part = 'sharer'; 
    149220      
    150221     public function playPublicScript($available) 
     
    167238     } 
    168239      
    169      public function playIconContent($record) 
    170      { 
    171           return $this->parseContent('DiggIcon',$record); 
    172      } 
    173       
    174      public function playBigContent($record) 
    175      { 
    176           return $this->parseContent('DiggMedium',$record); 
    177      } 
    178       
    179      public function playSmallContent($record) 
    180      { 
    181           return $this->parseContent('DiggCompact',$record); 
    182      } 
    183       
    184      private function parseContent($type,$record) 
    185      { 
    186           if (!$record || empty($record['title'])) return; 
    187            
    188           $url = !empty($record['shorturl']) ? $record['shorturl'] : $record['url']; 
    189           $title = html::clean($record['title']); 
    190            
    191           return  
    192           '<a class="DiggThisButton '.$type.'" href="http://digg.com/submit?'. 
    193           'url='.urlencode($url).'&amp;title='.urlencode($title).'"></a>'; 
     240     public function playIconContent($post) 
     241     { 
     242          return $this->parseContent('DiggIcon',$post); 
     243     } 
     244      
     245     public function playBigContent($post) 
     246     { 
     247          return $this->parseContent('DiggMedium',$post); 
     248     } 
     249      
     250     public function playSmallContent($post) 
     251     { 
     252          return $this->parseContent('DiggCompact',$post); 
     253     } 
     254      
     255     private function parseContent($type,$post) 
     256     { 
     257          if (!$post || empty($post['title'])) return; 
     258           
     259          $url = !empty($post['shorturl']) ? $post['shorturl'] : $post['url']; 
     260          $title = html::clean($post['title']); 
     261           
     262          $record[0] = array( 
     263               'service' => $this->id, 
     264               'source_name' => $this->name, 
     265               'source_url' => $this->home, 
     266               'source_icon' => $this->icon, 
     267               'content' => '<a class="DiggThisButton '.$type.'" href="http://digg.com/submit?url='.urlencode($url).'&amp;title='.urlencode($title).'"></a>' 
     268          ); 
     269          return $record; 
    194270     } 
    195271} 
     
    198274class diigoMoreSoCialMeSharerService extends soCialMeService 
    199275{ 
     276     protected $part = 'sharer'; 
     277     protected $available = true; 
     278      
    200279     protected $define = array( 
    201280          'id' => 'diigo', 
     
    204283          'icon' => 'pf=soCialMeLibMore/inc/icons/diigo.png' 
    205284     ); 
    206      protected $actions = array('playIconContent' => true); 
    207      protected $available = true; 
    208      protected $part = 'sharer'; 
    209       
    210      public function playIconContent($record) 
    211      { 
    212           if (!$record || empty($record['title'])) return; 
    213            
    214           $url = !empty($record['shorturl']) ? $record['shorturl'] : $record['url']; 
    215           $title = html::clean($record['title']); 
    216            
    217           return soCialMeUtils::preloadBox(soCialMeUtils::easyLink('http://www.diigo.com/post?url='.urlencode($url).'&title='.urlencode($title),$this->name,$this->icon)); 
     285      
     286     protected $actions = array( 
     287          'playIconContent' => true 
     288     ); 
     289      
     290     public function playIconContent($post) 
     291     { 
     292          if (!$post || empty($post['title'])) return; 
     293           
     294          $url = !empty($post['shorturl']) ? $post['shorturl'] : $post['url']; 
     295          $title = html::clean($post['title']); 
     296           
     297          $record[0] = array( 
     298               'service' => $this->id, 
     299               'source_name' => $this->name, 
     300               'source_url' => $this->home, 
     301               'source_icon' => $this->icon, 
     302               'preload' => true, 
     303               'title' => sprintf(__('Share on %s'),$this->name), 
     304               'avatar' => $this->icon, 
     305               'url' => 'http://www.diigo.com/post?url='.urlencode($url).'&amp;title='.urlencode($title) 
     306          ); 
     307          return $record; 
    218308     } 
    219309} 
     
    221311class dzoneMoreSoCialMeSharerService extends soCialMeService 
    222312{ 
     313     protected $part = 'sharer'; 
     314     protected $available = true; 
     315      
    223316     protected $define = array( 
    224317          'id' => 'dzone', 
     
    227320          'icon' => 'pf=soCialMeLibMore/inc/icons/dzone.png' 
    228321     ); 
     322      
    229323     protected $actions = array( 
    230324          'playIconContent' => true, 
     
    232326          'playBigContent' => true 
    233327     ); 
    234      protected $available = true; 
    235      protected $part = 'sharer'; 
     328      
    236329     private $script_loaded = false; 
    237330      
    238      public function playIconContent($record) 
    239      { 
    240           if (!$record || empty($record['title'])) return; 
    241            
    242           $url = !empty($record['shorturl']) ? $record['shorturl'] : $record['url']; 
    243           $title = html::clean($record['title']); 
    244            
    245           return soCialMeUtils::preloadBox(soCialMeUtils::easyLink('http://www.dzone.com/links/add.html?url='.urlencode($url).'&amp;title='.urlencode($title),$this->name,$this->icon)); 
    246      } 
    247       
    248      public function playSmallContent($record) 
    249      { 
    250           return $this->parseContent(2,$record); 
    251      } 
    252       
    253      public function playBigContent($record) 
    254      { 
    255           return $this->parseContent(1,$record); 
    256      } 
    257       
    258      private function parseContent($type,$record) 
    259      { 
    260           if (!$record || empty($record['title'])) return; 
    261            
    262           $url = !empty($record['shorturl']) ? $record['shorturl'] : $record['url']; 
    263           $title = html::clean($record['title']); 
     331     public function playIconContent($post) 
     332     { 
     333          if (!$post || empty($post['title'])) return; 
     334           
     335          $url = !empty($post['shorturl']) ? $post['shorturl'] : $post['url']; 
     336          $title = html::clean($post['title']); 
     337           
     338          $record[0] = array( 
     339               'service' => $this->id, 
     340               'source_name' => $this->name, 
     341               'source_url' => $this->home, 
     342               'source_icon' => $this->icon, 
     343               'preload' => true, 
     344               'title' => sprintf(__('Share on %s'),$this->name), 
     345               'avatar' => $this->icon, 
     346               'url' => 'http://www.dzone.com/links/add.html?url='.urlencode($url).'&amp;title='.urlencode($title) 
     347          ); 
     348          return $record; 
     349     } 
     350      
     351     public function playSmallContent($post) 
     352     { 
     353          return $this->parseContent(2,$post); 
     354     } 
     355      
     356     public function playBigContent($post) 
     357     { 
     358          return $this->parseContent(1,$post); 
     359     } 
     360      
     361     private function parseContent($type,$post) 
     362     { 
     363          if (!$post || empty($post['title'])) return; 
     364           
     365          $url = !empty($post['shorturl']) ? $post['shorturl'] : $post['url']; 
     366          $title = html::clean($post['title']); 
    264367           
    265368          if ($type == '2') { 
     
    270373          } 
    271374           
    272           return  
    273           soCialMeUtils::preloadBox( 
    274                '<iframe src="http://widgets.dzone.com/links/widgets/zoneit.html?'. 
    275                't='.$type.'&amp;url='.urlencode($url).'&amp;title='.urlencode($title). 
    276                '" height="'.$h.'" width="'.$w.'" scrolling="no" frameborder="0"></iframe>' 
    277           ); 
    278            
    279           /* 
    280           return  
    281           "\n<script type=\"text/javascript\">\n". 
    282           "var dzone_url = '".$url."';\n". 
    283           "var dzone_title = '".str_replace("'",'"',$text)."';\n". 
    284           "var dzone_style = '".$type."';\n". 
    285           "</script>\n". 
    286         "<script language=\"javascript\" src=\"http://widgets.dzone.com/links/widgets/zoneit.js\"></script>\n"; 
    287           //*/ 
     375          $record[0] = array( 
     376               'service' => $this->id, 
     377               'source_name' => $this->name, 
     378               'source_url' => $this->home, 
     379               'source_icon' => $this->icon, 
     380               'preload' => true, 
     381               'content' =>  
     382                    '<iframe src="http://widgets.dzone.com/links/widgets/zoneit.html?'. 
     383                    't='.$type.'&amp;url='.urlencode($url).'&amp;title='.urlencode($title). 
     384                    '" height="'.$h.'" width="'.$w.'" scrolling="no" frameborder="0"></iframe>' 
     385          ); 
     386          return $record; 
    288387     } 
    289388} 
     
    291390class emailMoreSoCialMeSharerService extends soCialMeService 
    292391{ 
     392     protected $part = 'sharer'; 
     393     protected $available = true; 
     394      
    293395     protected $define = array( 
    294396          'id' => 'email', 
     
    297399          'icon' => 'pf=soCialMeLibMore/inc/icons/email.png' 
    298400     ); 
    299      protected $actions = array('playIconContent' => true); 
    300      protected $available = true; 
    301      protected $part = 'sharer'; 
    302       
    303      public function playIconContent($record) 
    304      { 
    305           if (!$record || empty($record['title'])) return; 
    306            
    307           $url = !empty($record['shorturl']) ? $record['shorturl'] : $record['url']; 
    308           $title = html::clean($record['title']); 
     401      
     402     protected $actions = array( 
     403          'playIconContent' => true 
     404     ); 
     405      
     406     public function playIconContent($post) 
     407     { 
     408          if (!$post || empty($post['title'])) return; 
     409           
     410          $url = !empty($post['shorturl']) ? $post['shorturl'] : $post['url']; 
     411          $title = html::clean($post['title']); 
    309412           
    310413          $href = 'mailto:?Subject='.urlencode($title).'&amp;Body=%0D%0A'.urlencode($url); 
    311           $title = sprintf(__('Send by email')); 
    312            
    313           return  
    314           '<a href="'.$href.'" title="'.$title.'">'. 
    315           '<img src="'.$this->icon.'" alt="'.$title.'" />'. 
    316           '</a>'; 
     414           
     415          $record[0] = array( 
     416               'service' => $this->id, 
     417               'source_name' => $this->name, 
     418               'source_url' => $this->home, 
     419               'source_icon' => $this->icon, 
     420               'preload' => true, 
     421               'title' => __('Send by email'), 
     422               'avatar' => $this->icon, 
     423               'url' => $href 
     424          ); 
     425          return $record; 
    317426     } 
    318427} 
     
    320429class favoritesMoreSoCialMeSharerService extends soCialMeService 
    321430{ 
     431     protected $part = 'sharer'; 
     432     protected $available = true; 
     433      
    322434     protected $define = array( 
    323435          'id' => 'favorites', 
     
    326438          'icon' => 'pf=soCialMeLibMore/inc/icons/favorites.png' 
    327439     ); 
     440      
    328441     protected $actions = array( 
    329442          'playPublicScript'=>true, 
    330443          'playIconContent'=>true 
    331444     ); 
    332      protected $available = true; 
    333      protected $part = 'sharer'; 
    334445      
    335446     public function playPublicScript($available) 
     
    352463     } 
    353464      
    354      public function playIconContent($record) 
    355      { 
    356           if (!$record || empty($record['title'])) return; 
    357            
    358           $url = !empty($record['shorturl']) ? $record['shorturl'] : $record['url']; 
    359           $title = html::clean($record['title']); 
    360            
    361           return  
    362           '<a class="buttonFavorites" href="'.$url.'" title="'.html::escapeHTML($title).'">'. 
    363           '<img src="'.$this->icon.'" alt="'.$this->name.'" /></a>'; 
     465     public function playIconContent($post) 
     466     { 
     467          if (!$post || empty($post['title'])) return; 
     468           
     469          $url = !empty($post['shorturl']) ? $post['shorturl'] : $post['url']; 
     470          $title = html::clean($post['title']); 
     471           
     472          $record[0] = array( 
     473               'service' => $this->id, 
     474               'source_name' => $this->name, 
     475               'source_url' => $this->home, 
     476               'source_icon' => $this->icon, 
     477               'preload' => true, 
     478               'content' =>  
     479                    '<a class="buttonFavorites" href="'.$url.'" title="'.html::escapeHTML($title).'">'. 
     480                    '<img src="'.$this->icon.'" alt="'.$this->name.'" /><\/a>' 
     481          ); 
     482          return $record; 
    364483     } 
    365484} 
     
    367486class farkMoreSoCialMeSharerService extends soCialMeService 
    368487{ 
     488     protected $part = 'sharer'; 
     489     protected $available = true; 
     490      
    369491     protected $define = array( 
    370492          'id' => 'fark', 
     
    373495          'icon' => 'pf=soCialMeLibMore/inc/icons/fark.gif' 
    374496     ); 
    375      protected $actions = array('playIconContent' => true); 
    376      protected $available = true; 
    377      protected $part = 'sharer'; 
    378       
    379      public function playIconContent($record) 
    380      { 
    381           if (!$record) return; 
    382            
    383           $url = !empty($record['shorturl']) ? $record['shorturl'] : $record['url']; 
    384            
    385           return soCialMeUtils::preloadBox(soCialMeUtils::easyLink('http://cgi.fark.com/cgi/fark/submit.pl?new_url='.urlencode($url),$this->name,$this->icon)); 
     497      
     498     protected $actions = array( 
     499          'playIconContent' => true 
     500     ); 
     501      
     502     public function playIconContent($post) 
     503     { 
     504          if (!$post) return; 
     505           
     506          $url = !empty($post['shorturl']) ? $post['shorturl'] : $post['url']; 
     507           
     508          $record[0] = array( 
     509               'service' => $this->id, 
     510               'source_name' => $this->name, 
     511               'source_url' => $this->home, 
     512               'source_icon' => $this->icon, 
     513               'preload' => true, 
     514               'title' => sprintf(__('Share on %s'),$this->name), 
     515               'avatar' => $this->icon, 
     516               'url' => 'http://cgi.fark.com/cgi/fark/submit.pl?new_url='.urlencode($url) 
     517          ); 
     518          return $record; 
    386519     } 
    387520} 
     
    389522class flattrMoreSoCialMeSharerService extends soCialMeService 
    390523{ 
    391      protected $config = array( 
    392           'uid' => '', 
    393           'lang' => 'en_GB' 
    394      ); 
     524     protected $part = 'sharer'; 
     525     protected $setting_ns = 'soCialMeLibMore'; 
     526     protected $setting_id = 'soCialMe_sharer_flattr'; 
     527      
    395528     protected $define = array( 
    396529          'id' => 'flattr', 
     
    404537          'playBigContent' => true 
    405538     ); 
    406      protected $setting_ns = 'soCialMeLibMore'; 
    407      protected $setting_id = 'soCialMe_sharer_flattr'; 
    408      protected $available = true; 
    409      protected $part = 'sharer'; 
    410       
    411      public function init() { $this->readSettings(); return true; } 
    412      public function playSmallContent($record) { return $this->parseContent('compact',$record); } 
    413      public function playBigContent($record) { return $this->parseContent('',$record); } 
     539      
     540     protected $config = array( 
     541          'uid' => '', 
     542          'lang' => 'en_GB' 
     543     ); 
     544      
     545     public function init() { $this->readSettings(); $this->available = true; return true; } 
     546     public function playSmallContent($post) { return $this->parseContent('compact',$post); } 
     547     public function playBigContent($post) { return $this->parseContent('',$post); } 
    414548      
    415549     public function playPublicScript($available) 
     
    433567     } 
    434568      
    435      public function parseContent($type,$record) 
    436      { 
    437           if (empty($this->config['uid']) || !$record || empty($record['title'])) return; 
    438            
    439           $url = !empty($record['shorturl']) ? $record['shorturl'] : $record['url']; 
    440           $title = html::clean($record['title']); 
     569     public function parseContent($type,$post) 
     570     { 
     571          if (empty($this->config['uid']) || !$post || empty($post['title'])) return; 
     572           
     573          $url = !empty($post['shorturl']) ? $post['shorturl'] : $post['url']; 
     574          $title = html::clean($post['title']); 
    441575          $text = ''; 
    442           if (!empty($record['excerpt'])) $text = text::cutString(html::clean($record['excerpt']),900); 
    443           if (empty($text) && !empty($record['content'])) $text = text::cutString(html::clean($record['content']),900); 
     576          if (!empty($post['excerpt'])) $text = text::cutString(html::clean($post['excerpt']),900); 
     577          if (empty($text) && !empty($post['content'])) $text = text::cutString(html::clean($post['content']),900); 
    444578          if (empty($text)) $text = $title; 
    445579           
    446           $lang = !empty($record['lang']) ? self::flattrLangCode($record['lang']) : $this->config['lang']; 
    447            
    448           return  
    449           '<a class="FlattrButton" style="display:none;" '. 
    450           'title="'.$record['title'].'" '. 
    451           (!empty($record['tags']) ? 'data-flattr-tags="'.$record['tags'].'" ' : ''). 
    452           'data-flattr-category="text" '. 
    453           'data-flattr-language="'.$lang.'" '. 
    454           'href="'.$url.'"> '. 
    455           $text. 
    456           '</a>'; 
     580          $lang = !empty($post['lang']) ? self::flattrLangCode($post['lang']) : $this->config['lang']; 
     581           
     582           
     583          $record[0] = array( 
     584               'service' => $this->id, 
     585               'source_name' => $this->name, 
     586               'source_url' => $this->home, 
     587               'source_icon' => $this->icon, 
     588               'content' =>  
     589                    '<a class="FlattrButton" style="display:none;" '. 
     590                    'title="'.$post['title'].'" '. 
     591                    (!empty($post['tags']) ? 'data-flattr-tags="'.$post['tags'].'" ' : ''). 
     592                    'data-flattr-category="text" '. 
     593                    'data-flattr-language="'.$lang.'" '. 
     594                    'href="'.$url.'"> '. 
     595                    $text. 
     596                    '</a>' 
     597          ); 
     598          return $record; 
    457599     } 
    458600      
     
    545687class friendfeedMoreSoCialMeSharerService extends soCialMeService 
    546688{ 
     689     protected $part = 'sharer'; 
     690     protected $available = true; 
     691      
    547692     protected $define = array( 
    548693          'id' => 'friendfeed', 
     
    551696          'icon' => 'pf=soCialMeLibMore/inc/icons/friendfeed.png' 
    552697     ); 
    553      protected $actions = array('playIconContent' => true); 
    554      protected $available = true; 
    555      protected $part = 'sharer'; 
    556       
    557      public function playIconContent($record) 
    558      { 
    559           if (!$record || empty($record['title'])) return; 
    560            
    561           $url = !empty($record['shorturl']) ? $record['shorturl'] : $record['url']; 
    562           $title = str_replace(' ','%20',html::clean($record['title'])); 
    563            
    564           return soCialMeUtils::preloadBox(soCialMeUtils::easyLink('http://friendfeed.com/share/bookmarklet/frame#title='.urlencode($title).'&url='.urlencode($url),$this->name,$this->icon)); 
     698      
     699     protected $actions = array( 
     700          'playIconContent' => true 
     701     ); 
     702      
     703     public function playIconContent($post) 
     704     { 
     705          if (!$post || empty($post['title'])) return; 
     706           
     707          $url = !empty($post['shorturl']) ? $post['shorturl'] : $post['url']; 
     708          $title = str_replace(' ','%20',html::clean($post['title'])); 
     709           
     710          $record[0] = array( 
     711               'service' => $this->id, 
     712               'source_name' => $this->name, 
     713               'source_url' => $this->home, 
     714               'source_icon' => $this->icon, 
     715               'preload' => true, 
     716               'title' => sprintf(__('Share on %s'),$this->name), 
     717               'avatar' => $this->icon, 
     718               'url' => 'http://friendfeed.com/share/bookmarklet/frame#title='.urlencode($title).'&amp;url='.urlencode($url) 
     719          ); 
     720          return $record; 
    565721     } 
    566722} 
     
    568724class googlebookmarksMoreSoCialMeSharerService extends soCialMeService 
    569725{ 
     726     protected $part = 'sharer'; 
     727     protected $available = true; 
     728      
    570729     protected $define = array( 
    571730          'id' => 'googlebookmarks', 
     
    574733          'icon' => 'pf=soCialMeLibMore/inc/icons/googlebookmarks.png' 
    575734     ); 
    576      protected $actions = array('playIconContent' => true); 
    577      protected $available = true; 
    578      protected $part = 'sharer'; 
    579       
    580      public function playIconContent($record) 
    581      { 
    582           if (!$record || empty($record['title'])) return; 
    583            
    584           $url = !empty($record['shorturl']) ? $record['shorturl'] : $record['url']; 
    585           $title = str_replace(' ','%20',html::clean($record['title'])); 
    586            
    587           return soCialMeUtils::preloadBox(soCialMeUtils::easyLink('http://www.google.com/bookmarks/mark?op=edit&output=popup&bkmk='.urlencode($url).'&title='.urlencode($title),$this->name,$this->icon)); 
     735      
     736     protected $actions = array( 
     737          'playIconContent' => true 
     738     ); 
     739      
     740     public function playIconContent($post) 
     741     { 
     742          if (!$post || empty($post['title'])) return; 
     743           
     744          $url = !empty($post['shorturl']) ? $post['shorturl'] : $post['url']; 
     745          $title = str_replace(' ','%20',html::clean($post['title'])); 
     746           
     747          $record[0] = array( 
     748               'service' => $this->id, 
     749               'source_name' => $this->name, 
     750               'source_url' => $this->home, 
     751               'source_icon' => $this->icon, 
     752               'preload' => true, 
     753               'title' => sprintf(__('Share on %s'),$this->name), 
     754               'avatar' => $this->icon, 
     755               'url' => 'http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk='.urlencode($url).'&amp;title='.urlencode($title) 
     756          ); 
     757          return $record; 
    588758     } 
    589759} 
     
    591761class googlebuzzMoreSoCialMeSharerService extends soCialMeService 
    592762{ 
     763     protected $part = 'sharer'; 
     764     protected $available = true; 
     765      
    593766     protected $define = array( 
    594767          'id' => 'googlebuzz', 
     
    597770          'icon' => 'pf=soCialMeLibMore/inc/icons/googlebuzz.png' 
    598771     ); 
     772      
    599773     protected $actions = array( 
    600774          'playPublicScript' => true, 
     
    603777          'playBigContent' => true 
    604778     ); 
    605      protected $available = true; 
    606      protected $part = 'sharer'; 
    607779      
    608780     public function playPublicScript($available) 
     
    615787     } 
    616788      
    617      public function playIconContent($record) 
    618      { 
    619           if (!$record) return; 
    620            
    621           $url = !empty($record['shorturl']) ? $record['shorturl'] : $record['url']; 
    622            
    623           return soCialMeUtils::preloadBox(soCialMeUtils::easyLink('http://www.google.com/buzz/post?url='.urlencode($url),$this->name,$this->icon)); 
    624      } 
    625       
    626      public function playBigContent($record) 
    627      { 
    628           return $this->parseContent('normal-count',$record); 
    629      } 
    630       
    631      public function playSmallContent($record) 
    632      { 
    633           return $this->parseContent('small-count',$record); 
    634      } 
    635       
    636      private function parseContent($type,$record) 
    637      { 
    638           if (!$record || empty($record['title'])) return; 
    639            
    640           $url = !empty($record['shorturl']) ? $record['shorturl'] : $record['url']; 
    641           $title = html::clean($record['title']); 
    642            
    643           return soCialMeUtils::preloadBox( 
    644           '<a title="'.sprintf(__('Share on %s'),$this->name).'" class="google-buzz-button" href="http://www.google.com/buzz/post" '. 
    645           'data-button-style="'.$type.'" '. 
    646           'data-locale="fr" '. 
    647           'data-url="'.$url.'" '. 
    648           'data-message="'.$title.'"></a>'); 
     789     public function playIconContent($post) 
     790     { 
     791          if (!$post) return; 
     792           
     793          $url = !empty($post['shorturl']) ? $post['shorturl'] : $post['url']; 
     794           
     795          $record[0] = array( 
     796               'service' => $this->id, 
     797               'source_name' => $this->name, 
     798               'source_url' => $this->home, 
     799               'source_icon' => $this->icon, 
     800               'preload' => true, 
     801               'title' => sprintf(__('Share on %s'),$this->name), 
     802               'avatar' => $this->icon, 
     803               'url' => 'http://www.google.com/buzz/post?url='.urlencode($url) 
     804          ); 
     805          return $record; 
     806     } 
     807      
     808     public function playBigContent($post) 
     809     { 
     810          return $this->parseContent('normal-count',$post); 
     811     } 
     812      
     813     public function playSmallContent($post) 
     814     { 
     815          return $this->parseContent('small-count',$post); 
     816     } 
     817      
     818     private function parseContent($type,$post) 
     819     { 
     820          if (!$post || empty($post['title'])) return; 
     821           
     822          $url = !empty($post['shorturl']) ? $post['shorturl'] : $post['url']; 
     823          $title = html::clean($post['title']); 
     824           
     825          $record[0] = array( 
     826               'service' => $this->id, 
     827               'source_name' => $this->name, 
     828               'source_url' => $this->home, 
     829               'source_icon' => $this->icon, 
     830               'preload' => true, 
     831               'content' =>  
     832                    '<a title="'.sprintf(__('Share on %s'),$this->name).'" class="google-buzz-button" href="http://www.google.com/buzz/post" '. 
     833                    'data-button-style="'.$type.'" '. 
     834                    'data-locale="fr" '. 
     835                    'data-url="'.$url.'" '. 
     836                    'data-message="'.$title.'"></a>' 
     837          ); 
     838          return $record; 
    649839     } 
    650840} 
     
    652842class redditMoreSoCialMeSharerService extends soCialMeService 
    653843{ 
     844     protected $part = 'sharer'; 
     845     protected $available = true; 
     846      
    654847     protected $define = array( 
    655848          'id' => 'reddit', 
     
    658851          'icon' => 'pf=soCialMeLibMore/inc/icons/reddit.png' 
    659852     ); 
    660      protected $actions = array('playIconContent'=>true,'playSmallContent'=>true,'playBigContent'=>true); 
    661      protected $available = true; 
    662      protected $part = 'sharer'; 
    663       
    664      public function playIconContent($record) 
    665      { 
    666           if (!$record) return; 
    667            
    668           $url = !empty($record['shorturl']) ? $record['shorturl'] : $record['url']; 
    669            
    670           return soCialMeUtils::preloadBox(soCialMeUtils::easyLink('http://reddit.com/submit?url='.urlencode($url),$this->name,$this->icon)); 
    671      } 
    672       
    673      public function playSmallContent($record) 
    674      { 
    675           return $this->parseContent(1,$record); 
    676      } 
    677       
    678      public function playBigContent($record) 
    679      { 
    680           return $this->parseContent(2,$record); 
    681      } 
    682       
    683      private function parseContent($type,$record) 
    684      { 
    685           if (!$record || empty($record['title'])) return; 
    686            
    687           $url = !empty($record['shorturl']) ? $record['shorturl'] : $record['url']; 
    688           $title = html::clean($record['title']); 
     853      
     854     protected $actions = array( 
     855          'playIconContent'=>true, 
     856          'playSmallContent'=>true, 
     857          'playBigContent'=>true 
     858     ); 
     859      
     860     public function playIconContent($post) 
     861     { 
     862          if (!$post) return; 
     863           
     864          $url = !empty($post['shorturl']) ? $post['shorturl'] : $post['url']; 
     865           
     866          $record[0] = array( 
     867               'service' => $this->id, 
     868               'source_name' => $this->name, 
     869               'source_url' => $this->home, 
     870               'source_icon' => $this->icon, 
     871               'preload' => true, 
     872               'title' => sprintf(__('Share on %s'),$this->name), 
     873               'avatar' => $this->icon, 
     874               'url' => 'http://reddit.com/submit?url='.urlencode($url) 
     875          ); 
     876          return $record; 
     877     } 
     878      
     879     public function playSmallContent($post) 
     880     { 
     881          return $this->parseContent(1,$post); 
     882     } 
     883      
     884     public function playBigContent($post) 
     885     { 
     886          return $this->parseContent(2,$post); 
     887     } 
     888      
     889     private function parseContent($type,$post) 
     890     { 
     891          if (!$post || empty($post['title'])) return; 
     892           
     893          $url = !empty($post['shorturl']) ? $post['shorturl'] : $post['url']; 
     894          $title = html::clean($post['title']); 
    689895           
    690896          if ($type == 1) { 
     
    695901          } 
    696902           
    697           return soCialMeUtils::preloadBox( 
    698           '<iframe src="http://www.reddit.com/static/button/button'.$type.'.html?'. 
    699           'width='.$w. 
    700           '&url='.urlencode($url). 
    701           '&title='.urlencode($title). 
    702           '&newwindow=1" '. 
    703           'style="border:none; overflow:hidden;height:'.$h.'px; width:'.$w.'px;"'. 
    704           'scrolling="no" frameborder="0" allowTransparency="true"></iframe>'); 
    705      } 
    706 } 
    707 /* simple sample code 
    708 # MYCODE 
    709 class MYCODEMoreSoCialMeSharerService extends soCialMeService 
    710 { 
    711      public function init() 
    712      { 
    713           $this->define = array( 
    714                'id' => 'MYCODE', 
    715                'name' => 'MyCode', 
    716                'home' => 'http://my.code.com', 
    717                'icon' => 'pf=soCialMeLibMore/inc/icons/MYCODE.png' 
    718           ); 
    719           $this->actions = array('playIconContent' => true); 
    720           $this->available = true; 
    721           $this->part = 'sharer'; 
    722      } 
    723       
    724      public function playIconContent($url,$text,$realurl) 
    725      { 
    726           return soCialMeUtils::preloadBox(soCialMeUtils::easyLink('http://MY.CODE.TRUC/?title='.urlencode($title).'&url='.urlencode($url),$this->name,$this->icon)); 
    727      } 
    728 } 
    729 */ 
     903          $record[0] = array( 
     904               'service' => $this->id, 
     905               'source_name' => $this->name, 
     906               'source_url' => $this->home, 
     907               'source_icon' => $this->icon, 
     908               'preload' => true, 
     909               'content' =>  
     910                    '<iframe src="http://www.reddit.com/static/button/button'.$type.'.html?'. 
     911                    'width='.$w. 
     912                    '&amp;url='.urlencode($url). 
     913                    '&amp;title='.urlencode($title). 
     914                    '&amp;newwindow=1" '. 
     915                    'style="border:none; overflow:hidden;height:'.$h.'px; width:'.$w.'px;"'. 
     916                    'scrolling="no" frameborder="0" allowTransparency="true"></iframe>' 
     917          ); 
     918          return $record; 
     919     } 
     920} 
    730921?> 
  • plugins/soCialMeLibMore/locales/fr/main.lang.php

    r2944 r2970  
    11<?php 
    22// Language: Français  
    3 // Module: soCialMeLibMore - 0.2 
    4 // Date: 2011-02-13 15:50:34  
     3// Module: soCialMeLibMore - 0.3 
     4// Date: 2011-02-20 18:14:09  
    55// Translated with dcTranslater - 1.5  
    66 
    7 #inc/lib.social.profil.srv.more.php:1 
    8 #inc/lib.social.profil.srv.more.php:1 
    9 #inc/lib.social.profil.srv.more.php:1 
    10 #inc/lib.social.profil.srv.more.php:1 
     7#inc/lib.social.profil.srv.more.php:19 
     8#inc/lib.social.profil.srv.more.php:42 
     9#inc/lib.social.profil.srv.more.php:65 
     10#inc/lib.social.profil.srv.more.php:88 
    1111$GLOBALS['__l10n']['Your profil shortname:'] = 'Le nom court de votre profil :'; 
    1212 
    13 #inc/lib.social.profil.srv.more.php:1 
    14 #inc/lib.social.profil.srv.more.php:1 
    15 #inc/lib.social.profil.srv.more.php:1 
    16 #inc/lib.social.profil.srv.more.php:1 
     13#inc/lib.social.profil.srv.more.php:19 
     14#inc/lib.social.profil.srv.more.php:42 
     15#inc/lib.social.profil.srv.more.php:65 
     16#inc/lib.social.profil.srv.more.php:88 
    1717$GLOBALS['__l10n']['It appears on %s URL like this: %s'] = 'Il apparait sur l\'URL %s tel que : %s'; 
    1818 
    19 #inc/lib.social.reader.srv.more.php:1 
     19#inc/lib.social.reader.srv.more.php:24 
    2020$GLOBALS['__l10n']['URL of Atom or RSS feed to read:'] = 'URL du flux Atom ou RSS à lire :'; 
    2121 
    22 #inc/lib.social.reader.srv.more.php:1 
     22#inc/lib.social.reader.srv.more.php:24 
    2323$GLOBALS['__l10n']['Put one feed per line.'] = 'Mettre un flux par ligne.'; 
    2424 
    25 #inc/lib.social.sharer.srv.more.php:311 
     25#inc/lib.social.sharer.srv.more.php:421 
    2626$GLOBALS['__l10n']['Send by email'] = 'Envoyer par email'; 
    2727 
    28 #inc/lib.social.sharer.srv.more.php:347 
     28#inc/lib.social.sharer.srv.more.php:458 
    2929$GLOBALS['__l10n']['Add to favorites'] = 'Ajouter aux favoris'; 
    3030 
    31 #inc/lib.social.sharer.srv.more.php:475 
     31#inc/lib.social.sharer.srv.more.php:617 
    3232$GLOBALS['__l10n']['Your profil name or uid:'] = 'Votre nom de profil ou UID :'; 
    3333 
  • plugins/soCialMeLibMore/locales/fr/main.po

    r2944 r2970  
    11# Language: Français 
    2 # Module: soCialMeLibMore - 0.2 
    3 # Date: 2011-02-13 15:50:34 
     2# Module: soCialMeLibMore - 0.3 
     3# Date: 2011-02-20 18:14:09 
    44# Translated with translater 1.5 
    55 
     
    77msgstr "" 
    88"Content-Type: text/plain; charset=UTF-8\n" 
    9 "Project-Id-Version: soCialMeLibMore 0.2\n" 
     9"Project-Id-Version: soCialMeLibMore 0.3\n" 
    1010"POT-Creation-Date: \n" 
    11 "PO-Revision-Date: 2011-02-13T15:50:34+00:00\n" 
     11"PO-Revision-Date: 2011-02-20T18:14:09+00:00\n" 
    1212"Last-Translator: JC Denis\n" 
    1313"Language-Team: \n" 
     
    1515"Content-Transfer-Encoding: 8bit\n" 
    1616 
    17 #: inc/lib.social.profil.srv.more.php:1 
    18 #: inc/lib.social.profil.srv.more.php:1 
    19 #: inc/lib.social.profil.srv.more.php:1 
    20 #: inc/lib.social.profil.srv.more.php:1 
     17#: inc/lib.social.profil.srv.more.php:19 
     18#: inc/lib.social.profil.srv.more.php:42 
     19#: inc/lib.social.profil.srv.more.php:65 
     20#: inc/lib.social.profil.srv.more.php:88 
    2121msgid "Your profil shortname:" 
    2222msgstr "Le nom court de votre profil :" 
    2323 
    24 #: inc/lib.social.profil.srv.more.php:1 
    25 #: inc/lib.social.profil.srv.more.php:1 
    26 #: inc/lib.social.profil.srv.more.php:1 
    27 #: inc/lib.social.profil.srv.more.php:1 
     24#: inc/lib.social.profil.srv.more.php:19 
     25#: inc/lib.social.profil.srv.more.php:42 
     26#: inc/lib.social.profil.srv.more.php:65 
     27#: inc/lib.social.profil.srv.more.php:88 
    2828msgid "It appears on %s URL like this: %s" 
    2929msgstr "Il apparait sur l'URL %s tel que : %s" 
    3030 
    31 #: inc/lib.social.reader.srv.more.php:1 
     31#: inc/lib.social.reader.srv.more.php:24 
    3232msgid "URL of Atom or RSS feed to read:" 
    3333msgstr "URL du flux Atom ou RSS à lire :" 
    3434 
    35 #: inc/lib.social.reader.srv.more.php:1 
     35#: inc/lib.social.reader.srv.more.php:24 
    3636msgid "Put one feed per line." 
    3737msgstr "Mettre un flux par ligne." 
    3838 
    39 #: inc/lib.social.sharer.srv.more.php:311 
     39#: inc/lib.social.sharer.srv.more.php:421 
    4040msgid "Send by email" 
    4141msgstr "Envoyer par email" 
    4242 
    43 #: inc/lib.social.sharer.srv.more.php:347 
     43#: inc/lib.social.sharer.srv.more.php:458 
    4444msgid "Add to favorites" 
    4545msgstr "Ajouter aux favoris" 
    4646 
    47 #: inc/lib.social.sharer.srv.more.php:475 
     47#: inc/lib.social.sharer.srv.more.php:617 
    4848msgid "Your profil name or uid:" 
    4949msgstr "Votre nom de profil ou UID :" 
  • plugins/soCialMeLibMore/release.txt

    r2944 r2970  
     10.3 20110220 
     2 * Followed soCialMe new system 
     3 
    140.2 20110213 
    25 * Added feed to ''Reader'' part 
Note: See TracChangeset for help on using the changeset viewer.

Sites map