サブカテゴリー化(データ...
URLを自動選択させる
サイトマップやプロフィー...
記事訂正を簡単に-編集リ...
トラックバックで自動リビ...
リンク先を別ウィンドウで...
複数ブログのデザインを一...
トラックバックのURLを表...
コメント・トラックバック...
最近のトラックバックを表...
最近のコメントを表示
ページ変更なしで「続きを...
#menuの表示を変更
常にサイドメニューを表示
Decodeと文字色をつける
フォントの大きさを自在に
リビルドの負荷を減らす
RSSを導入する
RDFを表示させる
エントリーのカテゴリ表示
blockquoteを使おう!
カテゴリー表示できない!...
投稿者をニックネームにす...
(お詫び)このページは開...
サブカテゴリー化(データ...
iTunesのNowPlayingを表示...
NowPlayingなCDリストを表...
一言BBSをサイドメニュー...
カテゴリーのページ分割
サブカテゴリーに悩む
URLを自動選択させる
プラグインがうまく入りま...
MTでデータベースもどき2004/05/15
文字フォントを変えるに引き続き、エントリー画面をどんどん変更しまーす。
Trivial BLOGさんの「管理画面にDecodeボタンをつける」と「Color Selectorをつける」を参考にしました。
※補記:Decodeは<>を自動で<とか>(半角)に直してくれるボタンです。
やっぱりいじくるのは、“tmpl/cms/bm_entry.tmpl と edit_entry.tmpl”です。
Decodeだけでなく、CodeとQuoteも付けちゃいます。Trivial BLOGさんにはほんと感謝ですね!!
で、以下また完璧コピペ。(必要ないと思うものは削除で)
まず一番上の<script language="JavaScript">〜</script>内に、以下を貼り付け。
上から順に、Code、Decode、Quoteです。
function format_code() {
if (!document.selection) return;
var str = document.selection.createRange().text;
if (!str) return;
document.selection.createRange().text = "" + str + "";
return;
}function deCode() {
if (!document.selection) return;
strSelection = document.selection.createRange().text
if (!strSelection) return;
strSelection = strSelection.replace(new RegExp("&","g"), "&");
strSelection = strSelection.replace(new RegExp("<","g"), "<");
strSelection = strSelection.replace(new RegExp(">","g"), ">");
document.selection.createRange().text = strSelection;
return;
}function format_quote() {
if (!document.selection) return;
var str = document.selection.createRange().text;
if (!str) return;
document.selection.createRange().text = "" + str + "";
return;
}
function colorSelect (obj) {
var v;
if (!document.selection) return;
var str = document.selection.createRange().text;
if (!str) return;
with(obj) {
if (options[selectedIndex].value == "------") return;
v = options[selectedIndex].value;
}
document.all.colcol.style.backgroundColor = v;
document.selection.createRange().text = '<font color="' + v + '">' + str + '</font>';}function colorSet() {
var v;
if (!document.selection) return;
var str = document.selection.createRange().text;
if (!str) return;
if (document.all.colcol.options[document.all.colcol.selectedIndex].value == "------") return;
v = document.all.colcol.options[document.all.colcol.selectedIndex].value;
document.selection.createRange().text = '<font color="' + v + '">' + str + '</font>';}
次にフォントの大きさを自在に(EntryBody周辺)を参照しながら、変更していない場合は変更すると吉かも。
その下<script language="javascript">内にあるwidthなどは崩れないように微調整が必要かもしれません。
そして「document.write('
document.write('<td width="24"><a href="javascript:format_code()"><img src="<TMPL_VAR NAME=STATIC_URI>images/code-button.gif" alt="code" width="24" height="18" border="0"></a></td>');
document.write('<td width="24"><a href="javascript:deCode()"><img src="<TMPL_VAR NAME=STATIC_URI>images/decode-button.gif" alt="decode" width="24" height="18" border="0"></a></td>');
document.write('<td width="24"><a href="javascript:format_quote()"><img src="<TMPL_VAR NAME=STATIC_URI>images/quote-button.gif" alt="quote" width="24" height="18" border="0"></a></td>');
色については、以下を貼り付け。
document.write('<td width="100"><form name="colform"><select name="colcol" onchange="colorSelect(this)" width="48"><option value="------" selected>------<option value="red">red<option value="yellow">yellow<option value="blue">blue<option value="green">green<option value="cyan">cyan</select><input type="button" onclick="colorSet()" value="set"></td>');