discuz x3.2简化的搜索框代码
这是在做一个模板时改的,并不代表这是一个美化或者优化,只是特殊情况下的需要。
只有一个搜索框,默认帖子搜索,无搜索按钮,输入内容直接回车搜索。
<!--{if $_G['setting']['search']}-->
<!--{eval $slist = array();}-->
<!--{block slist[user]}--><li><a href="javascript:;" rel="user">{lang users}</a></li><!--{/block}-->
<!--{/if}-->
<!--{if $_G['setting']['search'] && $slist}-->
<div id="" class="{if $_G['setting']['srchhotkeywords'] && count($_G['setting']['srchhotkeywords']) > 5}scbar_narrow {/if}cl">
<form id="scbar_form" method="{if $_G[fid] && !empty($searchparams[url])}get{else}post{/if}" autocomplete="off" onsubmit="searchFocus($('scbar_txt'))" action="{if $_G[fid] && !empty($searchparams[url])}$searchparams[url]{else}search.php?searchsubmit=yes{/if}" target="_blank"">
<input type="hidden" name="mod" id="scbar_mod" value="forum" />
<input type="hidden" name="formhash" value="{FORMHASH}" />
<input type="hidden" name="srchtype" value="title" />
<input type="hidden" name="srhfid" value="$_G[fid]" />
<input type="hidden" name="srhlocality" value="$_G['basescript']::{CURMODULE}" />
<!--{if !empty($searchparams[params])}-->
<!--{loop $searchparams[params] $key $value}-->
<!--{eval $srchotquery .= '&' . $key . '=' . rawurlencode($value);}-->
<input type="hidden" name="$key" value="$value" />
<!--{/loop}-->
<input type="hidden" name="source" value="discuz" />
<input type="hidden" name="fId" id="srchFId" value="$_G[fid]" />
<input type="hidden" name="q" id="cloudsearchquery" value="" />
<!--{/if}-->
<div class="form-group">
<input type="text" name="srchtxt" id="s" autocomplete="off" x-webkit-speech speech placeholder="搜索…" class="form-control"/>
</div>
</form>
</div>
<!--{/if}-->
discuz x3.2简化的搜索框代码的更多相关文章
- WPF自定义搜索框代码分享
首先下载搜索图标: 控件中的搜索图标下载地址:http://www.easyicon.net/1183666-Search_icon.html 搜索框设计过程比较简单: 1.先定义一个Rectangl ...
- 微信小程序搜索框代码组件
search.wxml <view class="header"> <view class="search"> <icon typ ...
- discuz X3.1 源代码阅读,记录代码片段
require_once libfile('function/post'); // /source/function/function_post.php require_once libfile('p ...
- extjs在窗体中添加搜索框
在extjs中添加搜索框,搜索框代码如下: this.searchField = new Ext.ux.form.SearchField({ store : this.store ...
- 【代码笔记】iOS-点击搜索按钮,或放大镜后都会弹出搜索框
一, 效果图. 二,工程图. 三,代码. RootViewController.h #import <UIKit/UIKit.h> #import "CLHSearchBar.h ...
- Discuz! x3.1的插件/utility/convert/index.php代码执行漏洞
漏洞版本: Discuz! x3.1及以下版本 漏洞描述: Discuz! x3.1的插件/utility/convert/index.php存在代码执行漏洞,如果用户在使用完之后不删除,会导致网站容 ...
- bootStrap-table服务器端后台分页的使用,以及自定义搜索框的实现,前端代码到数据查询超详细讲解
关于分页,之前一直纯手写js代码来实现,最近又需要用到分页,找了好多最终确定bootstrap-table,正好前端页面用的是bootstrap. 首先下载BootStrap-table的js和CSS ...
- Android开发 ---代码创建选项菜单、隐藏菜单项、菜单的生命周期,菜单按钮图标设置、搜索框、xml中设置子菜单
1.activity_main.xml 描述: 定义了一个按钮 <?xml version="1.0" encoding="utf-8"?> < ...
- 将代码设置的剪切板内容通过输入法软件粘贴入app搜索框
#进入app搜索框位置--双击#等待输入法软件弹出#将代码设置的剪切板内容通过输入法软件粘贴入app搜索框#搜索 import win32apiimport timeimport win32clipb ...
随机推荐
- [LeetCode] 92. Reverse Linked List II 倒置链表之二
Reverse a linked list from position m to n. Do it in one-pass. Note: 1 ≤ m ≤ n ≤ length of list. Exa ...
- shell 读取yaml 之 shyaml
安装shyaml pip3. install shyaml file.yaml文件内容---idc_group: name: bx bx: news_bx: news_bx web3_bx: web3 ...
- 重启服务器后Docker容器暴露的端口外网突然访问不了!!
*:first-child { margin-top: 0 !important; } .markdown-body>*:last-child { margin-bottom: 0 !impor ...
- 通过Windows实现端口转发
转自:月光博客<通过Windows实现端口转发> 这里介绍一个使用两台云服务器访问外网的方法,一台国内服务器,一台国外服务器,国内服务器通过端口转发来用于中转,中转的好处是,服务器对服务器 ...
- 【记录】【idea】【mysql】Server returns invalid timezone. Go to 'Advanced' tab and set 'serverTimezone' property manually.解决问题
idea连接mysql报错Server returns invalid timezone. Go to 'Advanced' tab and set 'serverTimezone' property ...
- 2018 ACM-ICPC徐州站网络赛 G题
There's a beach in the first quadrant. And from time to time, there are sea waves. A wave ( xxx , yy ...
- Java8 LocalDateTime和Date相互转换
很想要用Java的时间api,但有时候还是需要转换为Date. 二者的相互转换并不是一步到位那么简单,所以,还是需要记录一下转换的api Date to LocalDateTime Date toda ...
- char (*a)[N] 与 char* a[M]区别
已知第二维 char (*a)[N]; //指向数组的指针,实际上这里的N并没有实际的约束意义,平时也很少这么用a = (char (*)[N])malloc(sizeof(char *) * m); ...
- VMWare 下安装 Windows XP
准备工作 安装VMware 我这里安装的是 VMware-workstation-full-12.1.1-3770994.exe 下载Windows XP with SP3 从网上下载的MSDN版本X ...
- 【IntelliJ IDEA】idea部署服务到Tomcat的工作原理
参考地址: https://blog.csdn.net/qq_41116058/article/details/81435084 为什么idea部署服务到tomcat时候,一定要修改Applicati ...