提交 b9b5fa06 编写于 作者: huangxuan258's avatar huangxuan258

更新fly响应式模板,增加文章和问题详情页面标签展示功能

上级 91494194
<!-- 公共头部-->
{template header}
<!-- 移动端搜索框-->
{template searchbox}
<!-- 首页导航 -->
{template index_nav}
......
......@@ -3,7 +3,7 @@
<div class="layui-form-item">
<label for="L_vercode" class="layui-form-label">验证码</label>
<div class="layui-input-inline">
<input type="text" id="code" name="code" value="" required lay-verify="required" placeholder="图片验证码" autocomplete="off" class="layui-input">
<input type="text" id="code" name="code" onkeydown="if(event.keyCode==13){event.keyCode=0;return false} " value="" required lay-verify="required" placeholder="图片验证码" autocomplete="off" class="layui-input">
</div>
<div class="layui-form-mid">
<span style="color: #c00;"><img class="hand" src="{url user/code}" onclick="javascript:updatecode();" id="verifycode"><a class="changecode" href="javascript:updatecode();">&nbsp;看不清?</a></span>
......
......@@ -18,7 +18,7 @@
{if $this->uri->segment ( 1 )!='question'}
{eval echo replacewords($topic['describtion']);}
{/if}
{if $user['groupid']==1||$user['uid']==$answer['authorid']&&$this->uri->segment ( 2 )=='editanswer'&&$this->uri->segment ( 1 )=='question'} {$answer['content']} {/if}
{if $user['groupid']==1||$user['uid']==$answer['authorid']&&$this->uri->segment ( 2 )=='editanswer'&&$this->uri->segment ( 1 )=='question'} {eval echo htmlspecialchars_decode($answer['content']);} {/if}
{/if}
</textarea>
......@@ -50,7 +50,7 @@ editor.disable();
{else}
<script type="text/javascript" src="{SITE_URL}static/js/neweditor/ueditor.config.js"></script>
<script type="text/javascript" src="{SITE_URL}static/js/neweditor/ueditor.all.js"></script>
<script type="text/plain" id="editor" name="content" style="width:100%;height:200px;">{if $this->uri->segment ( 2 )!='view'&&$this->uri->segment ( 1 )=='question'||$this->uri->segment ( 2 )=='editxinzhi'}{if $navtitle=='编辑问题'}{$question['description']} {/if}{if $this->uri->segment ( 1 )!='question'}{eval echo replacewords($topic['describtion']);}{/if}{if $user['groupid']==1||$user['uid']==$answer['authorid']&&$this->uri->segment ( 2 )=='editanswer'&&$this->uri->segment ( 1 )=='question'}{$answer['content']}{/if}{/if}</script>
<script type="text/plain" id="editor" name="content" style="width:100%;height:200px;">{if $this->uri->segment ( 2 )!='view'&&$this->uri->segment ( 1 )=='question'||$this->uri->segment ( 2 )=='editxinzhi'}{if $navtitle=='编辑问题'}{$question['description']} {/if}{if $this->uri->segment ( 1 )!='question'}{eval echo replacewords($topic['describtion']);}{/if}{if $user['groupid']==1||$user['uid']==$answer['authorid']&&$this->uri->segment ( 2 )=='editanswer'&&$this->uri->segment ( 1 )=='question'}{eval echo htmlspecialchars_decode($answer['content']);}{/if}{/if}</script>
<script type="text/javascript">
var isueditor=1;
var editor = UE.getEditor('editor',{
......
{template meta}
<div class="fly-header layui-bg-black">
<div class="layui-container">
<a class="fly-logo" href="{SITE_URL}">
<img src="{$setting['site_logo']}" alt="{$setting['site_name']}">
<a class="fly-logo" href="/">
<img src="{$setting['site_logo']}" alt="{$setting['site_name']}" style="width:130px;height:30px;">
</a>
<ul class="layui-nav fly-nav layui-hide-xs">
<li class="layui-nav-item {if $regular=='ask/index'}layui-this{/if}">
......@@ -64,4 +64,5 @@
{/if}
</ul>
</div>
</div>
\ No newline at end of file
</div>
<!-- 公共头部-->
<!-- 公共头部-->
{template header}
<!-- 移动端搜索框-->
{template searchbox}
<!-- 首页导航 -->
{template index_nav}
......
......@@ -5,4 +5,10 @@
</div>
</div>
{/if}
\ No newline at end of file
{/if}
<style>
@media screen and (max-width: 768px)
.laypage-main a, .laypage-main span {
display: inline-block;
}
</style>
\ No newline at end of file
......@@ -185,7 +185,7 @@
<span>,即可使用QQ帐号登录{$setting['name']}</span>
</li>
<!--{/if}-->
<!--{if $sinalogin}-->
<!--{if !$sinalogin}-->
<li class="fly-msg">
<i class="iconfont icon-weibo"></i>
......
<style>
.fly-list em{
color:red !important;
font-style: normal;
}
</style>
<div class="fly-panel-title fly-filter">
<a href="{url question/search}?word={$word}" class="{if ROUTE_A=='question'}layui-this{/if}">问题</a>
<span class="fly-mid"></span>
......
......@@ -77,11 +77,26 @@
<!--{/if}-->
</div>
</div>
{if $question['description']}
<div class="detail-body photos">
{template question_content_header}
{eval echo clearlinkref(htmlspecialchars_decode($question['description']));}
{eval echo htmlspecialchars_decode($question['description']);}
{template question_content_footer}
</div>
{/if}
<div class="relativetags">
相关标签:
<!--{if $taglist}-->
<!--{loop $taglist $tag}-->
<a href="{url tags/view/$tag['tagalias']}" title="{$tag['tagname']}"
target="_blank" class="project-tag-14">
<button type="button" class="layui-btn layui-btn-xs layui-btn-warm "><i class="layui-icon layui-icon-note"></i> {$tag['tagname']}</button>
</a>
<!--{/loop}-->
<!--{/if}-->
</div>
</div>
<div class="fly-panel detail-box" id="flyReply">
......
......@@ -94,6 +94,19 @@
</div>
</div>
</div>
<div class="relativetags">
相关标签:
<!--{if $taglist}-->
<!--{loop $taglist $tag}-->
<a href="{url tags/view/$tag['tagalias']}" title="{$tag['tagname']}"
target="_blank" class="project-tag-14">
<button type="button" class="layui-btn layui-btn-xs layui-btn-warm "><i class="layui-icon layui-icon-note"></i> {$tag['tagname']}</button>
</a>
<!--{/loop}-->
<!--{/if}-->
</div>
</div>
<div class="fly-panel detail-box" id="flyReply">
......
......@@ -688,4 +688,9 @@
}
.detail ol,.detail ul{
padding-left:20px;
}
/*相关标签*/
.relativetags{
margin:10px auto;
font-size:13px;
}
\ No newline at end of file
......@@ -1380,7 +1380,7 @@ function replacewords($content) {
assoc_unique ( $urlarray, $keys );
//
$keyword [$key] ['num'] = $keyword [$key] ['find'] + 1;
$keyword [$key] ['num'] = intval ( $keyword [$key] ['find'] ) + 1;
$firstcontent = substr ( $articlecontent, 0, $s_start );
//
$sec = substr ( $articlecontent, $s_start + $repstrlen );
......@@ -1641,6 +1641,9 @@ EOT;
return $state;
}
function sendemailtouser($toemail, $subject, $message) {
if (empty ( $toemail )) {
return false;
}
global $setting;
$message = <<<EOT
......@@ -2073,11 +2076,13 @@ function isimage($extname) {
function imagecropper($source_path, $dst, $target_width, $target_height) {
$httpxieyi = strtolower ( substr ( $source_path, 0, 7 ) );
$httpsxieyi = strtolower ( substr ( $source_path, 0, 8 ) );
$controlleradmin = substr ( ROUTE_A, 0, 5 );
$controlleradmin = strtolower ( substr ( ROUTE_A, 0, 5 ) );
$controllerkecheng = strtolower ( substr ( ROUTE_A, 0, 7 ) );
if (! file_exists ( $source_path )) {
// 非站内图片,看看外部图片格式
if ($httpxieyi != 'http://' && $httpsxieyi != 'https://' && $controlleradmin != 'admin') {
if ($httpxieyi != 'http://' && $httpsxieyi != 'https://' && $controlleradmin != 'admin' && $controllerkecheng != 'kecheng') {
exit ( "非正常图片地址" );
} else {
$source_info = getimagesize ( $source_path );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册