2.3.2
This commit is contained in:
parent
300c9e6a72
commit
0dc8798850
@ -470,4 +470,17 @@ abstract class BaseController
|
||||
return $array;
|
||||
}
|
||||
|
||||
/**
|
||||
* 过滤字符串中表情
|
||||
* @param $str string 字符串内容
|
||||
* @return string
|
||||
*/
|
||||
public function filterEmoji(string $str): string
|
||||
{
|
||||
$str = preg_replace_callback('/./u', function (array $match) {
|
||||
return strlen($match[0]) >= 4 ? '' : $match[0];
|
||||
}, $str);
|
||||
return $str;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -131,9 +131,9 @@ class Forum extends AdminController
|
||||
$data['content'] = $this->downUrlPicsReaplace($data['content']);
|
||||
// 把,转换为,并去空格->转为数组->去掉空数组->再转化为带,号的字符串
|
||||
$data['keywords'] = implode(',',array_filter(explode(',',trim(str_replace(',',',',$data['keywords'])))));
|
||||
|
||||
$data['description'] = strip_tags($this->filterEmoji($data['description']));
|
||||
// 获取分类ename,appname
|
||||
$cateName = $this->model->field('ename,appname')->find($data['cate_id']);
|
||||
$cateEname = Db::name('cate')->where('id',$data['cate_id'])->value('ename');
|
||||
|
||||
$result = $this->model->add($data);
|
||||
if ($result['code'] == 1) {
|
||||
@ -152,7 +152,7 @@ class Forum extends AdminController
|
||||
// 清除文章tag缓存
|
||||
Cache::tag('tagArtDetail')->clear();
|
||||
|
||||
$link = $this->getArticleUrl((int)$aid, 'index', $cateName['ename']);
|
||||
$link = $this->getArticleUrl((int)$aid, 'index', $cateEname);
|
||||
|
||||
hook('SeoBaiduPush', ['link'=>$link]); // 推送给百度收录接口
|
||||
|
||||
@ -201,7 +201,7 @@ class Forum extends AdminController
|
||||
$data['content'] = $this->downUrlPicsReaplace($data['content']);
|
||||
// 把,转换为,并去空格->转为数组->去掉空数组->再转化为带,号的字符串
|
||||
$data['keywords'] = implode(',',array_filter(explode(',',trim(str_replace(',',',',$data['keywords'])))));
|
||||
|
||||
$data['description'] = strip_tags($this->filterEmoji($data['description']));
|
||||
$result = $article->edit($data);
|
||||
if($result == 1) {
|
||||
//处理标签
|
||||
@ -228,7 +228,7 @@ class Forum extends AdminController
|
||||
}
|
||||
//删除原有缓存显示编辑后内容
|
||||
Cache::delete('article_'.$id);
|
||||
$link = $this->getRouteUrl((int) $id, $article->cate->ename, $article->cate->appname);
|
||||
$link = $this->getArticleUrl((int) $id, 'index', $article->cate->ename);
|
||||
hook('SeoBaiduPush', ['link'=>$link]); // 推送给百度收录接口
|
||||
return Msgres::success('edit_success',$link);
|
||||
}
|
||||
|
@ -90,8 +90,8 @@
|
||||
icon: 1,
|
||||
time: 1000
|
||||
}, function() {
|
||||
parent.layer.close(parent.layer.getFrameIndex(window.name)); //关闭当前页
|
||||
parent.layui.table.reload("user-table");
|
||||
parent.layer.close(parent.layer.getFrameIndex(window.name)); //关闭当前页
|
||||
});
|
||||
} else {
|
||||
layer.msg(result.msg, {
|
||||
|
@ -251,18 +251,6 @@ function getSpaceNmu($level)
|
||||
return str_repeat('---',$level);
|
||||
}
|
||||
|
||||
//链接投放开关,有设置则打开
|
||||
function showSlider($type)
|
||||
{
|
||||
$sliders = new \app\common\model\Slider();
|
||||
$sliderArr = $sliders->getSliderList($type);
|
||||
if(!empty($sliderArr)) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
//提取内容第一张图片
|
||||
function getOnepic($str)
|
||||
{
|
||||
|
@ -17,7 +17,6 @@ use think\facade\View;
|
||||
use think\facade\Db;
|
||||
use think\facade\Session;
|
||||
use think\facade\Cache;
|
||||
use app\facade\Article;
|
||||
use app\BaseController as BaseCtrl;
|
||||
use app\common\model\Cate;
|
||||
|
||||
@ -146,21 +145,11 @@ class BaseController extends BaseCtrl
|
||||
{
|
||||
//1.查询分类表获取所有分类
|
||||
$sysInfo = $this->getSystem();
|
||||
$slider = new \app\common\model\Slider();
|
||||
//头部链接
|
||||
$head_links = $slider->getSliderList(10);
|
||||
//页脚链接
|
||||
$foot_links = $slider->getSliderList(11);
|
||||
//友情链接
|
||||
$friend_links = $slider->getSliderList(9);
|
||||
//获取热门标签
|
||||
$hotTag = $this->getHotTag();
|
||||
|
||||
$assign = [
|
||||
'sysInfo' => $sysInfo,
|
||||
'headlinks' => $head_links,
|
||||
'footlinks' => $foot_links,
|
||||
'flinks' => $friend_links,
|
||||
'hotTag' => $hotTag,
|
||||
'host' => Request::domain() . '/'
|
||||
];
|
||||
|
@ -13,7 +13,6 @@
|
||||
namespace app\common\taglib;
|
||||
|
||||
use think\template\TagLib;
|
||||
use app\common\model\Article as ArticleModel;
|
||||
|
||||
class Article extends TagLib
|
||||
{
|
||||
@ -29,10 +28,14 @@ class Article extends TagLib
|
||||
'comment_num' => ['attr' => '', 'close' => 0],
|
||||
'keywords' => ['attr' => '', 'close' => 0],
|
||||
'description' => ['attr' => '', 'close' => 0],
|
||||
'link' => ['attr' => '', 'close' => 0],
|
||||
'time' => ['attr' => '', 'close' => 0],
|
||||
|
||||
'cate' => ['attr' => 'name', 'close' => 0],
|
||||
'user' => ['attr' => 'name', 'close' => 0],
|
||||
|
||||
'list' => ['attr' => '', 'close' => 1],
|
||||
|
||||
|
||||
'comment' => ['attr' => '', 'close' => 1],
|
||||
|
||||
@ -88,6 +91,16 @@ class Article extends TagLib
|
||||
return '{$article.description}';
|
||||
}
|
||||
|
||||
public function tagLink(): string
|
||||
{
|
||||
return '{$article.url}';
|
||||
}
|
||||
|
||||
public function tagTime(): string
|
||||
{
|
||||
return '{$article.create_time}';
|
||||
}
|
||||
|
||||
// 详情分类
|
||||
public function tagCate($tag): string
|
||||
{
|
||||
@ -106,12 +119,17 @@ class Article extends TagLib
|
||||
return '{$article.cate_id}';
|
||||
}
|
||||
|
||||
if($tag['name'] == 'link')
|
||||
{
|
||||
return '{:url(\'cate\',[\'ename\'=>$article.cate.ename])}';
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
public function tagUser($tag)
|
||||
{
|
||||
if($tag['name'] == 'user_link') {
|
||||
if($tag['name'] == 'link') {
|
||||
return '{:url("user/home",["id"=>'.'$'.'article.user.id'.'])->domain(true)}';
|
||||
}
|
||||
return '{$article.user.' . $tag['name'] . '}';
|
||||
@ -155,4 +173,13 @@ class Article extends TagLib
|
||||
return $parse;
|
||||
}
|
||||
|
||||
// 分类列表
|
||||
public function tagList($tag, $content): string
|
||||
{
|
||||
$parse = '{volist name="artList['.'\'data\''.']" id="article" empty= "还没有内容"}';
|
||||
$parse .= $content;
|
||||
$parse .= '{/volist}';
|
||||
return $parse;
|
||||
}
|
||||
|
||||
}
|
21
app/common/taglib/Cate.php
Normal file
21
app/common/taglib/Cate.php
Normal file
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
/**
|
||||
* @Program: table.css 2023/4/17
|
||||
* @FilePath: app\common\taglib\Cate.php
|
||||
* @Description: Cate.php
|
||||
* @LastEditTime: 2023-04-17 21:19:59
|
||||
* @Author: Taoker <317927823@qq.com>
|
||||
* @Copyright (c) 2020~2023 https://www.aieok.com All rights reserved.
|
||||
*/
|
||||
|
||||
namespace app\common\taglib;
|
||||
|
||||
use think\template\TagLib;
|
||||
|
||||
class Cate extends TagLib
|
||||
{
|
||||
protected $tag = [
|
||||
|
||||
];
|
||||
|
||||
}
|
95
app/common/taglib/Gnav.php
Normal file
95
app/common/taglib/Gnav.php
Normal file
@ -0,0 +1,95 @@
|
||||
<?php
|
||||
/**
|
||||
* @Program: table.css 2023/4/17
|
||||
* @FilePath: app\common\taglib\Gnav.php
|
||||
* @Description: Gnav.php
|
||||
* @LastEditTime: 2023-04-17 15:37:40
|
||||
* @Author: Taoker <317927823@qq.com>
|
||||
* @Copyright (c) 2020~2023 https://www.aieok.com All rights reserved.
|
||||
*/
|
||||
|
||||
namespace app\common\taglib;
|
||||
|
||||
use think\template\TagLib;
|
||||
|
||||
class Gnav extends TagLib
|
||||
{
|
||||
protected $tags = [
|
||||
// 标签定义: attr 属性列表 close 是否闭合(0 或者1 默认1) alias 标签别名 level 嵌套层次
|
||||
//'nav' => ['attr' => '', 'close' => 1],
|
||||
'id' => ['attr' => '', 'close' => 0],
|
||||
'pid' => ['attr' => '', 'close' => 0],
|
||||
'icon' => ['attr' => '', 'close' => 0],
|
||||
'name' => ['attr' => '', 'close' => 0],
|
||||
'ename' => ['attr' => '', 'close' => 0],
|
||||
'title' => ['attr' => '', 'close' => 0],
|
||||
'detpl' => ['attr' => '', 'close' => 0],
|
||||
'sort' => ['attr' => '', 'close' => 0],
|
||||
'desc' => ['attr' => '', 'close' => 0],
|
||||
'is_hot' => ['attr' => '', 'close' => 0],
|
||||
'link' => ['attr' => '', 'close' => 0],
|
||||
'children' => ['attr' => '', 'close' => 0],
|
||||
|
||||
];
|
||||
|
||||
|
||||
public function tagId(): string
|
||||
{
|
||||
return '{$gnav.id}';
|
||||
}
|
||||
|
||||
public function tagPid(): string
|
||||
{
|
||||
return '{$gnav.pid}';
|
||||
}
|
||||
|
||||
public function tagIcon(): string
|
||||
{
|
||||
return '{$gnav.icon}';
|
||||
}
|
||||
|
||||
public function tagName($tag): string
|
||||
{
|
||||
return '{$gnav.catename}';
|
||||
}
|
||||
|
||||
public function tagEname(): string
|
||||
{
|
||||
return '{$gnav.ename}';
|
||||
}
|
||||
|
||||
public function tagTitle(): string
|
||||
{
|
||||
return '{:cookie(\'think_lang\') == \'en-us\' ? $gnav.ename : $gnav.catename}';
|
||||
}
|
||||
|
||||
public function tagDetpl(): string
|
||||
{
|
||||
return '{$gnav.detpl}';
|
||||
}
|
||||
|
||||
public function tagSort(): string
|
||||
{
|
||||
return '{$gnav.sort}';
|
||||
}
|
||||
|
||||
public function tagDesc(): string
|
||||
{
|
||||
return '{$gnav.desc}';
|
||||
}
|
||||
|
||||
public function tagIs_hot(): string
|
||||
{
|
||||
return '{$gnav.is_hot}';
|
||||
}
|
||||
|
||||
public function tagLink(): string
|
||||
{
|
||||
return '{$gnav.url}';
|
||||
}
|
||||
|
||||
public function tagChildren(): string
|
||||
{
|
||||
return '{$gnav.children}';
|
||||
}
|
||||
}
|
96
app/common/taglib/Nav.php
Normal file
96
app/common/taglib/Nav.php
Normal file
@ -0,0 +1,96 @@
|
||||
<?php
|
||||
/**
|
||||
* @Program: table.css 2023/4/17
|
||||
* @FilePath: app\common\taglib\Nav.php
|
||||
* @Description: Nav.php
|
||||
* @LastEditTime: 2023-04-17 14:25:08
|
||||
* @Author: Taoker <317927823@qq.com>
|
||||
* @Copyright (c) 2020~2023 https://www.aieok.com All rights reserved.
|
||||
*/
|
||||
|
||||
namespace app\common\taglib;
|
||||
|
||||
use think\template\TagLib;
|
||||
|
||||
class Nav extends TagLib
|
||||
{
|
||||
protected $tags = [
|
||||
// 标签定义: attr 属性列表 close 是否闭合(0 或者1 默认1) alias 标签别名 level 嵌套层次
|
||||
//'nav' => ['attr' => '', 'close' => 1],
|
||||
'id' => ['attr' => '', 'close' => 0],
|
||||
'pid' => ['attr' => '', 'close' => 0],
|
||||
'icon' => ['attr' => '', 'close' => 0],
|
||||
'name' => ['attr' => '', 'close' => 0],
|
||||
'ename' => ['attr' => '', 'close' => 0],
|
||||
'title' => ['attr' => '', 'close' => 0],
|
||||
'detpl' => ['attr' => '', 'close' => 0],
|
||||
'sort' => ['attr' => '', 'close' => 0],
|
||||
'desc' => ['attr' => '', 'close' => 0],
|
||||
'is_hot' => ['attr' => '', 'close' => 0],
|
||||
'link' => ['attr' => '', 'close' => 0],
|
||||
'children' => ['attr' => '', 'close' => 0],
|
||||
|
||||
];
|
||||
|
||||
|
||||
public function tagId(): string
|
||||
{
|
||||
return '{$nav.id}';
|
||||
}
|
||||
|
||||
public function tagPid(): string
|
||||
{
|
||||
return '{$nav.pid}';
|
||||
}
|
||||
|
||||
public function tagIcon(): string
|
||||
{
|
||||
return '{$nav.icon}';
|
||||
}
|
||||
|
||||
public function tagName($tag): string
|
||||
{
|
||||
return '{$nav.catename}';
|
||||
}
|
||||
|
||||
public function tagEname(): string
|
||||
{
|
||||
return '{$nav.ename}';
|
||||
}
|
||||
|
||||
public function tagTitle(): string
|
||||
{
|
||||
return '{:cookie(\'think_lang\') == \'en-us\' ? $nav.ename : $nav.catename}';
|
||||
}
|
||||
|
||||
public function tagDetpl(): string
|
||||
{
|
||||
return '{$nav.detpl}';
|
||||
}
|
||||
|
||||
public function tagSort(): string
|
||||
{
|
||||
return '{$nav.sort}';
|
||||
}
|
||||
|
||||
public function tagDesc(): string
|
||||
{
|
||||
return '{$nav.desc}';
|
||||
}
|
||||
|
||||
public function tagIs_hot(): string
|
||||
{
|
||||
return '{$nav.is_hot}';
|
||||
}
|
||||
|
||||
public function tagLink(): string
|
||||
{
|
||||
return '{$nav.url}';
|
||||
}
|
||||
|
||||
public function tagChildren(): string
|
||||
{
|
||||
return '{$nav.children}';
|
||||
}
|
||||
|
||||
}
|
95
app/common/taglib/Snav.php
Normal file
95
app/common/taglib/Snav.php
Normal file
@ -0,0 +1,95 @@
|
||||
<?php
|
||||
/**
|
||||
* @Program: table.css 2023/4/17
|
||||
* @FilePath: app\common\taglib\Snav.php
|
||||
* @Description: Snav.php
|
||||
* @LastEditTime: 2023-04-17 15:37:30
|
||||
* @Author: Taoker <317927823@qq.com>
|
||||
* @Copyright (c) 2020~2023 https://www.aieok.com All rights reserved.
|
||||
*/
|
||||
|
||||
namespace app\common\taglib;
|
||||
|
||||
use think\template\TagLib;
|
||||
|
||||
class Snav extends TagLib
|
||||
{
|
||||
protected $tags = [
|
||||
// 标签定义: attr 属性列表 close 是否闭合(0 或者1 默认1) alias 标签别名 level 嵌套层次
|
||||
//'nav' => ['attr' => '', 'close' => 1],
|
||||
'id' => ['attr' => '', 'close' => 0],
|
||||
'pid' => ['attr' => '', 'close' => 0],
|
||||
'icon' => ['attr' => '', 'close' => 0],
|
||||
'name' => ['attr' => '', 'close' => 0],
|
||||
'ename' => ['attr' => '', 'close' => 0],
|
||||
'title' => ['attr' => '', 'close' => 0],
|
||||
'detpl' => ['attr' => '', 'close' => 0],
|
||||
'sort' => ['attr' => '', 'close' => 0],
|
||||
'desc' => ['attr' => '', 'close' => 0],
|
||||
'is_hot' => ['attr' => '', 'close' => 0],
|
||||
'link' => ['attr' => '', 'close' => 0],
|
||||
'children' => ['attr' => '', 'close' => 0],
|
||||
|
||||
];
|
||||
|
||||
|
||||
public function tagId(): string
|
||||
{
|
||||
return '{$snav.id}';
|
||||
}
|
||||
|
||||
public function tagPid(): string
|
||||
{
|
||||
return '{$snav.pid}';
|
||||
}
|
||||
|
||||
public function tagIcon(): string
|
||||
{
|
||||
return '{$snav.icon}';
|
||||
}
|
||||
|
||||
public function tagName($tag): string
|
||||
{
|
||||
return '{$snav.catename}';
|
||||
}
|
||||
|
||||
public function tagEname(): string
|
||||
{
|
||||
return '{$snav.ename}';
|
||||
}
|
||||
|
||||
public function tagTitle(): string
|
||||
{
|
||||
return '{:cookie(\'think_lang\') == \'en-us\' ? $snav.ename : $snav.catename}';
|
||||
}
|
||||
|
||||
public function tagDetpl(): string
|
||||
{
|
||||
return '{$snav.detpl}';
|
||||
}
|
||||
|
||||
public function tagSort(): string
|
||||
{
|
||||
return '{$snav.sort}';
|
||||
}
|
||||
|
||||
public function tagDesc(): string
|
||||
{
|
||||
return '{$snav.desc}';
|
||||
}
|
||||
|
||||
public function tagIs_hot(): string
|
||||
{
|
||||
return '{$snav.is_hot}';
|
||||
}
|
||||
|
||||
public function tagLink(): string
|
||||
{
|
||||
return '{$snav.url}';
|
||||
}
|
||||
|
||||
public function tagChildren(): string
|
||||
{
|
||||
return '{$snav.children}';
|
||||
}
|
||||
}
|
@ -16,12 +16,52 @@ class Taoler extends TagLib
|
||||
{
|
||||
protected $tags = [
|
||||
// 标签定义: attr 属性列表 close 是否闭合(0 或者1 默认1) alias 标签别名 level 嵌套层次
|
||||
'content' => ['attr' => 'name', 'close' => 0],
|
||||
'nav' => ['attr' => '', 'close' => 1],
|
||||
'snav' => ['attr' => '', 'close' => 1],
|
||||
'gnav' => ['attr' => '', 'close' => 1],
|
||||
'if' => ['condition', 'expression' => true, 'close' => 1],
|
||||
|
||||
];
|
||||
|
||||
public function tagContent($tag)
|
||||
public function tagNav($tag, $content): string
|
||||
{
|
||||
return '{$article.' . $tag['name'] . '}';
|
||||
$id = $tag['id'] ?? 'nav';
|
||||
$parse = '{volist name="cateList" id="'.$id.'"}';
|
||||
$parse .= $content;
|
||||
$parse .= '{/volist}';
|
||||
return $parse;
|
||||
}
|
||||
|
||||
public function tagSnav($tag, $content): string
|
||||
{
|
||||
$id = $tag['id'] ?? 'snav';
|
||||
$parse = '{volist name="nav.children" id="'.$id.'"}';
|
||||
$parse .= $content;
|
||||
$parse .= '{/volist}';
|
||||
return $parse;
|
||||
}
|
||||
|
||||
public function tagGnav($tag, $content): string
|
||||
{
|
||||
$id = $tag['id'] ?? 'gnav';
|
||||
$parse = '{volist name="snav.children" id="'.$id.'"}';
|
||||
$parse .= $content;
|
||||
$parse .= '{/volist}';
|
||||
return $parse;
|
||||
}
|
||||
|
||||
public function tagIf($tag, $content): string
|
||||
{
|
||||
|
||||
$condition = !empty($tag['expression']) ? $tag['expression'] : $tag['condition'];
|
||||
$condition = $this->parseCondition($condition);
|
||||
$parseStr = '<?php if(' . $condition . '): ?>' . $content . '<?php endif; ?>';
|
||||
|
||||
return $parseStr;
|
||||
|
||||
// return '{if'.$tag.'}} '.$content.' {/if}';
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -3,13 +3,38 @@
|
||||
// | 模板设置
|
||||
// +----------------------------------------------------------------------
|
||||
use think\facade\Db;
|
||||
use taoler\com\Files;
|
||||
use think\facade\Cache;
|
||||
|
||||
//如果网站安装从数据库查询选择的模板
|
||||
if(file_exists('./install.lock')){
|
||||
$template = Db::name('system')->where('id',1)->value('template');
|
||||
$template = Db::name('system')->where('id',1)->cache(true)->value('template');
|
||||
} else {
|
||||
$template = '';
|
||||
}
|
||||
|
||||
$taglib_pre_load = Cache::remember('taglib', function(){
|
||||
$tagsArr = [];
|
||||
//获取app/common/taglib
|
||||
$common_taglib = Files::getAllFile(root_path().'app/common/taglib');
|
||||
foreach ($common_taglib as $t) {
|
||||
$tagsArr[] = str_replace('/','\\',strstr(strstr($t, 'app/'), '.php', true));
|
||||
}
|
||||
|
||||
//获取addons/taglib文件
|
||||
$localAddons = Files::getDirName('../addons/');
|
||||
foreach($localAddons as $v) {
|
||||
$dir = root_path(). 'addons'. DIRECTORY_SEPARATOR . $v . DIRECTORY_SEPARATOR .'taglib';
|
||||
if(!file_exists($dir)) continue;
|
||||
$addons_taglib = Files::getAllFile($dir);
|
||||
foreach ($addons_taglib as $a) {
|
||||
$tagsArr[] = str_replace('/','\\',strstr(strstr($a, 'addons/'), '.php', true));
|
||||
}
|
||||
}
|
||||
return implode(',', $tagsArr);
|
||||
});
|
||||
|
||||
|
||||
return [
|
||||
// 模板引擎类型使用Think
|
||||
'type' => 'Think',
|
||||
@ -20,7 +45,7 @@ return [
|
||||
// 模板后缀
|
||||
'view_suffix' => 'html',
|
||||
// 预先加载的标签库
|
||||
'taglib_pre_load' => 'app\common\taglib\Article,app\common\taglib\Taoler,app\common\taglib\Comment',
|
||||
'taglib_pre_load' => $taglib_pre_load,
|
||||
// 模板文件名分隔符
|
||||
'view_depr' => DIRECTORY_SEPARATOR,
|
||||
// 模板引擎普通标签开始标记
|
||||
|
@ -12,8 +12,6 @@ use think\facade\Session;
|
||||
use think\facade\Config;
|
||||
use app\common\model\Cate;
|
||||
use app\common\model\Comment;
|
||||
use app\common\model\Article as ArticleModel;
|
||||
use app\common\model\Slider;
|
||||
use app\common\model\UserZan;
|
||||
use app\common\model\PushJscode;
|
||||
use taoler\com\Message;
|
||||
@ -30,15 +28,13 @@ class Article extends BaseController
|
||||
public function __construct(App $app)
|
||||
{
|
||||
parent::__construct($app);
|
||||
$this->model = new ArticleModel();
|
||||
$this->model = new \app\common\model\Article();
|
||||
}
|
||||
|
||||
//文章分类
|
||||
public function cate()
|
||||
{
|
||||
$cate = new Cate();
|
||||
$ad = new Slider();
|
||||
$article = new ArticleModel();
|
||||
//动态参数
|
||||
$ename = Request::param('ename');
|
||||
$type = Request::param('type','all');
|
||||
@ -53,13 +49,10 @@ class Article extends BaseController
|
||||
$path = substr($url,0,strrpos($url,"/"));
|
||||
|
||||
//分类列表
|
||||
$artList = $article->getCateList($ename,$type,$page);
|
||||
$artList = $this->model->getCateList($ename,$type,$page);
|
||||
// 热议文章
|
||||
$artHot = $article->getArtHot(10);
|
||||
//分类图片
|
||||
$ad_cateImg = $ad->getSliderList(3);
|
||||
//分类钻展赞助
|
||||
$ad_comm = $ad->getSliderList(6);
|
||||
$artHot = $this->model->getArtHot(10);
|
||||
|
||||
|
||||
$assignArr = [
|
||||
'ename'=>$ename,
|
||||
@ -67,8 +60,6 @@ class Article extends BaseController
|
||||
'type'=>$type,
|
||||
'artList'=>$artList,
|
||||
'artHot'=>$artHot,
|
||||
'ad_cateImg'=>$ad_cateImg,
|
||||
'ad_comm'=>$ad_comm,
|
||||
'path'=>$path,
|
||||
'jspage'=>'jie'
|
||||
];
|
||||
@ -155,12 +146,6 @@ class Article extends BaseController
|
||||
$lrDate_time = Db::name('comment')->where('article_id', $id)->max('update_time',false) ?? time();
|
||||
// 热议文章
|
||||
$artHot = $this->model->getArtHot(10);
|
||||
//广告
|
||||
$ad = new Slider();
|
||||
//分类图片
|
||||
$ad_artImg = $ad->getSliderList(4);
|
||||
//分类钻展赞助
|
||||
$ad_comm = $ad->getSliderList(7);
|
||||
//push
|
||||
$push_js = Db::name('push_jscode')->where(['delete_time'=>0,'type'=>1])->cache(true)->select();
|
||||
|
||||
@ -168,8 +153,6 @@ class Article extends BaseController
|
||||
'article' => $artDetail,
|
||||
'pv' => $pv,
|
||||
'artHot' => $artHot,
|
||||
'ad_art' => $ad_artImg,
|
||||
'ad_comm' => $ad_comm,
|
||||
'tags' => $tags,
|
||||
'relationArticle' => $relationArticle,
|
||||
'previous' => $previous,
|
||||
@ -282,13 +265,11 @@ class Article extends BaseController
|
||||
$data['content'] = $this->downUrlPicsReaplace($data['content']);
|
||||
// 把中文,转换为英文,并去空格->转为数组->去掉空数组->再转化为带,号的字符串
|
||||
$data['keywords'] = implode(',',array_filter(explode(',',trim(str_replace(',',',',$data['keywords'])))));
|
||||
|
||||
$data['description'] = strip_tags($this->filterEmoji($data['description']));
|
||||
// 获取分类ename,appname
|
||||
$cateName = Db::name('cate')->field('ename,appname')->find($data['cate_id']);
|
||||
|
||||
$article = new ArticleModel();
|
||||
|
||||
$result = $article->add($data);
|
||||
$result = $this->model->add($data);
|
||||
if ($result['code'] == 1) {
|
||||
// 获取到的最新ID
|
||||
$aid = $result['data']['id'];
|
||||
@ -350,7 +331,7 @@ class Article extends BaseController
|
||||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
$article = ArticleModel::find($id);
|
||||
$article = $this->model->find($id);
|
||||
|
||||
if(Request::isAjax()){
|
||||
$data = Request::only(['id','cate_id','title','title_color','read_type','art_pass','content','upzip','keywords','description','captcha']);
|
||||
@ -377,8 +358,8 @@ class Article extends BaseController
|
||||
$data['content'] = $this->downUrlPicsReaplace($data['content']);
|
||||
// 把,转换为,并去空格->转为数组->去掉空数组->再转化为带,号的字符串
|
||||
$data['keywords'] = implode(',',array_filter(explode(',',trim(str_replace(',',',',$data['keywords'])))));
|
||||
$data['description'] = strip_tags($this->filterEmoji($data['description']));
|
||||
|
||||
|
||||
$result = $article->edit($data);
|
||||
if($result == 1) {
|
||||
//处理标签
|
||||
@ -436,7 +417,7 @@ class Article extends BaseController
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
$article = ArticleModel::find(input('id'));
|
||||
$article = $this->model->find(input('id'));
|
||||
$result = $article->together(['comments'])->delete();
|
||||
if($result) {
|
||||
return Msgres::success('delete_success');
|
||||
@ -509,7 +490,7 @@ class Article extends BaseController
|
||||
public function jieset()
|
||||
{
|
||||
$data = Request::param();
|
||||
$article = ArticleModel::field('id,is_top,is_hot,is_reply')->find($data['id']);
|
||||
$article = $this->model->field('id,is_top,is_hot,is_reply')->find($data['id']);
|
||||
switch ($data['field']){
|
||||
case 'top':
|
||||
if($data['rank']==1){
|
||||
@ -549,7 +530,7 @@ class Article extends BaseController
|
||||
public function titleColor()
|
||||
{
|
||||
$data = Request::param();
|
||||
$result = ArticleModel::update($data);
|
||||
$result = $this->model->update($data);
|
||||
if($result){
|
||||
//清除文章缓存
|
||||
Cache::tag(['tagArt','tagArtDetail'])->clear();
|
||||
|
@ -15,7 +15,6 @@ use think\facade\View;
|
||||
use think\facade\Request;
|
||||
use think\facade\Db;
|
||||
use app\facade\Article;
|
||||
use app\common\model\Slider;
|
||||
use app\common\lib\Msgres;
|
||||
|
||||
class Index extends BaseController
|
||||
@ -30,39 +29,19 @@ class Index extends BaseController
|
||||
public function index()
|
||||
{
|
||||
$types = input('type');
|
||||
|
||||
$slider = new Slider();
|
||||
//幻灯
|
||||
$sliders = Request::isMobile() ? $slider->getSliderList(12) : $slider->getSliderList(1);
|
||||
//置顶文章
|
||||
$artTop = Article::getArtTop(5);
|
||||
//首页文章列表,显示20个
|
||||
$artList = Article::getArtList(22);
|
||||
//热议文章
|
||||
$artHot = Article::getArtHot(10);
|
||||
//首页广告
|
||||
$indexAd = $slider->getSliderList(13);
|
||||
//温馨通道
|
||||
$fast_links = $slider->getSliderList(8);
|
||||
//首页赞助
|
||||
$ad_index = $slider->getSliderList(5);
|
||||
//首页右栏图片
|
||||
$ad_comm = $slider->getSliderList(2);
|
||||
|
||||
//友情链接申请
|
||||
$adminEmail = Db::name('user')->where('id',1)->cache(true)->value('email');
|
||||
|
||||
$vs = [
|
||||
'slider' => $sliders,
|
||||
'artTop' => $artTop,
|
||||
'artList' => $artList,
|
||||
'artHot' => $artHot,
|
||||
'ad_index_r'=> $indexAd,
|
||||
'type' => $types,
|
||||
'ad_index' => $ad_index,
|
||||
'ad_comm' => $ad_comm,
|
||||
'fastlinks' => $fast_links,
|
||||
'adminEmail' => $adminEmail,
|
||||
'jspage' => '',
|
||||
];
|
||||
View::assign($vs);
|
||||
|
@ -48,7 +48,7 @@ DROP TABLE IF EXISTS `tao_article`;
|
||||
CREATE TABLE `tao_article` (
|
||||
`id` int NOT NULL AUTO_INCREMENT COMMENT '用户ID',
|
||||
`title` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '标题',
|
||||
`content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '内容',
|
||||
`content` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '内容',
|
||||
`status` enum('0','-1','1') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '1' COMMENT '状态1显示0待审-1禁止',
|
||||
`cate_id` int NOT NULL COMMENT '分类id',
|
||||
`user_id` int NOT NULL COMMENT '用户id',
|
||||
|
17
composer.lock
generated
17
composer.lock
generated
@ -596,16 +596,16 @@
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/psr7",
|
||||
"version": "1.9.0",
|
||||
"version": "1.9.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/psr7.git",
|
||||
"reference": "e98e3e6d4f86621a9b75f623996e6bbdeb4b9318"
|
||||
"reference": "e4490cabc77465aaee90b20cfc9a770f8c04be6b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/psr7/zipball/e98e3e6d4f86621a9b75f623996e6bbdeb4b9318",
|
||||
"reference": "e98e3e6d4f86621a9b75f623996e6bbdeb4b9318",
|
||||
"url": "https://api.github.com/repos/guzzle/psr7/zipball/e4490cabc77465aaee90b20cfc9a770f8c04be6b",
|
||||
"reference": "e4490cabc77465aaee90b20cfc9a770f8c04be6b",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
@ -630,11 +630,6 @@
|
||||
"laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.9-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"files": [
|
||||
"src/functions_include.php"
|
||||
@ -692,7 +687,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/guzzle/psr7/issues",
|
||||
"source": "https://github.com/guzzle/psr7/tree/1.9.0"
|
||||
"source": "https://github.com/guzzle/psr7/tree/1.9.1"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -708,7 +703,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2022-06-20T21:43:03+00:00"
|
||||
"time": "2023-04-17T16:00:37+00:00"
|
||||
},
|
||||
{
|
||||
"name": "jaeger/g-http",
|
||||
|
@ -16,7 +16,7 @@ return [
|
||||
// 应用名,此项不可更改
|
||||
'appname' => 'TaoLer',
|
||||
// 版本配置
|
||||
'version' => '2.3.1',
|
||||
'version' => '2.3.2',
|
||||
// 加盐
|
||||
'salt' => 'taoler',
|
||||
// 数据库备份目录
|
||||
|
@ -28,9 +28,10 @@ class Files
|
||||
$arr = array();
|
||||
$data = scandir($path);
|
||||
foreach ($data as $value){
|
||||
if($value !='.' && $value != '..' && !stripos($value,".") && $value != '.gitignore'){
|
||||
$arr[] = strtolower($value);
|
||||
}
|
||||
if (in_array($value, ['.', '..','.gitignore'])) continue;
|
||||
if(!stripos($value,".")) {
|
||||
$arr[] = strtolower($value);
|
||||
}
|
||||
}
|
||||
//return array_merge(array_diff($arr, array('install')));
|
||||
return $arr;
|
||||
|
111
public/static/component/pear/module/imgcom.js
Normal file
111
public/static/component/pear/module/imgcom.js
Normal file
@ -0,0 +1,111 @@
|
||||
/**
|
||||
images压缩扩展模块
|
||||
changlin_zhao@qq.com
|
||||
2021.5.25
|
||||
**/
|
||||
|
||||
layui.define(['upload','layer'],function(exports){
|
||||
var upload = layui.upload;
|
||||
var layer = layui.layer;
|
||||
var compressImage = {
|
||||
uploads: function(obj){
|
||||
//obj.preview(function(index, file, result){
|
||||
|
||||
//执行实例
|
||||
var files = obj.pushFile();
|
||||
var filesArry = [];
|
||||
for (var key in files) { //将上传的文件转为数组形式
|
||||
filesArry.push(files[key])
|
||||
}
|
||||
var index = filesArry.length - 1;
|
||||
var file = filesArry[index]; //获取最后选择的图片,即处理多选情况
|
||||
|
||||
if (navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion.split(";")[1]
|
||||
.replace(/[ ]/g, "").replace("MSIE", "")) < 9) {
|
||||
return obj.upload(index, file)
|
||||
}
|
||||
canvasDataURL(file, function (blob) {
|
||||
var aafile = new File([blob], file.name, {
|
||||
type: file.type
|
||||
})
|
||||
var isLt1M;
|
||||
if (file.size < aafile.size) {
|
||||
isLt1M = file.size
|
||||
} else {
|
||||
isLt1M = aafile.size
|
||||
}
|
||||
|
||||
if (isLt1M / 1024 / 1024 > 2) {
|
||||
return layer.alert('上传图片过大!')
|
||||
} else {
|
||||
if (file.size < aafile.size) {
|
||||
return obj.upload(index, file)
|
||||
}
|
||||
obj.upload(index, aafile)
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
function canvasDataURL(file, callback) { //压缩转化为base64
|
||||
var reader = new FileReader()
|
||||
reader.readAsDataURL(file)
|
||||
reader.onload = function (e) {
|
||||
const img = new Image()
|
||||
const quality = 0.8 // 图像质量
|
||||
const canvas = document.createElement('canvas')
|
||||
const drawer = canvas.getContext('2d')
|
||||
img.src = this.result
|
||||
img.onload = function () {
|
||||
|
||||
var originWidth = img.width,/* 图片的宽度 */
|
||||
originHeight = img.height; /* 图片的高度 */
|
||||
|
||||
// 设置最大尺寸限制,将所有图片都压缩到小于1m
|
||||
const maxWidth = 2560, maxHeight = 1600;
|
||||
// 需要压缩的目标尺寸
|
||||
let targetWidth = originWidth, targetHeight = originHeight;
|
||||
// 等比例计算超过最大限制时缩放后的图片尺寸
|
||||
if (originWidth > maxWidth || originHeight > maxHeight) {
|
||||
if (originWidth / originHeight > 1) {
|
||||
// 宽图片
|
||||
targetWidth = maxWidth;
|
||||
targetHeight = Math.round(maxWidth * (originHeight / originWidth));
|
||||
} else {
|
||||
// 高图片
|
||||
targetHeight = maxHeight;
|
||||
targetWidth = Math.round(maxHeight * (originWidth / originHeight));
|
||||
}
|
||||
}
|
||||
|
||||
canvas.width = targetWidth;
|
||||
canvas.height = targetHeight;
|
||||
drawer.drawImage(img, 0, 0, canvas.width, canvas.height)
|
||||
convertBase64UrlToBlob(canvas.toDataURL(file.type, quality), callback);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function convertBase64UrlToBlob(urlData, callback) { //将base64转化为文件格式
|
||||
const arr = urlData.split(',')
|
||||
const mime = arr[0].match(/:(.*?);/)[1]
|
||||
const bstr = atob(arr[1])
|
||||
let n = bstr.length
|
||||
const u8arr = new Uint8Array(n)
|
||||
while (n--) {
|
||||
u8arr[n] = bstr.charCodeAt(n)
|
||||
}
|
||||
callback(new Blob([u8arr], {
|
||||
type: mime
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
//})
|
||||
}
|
||||
}
|
||||
//输出 imgcom 接口
|
||||
exports('imgcom', compressImage);
|
||||
});
|
||||
|
27
vendor/composer/installed.json
vendored
27
vendor/composer/installed.json
vendored
@ -578,18 +578,24 @@
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/psr7",
|
||||
"version": "1.9.0",
|
||||
"version_normalized": "1.9.0.0",
|
||||
"version": "1.9.1",
|
||||
"version_normalized": "1.9.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/psr7.git",
|
||||
"reference": "e98e3e6d4f86621a9b75f623996e6bbdeb4b9318"
|
||||
"reference": "e4490cabc77465aaee90b20cfc9a770f8c04be6b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/psr7/zipball/e98e3e6d4f86621a9b75f623996e6bbdeb4b9318",
|
||||
"reference": "e98e3e6d4f86621a9b75f623996e6bbdeb4b9318",
|
||||
"shasum": ""
|
||||
"url": "https://api.github.com/repos/guzzle/psr7/zipball/e4490cabc77465aaee90b20cfc9a770f8c04be6b",
|
||||
"reference": "e4490cabc77465aaee90b20cfc9a770f8c04be6b",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
|
||||
"preferred": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.4.0",
|
||||
@ -606,13 +612,8 @@
|
||||
"suggest": {
|
||||
"laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
|
||||
},
|
||||
"time": "2022-06-20T21:43:03+00:00",
|
||||
"time": "2023-04-17T16:00:37+00:00",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.9-dev"
|
||||
}
|
||||
},
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
"files": [
|
||||
@ -671,7 +672,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/guzzle/psr7/issues",
|
||||
"source": "https://github.com/guzzle/psr7/tree/1.9.0"
|
||||
"source": "https://github.com/guzzle/psr7/tree/1.9.1"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
10
vendor/composer/installed.php
vendored
10
vendor/composer/installed.php
vendored
@ -3,7 +3,7 @@
|
||||
'name' => 'taoser/taoler',
|
||||
'pretty_version' => 'dev-master',
|
||||
'version' => 'dev-master',
|
||||
'reference' => 'eddc6843101a94454f9333fb993cff1741007b42',
|
||||
'reference' => '2aa133f33d26cc3d1dba9eb687b1744690f4026c',
|
||||
'type' => 'project',
|
||||
'install_path' => __DIR__ . '/../../',
|
||||
'aliases' => array(),
|
||||
@ -83,9 +83,9 @@
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'guzzlehttp/psr7' => array(
|
||||
'pretty_version' => '1.9.0',
|
||||
'version' => '1.9.0.0',
|
||||
'reference' => 'e98e3e6d4f86621a9b75f623996e6bbdeb4b9318',
|
||||
'pretty_version' => '1.9.1',
|
||||
'version' => '1.9.1.0',
|
||||
'reference' => 'e4490cabc77465aaee90b20cfc9a770f8c04be6b',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../guzzlehttp/psr7',
|
||||
'aliases' => array(),
|
||||
@ -349,7 +349,7 @@
|
||||
'taoser/taoler' => array(
|
||||
'pretty_version' => 'dev-master',
|
||||
'version' => 'dev-master',
|
||||
'reference' => 'eddc6843101a94454f9333fb993cff1741007b42',
|
||||
'reference' => '2aa133f33d26cc3d1dba9eb687b1744690f4026c',
|
||||
'type' => 'project',
|
||||
'install_path' => __DIR__ . '/../../',
|
||||
'aliases' => array(),
|
||||
|
@ -6,7 +6,7 @@ on:
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04
|
||||
strategy:
|
||||
max-parallel: 10
|
||||
matrix:
|
||||
@ -21,11 +21,7 @@ jobs:
|
||||
extensions: mbstring
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Mimic PHP 8.0
|
||||
run: composer config platform.php 8.0.999
|
||||
if: matrix.php > 8
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install dependencies
|
||||
run: composer update --no-interaction --no-progress
|
||||
|
@ -4,14 +4,13 @@ on:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
name: Test
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04
|
||||
strategy:
|
||||
max-parallel: 10
|
||||
matrix:
|
||||
php: ['7.2', '7.3', '7.4', '8.0']
|
||||
php: ['7.2', '7.3', '7.4', '8.0', '8.1']
|
||||
|
||||
steps:
|
||||
- name: Set up PHP
|
||||
@ -21,7 +20,7 @@ jobs:
|
||||
coverage: none
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Download dependencies
|
||||
uses: ramsey/composer-install@v1
|
||||
|
@ -6,11 +6,11 @@ on:
|
||||
jobs:
|
||||
php-cs-fixer:
|
||||
name: PHP-CS-Fixer
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
|
6
vendor/guzzlehttp/psr7/CHANGELOG.md
vendored
6
vendor/guzzlehttp/psr7/CHANGELOG.md
vendored
@ -9,6 +9,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
## Unreleased
|
||||
|
||||
## 1.9.1 - 2023-04-17
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed header validation issue
|
||||
|
||||
## 1.9.0 - 2022-06-20
|
||||
|
||||
### Added
|
||||
|
5
vendor/guzzlehttp/psr7/composer.json
vendored
5
vendor/guzzlehttp/psr7/composer.json
vendored
@ -61,11 +61,6 @@
|
||||
"GuzzleHttp\\Tests\\Psr7\\": "tests/"
|
||||
}
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.9-dev"
|
||||
}
|
||||
},
|
||||
"config": {
|
||||
"preferred-install": "dist",
|
||||
"sort-packages": true,
|
||||
|
13
vendor/guzzlehttp/psr7/src/MessageTrait.php
vendored
13
vendor/guzzlehttp/psr7/src/MessageTrait.php
vendored
@ -226,12 +226,9 @@ trait MessageTrait
|
||||
throw new \InvalidArgumentException('Header name can not be empty.');
|
||||
}
|
||||
|
||||
if (! preg_match('/^[a-zA-Z0-9\'`#$%&*+.^_|~!-]+$/', $header)) {
|
||||
if (! preg_match('/^[a-zA-Z0-9\'`#$%&*+.^_|~!-]+$/D', $header)) {
|
||||
throw new \InvalidArgumentException(
|
||||
sprintf(
|
||||
'"%s" is not valid header name',
|
||||
$header
|
||||
)
|
||||
sprintf('"%s" is not valid header name.', $header)
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -263,8 +260,10 @@ trait MessageTrait
|
||||
// Clients must not send a request with line folding and a server sending folded headers is
|
||||
// likely very rare. Line folding is a fairly obscure feature of HTTP/1.1 and thus not accepting
|
||||
// folding is not likely to break any legitimate use case.
|
||||
if (! preg_match('/^[\x20\x09\x21-\x7E\x80-\xFF]*$/', $value)) {
|
||||
throw new \InvalidArgumentException(sprintf('"%s" is not valid header value', $value));
|
||||
if (! preg_match('/^[\x20\x09\x21-\x7E\x80-\xFF]*$/D', $value)) {
|
||||
throw new \InvalidArgumentException(
|
||||
sprintf('"%s" is not valid header value.', $value)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
2
vendor/services.php
vendored
2
vendor/services.php
vendored
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
// This file is automatically generated at:2023-04-16 14:14:56
|
||||
// This file is automatically generated at:2023-04-19 16:12:11
|
||||
declare (strict_types = 1);
|
||||
return array (
|
||||
0 => 'taoser\\addons\\Service',
|
||||
|
@ -25,55 +25,50 @@
|
||||
<li {if condition="$type eq 'wait'" } class="layui-this" {/if}><a href="{$Request.domain}{:url('cate_type',['ename' => $Request.param.ename,'type' => 'wait',])}">{:lang('未解决')}</a> </li>
|
||||
</ul>
|
||||
</div>
|
||||
<ul class="question-list">
|
||||
{volist name="artList['data']" id="art"}
|
||||
<li>
|
||||
{if ($art.jie == 1)}
|
||||
<div class="que-sta-jie">
|
||||
<span >已解</span>
|
||||
<span >√</span>
|
||||
</div>
|
||||
{else /}
|
||||
<div class="que-sta-ask">
|
||||
<span>未解</span>
|
||||
<span >?</span>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="que-sta-view layui-hide-xs">
|
||||
<span>{$art.pv}</span>
|
||||
<span >阅读</span>
|
||||
</div>
|
||||
<div class="que-body">
|
||||
<h2><a href="{$Request.domain}{$art.url}" style="color:{$art.title_color ?? '#333'};">{$art.title}</a></h2>
|
||||
<div class="que-user-info">
|
||||
<a href="{$Request.domain}{:url('user/home',['id'=>$art.user.id])}" class="que-avatar">
|
||||
<cite>{$art.user.nickname ?: $art.user.name}</cite>
|
||||
</a>
|
||||
{$art.create_time|date='Y-m-d'}
|
||||
{$art.has_img ?= '<span><i class="layui-icon layui-icon-picture" style="color: #5FB878;"></i></span>'}
|
||||
{$art.has_video ?= '<span><i class="layui-icon layui-icon-play" style="color: #FF5722;"></i></span>'}
|
||||
{$art.has_audio ?= '<span><i class="layui-icon layui-icon-speaker" style="color: #000000;"></i></span>'}
|
||||
{$art.read_type ?= '<span><i class="layui-icon layui-icon-password" style="color: #FF5722;"></i></span>'}
|
||||
{$art.upzip ?= '<span><i class="layui-icon layui-icon-file-b" style="color: #009688;" title="附件"></i></span>'}
|
||||
<span ><i class="iconfont icon-pinglun1" title="回答"></i> {$art.comments_count}</span>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{/volist}
|
||||
</ul>
|
||||
|
||||
<ul class="question-list">
|
||||
{article:list}
|
||||
<li>
|
||||
{if ($article.jie == 1)}
|
||||
<div class="que-sta-jie">
|
||||
<span >已解</span>
|
||||
<span >√</span>
|
||||
</div>
|
||||
{else /}
|
||||
<div class="que-sta-ask">
|
||||
<span>未解</span>
|
||||
<span >?</span>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="que-sta-view layui-hide-xs">
|
||||
<span>{article:pv /}</span>
|
||||
<span >阅读</span>
|
||||
</div>
|
||||
<div class="que-body">
|
||||
<h2><a href="{article:link}" style="color:{article:title_color};">{article:title}</a></h2>
|
||||
<div class="que-user-info">
|
||||
<a href="{article:user name='link'}" class="que-avatar">
|
||||
<cite>{article:auther /}</cite>
|
||||
</a>
|
||||
{$article.create_time|date='Y-m-d'}
|
||||
{$article.has_img ?= '<span><i class="layui-icon layui-icon-picture" style="color: #5FB878;"></i></span>'}
|
||||
{$article.has_video ?= '<span><i class="layui-icon layui-icon-play" style="color: #FF5722;"></i></span>'}
|
||||
{$article.has_audio ?= '<span><i class="layui-icon layui-icon-speaker" style="color: #000000;"></i></span>'}
|
||||
{$article.read_type ?= '<span><i class="layui-icon layui-icon-password" style="color: #FF5722;"></i></span>'}
|
||||
{$article.upzip ?= '<span><i class="layui-icon layui-icon-file-b" style="color: #009688;" title="附件"></i></span>'}
|
||||
<span ><i class="iconfont icon-pinglun1" title="回答"></i> {article:comment_num /}</span>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{/article:list}
|
||||
</ul>
|
||||
<div style="text-align: center" id="pages"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md4">
|
||||
{if showSlider(3)}
|
||||
<div class="fly-panel">
|
||||
<div class="fly-panel" style="padding: 5px 0; text-align: center;">
|
||||
{volist name="ad_cateImg" id="vo"}
|
||||
<a href="{$vo.slid_href}" target="_blank"><img src="{$Request.domain}{$vo.slid_img}" style="max-width: 100%;"></a>
|
||||
{/volist}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
<!--列表广告图片位-->
|
||||
{:hook('ads_cate_rimg')}
|
||||
|
||||
<dl class="fly-panel fly-list-one layui-hide-xs">
|
||||
<dt class="fly-panel-title">{:lang('hot post list')}</dt>
|
||||
{volist name="artHot" id="vo"}
|
||||
@ -94,18 +89,9 @@
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{if showSlider(6)}
|
||||
<div class="fly-panel">
|
||||
<div class="fly-panel-title">{:lang('sponsor')}<span style="padding: 0 3px;">-</span>
|
||||
<a href="" class="fly-link fly-joinad">{:lang('i want to join')}</a>
|
||||
</div>
|
||||
<div class="fly-panel-main">
|
||||
{volist name="ad_comm" id="vo"}
|
||||
<a href="{$vo.slid_href}" target="_blank" rel="nofollow" class="fly-zanzhu" style="background-color: '{$vo.slid_color};'">{$vo.slid_name}</a>
|
||||
{/volist}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
<!--列表广告赞助位-->
|
||||
{:hook('ads_cate_support')}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -129,7 +115,7 @@
|
||||
var page = obj.curr;
|
||||
//首次不执行
|
||||
if(!first){
|
||||
location.href ="{$path}/"+page+'.html';
|
||||
location.href ="{$path}/"+page+'.html';
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -16,20 +16,18 @@
|
||||
{block name="content"}
|
||||
<div class="layui-container">
|
||||
<div class="layui-row layui-col-space15">
|
||||
<div class="layui-col-md9 content detail">
|
||||
<div class="layui-col-md8 content detail">
|
||||
<div class="fly-panel detail-box">
|
||||
{//标题}
|
||||
<div class="title layui-clear"><h1 style="color:{$article.title_color ?? '#333'};">{$article.title}</h1></div>
|
||||
<div class="detail_qrcode layui-hide-xs" onclick="PhoneDown();" id="mobile"></div>
|
||||
|
||||
<div class="title layui-clear"><h1 style="color:{article:title_color /};">{article:title /}</h1></div>
|
||||
{//图标}
|
||||
<div class="user-questions">
|
||||
<a class="user-avatar" href="{$Request.domain}{:url('user/home',['id'=>$article.user.id])}">
|
||||
<img src="{$Request.domain}{$article.user.user_img}" alt="{$article.user.name}" />
|
||||
<cite>{$article.user.nickname ?: $article.user.name} / </cite>
|
||||
<a class="user-avatar" href="{article:user name='link' /}">
|
||||
<img src="{article:user name='user_img' /}" alt="{article:user name='name' /}" />
|
||||
<cite>{article:auther} / </cite>
|
||||
</a>
|
||||
<span class="user-post-time" data="{$article.create_time}" style="padding-top: 5px"></span>
|
||||
/ <i class="iconfont" title="{:lang('reply')}"></i> {$article.comments_count} / <i class="iconfont" title="浏览"></i> {$pv}
|
||||
/ <i class="iconfont" title="{:lang('reply')}"></i> {$article:comments_count} / <i class="iconfont" title="浏览"></i> {$pv}
|
||||
{if ($article.jie == 0) }
|
||||
<span class="layui-btn layui-btn-xs" style="background-color: #ff5722">{:lang('no finished')}</span>
|
||||
{else /}
|
||||
@ -44,7 +42,7 @@
|
||||
<div style="margin-top: 15px; font-size: 18px; font-weight: bold; color: rgb(130, 125, 125)">问题描述:</div>
|
||||
<hr />
|
||||
{:hook('taoplayerdiv')}
|
||||
<div class="detail-body photos" id="content">{$article.content|raw}</div>
|
||||
<div class="detail-body photos" id="content">{article:content}</div>
|
||||
{if (($article.upzip !== '') || session('?user_name'))}
|
||||
<div class="">
|
||||
{notempty name="$article.upzip"}
|
||||
@ -77,37 +75,37 @@
|
||||
|
||||
{//评论内容}
|
||||
<div class="fly-panel detail-box" id="flyReply">
|
||||
<span style="font-size: 18px">评论 {$article.comments_count}</span>
|
||||
<span style="font-size: 18px">评论 {article:comment_num}</span>
|
||||
<ul class="jieda" id="jieda">
|
||||
{volist name="comments['data']" id="vo" empty= ""}
|
||||
<li data-id="{$vo.id}" class="jieda-daan">
|
||||
{article:comment}
|
||||
<li data-id="{comment:id /}" class="jieda-daan">
|
||||
<a name="item-1111111111"></a>
|
||||
<div class="detail-about detail-about-reply">
|
||||
<a class="fly-avatar" href="{$Request.domain}{:url('user/home',['id'=>$vo.user.id])}">
|
||||
<img src="{$Request.domain}{$vo.user.user_img}" alt=" " />{if($vo.user.vip > 0)}<i class="iconfont icon-renzheng" title="认证信息"></i>{/if}
|
||||
<a class="fly-avatar" href="{comment:ulink /}">
|
||||
<img src="{comment:uimg /}" alt=" " />{if($comment.user.vip > 0)}<i class="iconfont icon-renzheng" title="认证信息"></i>{/if}
|
||||
</a>
|
||||
<div class="fly-detail-user">
|
||||
<a href="{$Request.domain}{:url('user/home',['id'=>$vo.user.id])}" class="fly-link">
|
||||
<cite>{$vo.user.nickname ?: $vo.user.name}</cite>
|
||||
<a href="{comment:ulink /}" class="fly-link">
|
||||
<cite>{comment:uname /}</cite>
|
||||
</a>
|
||||
{if condition="$article.user.id eq $vo.user.id"}<span>({:lang('poster')})</span>{/if}
|
||||
{if condition="$article.user_id eq $comment.user_id"}<span>({:lang('poster')})</span>{/if}
|
||||
</div>
|
||||
<div class="detail-hits"><span class="post-time" data="{$vo.create_time}"></span>{:hook('ipShow', $vo.user.city)}</div>
|
||||
{if $vo.cai == 1}<i class="iconfont icon-caina" title="最佳答案"></i>{/if}
|
||||
<div class="detail-hits"><span class="post-time" data="{comment:time /}"></span>{:hook('ipShow', $comment.user.city)}</div>
|
||||
{if $comment.cai == 1}<i class="iconfont icon-caina" title="最佳答案"></i>{/if}
|
||||
</div>
|
||||
|
||||
{//加密未解密评论不可查看}
|
||||
{if($article.read_type == 0 || (($article.read_type == 1) && $passJieMi))}
|
||||
<div class="detail-body jieda-body photos">{$vo.content|raw}</div>
|
||||
<div class="detail-body jieda-body photos">{comment:content /}</div>
|
||||
<div class="jieda-reply">
|
||||
<span class="jieda-zan {if($vo.zan != 0)}zanok{/if}" type="zan"><i class="iconfont icon-zan"></i><em>{$vo.zan}</em>赞</span>
|
||||
<span class="jieda-zan {if($comment.zan != 0)}zanok{/if}" type="zan"><i class="iconfont icon-zan"></i><em>{comment:zan /}</em>赞</span>
|
||||
<span type="reply" id="user-reply"><i class="iconfont icon-svgmoban53"></i>{:lang('reply')}</span>
|
||||
{//评论 编辑/删除/采纳/权限}
|
||||
<div class="jieda-admin">
|
||||
{if ((session('user_id') == $vo.user.id) && (getLimtTime($vo.create_time) < 2)) OR ($user.auth ?? '')}
|
||||
<span type="edit" class="comment-edit" data-id="{$vo.id}">{:lang('edit')}</span>
|
||||
{if ((session('user_id') == $comment.user_id) && (getLimtTime($comment.create_time) < 2)) OR ($user.auth ?? '')}
|
||||
<span type="edit" class="comment-edit" data-id="{$comment.id}">{:lang('edit')}</span>
|
||||
<span type="del">{:lang('delete')}</span>
|
||||
{/if} {if ($vo.cai == 0) && ((session('user_id') == $article.user_id) OR ($user.auth ?? '')) && ($article.jie == 0)/}
|
||||
{/if} {if ($comment.cai == 0) && ((session('user_id') == $article.user_id) OR ($user.auth ?? '')) && ($article.jie == 0)/}
|
||||
<span class="jieda-accept" type="accept">{:lang('accept')}</span>
|
||||
{/if}
|
||||
</div>
|
||||
@ -115,14 +113,10 @@
|
||||
{else /}
|
||||
<div class="detail-body jieda-body photos"><i class="layui-icon layui-icon-password" style="font-size: 24px; color: #FF5722;"></i> 评论解密后查看 </div>
|
||||
{/if}
|
||||
|
||||
|
||||
<div style="margin: 5px 0px;">
|
||||
<hr style="border:1px dotted red;height:1px;width:90%" />
|
||||
<div>{$vo.user.sign|raw}</div>
|
||||
</div>
|
||||
<div style="margin: 5px 0px;">{comment:usign /}</div>
|
||||
</li>
|
||||
{/volist}
|
||||
{/article:comment}
|
||||
</ul>
|
||||
<div style="text-align: center" id="pages"></div>
|
||||
</div>
|
||||
@ -143,11 +137,10 @@
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
</div>
|
||||
|
||||
{// 右栏}
|
||||
<div class="layui-col-md3">
|
||||
<div class="layui-col-md4">
|
||||
<div class="fly-panel">
|
||||
<div class="fly-panel-main wenda-user">
|
||||
<div class="user-img">
|
||||
@ -162,18 +155,10 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{if showSlider(7)}
|
||||
<div class="fly-panel">
|
||||
<div class="fly-panel-title">{:lang('sponsor')}<span style="padding: 0 3px">-</span>
|
||||
<a href="" class="fly-link fly-joinad">{:lang('i want to join')}</a>
|
||||
</div>
|
||||
<div class="fly-panel-main">
|
||||
{volist name="ad_comm" id="vo"}
|
||||
<a href="{$vo.slid_href}" target="_blank" rel="nofollow" class="fly-zanzhu" style="background-color:{$vo.slid_color};">{$vo.slid_name}</a>
|
||||
{/volist}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<!--详情广告赞助位-->
|
||||
{:hook('ads_detail_support')}
|
||||
|
||||
<dl class="fly-panel fly-list-one">
|
||||
<dt class="fly-panel-title">{:lang('hot post list')}</dt>
|
||||
{volist name="artHot" id="vo"}
|
||||
@ -183,21 +168,15 @@
|
||||
</dd>
|
||||
{/volist}
|
||||
</dl>
|
||||
{if showSlider(4)}
|
||||
<div class="fly-panel" style="padding: 5px 0; text-align: center">
|
||||
{volist name="ad_art" id="vo"}
|
||||
<a href="{$vo.slid_href}" target="_blank"><img src="{$Request.domain}/{$vo.slid_img}" style="max-width: 100%" /></a>
|
||||
{/volist}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<!--详情广告图片位-->
|
||||
{:hook('ads_detail_rimg')}
|
||||
|
||||
</div>
|
||||
{//crud管理模块}
|
||||
{include file="/public/crud" /}
|
||||
</div>
|
||||
<!--底部栏-->
|
||||
<div class="site-tree-mobile-detail-bottom layui-hide-md">
|
||||
<div id="LAY_jieAdmin1" data-id="{$article['id']}"></div>
|
||||
</div>
|
||||
</div>
|
||||
{include file="public/menu" /}
|
||||
{/block}
|
||||
|
@ -32,47 +32,47 @@
|
||||
<div class="col-lg-8">
|
||||
<div class="post"><h1>{$sysInfo.webname}</h1></div>
|
||||
<section id="main" class="list-home list-grid list-grid-padding">
|
||||
{volist name="artList['data']" id="art"}
|
||||
{article:list}
|
||||
<article class="list-item block card-plain">
|
||||
{if getOnepic($art.content)}
|
||||
{if getOnepic($article.content)}
|
||||
<figure class="media media-3x2 col-4 col-md-4 d-none d-md-block">
|
||||
<a class="media-content" href="{$art.url}" title="{$art.title}">
|
||||
<img src="{:getOnepic($art.content)}" width="233" height="155" alt="{$art.title}">
|
||||
<a class="media-content" href="{article:link /}" title="{article:title /}">
|
||||
<img src="{:getOnepic($article.content)}" width="233" height="155" alt="{article:title /}">
|
||||
</a>
|
||||
</figure>
|
||||
{/if}
|
||||
<div class="list-width list-content">
|
||||
<div class="list-body">
|
||||
<h3>
|
||||
<a href="{$Request.domain}{$art.url}" title="{$art.title}" class="list-title fanpian">{$art.title}</a>
|
||||
<a href="{article:link /}" title="{article:title /}" class="list-title fanpian">{article:title /}</a>
|
||||
</h3>
|
||||
<div class="list-desc d-block d-md-block text-sm text-secondary my-3">
|
||||
<p class="h-3x">{:getArtContent($art.content)}</p>
|
||||
<p class="h-3x">{:getArtContent($article.content)}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="list-footer">
|
||||
<div class="d-flex flex-fill align-items-center text-muted text-xs">
|
||||
<time class="d-inline-block" datetime="{$art.create_time|date='Y-m-d'}">{$art.create_time|date='Y-m-d'}</time>
|
||||
<time class="d-inline-block" datetime="{$article.create_time|date='Y-m-d'}">{$article.create_time|date='Y-m-d'}</time>
|
||||
<div class="d-inline-block mx-1 mx-md-2">
|
||||
<i class="text-primary">·</i>
|
||||
</div>
|
||||
<div class="d-inline-block">
|
||||
<a href="{$Request.domain}{:url('user/home',['id'=>$art.user.id])}" class="text-muted" title="发布于{$art.user.name}" rel="category">{$art.user.nickname ?: $art.user.name}</a>
|
||||
{$art.has_img ?= '<span><i class="layui-icon layui-icon-picture" style="color: #5FB878;"></i></span>'}
|
||||
{$art.has_video ?= '<span><i class="layui-icon layui-icon-play" style="color: #FF5722;"></i></span>'}
|
||||
{$art.has_audio ?= '<span><i class="layui-icon layui-icon-speaker" style="color: #000000;"></i></span>'}
|
||||
{$art.read_type ?= '<span><i class="layui-icon layui-icon-password" style="color: #FF5722;"></i></span>'}
|
||||
{$art.upzip ?= '<span><i class="layui-icon layui-icon-file-b" style="color: #009688;" title="附件"></i></span>'}
|
||||
<a href="{article:user name='link' /}" class="text-muted" title="发布于{article:auther /}" rel="category">{article:auther /}</a>
|
||||
{$article.has_img ?= '<span><i class="layui-icon layui-icon-picture" style="color: #5FB878;"></i></span>'}
|
||||
{$article.has_video ?= '<span><i class="layui-icon layui-icon-play" style="color: #FF5722;"></i></span>'}
|
||||
{$article.has_audio ?= '<span><i class="layui-icon layui-icon-speaker" style="color: #000000;"></i></span>'}
|
||||
{$article.read_type ?= '<span><i class="layui-icon layui-icon-password" style="color: #FF5722;"></i></span>'}
|
||||
{$article.upzip ?= '<span><i class="layui-icon layui-icon-file-b" style="color: #009688;" title="附件"></i></span>'}
|
||||
</div>
|
||||
<div class="flex-fill"></div>
|
||||
<div class="mx-1">
|
||||
<a href="{$Request.domain}{$art.url}" class="text-muted">阅读全文</a>
|
||||
<a href="{article:link /}" class="text-muted">阅读全文</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
{/volist}
|
||||
{/article:list}
|
||||
</section>
|
||||
<nav class="navigation pagination" role="navigation" aria-label="Posts Navigation">
|
||||
<div class="nav-links" style="padding-bottom: 10px;" id="pages">
|
||||
@ -85,17 +85,9 @@
|
||||
</div>
|
||||
<div class="sidebar col-lg-4 d-none d-lg-block">
|
||||
<div class="theiaStickySidebar">
|
||||
{if showSlider(3)}
|
||||
<dl class="function" id="rongkeji_tuwenad">
|
||||
<dt style="display:none;"></dt>
|
||||
{volist name="ad_cateImg" id="vo"}
|
||||
<dd class="function_c">
|
||||
<div><a href="{$vo.slid_href}" target="_blank" rel="nofollow"><img src="{$Request.domain}/{$vo.slid_img}" width="350" height="350" alt="图文广告"></a>
|
||||
</div>
|
||||
</dd>
|
||||
{/volist}
|
||||
</dl>
|
||||
{/if}
|
||||
<!--博客列表广告赞助位-->
|
||||
{:hook('ads_blog_cate_rimg')}
|
||||
|
||||
<dl class="function" id="rongkeji_remenwenzhang">
|
||||
<dt class="function_t">热门文章</dt>
|
||||
<dd class="function_c">
|
||||
@ -113,18 +105,8 @@
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
{notempty name="flinks"}
|
||||
<dl class="function" id="divLinkage">
|
||||
<dt class="function_t">友情链接</dt>
|
||||
<dd class="function_c">
|
||||
<ul>
|
||||
{volist name="flinks" id="vo"}
|
||||
<li class="link-item"><a href="{$vo.slid_href}" target="_blank" title="{$vo.slid_name}">{$vo.slid_name}</a></li>
|
||||
{/volist}
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
{/notempty}
|
||||
<!--博客列表友情链接-->
|
||||
{:hook('ads_blog_cate_flink')}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -29,20 +29,22 @@
|
||||
<main class="py-2 py-md-2 pb-3" style="transform: none">
|
||||
<div class="container" style="transform: none">
|
||||
<div class="row" style="transform: none">
|
||||
<div class="col-lg-8" itemscope itemType="http://schema.org/BlogPosting">
|
||||
<div class="col-lg-8" itemscope itemType="">
|
||||
<div class="post card">
|
||||
<section class="card-body">
|
||||
<div class="post-header border-bottom mb-4 pb-4">
|
||||
<h1 class="h3 mb-3" itemprop="headline">{$article.title}</h1>
|
||||
<h1 class="h3 mb-3" itemprop="headline">{article:title /}</h1>
|
||||
<div class="meta d-flex align-items-center text-xs text-muted">
|
||||
<div>
|
||||
<div class="d-inline-block" itemprop="author" itemscope="" itemtype="https://schema.org/Person">
|
||||
Posted by <a href="{$Request.domain}" target="_blank" class="text-muted" itemprop="url"><span itemprop="name">{$article.user.name}</span></a>,<a href="{:url('cate',['ename'=>$article.cate.ename])}" target="_blank" class="text-muted" rel="category">{$article.cate.catename}</a>,<time class="d-inline-block" datetime="{$article.create_time|date='Y-m-d h:m:s'}" itemprop="datePublished">{$article.create_time}</time>
|
||||
<div class="d-inline-block" itemprop="author" itemscope="" itemtype="">
|
||||
Posted by <a href="{$Request.domain}" target="_blank" class="text-muted" itemprop="url">
|
||||
<span itemprop="name">{article:auther}</span></a>,
|
||||
<a href="{article:cate name='link'}" target="_blank" class="text-muted" rel="category">{article:cate name="catename"}</a>,<time class="d-inline-block" datetime="{$article.create_time|date='Y-m-d h:m:s'}" itemprop="datePublished">{article:time}</time>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ml-auto text-sm yincang">
|
||||
<span class="mx-1">
|
||||
<small>已阅读 {$pv} 次</small>
|
||||
<small>已阅读 {article:pv /} 次</small>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@ -50,7 +52,7 @@
|
||||
</div>
|
||||
{:hook('taoplayerdiv')}
|
||||
<article class="post-content detail-body" itemprop="articleBody" view-image>
|
||||
{$article.content|raw}
|
||||
{article:content}
|
||||
</article>
|
||||
{//文章末尾}
|
||||
{if (($article.upzip !== '') || session('?user_name'))}
|
||||
@ -125,48 +127,44 @@
|
||||
<div class="card-body pt-4">
|
||||
{//评论内容}
|
||||
<div class="mb-3" id="flyReply">
|
||||
文章评论 <small class="font-theme text-muted">({$article.comments_count})</small>
|
||||
文章评论 <small class="font-theme text-muted">({article:comment_num})</small>
|
||||
<ul class="jieda" id="jieda">
|
||||
{volist name="comments['data']" id="vo" empty= ""}
|
||||
{article:comment}
|
||||
<li data-id="{$vo.id}" class="jieda-daan">
|
||||
<a name="item-1111111111"></a>
|
||||
<div class="detail-about detail-about-reply">
|
||||
<a class="fly-avatar" href="{$Request.domain}{:url('user/home',['id'=>$vo.user.id])}">
|
||||
<img src="{$Request.domain}{$vo.user.user_img}" alt=" " />{if($vo.user.vip > 0)}<i class="iconfont icon-renzheng" title="认证信息"></i>{/if}
|
||||
<a class="fly-avatar" href="{comment:ulink /}">
|
||||
<img src="{comment:uimg /}" alt=" " />{if($comment.user.vip > 0)}<i class="iconfont icon-renzheng" title="认证信息"></i>{/if}
|
||||
</a>
|
||||
<div class="fly-detail-user">
|
||||
<a href="{$Request.domain}{:url('user/home',['id'=>$vo.user.id])}" class="fly-link">
|
||||
<cite>{$vo.user.nickname ?: $vo.user.name}</cite>
|
||||
<a href="{comment:ulink /}" class="fly-link">
|
||||
<cite>{comment:uname /}</cite>
|
||||
</a>
|
||||
{if condition="$article.user.id eq $vo.user.id"}<span>({:lang('poster')})</span>{/if}
|
||||
{if condition="$article.user.id eq $comment.user_id"}<span>({:lang('poster')})</span>{/if}
|
||||
</div>
|
||||
<div class="detail-hits"><span class="post-time" data="{$vo.create_time}"></span>{:hook('ipShow',$vo.user.city)}</div>
|
||||
{if $vo.cai == 1}<i class="iconfont icon-caina" title="最佳答案"></i>{/if}
|
||||
<div class="detail-hits"><span class="post-time" data="{$vo.create_time}"></span>{:hook('ipShow',$comment.user.city)}</div>
|
||||
</div>
|
||||
{//加密未解密评论不可查看}
|
||||
{if($article.read_type == 0 || (($article.read_type == 1) && $passJieMi))}
|
||||
<div class="detail-body jieda-body photos">{$vo.content|raw}</div>
|
||||
<div class="jieda-reply">
|
||||
<span class="jieda-zan {if($vo.zan != 0)}zanok{/if}" type="zan"><i class="iconfont icon-zan"></i><em>{$vo.zan}</em>赞</span>
|
||||
<span type="reply"><i class="iconfont icon-svgmoban53"></i>{:lang('reply')}</span>
|
||||
{//评论 编辑/删除/采纳/权限}
|
||||
<div class="jieda-admin">
|
||||
{if ((session('user_id') == $vo.user.id) && (getLimtTime($vo.create_time) < 2)) OR ($user.auth ?? '')}
|
||||
<span type="edit" class="comment-edit" data-id="{$vo.id}">{:lang('edit')}</span>
|
||||
<span type="del">{:lang('delete')}</span>
|
||||
{/if} {if ($vo.cai == 0) && ((session('user_id') == $article.user_id) OR ($user.auth ?? '')) && ($article.jie == 0)/}
|
||||
<span class="jieda-accept" type="accept">{:lang('accept')}</span>
|
||||
{/if}
|
||||
<div class="detail-body jieda-body photos">{comment:content}</div>
|
||||
<div class="jieda-reply">
|
||||
<span class="jieda-zan {if($comment.zan != 0)}zanok{/if}" type="zan"><i class="iconfont icon-zan"></i><em>{comment:zan /}</em>赞</span>
|
||||
<span type="reply"><i class="iconfont icon-svgmoban53"></i>{:lang('reply')}</span>
|
||||
{//评论 编辑/删除/采纳/权限}
|
||||
<div class="jieda-admin">
|
||||
{if ((session('user_id') == $comment.user_id) && (getLimtTime($comment.create_time) < 2)) OR ($user.auth ?? '')}
|
||||
<span type="edit" class="comment-edit" data-id="{comment:id /}">{:lang('edit')}</span>
|
||||
<span type="del">{:lang('delete')}</span>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{else /}
|
||||
<div class="detail-body jieda-body photos"><i class="layui-icon layui-icon-password" style="font-size: 24px; color: #FF5722;"></i> 评论解密后查看 </div>
|
||||
<div class="detail-body jieda-body photos"><i class="layui-icon layui-icon-password" style="font-size: 24px; color: #FF5722;"></i> 评论解密后查看 </div>
|
||||
{/if}
|
||||
<hr style="width:90%;border:1px dotted red;height:1px;margin:5px 0px;"; />
|
||||
<div>{$vo.user.sign|raw}</div>
|
||||
|
||||
<div>{comment:usign /}</div>
|
||||
</li>
|
||||
{/volist}
|
||||
{/article:comment}
|
||||
</ul>
|
||||
<div style="text-align: center" id="pages"></div>
|
||||
</div>
|
||||
@ -214,7 +212,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="widget-author-avatar">
|
||||
<div class="flex-avatar w-80"><img alt="{$article.user.name}" src="{$article.user.user_img}" class="avatar" height="80" width="80">
|
||||
<div class="flex-avatar w-80"><img alt="{$article.user.name}" src="{article:user name='user_img'}" class="avatar" height="80" width="80">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -233,18 +231,9 @@
|
||||
</dd>
|
||||
</dl>
|
||||
{//广告}
|
||||
{if showSlider(4)}
|
||||
<dl class="function" id="rongkeji_tuwenad">
|
||||
<dt style="display:none;"></dt>
|
||||
{volist name="ad_art" id="vo"}
|
||||
<dd class="function_c">
|
||||
<div>
|
||||
<a href="{$vo.slid_href}" target="_blank" rel="nofollow"><img src="{$Request.domain}/{$vo.slid_img}" width="350" height="350" alt="图文广告"></a>
|
||||
</div>
|
||||
</dd>
|
||||
{/volist}
|
||||
</dl>
|
||||
{/if}
|
||||
<!--博客详情广告赞助位-->
|
||||
{:hook('ads_blog_detail_rimg')}
|
||||
|
||||
{//热门文章}
|
||||
<dl class="function" id="rongkeji_remenwenzhang">
|
||||
<dt class="function_t">热门文章</dt>
|
||||
@ -278,18 +267,9 @@
|
||||
</dl>
|
||||
{/if}
|
||||
{//友情链接}
|
||||
{if count($flinks) > 0}
|
||||
<dl class="function" id="divLinkage">
|
||||
<dt class="function_t">友情链接</dt>
|
||||
<dd class="function_c">
|
||||
<ul>
|
||||
{volist name="flinks" id="vo"}
|
||||
<li class="link-item"><a href="{$vo.slid_href}" target="_blank" title="{$vo.slid_name}">{$vo.slid_name}</a></li>
|
||||
{/volist}
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
{/if}
|
||||
<!--博客详情友链-->
|
||||
{:hook('ads_blog_detail_flink')}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -330,6 +310,7 @@ layui.use(['fly', 'face','colorpicker', 'laypage'], function(){
|
||||
,uid = layui.cache.user.uid
|
||||
,laypage = layui.laypage;
|
||||
var id = "{$article.id}";
|
||||
let LOGIN_URL = "{:url('login/index')}";
|
||||
|
||||
//如果你是采用模版自带的编辑器,你需要开启以下语句来解析。
|
||||
|
||||
@ -476,7 +457,7 @@ layui.use(['fly', 'face','colorpicker', 'laypage'], function(){
|
||||
$("#jiemi").click(function (){
|
||||
//判断登陆
|
||||
if(uid == -1){
|
||||
layer.msg('请先登录再查看', {icon: 6}, function(){location.href = login})
|
||||
layer.msg('请先登录再查看', {icon: 6}, function(){location.href = LOGIN_URL})
|
||||
return false;
|
||||
}
|
||||
var id = "{$article.id}";
|
||||
|
@ -16,7 +16,7 @@
|
||||
{block name="content"}
|
||||
<div class="layui-container">
|
||||
<div class="layui-row layui-col-space15">
|
||||
<div class="layui-col-md9">
|
||||
<div class="layui-col-md8">
|
||||
<div class="fly-panel" style="margin-bottom: 0;">
|
||||
|
||||
{include file="public/filter" /}
|
||||
@ -62,16 +62,9 @@
|
||||
<div style="text-align: center" id="pages"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md3">
|
||||
{if showSlider(3)}
|
||||
<div class="fly-panel">
|
||||
<div class="fly-panel" style="padding: 5px 0; text-align: center;">
|
||||
{volist name="ad_cateImg" id="vo"}
|
||||
<a href="{$vo.slid_href}" target="_blank"><img src="{$Request.domain}{$vo.slid_img}" style="max-width: 100%;"></a>
|
||||
{/volist}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="layui-col-md4">
|
||||
<!--列表广告图片位-->
|
||||
{:hook('ads_cate_rimg')}
|
||||
<dl class="fly-panel fly-list-one layui-hide-xs">
|
||||
<dt class="fly-panel-title">{:lang('hot post list')}</dt>
|
||||
{volist name="artHot" id="vo"}
|
||||
@ -81,18 +74,8 @@
|
||||
</dd>
|
||||
{/volist}
|
||||
</dl>
|
||||
{if showSlider(6)}
|
||||
<div class="fly-panel">
|
||||
<div class="fly-panel-title">{:lang('sponsor')}<span style="padding: 0 3px;">-</span>
|
||||
<a href="" class="fly-link fly-joinad ">{:lang('i want to join')}</a>
|
||||
</div>
|
||||
<div class="fly-panel-main">
|
||||
{volist name="ad_comm" id="vo"}
|
||||
<a href="{$vo.slid_href}" target="_blank" rel="nofollow" class="fly-zanzhu" style="background-color: {$vo.slid_color};">{$vo.slid_name}</a>
|
||||
{/volist}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
<!--列表广告赞助位-->
|
||||
{:hook('ads_cate_support')}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -53,15 +53,9 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md4">
|
||||
{if showSlider(3)}
|
||||
<div class="fly-panel">
|
||||
<div class="fly-panel" style="padding: 5px 0; text-align: center;">
|
||||
{volist name="ad_cateImg" id="vo"}
|
||||
<a href="{$vo.slid_href}" target="_blank"><img src="{$Request.domain}{$vo.slid_img}" style="max-width: 100%;"></a>
|
||||
{/volist}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
<!--列表广告图片位-->
|
||||
{:hook('ads_cate_rimg')}
|
||||
|
||||
<dl class="fly-panel fly-list-one layui-hide-xs">
|
||||
<dt class="fly-panel-title">{:lang('hot post list')}</dt>
|
||||
{volist name="artHot" id="vo"}
|
||||
@ -71,18 +65,8 @@
|
||||
</dd>
|
||||
{/volist}
|
||||
</dl>
|
||||
{if showSlider(6)}
|
||||
<div class="fly-panel">
|
||||
<div class="fly-panel-title">{:lang('sponsor')}<span style="padding: 0 3px;">-</span>
|
||||
<a href="" class="fly-link fly-joinad">{:lang('i want to join')}</a>
|
||||
</div>
|
||||
<div class="fly-panel-main">
|
||||
{volist name="ad_comm" id="vo"}
|
||||
<a href="{$vo.slid_href}" target="_blank" rel="nofollow" class="fly-zanzhu" style="background-color: '{$vo.slid_color}';">{$vo.slid_name}</a>
|
||||
{/volist}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
<!--列表广告赞助位-->
|
||||
{:hook('ads_cate_support')}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -102,6 +102,7 @@
|
||||
,laytpl = layui.laytpl
|
||||
,uid = layui.cache.user.uid
|
||||
,laypage = layui.laypage;
|
||||
let LOGIN_URL = "{:url('login/index')}";
|
||||
|
||||
//如果你是采用模版自带的编辑器,你需要开启以下语句来解析。
|
||||
|
||||
@ -230,7 +231,7 @@
|
||||
$("#jiemi").click(function (){
|
||||
//判断登陆
|
||||
if(uid == -1){
|
||||
layer.msg('请先登录再查看', {icon: 6}, function(){location.href = login})
|
||||
layer.msg('请先登录再查看', {icon: 6}, function(){location.href = LOGIN_URL})
|
||||
return false;
|
||||
}
|
||||
var id = "{$article.id}";
|
||||
|
@ -58,15 +58,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md4">
|
||||
{if showSlider(3)}
|
||||
<div class="fly-panel">
|
||||
<div class="fly-panel" style="padding: 5px 0; text-align: center;">
|
||||
{volist name="ad_cateImg" id="vo"}
|
||||
<a href="{$vo.slid_href}" target="_blank"><img src="{$Request.domain}{$vo.slid_img}" style="max-width: 100%;"></a>
|
||||
{/volist}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
<!--列表广告图片位-->
|
||||
{:hook('ads_cate_rimg')}
|
||||
{//热门文章}
|
||||
<dl class="fly-panel fly-list-one layui-hide-xs">
|
||||
<dt class="fly-panel-title">{:lang('hot post list')}</dt>
|
||||
@ -88,18 +81,8 @@
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{if showSlider(6)}
|
||||
<div class="fly-panel">
|
||||
<div class="fly-panel-title">{:lang('sponsor')}<span style="padding: 0 3px;">-</span>
|
||||
<a href="" class="fly-link fly-joinad ">{:lang('i want to join')}</a>
|
||||
</div>
|
||||
<div class="fly-panel-main">
|
||||
{volist name="ad_comm" id="vo"}
|
||||
<a href="{$vo.slid_href}" target="_blank" rel="nofollow" class="fly-zanzhu" style="background-color: {$vo.slid_color};">{$vo.slid_name}</a>
|
||||
{/volist}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
<!--详情广告赞助位-->
|
||||
{:hook('ads_detail_support')}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -41,12 +41,12 @@
|
||||
</div>
|
||||
{//作者}
|
||||
<div class="detail-about">
|
||||
<a class="fly-avatar" href="{article:user name='user_link' /}">
|
||||
<a class="fly-avatar" href="{article:user name='link' /}">
|
||||
<img src="{article:user name='user_img' /}" alt="{article:user name='name' /}">
|
||||
{if($article.user.vip > 0)}<i class="iconfont icon-renzheng" title="认证信息"></i>{/if}
|
||||
</a>
|
||||
<div class="fly-detail-user">
|
||||
<a href="{article:user name='user_link' /}" class="fly-link">
|
||||
<a href="{article:user name='link' /}" class="fly-link">
|
||||
<cite>{article:auther}</cite>
|
||||
</a>
|
||||
<span class="layui-btn layui-btn-xs guanzhu" >关注</span>
|
||||
@ -115,7 +115,7 @@
|
||||
<a href="{comment:ulink /}" class="fly-link">
|
||||
<cite>{comment:uname /}</cite>
|
||||
</a>
|
||||
{if condition="$article.user.id eq $comment.user.id"}<span>({:lang('poster')})</span>{/if}
|
||||
{if condition="$article.user_id eq $comment.user_id"}<span>({:lang('poster')})</span>{/if}
|
||||
<span>{comment:usign /}</span>
|
||||
</div>
|
||||
<div class="detail-hits"><span class="post-time" data="{comment:time}"></span>{:hook('ipShow',$comment.user.city)}</span>
|
||||
@ -132,7 +132,7 @@
|
||||
<span type="reply"><i class="iconfont icon-svgmoban53"></i>{:lang('reply')}</span>
|
||||
{//评论编辑删除采纳权限}
|
||||
<div class="jieda-admin">
|
||||
{if ((session('user_id') == $comment.user.id) && (getLimtTime($comment.create_time) < 2)) OR ($user.auth ?? '')}
|
||||
{if ((session('user_id') == $comment.user_id) && (getLimtTime($comment.create_time) < 2)) OR ($user.auth ?? '')}
|
||||
<span type="edit" class="comment-edit" data-id="{comment:id /}">{:lang('edit')}</span>
|
||||
<span type="del">{:lang('delete')}</span>
|
||||
{/if}
|
||||
@ -148,6 +148,7 @@
|
||||
{/article:comment}
|
||||
</ul>
|
||||
<div style="text-align: center" id="pages"></div>
|
||||
|
||||
{//评论}
|
||||
{if session('?user_id') AND ( config('taoler.config.is_reply') == 1 ) AND ( $article.is_reply == 1 )}
|
||||
<div class="layui-form layui-form-pane">
|
||||
@ -182,18 +183,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{if showSlider(7)}
|
||||
<div class="fly-panel">
|
||||
<div class="fly-panel-title">{:lang('sponsor')}<span style="padding: 0 3px;">-</span>
|
||||
<a href="" class="fly-link fly-joinad">{:lang('i want to join')}</a>
|
||||
</div>
|
||||
<div class="fly-panel-main">
|
||||
{volist name="ad_comm" id="vo"}
|
||||
<a href="{$vo.slid_href}" target="_blank" rel="nofollow" class="fly-zanzhu" style="background-color: {$vo.slid_color};">{$vo.slid_name}</a>
|
||||
{/volist}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
<!--详情广告赞助位-->
|
||||
{:hook('ads_detail_support')}
|
||||
<dl class="fly-panel fly-list-one">
|
||||
<dt class="fly-panel-title">{:lang('hot post list')}</dt>
|
||||
{volist name="artHot" id="vo"}
|
||||
@ -203,13 +194,8 @@
|
||||
</dd>
|
||||
{/volist}
|
||||
</dl>
|
||||
{if showSlider(4)}
|
||||
<div class="fly-panel" style="padding: 5px 0; text-align: center;">
|
||||
{volist name="ad_art" id="vo"}
|
||||
<a href="{$vo.slid_href}" target="_blank"><img src="{$Request.domain}{$vo.slid_img}" style="max-width: 100%;"></a>
|
||||
{/volist}
|
||||
</div>
|
||||
{/if}
|
||||
<!--详情广告图片位-->
|
||||
{:hook('ads_detail_rimg')}
|
||||
</div>
|
||||
{//crud管理模块}
|
||||
{include file="/public/crud" /}
|
||||
@ -247,6 +233,7 @@ layui.use(['fly', 'face','colorpicker', 'laypage'], function(){
|
||||
,uid = layui.cache.user.uid
|
||||
,laypage = layui.laypage;
|
||||
var id = "{$article.id}";
|
||||
let LOGIN_URL = "{:url('login/index')}";
|
||||
|
||||
//如果你是采用模版自带的编辑器,你需要开启以下语句来解析。
|
||||
// 编辑器插件启用状态
|
||||
@ -387,7 +374,7 @@ layui.use(['fly', 'face','colorpicker', 'laypage'], function(){
|
||||
$("#jiemi").click(function (){
|
||||
//判断登陆
|
||||
if(uid == -1){
|
||||
layer.msg('请先登录再查看', {icon: 6}, function(){location.href = login})
|
||||
layer.msg('请先登录再查看', {icon: 6}, function(){location.href = LOGIN_URL})
|
||||
return false;
|
||||
}
|
||||
var id = "{$article.id}";
|
||||
|
@ -11,124 +11,76 @@
|
||||
{block name="column"}{include file="public/column" /}{/block}
|
||||
{block name="content"}
|
||||
<div class="layui-container">
|
||||
<div class="layui-row layui-col-space15">
|
||||
<div class="layui-col-md8">
|
||||
<!--首页幻灯-->
|
||||
{if showSlider(1)}
|
||||
<div class="fly-panel">
|
||||
{include file="public/index-slider" /}
|
||||
</div>
|
||||
{/if}
|
||||
<!--置顶文章-->
|
||||
<div class="fly-panel">
|
||||
<div class="fly-panel-title fly-filter">
|
||||
<a>{:lang('top')}</a>
|
||||
<a href="#signin" class="layui-hide-sm layui-show-xs-block fly-right" id="LAY_goSignin" style="color: #FF5722;">{:lang('go sign')}</a>
|
||||
</div>
|
||||
<ul class="fly-list">
|
||||
{volist name="artTop" id="top"}
|
||||
{include file="public/index-topforum" /}
|
||||
{/volist}
|
||||
</ul>
|
||||
</div>
|
||||
<!--文章列表-->
|
||||
<div class="fly-panel" style="margin-bottom: 0;">
|
||||
<ul class="fly-list">
|
||||
{volist name="artList" id="art"}
|
||||
{include file="public/index-forumlist" /}
|
||||
{/volist}
|
||||
</ul>
|
||||
<div style="text-align: center">
|
||||
<div class="laypage-main">
|
||||
<a href="{$Request.domain}{:url('cate',['ename'=>'all'])}" class="laypage-next">{:lang('more post')}</a>
|
||||
<div class="layui-row layui-col-space15">
|
||||
<div class="layui-col-md8">
|
||||
<!--首页幻灯-->
|
||||
{:hook('ads_slider')}
|
||||
<!--置顶文章-->
|
||||
<div class="fly-panel">
|
||||
<div class="fly-panel-title fly-filter">
|
||||
<a>{:lang('top')}</a>
|
||||
<a href="#signin" class="layui-hide-sm layui-show-xs-block fly-right" id="LAY_goSignin" style="color: #FF5722;">{:lang('go sign')}</a>
|
||||
</div>
|
||||
<ul class="fly-list">
|
||||
{volist name="artTop" id="top"}
|
||||
{include file="public/index-topforum" /}
|
||||
{/volist}
|
||||
</ul>
|
||||
</div>
|
||||
<!--文章列表-->
|
||||
<div class="fly-panel" style="margin-bottom: 0;">
|
||||
<ul class="fly-list">
|
||||
{volist name="artList" id="art"}
|
||||
{include file="public/index-forumlist" /}
|
||||
{/volist}
|
||||
</ul>
|
||||
<div style="text-align: center">
|
||||
<div class="laypage-main">
|
||||
<a href="{$Request.domain}{:url('cate',['ename'=>'all'])}" class="laypage-next">{:lang('more post')}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{//右栏}
|
||||
<div class="layui-col-md4">
|
||||
<!--签到-->
|
||||
{:hook('signhook', ['id'=>1])}
|
||||
<!--排名-->
|
||||
{:hook('ranking')}
|
||||
<!--首页图片广告-->
|
||||
{:hook('ads_index_rimg')}
|
||||
<!--温馨通道-->
|
||||
{:hook('ads_index_fastlinks')}
|
||||
<!--广告赞助-->
|
||||
{:hook('ads_index_support')}
|
||||
<!--回帖榜-->
|
||||
<div class="fly-panel fly-rank fly-rank-reply layui-hide-xs" id="LAY_replyRank" data-url="{:url('user_reply')}">
|
||||
<h3 class="fly-panel-title">{:lang('reviewers list')}</h3>
|
||||
<dl>
|
||||
<i class="layui-icon fly-loading"></i>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{//右栏}
|
||||
<div class="layui-col-md4">
|
||||
{:hook('live')}
|
||||
{:hook('ranking')}
|
||||
{:hook('kankan')}
|
||||
{:hook('signhook', ['id'=>1])}
|
||||
|
||||
<!--首页图片广告-->
|
||||
{if showSlider(13)}
|
||||
<div class="fly-panel" style="padding: 5px 0; text-align: center;">
|
||||
{volist name="ad_index_r" id="vo"}
|
||||
<a href="{$vo.slid_href}" target="_blank"><img src="{$Request.domain}{$vo.slid_img}" style="max-width: 100%;"></a>
|
||||
{/volist}
|
||||
</div>
|
||||
{/if}
|
||||
<!--温馨通道-->
|
||||
{if showSlider(8)}
|
||||
<div class="fly-panel layui-hide-xs">
|
||||
<h3 class="fly-panel-title">{:lang('links list')}</h3>
|
||||
{include file="public/index-static" /}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<!--广告赞助-->
|
||||
{if showSlider(5)}
|
||||
<div class="fly-panel">
|
||||
<div class="fly-panel-title">{:lang('sponsor')}<span class="fly-mid"></span>
|
||||
<a href="/" class="fly-link fly-joinad">{:lang('i want to join')}</a>
|
||||
</div>
|
||||
<div class="fly-panel-main" style="padding: 13px 15px;">
|
||||
{volist name="ad_index" id="vo"}
|
||||
<a href="{$vo.slid_href}" target="_blank" rel="nofollow" class="fly-zanzhu" style="background-color: {$vo.slid_color};">{$vo.slid_name}</a>
|
||||
{/volist}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
<!--回帖榜-->
|
||||
<div class="fly-panel fly-rank fly-rank-reply layui-hide-xs" id="LAY_replyRank" data-url="{:url('user_reply')}">
|
||||
<h3 class="fly-panel-title">{:lang('reviewers list')}</h3>
|
||||
<dl>
|
||||
<i class="layui-icon fly-loading"></i>
|
||||
<!--热帖榜-->
|
||||
<dl class="fly-panel fly-list-one layui-hide-xs">
|
||||
<dt class="fly-panel-title">{:lang('hot post list')}</dt>
|
||||
{volist name="artHot" id="vo"}
|
||||
<dd>
|
||||
<a href="{$Request.domain}{$vo.url}">{$vo.title}</a>
|
||||
<span><i class="iconfont icon-pinglun1"></i> {$vo.comments_count}</span>
|
||||
</dd>
|
||||
{/volist}
|
||||
</dl>
|
||||
<!--首页图片广告-->
|
||||
{:hook('ads_index_rfimg')}
|
||||
<!--友情链接-->
|
||||
{:hook('ads_index_flink')}
|
||||
|
||||
</div>
|
||||
<!--热帖榜-->
|
||||
<dl class="fly-panel fly-list-one layui-hide-xs">
|
||||
<dt class="fly-panel-title">{:lang('hot post list')}</dt>
|
||||
{volist name="artHot" id="vo"}
|
||||
<dd>
|
||||
<a href="{$Request.domain}{$vo.url}">{$vo.title}</a>
|
||||
<span><i class="iconfont icon-pinglun1"></i> {$vo.comments_count}</span>
|
||||
</dd>
|
||||
{/volist}
|
||||
</dl>
|
||||
<!--首页图片广告-->
|
||||
{if showSlider(2)}
|
||||
<div class="fly-panel" style="padding: 5px 0; text-align: center;">
|
||||
{volist name="ad_comm" id="vo"}
|
||||
<a href="{$vo.slid_href}" target="_blank"><img src="{$Request.domain}{$vo.slid_img}" style="max-width: 100%;"></a>
|
||||
{/volist}
|
||||
</div>
|
||||
{/if}
|
||||
<!--友情链接-->
|
||||
{if showSlider(9)}
|
||||
<div class="fly-panel fly-link html5plus-hide layui-hide-xs">
|
||||
{include file="public/flink" /}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{include file="public/menu" /}
|
||||
|
||||
{/block}
|
||||
|
||||
{block name="script"}
|
||||
<script>
|
||||
$('#friend-link').on('click', function(){
|
||||
layer.open({
|
||||
title: '申请友链',
|
||||
content: '发送邮件至:{$adminEmail} ',
|
||||
yes: function(index, layero){
|
||||
layer.close(index);
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
</script>
|
||||
{/block}
|
||||
{block name="script"}{/block}
|
@ -43,6 +43,7 @@
|
||||
{if strpos($Request.SERVER.HTTP_USER_AGENT,"Html5Plus") !== false} html body{margin-top: 1px;} {/if}
|
||||
</style>
|
||||
<script src="/static/share/plusShare.js" type="text/javascript" charset="utf-8"></script>
|
||||
{$sysInfo.showlist|raw}
|
||||
</head>
|
||||
<body >
|
||||
<script> if(navigator.userAgent.indexOf("Html5Plus") > -1) {document.body.classList.add("html5plus")} </script>
|
||||
|
@ -3,13 +3,9 @@
|
||||
<div class="footer-col footer-col-logo">
|
||||
<img src="{$sysInfo.logo}" alt="{$sysInfo.webname}"></div>
|
||||
<div class="footer-col footer-col-copy">
|
||||
<ul class="footer-nav layui-hide-xs">
|
||||
{volist name="footlinks" id="vo"}
|
||||
<li class="menu-item"><a href="{$vo.slid_href}" target="_blank">{$vo.slid_name}</a></li>
|
||||
{/volist}
|
||||
</ul>
|
||||
{:hook('ads_footer_link')}
|
||||
<div class="copyright">
|
||||
<span class="layui-hide"> v{:config('taoler.version')}</span> {$sysInfo.showlist|raw}
|
||||
<span class="layui-hide"> v{:config('taoler.version')}</span>
|
||||
<p>Copyright © {:date('Y')} {$sysInfo.copyright|raw} <a href="https://www.aieok.com" target="blank" title="TaoLerCMS" class="layui-hide">TaoLerCMS</a>
|
||||
<a href="https://beian.miit.gov.cn/" target="blank">{$sysInfo.icp}</a>
|
||||
</p>
|
||||
|
@ -7,23 +7,22 @@
|
||||
{//移动端LOGO}
|
||||
<a class="layui-hide-md layui-hide-sm" href="{$Request.domain}" ><img class="fly-logo-m" src="{$Request.domain}{$sysInfo.m_logo}" alt="logo"></a>
|
||||
<ul class="layui-nav fly-nav layui-hide-xs">
|
||||
{//导航nav}
|
||||
{volist name="cateList" id="cate"}
|
||||
<li class="layui-nav-item {if($cate.ename eq $Request.param.ename)} layui-this {/if}" >
|
||||
<a href="{$cate.url}">{:cookie('think_lang') == 'en-us' ? $cate.ename : $cate.catename} {if condition="$cate.is_hot eq 1"} <span class="layui-badge-dot"></span> {/if}</a>
|
||||
{notempty name="cate.children"}
|
||||
<dl class="layui-nav-child"> <!-- 二级菜单 -->
|
||||
{volist name="cate.children" id="vo2"}
|
||||
<dd><a href="{$vo2.url}">{$vo2.catename}</a></dd>
|
||||
{/volist}
|
||||
</dl>
|
||||
{/notempty}
|
||||
</li>
|
||||
{/volist}
|
||||
{// 后台自定义头部链接}
|
||||
{volist name="headlinks" id="vo"}
|
||||
<li class="layui-nav-item"><a href="{$vo.slid_href}" target="_blank"><i class="layui-icon {$vo.slid_img}"></i>{$vo.slid_name}</a></li>
|
||||
{/volist}
|
||||
{//导航nav}
|
||||
{taoler:nav}
|
||||
<li class="layui-nav-item {if condition='$nav.ename eq $Request.param.ename'} layui-this {/if}" >
|
||||
<a href="{nav:link}">{nav:title} {if condition="$nav.is_hot eq 1"} <span class="layui-badge-dot"></span> {/if}</a>
|
||||
{notempty name="nav.children"}
|
||||
<dl class="layui-nav-child"> <!-- 二级菜单 -->
|
||||
{taoler:snav}
|
||||
<dd><a href="{snav:link}">{snav:name}</a></dd>
|
||||
{/taoler:snav}
|
||||
</dl>
|
||||
{/notempty}
|
||||
</li>
|
||||
{/taoler:nav}
|
||||
|
||||
{// 后台自定义头部链接}
|
||||
{:hook('ads_header_link')}
|
||||
</ul>
|
||||
|
||||
{//头部右栏}
|
||||
|
@ -55,13 +55,7 @@
|
||||
<div class="layui-menu-body-title">菜单</div>
|
||||
<hr>
|
||||
<ul>
|
||||
{volist name="headlinks" id="vo"}
|
||||
<li class="">
|
||||
<div class="layui-menu-body-title">
|
||||
<a href="{$vo.slid_href}"><i class="layui-icon {$vo.slid_img}"></i><span> {$vo.slid_name} </span></a>
|
||||
</div>
|
||||
</li>
|
||||
{/volist}
|
||||
{:hook('ads_mobile_link')}
|
||||
<li class="">
|
||||
<div class="layui-menu-body-title">
|
||||
<a href="/">
|
||||
|
Loading…
Reference in New Issue
Block a user