It's better when it's simple

User Tools

Site Tools


SocialMark Plugin

Compatible with DokuWiki

No compatibility info given!

plugin Add link to “social bookmark” a page

Last updated on

This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.

Tagged with bookmark, links, social

This plugin add some link to “social-bookmark” a page.


Simply write {{socialmark}} where you want links appear.


You can see it in action here (end of page).


With Plugin Manager:

Or manually: Download and unzip the plugin_manager archive then put folder in you're 'lib/plugins/' directory.


(if plugin_manager URL does not work)

if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../../').'/');
if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/');
 * All DokuWiki plugins to extend the parser/rendering mechanism
 * need to inherit from this class
class syntax_plugin_socialmark extends DokuWiki_Syntax_Plugin {
     * return some info
    function getInfo(){
        return array(
            'author' => 'iDo',
            'email'  => '',
            'date'   => '21/03/2006',
            'name'   => 'Social Mark Plugin',
            'desc'   => 'Add some link to social bookmarking page. Syntax: {{socialmark}}',
            'url'    => '',
     * 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) {
     * Handle the match
    function handle($match, $state, $pos, &$handler){
		return true;
     * Create output
    function render($mode, &$renderer, $data) {
        if($mode == 'xhtml'){       		
			$renderer->doc .= '<div>';
            $renderer->doc .= $this->_socialmark();
            $renderer->doc .= '</div>';
            return true;
        return false;
	function _socialmark() {
		global $conf;
		$r='<ul id="socialmark">';
		foreach ($g as $v) {
			if ($v{0}=='#') continue; /*comments line starts by #*/
			if (@$v[1])
			else {
			$r.='<li><a href="'.$v[0].$this->_getfullURL().'" '.(($conf['target']['extern']!='')?'target="'.$conf['target']['extern'].'"':'').'>'.$h."</a></li>\n";
		return $r.'</ul>';
	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 :
#Start a line whit a sharp to put it in comment
#Syntaxe for URL is :
#URL|link text
#ex :
#|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|Connectedy it !|Blogmark it !|Netvouz it !|Scuttle it !|Blinklist it !|Spurl it !;url=| it !|Connotea it !|Linkroll it !|Openbm it !|Simpy it !|FeedmeLinks it !


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 |


Links are displayed in an <ul>.

You can customize style by changing css:

#socialmark {
/*ul element */
#socialmark li {
#socialmark li a {


I don't see the link between this plugin and the “Social Bookmarking”. With the “Social Bookmarking”, you have tags that refers to a URL. With socialmark, there's no tags or it doesn't work for me.

Need help !

plugin/socialmark.txt · Last modified: 2023-12-21 16:16 by Aleksandr

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki