Home

Di notebook

jQueryで角丸

  • Posted by: masa
  • 2010年3月10日 00:48
  • javascript

JQuery Corner でボックスの角っこを丸くする。

サンプル

Continue reading

  • Comments (Close): 0
  • TrackBack (Close): 0

MTユーザー情報のメールアドレスを公開する場合のスパム対策

<$MTEntryAuthorEmail spam_protect="1"$>

Continue reading

  • Comments (Close): 0
  • TrackBack (Close): 0

Espresso + Zen-coding のメモ

  • Posted by: masa
  • 2010年3月 4日 16:56
  • espresso

Espresso (Version 1.1.1) でのZen-coding (Version 0.6) メモ。

Continue reading

  • Comments (Close): 0
  • TrackBack (Close): 0

jQueryを使って、日時に合わせて背景画像を自動的に変更する

  • Posted by: masa
  • 2010年2月18日 23:55
  • javascript

日時(月、時間など)に合わせて、背景画像を自動的に変更したいとき。

月に合わせて、背景画像を(正月、節分、ひな祭り、......)のように替えたい場合、まず1〜12月の画像を連番で用意する。

1月はimage0.png、2月はimage1.png

のように0を初期値として連番で画像に名前をつける。表示するためのjavascriptは以下の通り。

var theDate = new Date();
var thisMonthImage = "url(image" + theDate.getMonth() + ".png)";
$("#content").css("background", thisMonthImage);
  • head要素でjQueryを読み込んでおく
  • id="content"の属性を付けたHTML要素の背景画像が設定される
  • getMonth()で得られる値は0から11で、0が1月、1が2月、...、11が12月となる

Continue reading

  • Comments (Close): 0
  • TrackBack (Close): 0

ブログ記事編集中の自動保存を無効にする

mt-config.cgi に以下を追記する

AutoSaveFrequency 0

※ieでは自動保存のタイミングでカーソルが勝手に移動してしまうらしい。なので標準で設定しておいた方がいい。※MT5では未確認。

Continue reading

  • Comments (Close): 0
  • TrackBack (Close): 0

更新通知

設定 > ウェブサービス の「更新通知」に以下を追加する

http://api.my.yahoo.co.jp/RPC2
http://rpc.reader.livedoor.com/ping
  • 開発時には通知しないよう注意する
  • technorati.com のチェックを外す(エラーが返るので 2009.12.20追記)

Continue reading

  • Comments (Close): 0
  • TrackBack (Close): 0

UI画像のファイル名規則

  • Posted by: masa
  • 2009年12月10日 10:12
  • guideline

原則

  • ディレクトリ名に合わせる
  • 英語を用いる
  • コンテンツ画像と収容するフォルダを分別できない場合(カラーミーショッププロなど)は、ui- を頭に付与する 例)ui-icon-blog.png

Continue reading

  • Comments (Close): 0
  • TrackBack (Close): 0

カスタムフィールドで入力したものを表示するタグ

テキストの場合

<mt:If tag="■">
<mt:■>
</mt:If>

画像の場合

<mt:If tag="■">
<mt:■Asset><img src="<$mt:AssetURL$>" alt="" /></mt:■Asset>
</mt:If>

■はフィールドテンプレートタグ

Continue reading

  • Comments (Close): 0
  • TrackBack (Close): 0

301リダイレクト(恒久的なリダイレクト)

  • Posted by: masa
  • 2009年10月19日 11:37
  • .htaccess

筆者が個人ブログに書いてあったMT関連の記事を、本notebook内に引っ越した。それらの記事は、はてなブックマークで人気エントリーとなっていた(はてなブックマーク - Movable Type のテンプレートを Dreamweaver で編集する)ので、本notebook内の記事へリダイレクトしてみる。

Continue reading

  • Comments (Close): 0
  • TrackBack (Close): 0

MTの追加プラグイン

◎全案件

◎要件による

Continue reading

  • Comments (Close): 0
  • TrackBack (Close): 0

Index of all entries

Home

Search
Feeds

Return to page top