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] 161. One Edit Distance 一个编辑距离
Given two strings s and t, determine if they are both one edit distance apart. Note: There are 3 pos ...
- Windows的一些使用技巧/设置
仅为个人记录,关闭与否还请读者斟酌 1,加速关机速度 运行gpedit.msc: 计算机管理,管理模块 - 系统 -关机选项 关闭会阻止或取消关机的应用程序的自动终止功能. 2,组策略关闭小娜后,只把 ...
- Metasploit 常用命令手册
Installation curl https://raw.githubusercontent.com/rapid7/metasploit-omnibus/master/config/template ...
- window环境下的oracle错误error: 0x7e的解决方法
今天连接一个Win2008 Server服务端上的一个oracle出现了下面的这些错误 LoadLibraryFromPath: FQ Dll C:\Windows\system\oci.dll is ...
- Python3.7 exe编译工具对比zz
For years, NVDA has used Py2exe to package Python code into something that is executable on a system ...
- MySQL 5.7.26安装及配置--windows10系统下
安装过程省略,下载包解压即可 一.配置my.ini在解压目录下,新建一个my.ini [mysql] default-character-set=utf8 [mysqld] port = 3306 b ...
- 【转】PyQt弹出式对话框的常用方法及标准按钮类型
pyQt之弹出式对话框(QMessageBox)的常用方法及标准按钮类型 一.控件说明 QMessageBox是一种通用的弹出式对话框,用于显示消息,允许用户通过单击不同的标准按钮对消息进行反馈,且每 ...
- 在Linux上利用curl 命令模拟 HTTP GET/POST 请求
本文系转载,原文地址:https://www.cnblogs.com/alfred0311/p/7988648.html 序言 在 Linux 操作系统上对后端程序进行测试的时候,需要进行模拟连接或者 ...
- Arcpy中Geometry类与Array类转换的陷阱
1.现象说明 使用Arcpy.da.searchcursor得到Geometry,将Geometry转换成Array,再从Array转换回Geometry.若Geometry包含内环,这个过程可能导致 ...
- Rollup 配置 es6 环境
前 为了可以使用新型的语法,顺便在兼容下老的浏览器,所以需要自己搭建个环境,目前我个人推崇使用 rollup,主要喜欢它的 tree-shake,打包出来的代码真的很简洁. 配置 rollup.con ...