Compatible with DokuWiki
No compatibility info given!
Similar to facebook, fbcomments, fbsp
I looked for a realy good Facebook like-button plugin for Dokuwiki but there were only Facebook plugin and fbsp plugin. The first one only creates a big fat like-box and the second one is too simple. So I created a plugin on my own. You can find this plugin on Github. You can find a current doku on echtzeitraum.de
Plugin configuration is available in following languages: German, English
Icon of the text editor button by Yusuke Kamiyamane.
To use this Plugin you need the following system:
To install this plugin go to Admin → Manage plugins and enter in the following URL:
http://downloads.echtzeitraum.de/plugin/dokuwiki/facebooklike.zip
In Admin → Configuration settings you can change various settings. You can modify and redistribute it under the terms of the GPL Version 3.
Adding the following code will insert a default Facebook like-button (with the default settings) on the current page. You can modify the default settings on the wiki configuration page ( Admin → Configuration settings ).
{{like>}}
If you want you can modify the default settings by adding one or more parameters.
{{like>url=http://example.com/|colorscheme=dark}}
Supported parameters:
| Parameter | Value | Description |
|---|---|---|
| url | String | Page that should be liked. Must be a valid address (e.g. http://example.com/). |
| layout | String | Determines the size and amount of social context next to the button. (standard/button_count/box_count) |
| show_faces | Boolean | Display faces of friends who likes the specified url. Effects layout “standard” only! |
| width | Integer | Width of the “reserved” area. |
| action | String | The verb to display in the button. (like/recommend) |
| font | String | The font of the button. (arial/verdana/segoe ui/tahoma/lucida grande/trebuchet ms) |
| colorscheme | String | Colors of the buttons.(light/dark) |
You can try out different combinations on the official Facebook developer page or on my webpage.
If you use a secure SSL connection, this Plugin may cause an error message. This is caused by the FBML JavaScript Header, which is called by HTTP and not HTTPS. To fix it, you have to make a little change in action.php.
Search this and delete http: before the double slash. This will automatically choose the correct protocol.
function _addHeaders (&$event, $param) { global $lang; $event->data["script"][] = array ( "type" => "text/javascript", "src" => 'http://connect.facebook.net/'.$this->getLang('fbml_language').'/all.js#xfbml=1', ); }
Here's the result:
<?php /* Facebook Like-Button Plugin for Dokuwiki ... */ if(!defined('DOKU_INC')) die(); if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/'); require_once(DOKU_PLUGIN.'action.php'); class action_plugin_facebooklike extends DokuWiki_Action_Plugin { /** * General information about the plugin. */ function getInfo(){ return array( 'author' => 'Marvin Thomas Rabe', 'email' => 'm.rabe@echtzeitraum.de', 'date' => '2011-01-05', 'name' => 'Facebook Like-Button', 'desc' => 'Adds Facebook like-buttons', 'url' => 'http://echtzeitraum.de/plugin/dokuwiki/like-button', ); } /** * Register its handlers. */ function register(&$controller) { $controller->register_hook('TPL_METAHEADER_OUTPUT', 'BEFORE', $this, '_addHeaders'); } /** * Adds the FBML JavaScript file to the header. */ function _addHeaders (&$event, $param) { global $lang; $event->data["script"][] = array ( "type" => "text/javascript", "src" => '//connect.facebook.net/'.$this->getLang('fbml_language').'/all.js#xfbml=1', ); } }
We are in the process of deprecating FBML. If you are building a new application on Facebook.com, please implement your application using HTML, JavaScript and CSS. You can use our JavaScript SDK and Social Plugins to embedded many of the same social features available in FBML. While there is still functionality that we have not ported over yet, we are no longer adding new features to FBML. Quelle: http://developers.facebook.com/docs/reference/fbml/
— But FBML-LIKE will be still supported. Its listed as an Social Plugin.
ftp is a bad thing for dowmloads, cant download it.
— Fixed.