颜五月 發表於 2023-7-3 00:00:00

dedeCMS 站内搜索代码的改进方法

<p>
        <span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>要用好织梦的站内搜索,必须要明白织梦CMS搜索页面和代码调用方式。 </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、织梦CMS的搜索页面存放在网站根目录下/plus/advancedsearch.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;'>2、代码调用方式:我们只要将以下代码放在模板页面的指定位置,就可以实现强大的站内搜索了。 </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;'>以下为引用的内容: </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";'>
        <p class="right">
                <span><u>复制代码</u></span></p>
        <p>
                代码如下:</p>
</div>
<p class="msgborder" 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>
        &lt;form action="/plus/advancedsearch.php" method="post"&gt;&lt;!--这里是你的搜索页面位置--&gt; <br>
        &lt;p&gt; <br>
        &lt;input type="hidden" name="mid" value="1" /&gt; <br>
        &lt;input type="hidden" name="dopost" value="search" /&gt; <br>
        &lt;span class="STYLE3 STYLE2"&gt;&lt;span class="STYLE3"&gt;关键词:&lt;/span&gt;&lt;/span&gt; <br>
        &lt;input name="q" type="text" class="STYLE2" size="20" /&gt; <br>
        &lt;input name="submit2" type="submit" class="STYLE2" value="开始搜索" /&gt;&lt;!--以上代码内关键词的搜索代码--&gt; <br>
        &lt;/p&gt; <br>
        &lt;p&gt;<br><br>
        &lt;span class="STYLE7"&gt;文章内容 :&lt;/span&gt; <br>
        &lt;input name="body" type="text" class="STYLE2" size="40" /&gt; <br>
        &lt;input name="submit3" type="submit" class="STYLE2" value="开始搜索" /&gt; <br><br>
        &lt;/p&gt; <br>
        &lt;/form&gt; <br>
        &lt;!--以上代码为文章内容搜索代码--&gt; </p>
<div>
         </div>
頁: [1]
查看完整版本: dedeCMS 站内搜索代码的改进方法