NP_FancyText

コメントなどにSmilelyを出すインターフェースがよく見受けられる。vengoさんのリクエストにお答えして、入れてみた。ウチはコメントだけに使おうと思うので、commentform-loggedin.templateとcommentform-notloggedin.templateのふたつのファイルを修正する必要がある。で、milkさんちから頂いた。http://hunny.babymilk.jp/php/nucleus/item_16.htmlところが、日本ボイタ協会*1の詳細ページの方で、サイドメニューが右下に数十ピクセルずれるようになった理由を調べると、どうやら、これが原因らしい。で、ログインしているとずれないという現象から、commentform-notloggedin.templateに問題があるのだと推察した。※ただし、そこまで気が回ったのは、数時間後・・・(^^;;form要素が重複していたのと、divとformの閉じタグが足りないことが原因だった。で、ちょろっと直した。ついでに、tableを少しややこしくなくした。commentform-notloggedin.templateの内容
<?php<form method="post" style="margin-bottom:0em" name="comment" id="comment" action="<%formdata(actionurl)%>"><div class="commentform"><input type="hidden" name="action" value="addcomment" /><input type="hidden" name="url" value="<%formdata(destinationurl)%>" /><input type="hidden" name="itemid" value="<%itemid%>" /><script type="text/javascript">    //<![CDATA[         function insertext(text){        document.comment.body.value+=" "+ text;        document.comment.body.focus();         }    //]]></script><noscript>    Your browser is not Javascript enable or you have turn it off.    We recommend you to activate,    otherwise you will have to enter the emoticons representations manually.</noscript><table border="0" width="500"><tr><td align="center">    <a href="javascript:insertext(':D','short')">    <img style="border: none;" alt="biggrin" src="nucleus/plugins/fancytext/smiles/icon_biggrin.gif" />    </a>        <a href="javascript:insertext(':!:','short')">    <img style="border: none;" alt="!" src="nucleus/plugins/fancytext/smiles/icon_exclaim.gif" />    </a>        <a href="javascript:insertext(':?:','short')">    <img style="border: none;" alt="?" src="nucleus/plugins/fancytext/smiles/icon_question.gif" />    </a>        <a href="javascript:insertext('8)','short')"><img style="border: none;" alt="cool " src="nucleus/plugins/fancytext/smiles/icon_cool.gif" />    </a>        <a href="javascript:insertext(':?','short')">    <img style="border: none;" alt="confused" src="nucleus/plugins/fancytext/smiles/icon_confused.gif" />    </a>        <a href="javascript:insertext(':idea:','short')">    <img style="border: none;" alt="idea" src="nucleus/plugins/fancytext/smiles/icon_idea.gif" />    </a>        <a href="javascript:insertext(':lol:','short')">    <img style="border: none;" alt="lol" src="nucleus/plugins/fancytext/smiles/icon_lol.gif" />    </a>        <a href="javascript:insertext(':oops:','short')">    <img style="border: none;" alt="oops" src="nucleus/plugins/fancytext/smiles/icon_redface.gif" />    </a>        <a href="javascript:insertext(':cry:','short')">    <img style="border: none;" alt="cry" src="nucleus/plugins/fancytext/smiles/icon_cry.gif" />    </a>        <a href="javascript:insertext(':twisted:','short')">    <img style="border: none;" alt="twisted" src="nucleus/plugins/fancytext/smiles/icon_twisted.gif" /></a>        <a href="javascript:insertext(':arrow:','short')">    <img style="border: none;" alt="arrow" src="nucleus/plugins/fancytext/smiles/icon_arrow.gif" />    </a>        <a href="javascript:insertext('8O','short')">    <img style="border: none;" alt="eek" src="nucleus/plugins/fancytext/smiles/icon_eek.gif" />    </a>        <a href="javascript:insertext(':evil:','short')">    <img style="border: none;" alt="evil" src="nucleus/plugins/fancytext/smiles/icon_evil.gif" />    </a>        <a href="javascript:insertext(':-(','short')">    <img style="border: none;" alt="frown" src="nucleus/plugins/fancytext/smiles/icon_frown.gif" />    </a>        <a href="javascript:insertext(':x','short')">    <img style="border: none;" alt="mad" src="nucleus/plugins/fancytext/smiles/icon_mad.gif" />    </a>        <a href="javascript:insertext(':wink:','short')">    <img style="border: none;" alt="wink" src="nucleus/plugins/fancytext/smiles/icon_wink.gif" />    </a>        <a href="javascript:insertext(':|','short')">    <img style="border: none;" alt="neutral" src="nucleus/plugins/fancytext/smiles/icon_neutral.gif" />    </a>        <a href="javascript:insertext(':P','short')"><img style="border: none;" alt="razz" src="nucleus/plugins/fancytext/smiles/icon_razz.gif" />    </a>        <a href="javascript:insertext(':roll:','short')">    <img style="border: none;" alt="rolleyes" src="nucleus/plugins/fancytext/smiles/icon_rolleyes.gif" />    </a>        <a href="javascript:insertext(':o','short')">    <img style="border: none;" alt="surprised" src="nucleus/plugins/fancytext/smiles/icon_surprised.gif" />    </a></td></tr></table><label for="nucleus_cf_body"><%text(_COMMENTFORM_COMMENT)%></label>    <textarea name="body" class="formfield" cols="40" rows="10" id="nucleus_cf_body"></textarea><table border="0"><tr><td>    <label for="nucleus_cf_name"><%text(_COMMENTFORM_NAME)%></label>:    </td><td>    <input name="user" size="40" maxlength="40" value="<%formdata(user)%>" class="formfield" id="nucleus_cf_name" /></td></tr><tr><td>    <label for="nucleus_cf_mail"><%text(_COMMENTFORM_MAIL)%></label>:    </td><td>    <input name="userid" size="40" maxlength="60" value="<%formdata(userid)%>" class="formfield" id="nucleus_cf_mail" /></td></tr></table>    <input type="submit" value="<%text(_COMMENTFORM_SUBMIT)%>" class="formbutton" />    <input type="checkbox" value="1" name="remember" id="nucleus_cf_remember" <%formdata(rememberchecked)%> /><label for="nucleus_cf_remember"><%text(_COMMENTFORM_REMEMBER)%></label>    </div></form>?>
  • 注1http://www.vojta.jp/nucleus/index.php

脳みその中身(Ownd 別館)

ICTコンサルタントの備忘録

0コメント

  • 1000 / 1000