Changeset 2965
- Timestamp:
- 02/21/11 03:11:03 (12 years ago)
- Location:
- plugins/dcLibIdentica
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/dcLibIdentica/_define.php
r2931 r2965 17 17 /* Description*/ "Identica library for Dotclear's plugins", 18 18 /* Author */ "JC Denis", 19 /* Version */ '0. 1-beta2',19 /* Version */ '0.3', 20 20 /* Permissions */ 'admin' 21 21 ); 22 /* date */ #20110 13022 /* date */ #20110220 23 23 ?> -
plugins/dcLibIdentica/inc/lib.social.sharer.srv.identica.php
r2931 r2965 16 16 { 17 17 protected $part = 'sharer'; 18 protected $setting_ns = 'dcLibIdentica'; 19 protected $setting_id = 'soCialMe_sharer'; 18 20 19 21 protected $define = array( … … 29 31 ); 30 32 31 protected $config = array('via' => ''); 33 protected $config = array( 34 'via' => '' 35 ); 32 36 33 37 protected function init() 34 38 { 35 $config = $this->core->blog->settings->dcLibIdentica->soCialMe_sharer; 36 $config = @unserialize(base64_decode($config)); 37 if (!is_array($config)) $config = array(); 38 39 $this->config = array_merge($this->config,$config); 40 39 $this->readSettings(); 41 40 $this->available = true; 42 41 return true; … … 50 49 'via' => !empty($_POST['dcLibIdentica_soCialMe_via']) ? $_POST['dcLibIdentica_soCialMe_via'] : '' 51 50 ); 52 $config = base64_encode(serialize($this->config)); 53 54 $this->core->blog->settings->dcLibIdentica->put('soCialMe_sharer',$config); 51 $this->writeSettings(); 55 52 } 56 53 … … 71 68 } 72 69 73 private function parseContent($type,$ record)70 private function parseContent($type,$post) 74 71 { 75 if (!$ record || empty($record['title'])) return;72 if (!$post || empty($post['title'])) return; 76 73 77 $url = !empty($record['shorturl']) ? $record['shorturl'] : $record['url']; 78 $title = html::clean($record['title']); 74 $title = html::clean($post['title']); 75 $url = !empty($post['shorturl']) ? $post['shorturl'] : $post['url']; 76 $url = 'http://identi.ca//index.php?action=newnotice&status_textarea='.urlencode($title).' '.urlencode($url).(!empty($this->config['via']) ? ' '.$this->config['via'] : ''); 79 77 80 return soCialMeUtils::preloadBox(soCialMeUtils::easyLink( 81 'http://identi.ca//index.php?action=newnotice&status_textarea='. 82 urlencode($title).' '.urlencode($url). 83 (!empty($this->config['via']) ? ' '.$this->config['via'] : ''), 84 $this->name, 85 $this->url.'pf=dcLibIdentica/inc/icons/identica-'.$type.'.png' 86 )); 78 $record[0] = array( 79 'service' => $this->id, 80 'source_name' => $this->name, 81 'source_url' => $this->home, 82 'source_icon' => $this->icon, 83 'preload' => true, 84 'title' => sprintf(__('Share on %s'),$this->name), 85 'avatar' => $this->url.'pf=dcLibIdentica/inc/icons/identica-'.$type.'.png', 86 'url' => $url 87 ); 88 return $record; 87 89 } 88 90 89 public function playIconContent($ record)91 public function playIconContent($post) 90 92 { 91 return $this->parseContent('icon',$ record);93 return $this->parseContent('icon',$post); 92 94 } 93 95 94 public function playSmallContent($ record)96 public function playSmallContent($post) 95 97 { 96 return $this->parseContent('small',$ record);98 return $this->parseContent('small',$post); 97 99 } 98 100 } -
plugins/dcLibIdentica/inc/lib.social.writer.srv.identica.php
r2931 r2965 140 140 $params = array('status' => (string) $line); 141 141 142 $this->log('Post','playXxxContent','status_update'); 142 143 $this->oauth->post('statuses/update',$params); 143 144 } -
plugins/dcLibIdentica/release.txt
r2923 r2965 1 0.3 20110220 2 * Followed soCialMe new system 3 1 4 0.1-beta1 20110130 2 5 * First publis release of Identica libraries for Dotclear
Note: See TracChangeset
for help on using the changeset viewer.