Warning: include() [function.include]: URL file-access is disabled in the server configuration in /home/users/0/main.jp-30smash/web/mt/kanri/ver32_1.html on line 28

Warning: include(http://30smash.main.jp/mt/topnavi.php) [function.include]: failed to open stream: no suitable wrapper could be found in /home/users/0/main.jp-30smash/web/mt/kanri/ver32_1.html on line 28

Warning: include() [function.include]: Failed opening 'http://30smash.main.jp/mt/topnavi.php' for inclusion (include_path='.:/usr/local/php5.2/php') in /home/users/0/main.jp-30smash/web/mt/kanri/ver32_1.html on line 28

エントリーで文字サイズ設定

エントリーの投稿で色ボタン設定(ver3.2対応)と作業自体は殆ど変わりません。
 1.画像のアップロード
 2.編集画面のソースを付け足す
 3.javascriptの作成
 4.スタイルシートにフォントの設定
の4点になります。

1.イメージファイルをアップロード
 /cgi/mt/mt-static/imagesの配下に画像gifをアップロードします。

2.cgi/mt/tmpl/cms/edit_entry.tmplを修正

348行目からがエントリーの内容、376行目からが追記のボタンを決めています。
まず348行目

write('<a title="<MT_TRANS phrase="Bold">" href="#" onclick="return formatStr(document.entry_form.text_more, \'strong\')"><img src="<TMPL_VAR NAME=STATIC_URI>images/html-bold.gif" alt="<MT_TRANS phrase="Bold">" width="22" height="16" /></a>');

の上に


write('<a title="<MT_TRANS phrase="16">" href="#" onclick="return formatSizeStr(document.entry_form.text, \'font_16\')"><img src="<TMPL_VAR NAME=STATIC_URI>images/16px.gif" alt="16" width="22" height="16" /></a>');
write('<a title="<MT_TRANS phrase="14">" href="#" onclick="return formatSizeStr(document.entry_form.text, \'font_14\')"><img src="<TMPL_VAR NAME=STATIC_URI>images/14px.gif" alt="14" width="22" height="16" /></a>');
write('<a title="<MT_TRANS phrase="10">" href="#" onclick="return formatSizeStr(document.entry_form.text, \'font_10\')"><img src="<TMPL_VAR NAME=STATIC_URI>images/10px.gif" alt="10" width="22" height="16" /></a>');

次に376行目に

write('<a title="<MT_TRANS phrase="16">" href="#" onclick="return formatSizeStr(document.entry_form.text_more, \'font_16\')"><img src="<TMPL_VAR NAME=STATIC_URI>images/16px.gif" alt="16" width="22" height="16" /></a>');
write('<a title="<MT_TRANS phrase="14">" href="#" onclick="return formatSizeStr(document.entry_form.text_more, \'font_14\')"><img src="<TMPL_VAR NAME=STATIC_URI>images/14px.gif" alt="14" width="22" height="16" /></a>');
write('<a title="<MT_TRANS phrase="10">" href="#" onclick="return formatSizeStr(document.entry_form.text_more, \'font_10\')"><img src="<TMPL_VAR NAME=STATIC_URI>images/10px.gif" alt="10" width="22" height="16" /></a>');

を追記します。

3./cgi/mt/mt-static/mt_ja.jsを修正

場所はfunction formatStr (e, v) {の上あたりに

function formatSizeStr (e, v) { if (!canFormat) return; var str = getSelected(e); if (!str) return; setSelection(e, '<span class="' + v + '">' + str + '</span>'); return false; }

4.スタイルシート内に

.font_10{ font-size:10px;}
.font_14{ font-size:14px;}
.font_16{ font-size:16px;}

を追加





▽次の記事:ペースターでHTMLを補完
△前の記事:テンプレートの種類と作成方法手順

サイト内検索

 

Movable Type 入門 更新履歴

必要商品

レンタルサーバー

MovableTypeはcgi等の使用を許可しているサーバーを借りなくてはいけません。

解説書

ムーバブルタイプは自分でソースを編集するので、本は必ずあった方がよいです。

最近の一冊

Links

管理人の別館サイト

お問い合わせ&RSS

Powered by Movable Type 4.01
for owner Edit
ランキングのご協力をお願いします。