-
Notifications
You must be signed in to change notification settings - Fork 0
template.rb
#template.rb tDiaryでテンプレートを使えるようにするプラグイン。定型文をクリック一発で簡単に挿入できます。定型文の定義もウェブのフォームから簡単に作成できます。
##ダウンロード http://itoshi.tv/p/template.rb
##インストール #template.rbをmisc/pluginへコピー。 #追記->設定->プラグイン選択でtemplate.rbを選択。
##使い方
追記の画面のフォームの下のほうに、
テンプレート: | 体重 | 食事
と書いてある。これがテンプレートの名前(template_name)。挿入したいテンプレートの名前をクリックすると、本文フォームにテンプレートが挿入されます。
##テンプレートを作成する
#tDiaryのメニューから追記->設定->テンプレートの設定を選択 #テンプレートを書式に従って書く
##テンプレートの書式 =tamplate_name テンプレートの名前 =template_value テンプレートの内容 =tamplate_name テンプレートの名前 =template_value テンプレートの内容 : :
ダブルクォーテーションは、 " のようにバックスラッシュ(エンマーク)を前に置いてください。
##応用例
例えば、Rubyのクラス定義とかモジュール定義など頻繁に書くひとは、
=template_name class定義 =template_value class def initialize end end
としておくとか、アマゾンプラグインを頻繁に使う人は、
=template_name アマゾンプラグイン =template_value <%=isbn_image "" %>
として置くとか。もし、某巨大掲示板的な顔文字を多用する人は、
=template_name
どうしたら
=template_value
(〃*Д´)どうしたらいいんだよぉ! =template_name くれよ =template_value ヽ(
Д´)ノクレヨ
=template_name
にやり
=template_value
書けませんよ( ̄ー ̄)ニヤリッ
=template_name
いよう
=template_value
(=゜ω゜)ノぃょぅ
=template_name
じゃまた
=template_value
|Д´)ノ 》 ジャ、マタ
=template_name
なにか
=template_value
( ´Д)なにか? =template_name おくれよ =template_value ヽ(´ー
)ノオクレヨ
=template_name
がくぶる
=template_value
((((;゜Д゜)))ガクガクブルブル
=template_name
しょぼーん
=template_value
(´・ω・)ショボーン =template_name うわーん =template_value ヽ(
Д´)ノウワァァァンン
=template_name
ぐすん
=template_value
(´Д⊂グスン
としておくとか。
テキスト弄り系サイトをtDiaryで書いている人は、フォントの色やサイズを変更するタグを以下のように登録しておけば良いでしょう(Wikiスタイルの例)。 =template_name 赤XL =template_value {{'<span style="color:#F00; font-size: x-large">ほげ'}} =template_name 黒XS =template_value {{'<span style="color:#000; font-size: x-small">ほげ'}}