capsctrldays

2007-01-05 (金) [長年日記]

マルセイバターサンドキター!

大好物キターーーーー!うますなあ。

できることなら貪欲に東京でも手に入れたいので、各地催事への出品のご案内をRSS形式にして欲しい(地区別で)。もしくは、.cal形式にして欲しい(もちろん地区別で)。

それ、plaggerでできるんでしょう?

とりあえず、今月末は吉祥寺伊勢丹に買いに行くこと。

[Rails] Riding Rails: Rails 1.2: Release Candidate 2

早く1.2にして欲しいな。

[PHP] Smartyで文字列をテンプレートにする

メモしとく。めんどい。

<?php
require_once("../phplib/smarty/Smarty.class.php");

function get_template($tpl_name,&$tpl_source,&$smarty_obj){
    $tpl_source = $tpl_name;
    return true;
}

function get_timestamp($tpl_name,&$tpl_timestamp,&$smarty_obj){
    $tpl_timestamp = time();
    return true;
}

function get_secure($tpl_name,&$smarty_obj){
    // 全てのテンプレートがセキュアであると仮定する
    return true;
}

function get_trusted($tpl_name,&$smarty_obj){
    // テンプレートから使用しない
}

$smarty = new Smarty();
$smarty->compile_dir="../template_c";

// テンプレートリソース名"val"を登録する
$smarty->register_resource("val",array("get_template",
                                       "get_timestamp",
                                       "get_secure",
                                       "get_trusted"));

$tmpl = "{ if true }TRUE{ /if }";
$result = $smarty->fetch("val:".$tmpl);

print $result;
?>
本日のツッコミ(全3件) [ツッコミを入れる]
1 watanabe (2007-01-05 (金) 13:55)

not マルセイユ but マルセイ from 道民

2 kdmsnr (2007-01-05 (金) 14:46)

うう。コピペしたのに。

3 thata (2007-01-05 (金) 18:18)

主食にしたい>マルセイ