**[[続・質問箱/38]] [#ub54f7dd] #author("2018-03-11T12:22:11+09:00;2011-07-14T11:24:51+09:00","","") **[[質問箱/2038]] [#ub54f7dd] |RIGHT:70|LEFT:410|c |~カテゴリ|| |~サマリ|見出し単位の編集| |~バージョン|1.4.2| |~投稿者|[[mai]]| |~状態|完了| |~投稿日|&new{2004-02-16 (MON) 11:22:52};| ***質問 [#f42298d0] このページのように、見出しの横に編集アイコンを 作るにはどのようにすればよろしいですか? editコマンドかなと思って参考テキストを探しては 試しているのですが、上手く行きません。 すいませんが、ご指導をお願い致します。 ちなみに、アンカー?!は何とか出来たようです。 ***回答 [#k418d321] -[[reimy]] &new{2004-02-16 (MON) 12:38:02}; ~[[dev:PukiWiki/1.4/ちょっと便利に/見出しごとの編集(fixed_anchor版)]]の差分を当てたうえで、下記のように変更します。 --ja.lng (en.lngも英語化して同様に) $_symbol_anchor = '■'; /* タグ使用不可・プラグイン使用可能 */ $_symbol_anchor2 = '■'; /* タグ使用可能・プラグイン使用不可 */ $_symbol_edit = '<img src="./image/paraedit.png" width="9" height="9" alt="Edit" title="Edit" />'; --edit.inc.php global $script,$vars,$_symbol_edit; $args = func_get_args(); $s_label = array_pop($args); if ($s_label == '') { $s_label = $_symbol_edit; } --edit.inc.php $r_page = rawurlencode($page); return "<a class=\"anchor_super\" href=\"$script?cmd=edit&page=$r_page$id\" title=\"Edit\">$s_label</a>"; --calendar_viewer.inc.php global $_symbol_anchor2,$_symbol_edit; --calendar_viewer.inc.php $head .= ">$link <a class=\"anchor_super\" href=\"$script?$r_page\">$_symbol_anchor2</a> <a class=\"anchor_super\" href=\"$script?cmd=edit&page=$r_page\" title=\"Edit\">$_symbol_edit</a></h3>\n"; --include.inc.php global $_symbol_anchor2,$_symbol_edit; --include.inc.php $head .= "<h3>$link <a class=\"anchor_super\" href=\"$script?$r_page\">$_symbol_anchor2</a> <a class=\"anchor_super\" href=\"$script?cmd=edit&page=$r_page\" title=\"Edit\">$_symbol_edit</a></h3>\n"; --default.ja.css/default.en.css .anchor_super{ font-size:x-small; font-weight:normal; font-style:normal; padding:0px; line-height:100%; vertical-align:text-top; } --pukiwiki.ini.php // 見出し行に固有のアンカーを自動挿入する $fixed_heading_anchor = 1; -[[mai]] &new{2004-02-16 (MON) 14:01:55}; ~“dev:PukiWiki/1.4/ちょっと便利に/見出しごとの編集(fixed_anchor版)に差分を当てたうえで”とありますが、どういう意味なのでしょうか?~ とりあえず、リンク先のpara_edit.diffをダウンロードして、以前教わったpatchでedit.inc.phpに差分としてあててみましたが、何やらきちんと処理が出来ていないようで、 index:convert_html.php...... で始まり、最後は file to patch: という表示が出ます。どこかに説明文がないか探してはいますが、初心者の私には難しいです。どこの解釈を間違えているのでしょうか?教えて下さい。 -[[通りすがり]] &new{2004-02-16 (MON) 15:00:07}; ~その前に[[続・質問箱/23]]のkouさんにコメント付けて欲しいですな。 ~その前に[[質問箱/2023]]のkouさんにコメント付けて欲しいですな。 -[[reimy]] &new{2004-02-16 (MON) 14:52:58}; ~edit.inc.phpだけにパッチを当てるのではありません。対象となるすべてのファイルにパッチを当てる必要があります。 ~para_edit.diffの対象ファイルは、 --convert_html.php --html.php --plugin/edit.inc.php -[[mai]] &new{2004-02-17 (TUE) 08:57:01}; ~全部はクリア出来ませんでしたが、もうちょっと勉強して再チャレンジしてみます。reimyさんアドバイスありがとうございました。 -[[radio]] &new{2004-05-06 (THU) 00:17:57}; ~calendar_viewer.inc.phpの修正には誤記があるのでは? ~正しくは、 $head = "<h3>$link <a class=\"anchor_super\" href=\"$script? $r_page\">$_symbol_anchor2</a> <a class=\"anchor_super\" href=\"$script?cmd=edit&page=$r_page\" title=\"Edit\">$_symbol_edit</a></h3>\n"; ではないでしょうか。 ~行頭の ~.= を = に ~ > を <h3> ~に修正しています。 -[[satoshi]] &new{2004-05-06 (THU) 22:29:48}; ~編集アイコンに使われているparaedit.pngなのですが、IEではトゥルーカラーPNGの透明ピクセルに対応してないために、鉛筆の周りの色が要素の背景色ではなく、Webブラウザの背景色になってしまいます。インデックスカラーの場合は透明色に対応しています(ただしα値0のみ)。インデックスカラーに変換したPNGファイルを、このページに添付しておきます。&ref(paraedit.png); //#comment