plugin:socialmark
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| plugin:socialmark [2006-03-21 16:52] – 84.96.84.106 | plugin:socialmark [2023-12-21 16:16] (current) – new download url Aleksandr | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== SocialMark Plugin ====== | ||
| + | ---- plugin ---- | ||
| + | description: | ||
| + | author | ||
| + | email : ido@woow-fr.com | ||
| + | type : syntax | ||
| + | lastupdate : 2006-03-21 | ||
| + | compatible : | ||
| + | depends | ||
| + | conflicts | ||
| + | similar | ||
| + | tags : bookmark, links, social | ||
| + | downloadurl: | ||
| + | ---- | ||
| + | |||
| + | This plugin add some link to " | ||
| + | |||
| + | ===== Syntax ===== | ||
| + | |||
| + | Simply write '' | ||
| + | |||
| + | ===== Example ===== | ||
| + | |||
| + | You can see it in action [[https:// | ||
| + | |||
| + | ===== Installation ===== | ||
| + | |||
| + | With Plugin Manager: [[https:// | ||
| + | |||
| + | Or manually: Download and unzip the plugin_manager archive then put folder in you're ' | ||
| + | |||
| + | ===== Source ===== | ||
| + | |||
| + | (if plugin_manager URL does not work) | ||
| + | |||
| + | <file php lib/ | ||
| + | <?php | ||
| + | |||
| + | if(!defined(' | ||
| + | if(!defined(' | ||
| + | require_once(DOKU_PLUGIN.' | ||
| + | |||
| + | /** | ||
| + | * All DokuWiki plugins to extend the parser/ | ||
| + | * need to inherit from this class | ||
| + | */ | ||
| + | class syntax_plugin_socialmark extends DokuWiki_Syntax_Plugin { | ||
| + | |||
| + | /** | ||
| + | * return some info | ||
| + | */ | ||
| + | function getInfo(){ | ||
| + | return array( | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ); | ||
| + | } | ||
| + | | ||
| + | /** | ||
| + | * What kind of syntax are we? | ||
| + | */ | ||
| + | function getType(){ | ||
| + | return ' | ||
| + | } | ||
| + | |||
| + | /** | ||
| + | * Where to sort in? | ||
| + | */ | ||
| + | function getSort(){ | ||
| + | return 108; | ||
| + | } | ||
| + | |||
| + | /** | ||
| + | * Connect pattern to lexer | ||
| + | */ | ||
| + | function connectTo($mode) { | ||
| + | $this-> | ||
| + | } | ||
| + | | ||
| + | /** | ||
| + | * Handle the match | ||
| + | */ | ||
| + | function handle($match, | ||
| + | return true; | ||
| + | } | ||
| + | |||
| + | /** | ||
| + | * Create output | ||
| + | */ | ||
| + | function render($mode, | ||
| + | if($mode == ' | ||
| + | $renderer-> | ||
| + | $renderer-> | ||
| + | $renderer-> | ||
| + | return true; | ||
| + | } | ||
| + | return false; | ||
| + | } | ||
| + | |||
| + | function _socialmark() { | ||
| + | global $conf; | ||
| + | $r='< | ||
| + | $g=@file(DOKU_PLUGIN.' | ||
| + | foreach ($g as $v) { | ||
| + | if ($v{0}=='#' | ||
| + | $v=explode(' | ||
| + | if (@$v[1]) | ||
| + | $h=$v[1]; | ||
| + | else { | ||
| + | $h=parse_url($v[0]); | ||
| + | $h=$h[' | ||
| + | } | ||
| + | |||
| + | $r.='< | ||
| + | } | ||
| + | return $r.'</ | ||
| + | } | ||
| + | function _getfullURL() { | ||
| + | return ' | ||
| + | } | ||
| + | } | ||
| + | |||
| + | //Setup VIM: ex: et ts=4 enc=utf-8 : | ||
| + | ?> | ||
| + | </ | ||
| + | |||
| + | <file txt lib/ | ||
| + | #Start a line whit a sharp to put it in comment | ||
| + | #Syntaxe for URL is : | ||
| + | #URL|link text | ||
| + | #ex : | ||
| + | # | ||
| + | #if link text is not specified, the host name is used. | ||
| + | #Note : | ||
| + | #Always put the URL param at the end of the url | ||
| + | http:// | ||
| + | http:// | ||
| + | http:// | ||
| + | http:// | ||
| + | http:// | ||
| + | http:// | ||
| + | http:// | ||
| + | http:// | ||
| + | http:// | ||
| + | http:// | ||
| + | http:// | ||
| + | http:// | ||
| + | </ | ||
| + | |||
| + | ====== Customize ====== | ||
| + | |||
| + | ===== links ===== | ||
| + | You can add, delete and modify links : \\ | ||
| + | just edit ' | ||
| + | Comments line start by # \\ | ||
| + | URL and textlink are separated by | \\ | ||
| + | |||
| + | ===== style ===== | ||
| + | |||
| + | Links are displayed in an <ul>. | ||
| + | |||
| + | You can customize style by changing css: | ||
| + | |||
| + | <code css> | ||
| + | #socialmark { | ||
| + | /*ul element */ | ||
| + | } | ||
| + | #socialmark li { | ||
| + | |||
| + | } | ||
| + | #socialmark li a { | ||
| + | |||
| + | } | ||
| + | </ | ||
| + | |||
| + | ====== Comments ====== | ||
| + | |||
| + | I don't see the link between this plugin and the " | ||
| + | |||
| + | Need help ! | ||
