deliciousjson.inc.php
First Edition. 02/01/2006
Last Modified. 05/25/2006
Last Modified. 05/25/2006
Requests del.icio.us json feeds - htmlinsert/djson ぐらいで充分なことにしてボツ
Summary | Requests del.icio.us json feeds |
---|---|
Compatible Versions | Verified with Pukiwiki Plus 1.4.6-u1-i18n |
Developer | sonots |
First Edition | 02/01/2006 |
License | GPL |
Table of Contents |
This page is written in both English and Japanese.
Abstract
This plugin requests del.icio.us json feeds.
Del.icio.us json enables us to show latest bookmarks from del.ico.us. I assume you know what del.icio.us is.
How to use: An example
#deliciousjson(sonots/matlab+reference?count=100,Matlab References)
Matlab References
Source Code
Actually, just a wrapper of javascripts. You may modify javascript codes to change looks.
<?php function plugin_deliciousjson_convert() { $args = func_get_args(); switch (func_num_args()) { case 2: $title = htmlspecialchars(array_pop($args)); case 1: $jsonarg = htmlspecialchars(array_pop($args)); break; default: break; } return <<<HTML <div id="container">${title}</div> <script type="text/javascript" src="http://del.icio.us/feeds/json/${jsonarg}"></script> <script type="text/javascript"> function showImage(img){ return (function(){ img.style.display='inline' }) } var ul = document.createElement('ul') for (var i=0, post; post = Delicious.posts[i]; i++) { var li = document.createElement('li') var a = document.createElement('a') a.setAttribute('href', post.u) a.appendChild(document.createTextNode(post.d)) li.appendChild(a) if (post.n != undefined) { var br = document.createElement('br') li.insertBefore(br, null) var span = document.createElement('span') span.appendChild(document.createTextNode(post.n)) li.insertBefore(span, null) } ul.appendChild(li) } document.getElementById('container').appendChild(ul) </script> HTML; } ?>
Download
Please remove the numbered extention, and put into plugin directory.
File | Date | What's new |
![]() | 02/21/2006 | First Edition |
Comment
Please go to ./Note?