White Wiki

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

tumblr [2017/08/19 15:41] (current)
ipari created
Line 1: Line 1:
 +====== Tumblr Plugin ======
 +
 +---- plugin ----
 +description:​ Embed tumblr into DokuWiki
 +author ​    : Lee, Kwangyoung
 +email      : ipari@leaflette.com
 +type       : syntax
 +lastupdate : 2016-02-27
 +compatible : 2017-02-19 2016-06-26 2015-08-10
 +depends ​   : 
 +conflicts ​ : 
 +similar ​   : 
 +tags       : embed, tumblr, rss
 +
 +downloadurl:​ https://​github.com/​ipari/​dokuwiki-plugin-tumblr/​zipball/​master
 +bugtracker : https://​github.com/​ipari/​dokuwiki-plugin-tumblr/​issues
 +sourcerepo : https://​github.com/​ipari/​dokuwiki-plugin-tumblr/​
 +donationurl: ​
 +
 +screenshot_img : 
 +----
 +
 +===== Installation =====
 +
 +Use the download link given above in the plugin manager or to download the plugin manually.
 +
 +===== Syntax =====
 +
 +  {{tumblr>​url=http://​your.tumblr.com}}
 +
 +
 +^ Parameter ^ Description ^
 +| ''​url''​ | Tumblr URL you want to embed. |
 +| ''​type''​ | If you set this ''​list'',​ only title and date are shown. |
 +| ''​target''​ | Wiki page to open post. Target page also have to embed tumblr plugin. \\ //(Default: Page that includes plugin)// |
 +
 +==== Example 1 ====
 +
 +Basic Usage.
 +
 +  {{tumblr>​url=https://​doku-plugin.tumblr.com/​}}
 +
 +**Sample Page** : [[http://​sample.leaflette.com/​tumblr/​blog]]
 +{{http://​sample.leaflette.com/​_media/​tumblr/​blog_view.png}}
 +
 +==== Example 2 ====
 +
 +Show titles and dates only and open posts at '​tumblr'​ page. In this case, '​tumblr'​ page should have [[plugin:​tumblr#​Example 1]].
 +
 +  {{tumblr>​url=http://​https://​doku-plugin.tumblr.com/&​type=list&​target=tumblr}}
 +
 +**Sample Page** : [[http://​sample.leaflette.com/​tumblr/​list]]
 +{{http://​sample.leaflette.com/​_media/​tumblr/​list_view.png}}
 +
 +===== Configurations =====
 +
 +:!: This is a security risk when used on a freely accessible site.
 +
 +==== Allow embedded HTML ====
 +
 +To show all contents include images and movies, enabling [[config:​htmlok]] is required.
 +
 +==== Movies ====
 +
 +Even if you allow embedded HTML, you still can't see movies in tumblr posts. It's because of [[devel:​simplepie|SimplePie]],​ RSS parser that DokuWiki uses, basically stripping ''​iframe''​ tags. ([[http://​simplepie.org/​wiki/​reference/​simplepie/​strip_htmltags|See more info]])
 +
 +Find ''​$strip_htmltags''​ on files in ''​vendor/​simplepie/​simplepie''​ and remove ''​iframe''​.
 +
 +<code php>
 +// Line 16395
 +var $strip_htmltags = array('​base',​ '​blink',​ '​body',​ '​doctype',​ '​embed',​ '​font',​ '​form',​ '​frame',​ '​frameset',​ '​html',​ '​iframe',​ '​input',​ '​marquee',​ '​meta',​ '​noscript',​ '​object',​ '​param',​ '​script',​ '​style'​);​
 +</​code>​
 +
 +==== Redirect your tumblr to DokuWiki ====
 +
 +1. Paste below codes above ''</​head>''​ tag in your tumblr theme.
 +
 +<code javascript>​
 +<script type="​text/​javascript">​
 +  function go_wiki() {
 +    var addr = location.href;​
 +    var params = addr.split("/"​);​
 +    var wiki_addr = 'Wiki URL contains a tumblr plugin';​
 +    var new_addr;
 +    if(params[3) {
 +      new_addr = wiki_addr + '?'​ + params[3] + '​='​ + params[4];
 +    } else {
 +      new_addr = wiki_addr;
 +    }
 +    location.href = new_addr;
 +  }
 +</​script>​
 +</​code>​
 +
 +2. modify ''<​body>''​ tag
 +
 +<code html>
 +<body onload="​go_wiki()">​
 +</​code>​
 +
 +==== Posts per page ====
 +
 +Go to Customize > Advanced on your tumblr.
 +
 +{{http://​sample.leaflette.com/​_media/​tumblr/​posts_per_page.png}}
 +===== Development =====
 +
 +==== Releases ====
 +
 +{{rss>​https://​github.com/​ipari/​dokuwiki-plugin-tumblr/​releases.atom 5}}
 +
 +
 +==== Bugs / Feature Requests ====
 +
 +Please report bugs or feature requests at the https://​github.com/​ipari/​dokuwiki-plugin-tumblr/​issues.
 +
 +==== ToDo / Wish List ====
 +
 +  * Support more languages.
 +
 +===== Discussion =====
 +