鱼王 發表於 2023-9-8 00:00:00

织梦系统DedeCMS设定栏目及文档权限登录后跳转到登陆前的页面的实现方法

<p style='margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";'>
        出现这样的情况后,您的用户不得不再次去辛辛苦苦寻找在登陆前有极大兴趣查看的文档或栏目地址,当您的文档或栏目数量比较壮观时,这时候您的用户就要发狂了。 <br><br>
        解决方法 <br>
        栏目页(plus/list.php?tid=xx) <br>
        打开/plus/list.php文件,找到如下代码: <br><br>
        1 include_once(DEDETEMPLATE.'/plus/view_msg_catalog.htm'); <br>
        在其上一行加入如下代码: <br>
         </p>
<div class="msgheader" style='margin: 3px auto 0px; padding: 0px 3px; outline: none; line-height: 21.6px; clear: both; border-width: 1px; border-style: solid; border-color: rgb(0, 153, 204); background: rgb(246, 251, 255); overflow: hidden; font-family: tahoma, arial, "Microsoft YaHei";'>
        <div class="right">
                <span><u>复制代码</u></span>
</div>
        <p>
                代码如下:</p>
</div>
<div class="msgborder" id="phpcode2" style='margin: 0px auto 3px; padding: 0px 3px; outline: none; line-height: 25.2px; font-size: 14px; clear: both; border-right: 1px solid rgb(0, 153, 204); background: rgb(221, 237, 251); overflow: hidden; border-left: 1px solid rgb(0, 153, 204); word-break: break-all; border-bottom: 1px solid rgb(0, 153, 204); word-wrap: break-word; font-family: tahoma, arial, "Microsoft YaHei";'>
        <br>
        //游客才显示登录连接 <br>
        if($cfg_ml-&gt;M_Rank == 0){ <br>
        $gourl = GetCurUrl(); <br>
        $moremsg .= "请先 &lt;a href='{$cfg_memberurl}/login.php?gourl={$gourl}'&gt;&lt;font color='red'&gt;登陆&lt;/font&gt;&lt;/a&gt; 或 &lt;a href='{$cfg_memberurl}/index_do.php?fmdo=user&amp;dopost=regnew'&gt;&lt;font color='red'&gt;注册&lt;/font&gt;&lt;/a&gt; 吧。"; <br>
        } </div>
<p>
        <br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>保存后即可。 </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>内容页(plus/view.php?aid=x) </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>打开 plus/view.php文件,找到如下代码: </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>1 include_once(DEDETEMPLATE.'/plus/view_msg.htm'); </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>在其上一行加入如下代码: </span></p>
<div class="msgheader" style='margin: 3px auto 0px; padding: 0px 3px; outline: none; line-height: 21.6px; clear: both; border-width: 1px; border-style: solid; border-color: rgb(0, 153, 204); background: rgb(246, 251, 255); overflow: hidden; font-family: tahoma, arial, "Microsoft YaHei";'>
        <div class="right">
                <span><u>复制代码</u></span>
</div>
        <p>
                代码如下:</p>
</div>
<div class="msgborder" id="phpcode3" style='margin: 0px auto 3px; padding: 0px 3px; outline: none; line-height: 25.2px; font-size: 14px; clear: both; border-right: 1px solid rgb(0, 153, 204); background: rgb(221, 237, 251); overflow: hidden; border-left: 1px solid rgb(0, 153, 204); word-break: break-all; border-bottom: 1px solid rgb(0, 153, 204); word-wrap: break-word; font-family: tahoma, arial, "Microsoft YaHei";'>
        <br>
        //游客才显示登录连接 <br>
        if($cfg_ml-&gt;M_Rank == 0){ <br>
        $gourl = GetCurUrl(); <br>
        $moremsg .= "请先 &lt;a href='{$cfg_memberurl}/login.php?gourl={$gourl}'&gt;&lt;font color='red'&gt;登陆&lt;/font&gt;&lt;/a&gt; 或 &lt;a href='{$cfg_memberurl}/index_do.php?fmdo=user&amp;dopost=regnew'&gt;&lt;font color='red'&gt;注册&lt;/font&gt;&lt;/a&gt; 吧。"; <br>
        } </div>
<p>
        <br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>保存后即可。</span></p>
頁: [1]
查看完整版本: 织梦系统DedeCMS设定栏目及文档权限登录后跳转到登陆前的页面的实现方法