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
【設定ファイル】 | |
[product_image] | |
fieldname = 商品画像 | |
type = imagefield | |
class = post page | |
【テンプレート】 | |
<?php | |
$imagefield = get_imagefield('product_image'); | |
$image_id = $imagefield['id']; |
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:DynamicMTML> | |
<mt:CampaignRandom tag="main_visual"> | |
<mt:CampaignAsset> | |
<p class="image"><img src="<$mt:AssetURL$>" alt="<$mt:AssetLabel$>" width="<$mt:AssetProperty property="image_width"$>" height="<$mt:AssetProperty property="image_height"$>" /></p> | |
</mt:CampaignAsset> | |
</mt:CampaignRandom> | |
</mt:DynamicMTML> |
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
if (mtappVars.screen_id === 'edit-page') { | |
$.MTAppInCats({ | |
categories: '3', // ←フォルダIDをカンマ区切りで設定 | |
code: function(){ | |
alert('Have a good day!'); // 処理内容を指定($.MTAppCustomize()などなど) | |
} | |
}); | |
} |
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
次のように書きたいとする。 | |
$.MTAppFieldSort({sort: 'title,excerpt,text,ext-field,keywords,tags'}); | |
【対処方法】 | |
text-fieldの手前を$.MTAppFieldSort()でソートして、後はtext-fieldにafter()していく。 | |
(1) シンプルに書く | |
$.MTAppFieldSort({sort: 'title,excerpt'}); |
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
<$MTSetVar name="nest_count" value="0"$><MTParentCategories><$MTSetVar name="nest_count" op="++"$></MTParentCategories><MTIf name="nest_count" gt="2">service/list_<$MTCategoryBasename$>.html<MTElse>_index.html</MTElse></MTIf> |
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
jQuery(function($){ | |
var btn = $('<button class="button mt-edit-field-button"></button>') | |
.text('公開日を現在時刻に設定') | |
.click(function(){ | |
if (confirm('公開日時を変更していいですか!?') == false) { | |
return false; | |
} | |
stamp(); | |
return false; | |
}); |
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
#!/usr/bin/perl | |
# Copyright (c) Tomohiro Okuwaki. http://www.tinybeans.net/blog/ | |
use strict; | |
use warnings; | |
use utf8; | |
# 複数のファイルの操作 | |
my $dir = shift; | |
my $files = []; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>MTDDC</title> | |
<style type="text/css"> | |
#result-container { | |
position: relative; | |
} | |
#result-img { |
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 api = new MT.DataAPI({ | |
baseUrl: '/mt_dir/mt-data-api.cgi', | |
clientId: 'mt data api test.' | |
}); | |
var blog_ids = [1, 2, 3]; | |
var total = 0; | |
var responsed = 0; | |
for (var i = 0, l = blog_ids.length; i < l; i++) { | |
api.listEntries( | |
blog_ids[i], |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Multi file uploader</title> | |
<style type="text/css"> | |
body { | |
background-color: black; | |
font-family: 'Source Code Pro', Monaco, Consolas, 'Courier New', Courier, monospace; | |
color: white; |
OlderNewer