This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<mt:TopLevelCategories> | |
<mt:CategoryId> | |
<mt:CategoryLabel> | |
<mt:CategoryBasename> | |
<mt:SubCategories> | |
<mt:CategoryId> | |
<mt:CategoryLabel> | |
<mt:CategoryBasename> | |
</mt:SubCategories> | |
</mt:TopLevelCategories> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function() { | |
var blogfeed = 'http://example.com/jsonp.feed?'; | |
$.getJSON(blogfeed, function(data) { | |
for (var key in data) { | |
var link = data[key]['link']; | |
var title = data[key]['title']; | |
var date = new Date(Date.parse(data[key]['date'])); | |
var y = date.getFullYear(); | |
var m = date.getMonth() + 1; | |
var d = date.getDate(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* { | |
font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", ".HiraKakuInterface-W2", sans-serif; | |
font-weight: 100; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action('wp_footer', 'addthis_conf'); | |
function addthis_conf() { | |
echo <<<EOS | |
<script type="text/javascript"> | |
var addthis_share = | |
{ | |
templates: { | |
twitter: '{{title}} {{url}} (from @semicolon)' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Movable Type が設置されているディレクトリのパス | |
$basepath = '/path/to/MT'; | |
// mt-config.cgi のファイル名 | |
$cfg_file = 'mt-config.cgi'; | |
// include_path に Movable Type のライブラリディレクトリを追加します | |
set_include_path(get_include_path() . PATH_SEPARATOR . $basepath . '/php' . PATH_SEPARATOR . $basepath . '/php/extlib' . PATH_SEPARATOR . $basepath . '/MT/php/lib'); | |
// PHP で Movable Type を操作するためのライブラリを読み込みます | |
require_once('mt.php'); | |
// MTオブジェクトのインスタンスを作成します |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var obj = { | |
"key0": "val0", | |
"key1": "val1", | |
"key2": "val2", | |
} | |
/* | |
以下は IE8 で動かない | |
var len = Object.keys(obj).length; | |
*/ | |
//一度ループさせて数を取得する必要がある |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<mt:SetVar name="entries" function="undef" /> | |
<mt:SetVar name="idx" value="0" /> | |
<mt:Entries> | |
<mt:SetVar name="e" function="undef" /> | |
<mt:SetHashVar name="e"> | |
<mt:EntryID setvar="entry_id" /> | |
<mt:EntryTitle setvar="entry_title" /> | |
<mt:EntryBody setvar="entry_body" /> | |
</mt:SetHashVar> | |
<mt:SetVar name="entries" key="$idx" value="$e" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.image-wrap { | |
display: table-cell; | |
width: 200px; | |
height: 200px; | |
text-align: center; | |
vertical-align: middle; | |
line-height: 0; | |
border: 1px solid #999; | |
} |