>> Back to: Home

为模板添加“记住我”功能 不指定

       现在使用的BO-BLOG simple模板没有“记住我”功能。经逸冰同学提醒可以通过修改模板完成此功能。右手谷歌,左手百度。发现只需要用一段代码替换原模板即可。

       代码如下
$elements['form_reply']=<<<eot
  <a name="reply"></a>
  <div id="commentForm">
    <form name="visitorinput" id="visitorinput" method="post" action="javascript: ajax_submit('{jobnow}');">
    <div class="formbox-comment">
      <div class="formbox-comment-title">{formtitle}</div>
      <div class="formbox-comment-content">
        {if_neednopsw_begin}
        <div class="formbox-comment-input">
          <p class="in"><input name="v_replier" id="v_replier" type="text" size="32" class="text" value="{replier}" {disable_replier}/>  {$lnc[246]}</p>      
          <p class="in"><input name="v_repurl" id="v_repurl" type="text" size="32" class="text" value="{repurl}" />  {$lnc[170]}</p>        
          <p class="in"><input name="v_repemail" id="v_repemail" type="text" size="32" class="text"  value="{repemail}" />  {$lnc[248]}</p>
          <input name="v_password" id="v_password" type="hidden" size="12" class="text"  value="{password}" {disable_password}/>
        </div>
        {if_neednopsw_end}

        {if_openid_begin}
    <div id="commentbox-openid" style="padding-bottom:5px">
    <strong>{$lnc[314]}:</strong> <br/>
    <input name="openid_url" id="openid_url" type="text" size="44" class="text" value="{repopenurl}" {disable_openurl}/>
    </div>
        {if_openid_end}

        <div class="formbox-comment-tool">
          <input name="stat_html" id="stat_html" type="checkbox" value="1" {disable_html} /> {$lnc[242]}
          <input name="stat_ubb" id="stat_ubb" type="checkbox" value="0" onclick="showhidediv('ubbid')"/> {$lnc[243]}
          <input name="stat_emot" id="stat_emot" type="checkbox" value="1" {disable_emot}/> {$lnc[244]}<img src="{$template['moreimages']}/arrows/singledown.gif" alt="" title="{$lnc[241]}" style="cursor: pointer;" onclick="showhidediv('emotid')" align="absmiddle" />
          <input name="stat_property" id="stat_property" type="checkbox" value="1" onclick="promptreppsw();"/> {$lnc[245]}
          {if_neednopsw_begin}
          <input name="stat_rememberme" id="stat_rememberme" type="checkbox" value="1" {checked_rememberme} onclick="quickremember();"/>  {$lnc[284]} <a href="login.php">[{$lnc[89]}]</a> {if_neednopsw_rawend}{additional}
          </div>
        <div id="ubbid" class="formbox-comment-ubb" style="display: none;">{ubbcode}</div>
        <div id="emotid" class="panel-smilies" style="display: none;" onclick="showhidediv('emotid')">
            <div class="panel-smilies-content">
            {emots}
            </div>
        </div>
        {if_securitycode_begin}<script type="text/javascript">securitycodejs="{$lnc[249]} <span id='securityimagearea'><img src='inc/securitycode.php?rand={rand}' alt='' title='{$lnc[250]}' style='cursor: pointer;' onclick=\"refreshsecuritycode('securityimagearea', 'v_security');\"/></span> <input name='v_security' id='v_security' type='text' size='4' maxlength='4' class='text' style='ime-mode: disabled' /> ";</script>  {if_securitycode_end}
        <textarea name="v_content" id="v_content" cols="64" rows="10" onkeydown="ctrlenterkey(event);" onfocus="if (securitycodejs!=null) {document.getElementById('showsecuritycode').innerHTML=securitycodejs; securitycodejs=null;}"></textarea> <br/>  <span id="showsecuritycode"></span>
        <div style="padding-top:10px">
        {hidden_areas}
        <input type="button" name="btnSubmit" id="btnSubmit" value="{$lnc[25]}" class="button" onclick="ajax_submit('{jobnow}'); return false;"/>&nbsp;
        <input name="reset" id="reset" type="reset" value="{$lnc[252]}" class="button" />
        </div>
      </div>
    </div>
    </form>
  </div>
eot;


      将此段代码覆盖原模板$elements['form_reply']一段即可。
相关日志
返回顶部
Mr.Bean Email Homepage
2009/05/20 21:52
喜欢这个东西,爱不释手。
最近一直很忙,学校事情多。准备用用帝国系统做站。有兴趣去看看这个:http://yuwen.freshbean.cn
Life 回复于 2009/05/21 13:47
呵,模板挺好看的,看好你哦。
小狼 Homepage
2009/05/16 19:46
终于.....
Life 回复于 2009/05/21 13:46
o(∩_∩)o...让您久等了。
chanthon Homepage
2009/05/15 17:50
我在官方论坛里看到过,
好像不需要这么麻烦吧。。
Life 回复于 2009/05/15 19:45
我今天也去官方论坛找了下,没找到,在谷歌中找到了一个相关的。之后就自己动手了。
笔头 Email Homepage
2009/05/15 11:57
不知道是什么....
Life 回复于 2009/05/15 19:44
原来此套模板没有“记住我”。比如在评论我文章的时候,现在有了这个选项,你只需要点“记住我”,下次就不用重新输入你的名称和网站了。
分页: 1/1 第一页 1 最后页
发表评论

昵称

网址

电邮

您也可用OpenID登入:
打开HTML 打开UBB 打开表情 隐藏 记住我 [登入] [注册]