====== SocialMark ====== ---- plugin ---- description: Add link to "social bookmark" a page author : iDo email : ido@woow-fr.com type : syntax lastupdate : 2006-03-21 compatible : depends : conflicts : similar : tags : bookmark, links, social downloadurl: http://dokuplugins.idotech.info/socialmark.zip ---- This plug add some link to "social-bookmark" a page. \\ ====== Syntax ====== Simply write {{socialmark}} where you want links appear. ====== Example ====== You can see it in action here : http://www.wikistuce.info/doku.php/php/creer_une_shoutbox (end of page) \\ ====== Installation ====== With plugin_manager : http://dokuplugins.idotech.info/socialmark.zip \\ Or manually: \\ Download and unzip the plugin_manager archive then put folder in you're 'lib/plugins/' directory. ====== Source ====== (if plugin_manager URL does not work) \\ lib/plugins/socialmark/syntax.php : 'iDo', 'email' => 'iDo@woow-fr.com', 'date' => '21/03/2006', 'name' => 'Social Mark Plugin', 'desc' => 'Add some link to social bookmarking page. syntaxe : {{socialmark}}', 'url' => 'http://www.dokuwiki.org/plugin:socialmark', ); } /** * What kind of syntax are we? */ function getType(){ return 'substition'; } /** * Where to sort in? */ function getSort(){ return 108; } /** * Connect pattern to lexer */ function connectTo($mode) { $this->Lexer->addSpecialPattern("{{socialmark}}",$mode,'plugin_socialmark'); } /** * Handle the match */ function handle($match, $state, $pos, &$handler){ return true; } /** * Create output */ function render($mode, &$renderer, $data) { if($mode == 'xhtml'){ $renderer->doc .= '
'; $renderer->doc .= $this->_socialmark(); $renderer->doc .= '
'; return true; } return false; } function _socialmark() { global $conf; $r=''; } function _getfullURL() { return 'http'.(($_SERVER['HTTPS']=='on')?'s':'').'://'.$_SERVER['HTTP_HOST'].(($_SERVER['SERVER_PORT']!='80')?':'.$_SERVER['SERVER_PORT']:'').$_SERVER['REQUEST_URI']; } } //Setup VIM: ex: et ts=4 enc=utf-8 : ?>
lib/plugins/socialmark/list.txt : #Start a line whit a sharp to put it in comment #Syntaxe for URL is : #URL|link text #ex : #http://blogmarks.net/my/new.php?mini=1&simple=1&url=|Blogmarks it ! #if link text is not specified, the host name is used. #Note : #Always put the URL param at the end of the url http://www.connectedy.com/add-link.php?remote=1&url=|Connectedy it ! http://blogmarks.net/my/new.php?mini=1&simple=1&url=|Blogmark it ! http://www.netvouz.com/action/submitBookmark?url=|Netvouz it ! http://scuttle.org/bookmarks.php/?action=add&address=|Scuttle it ! http://www.blinklist.com/index.php?Action=Blink/addblink.php&Url=|Blinklist it ! http://www.spurl.net/spurl.php?v=3&url=|Spurl it ! http://del.icio.us/post?v=4;url=|Del.icio.us it ! http://www.connotea.org/addpopup?continue=confirm&uri=|Connotea it ! http://www.linkroll.com/index.php?action=insertLink&url=|Linkroll it ! http://www.openbm.de/bm.php?outside=1&link=|Openbm it ! http://simpy.com/simpy/LinkAdd.do?href=|Simpy it ! http://feedmelinks.com/categorize?from=toolbar&op=submit&url=|FeedmeLinks it ! ====== Customize ====== ===== links ===== You can add, delete and modify links : \\ just edit 'list.txt' in 'lib/plugins/socialmark/' \\ Comments line start by # \\ URL and textlink are separated by | \\ ===== style ===== Links are displayed in an