<?php
$template = <<<END
<section class="travel1_kiji">
<!-- travel1: 記事 -->
<!--{def item/pattern1}-->
<!-- 右画像 -->
<div class="list-free">
<h3 class="order1">{val item/title}</h3>
<div class="text order2">
<!--{def item/subtitle}-->
<h4>{val item/subtitle}</h4>
<!--{/def}-->
{rval item/text}</div>
<div class="image {val item/image_wide} order3">
<!--{def item/image1}-->
<img src="user_data/{val item/image1_file}" alt="">
<!--{def item/image_text1}-->
<div><p>{val item/image_text1}</p></div>
<!--{/def}-->
<!--{/def}-->
<!--{def item/image2}-->
<img src="user_data/{val item/image2_file}" alt="">
<!--{def item/image_text2}-->
<div><p>{val item/image_text2}</p></div>
<!--{/def}-->
<!--{/def}-->
</div>
</div>
<!--/.list-free-->
<!--{/def}-->
<!--{def item/pattern2}-->
<!-- 左画像 -->
<div class="list-free">
<h3 class="order3">{val item/title}</h3>
<div class="text order2">
<!--{def item/subtitle}-->
<h4>{val item/subtitle}</h4>
<!--{/def}-->
{rval item/text}</div>
<div class="image {val item/image_wide} order1">
<!--{def item/image1}-->
<img src="user_data/{val item/image1_file}" alt="">
<!--{def item/image_text1}-->
<div><p>{val item/image_text1}</p></div>
<!--{/def}-->
<!--{/def}-->
<!--{def item/image2}-->
<img src="user_data/{val item/image2_file}" alt="">
<!--{def item/image_text2}-->
<div><p>{val item/image_text2}</p></div>
<!--{/def}-->
<!--{/def}-->
</div>
</div>
<!--/.list-free-->
<!--{/def}-->
<!--{def item/pattern3}-->
<!-- 右画像・中見出し -->
<div class="list-free">
<h3 class="order2">{val item/title}</h3>
<div class="text order1">
<!--{def item/subtitle}-->
<h4>{val item/subtitle}</h4>
<!--{/def}-->
{rval item/text}</div>
<div class="image {val item/image_wide} order3">
<!--{def item/image1}-->
<img src="user_data/{val item/image1_file}" alt="">
<!--{def item/image_text1}-->
<div><p>{val item/image_text1}</p></div>
<!--{/def}-->
<!--{/def}-->
<!--{def item/image2}-->
<img src="user_data/{val item/image2_file}" alt="">
<!--{def item/image_text2}-->
<div><p>{val item/image_text2}</p></div>
<!--{/def}-->
<!--{/def}-->
</div>
</div>
<!--/.list-free-->
<!--{/def}-->
<!--{def item/pattern4}-->
<!-- 左画像・中見出し -->
<div class="list-free">
<h3 class="order2">{val item/title}</h3>
<div class="text order3">
<!--{def item/subtitle}-->
<h4>{val item/subtitle}</h4>
<!--{/def}-->
{rval item/text}</div>
<div class="image {val item/image_wide} order1">
<!--{def item/image1}-->
<img src="user_data/{val item/image1_file}" alt="">
<!--{def item/image_text1}-->
<div><p>{val item/image_text1}</p></div>
<!--{/def}-->
<!--{/def}-->
<!--{def item/image2}-->
<img src="user_data/{val item/image2_file}" alt="">
<!--{def item/image_text2}-->
<div><p>{val item/image_text2}</p></div>
<!--{/def}-->
<!--{/def}-->
</div>
</div>
<!--/.list-free-->
<!--{/def}-->
</section>
END;

$travel1_kiji = array(
		"title" => "travel1 記事",
		"name" => "travel1_kiji",			// 名称、重複すると正しく動作しません
		"template" => $template,		// ブロックのテンプレート
		"input" => array(
		"help" => array(
			"title" => "使い方",
			"type" => "comment",
			"link" => DOCUMENT1 . "/?act=travel1_kiji",
			"class" => "notice",
		),
			"pattern" => array(
				"title" => "表示パターン",
				"type" => "select",
				"list" => array(
					"1" => "右画像",
					"2" => "左画像",
					"3" => "右画像・見出中",
					"4" => "左画像・見出中",
				),
			),
			"title" => array(
				"title" => "見出し（縦）",
				"type" => "text",
			),
			"subtitle" => array(
				"title" => "小見出し",
				"type" => "text",
			),
			"text" => array(
				"title" => "説明文",
				"type" => "textarea",
			),
			"image_wide" => array(
				"title" => "画像サイズ",
				"type" => "select",
				"list" => array(
					"w1" => "画像小",
					"w2" => "画像大",
				),
			),
			"image1" => array(
				"title" => "画像1",
				"type" => "image",
			),
			"image_text1" => array(
				"title" => "画像説明1",
				"type" => "text",
			),
			"image2" => array(
				"title" => "画像2",
				"type" => "image",
			),
			"image_text2" => array(
				"title" => "画像説明2",
				"type" => "text",
			),
		),
		"func" => "func_travel1_kiji",
	);
block_add($travel1_kiji);

function func_travel1_kiji($def, $info)
{
	$info["pattern" . $info["pattern"]]  = $info["pattern"];
	return $info;
}
