begin of thinksaas 3.68

Signed-off-by: kevin <kevin@lmve.net>
This commit is contained in:
2023-06-22 13:33:25 +08:00
commit 963ec1b2ea
2746 changed files with 331806 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
<?php
defined('IN_TS') or die('Access Denied.');
//插件信息
return array(
'hook'=>'home_index_right', //钩子
'name' => '微博说',
'version' => '1.0',
'desc' => '微博说',
'url' => 'http://www.thinksaas.cn',
'email' => 'thinksaas@qq.com',
'author' => '邱君',
'author_url' => 'http://www.thinksaas.cn',
'isedit' => '0',
);
+76
View File
@@ -0,0 +1,76 @@
.weiform{}
.weiform form {
background: none repeat scroll 0 0 #0099FF;
border: 1px solid #0099FF;
margin: 0 0 10px;
height:36px;
width:100%;
position: relative;
overflow:hidden;
border-radius: 0px;
}
.weiform textarea {
background: none repeat scroll 0 0 #FFFFFF;
border: 0 none;
float: left;
font-size: 9pt;
height: 36px;
overflow: auto;
padding: 2px;
resize: none;
width: 80%;
}
.weiform input {
background: none repeat scroll 0 0 #0099FF;
border: 0 none;
color: #FFFFFF;
float: right;
font-size: 10pt;
height: 36px;
width: 20%;
cursor: pointer;
}
.weilist{}
.weilist ul, .weilist ul li{list-style: none;margin:0;padding:0;}
.weilist ul li {
border-bottom: 1px dashed #DDDDDD;
margin: 0 0 5px;
padding: 0 0 8px;
display: flex;
}
.weilist ul li .portrait {
padding-top: 3px;
width: 45px;
}
.weilist ul li .portrait img {
background: none repeat scroll 0 0 #FFFFFF;
height: 32px;
padding: 1px;
width: 32px;
}
.weilist ul li .body {
flex:1;
font-size: 9pt;
overflow: hidden;
}
.weilist ul li .user a {
}
.weilist ul li .log {
color: #999;
word-break: break-all;
}
.weilist ul li .time {
color: #9A9A9A;
display: block;
margin: 5px 0 0;
}
.weilist ul li .time a {
color: #9A9A9A;
text-decoration: none;
}
+48
View File
@@ -0,0 +1,48 @@
<div class="card">
<div class="card-header">唠唠叨叨</div>
<div class="card-body">
<div class="weibo">
<!--
<div class="weiform">
<form id="comm-form" method="post" action="{SITE_URL}index.php?app=weibo&ac=add">
<textarea name="title" placeholder="说点啥..."></textarea>
<input type="hidden" name="token" value="{$_SESSION['token']}" />
<input type="submit" value="发送" />
</form>
</div>
-->
<div class="mb-3">
<a class="btn btn-block btn-outline-info btn-lg" href="{tsUrl('weibo')}"><i class="bi bi-chat-dots"></i> 吐个槽,唠叨两句</a>
</div>
<div class="clear"></div>
<div class="weilist">
<ul id="weibolist">
{loop $arrWeibo $key $item}
<li>
<span class="portrait"><a href="{tsUrl('user','space',array('id'=>$item['user']['userid']))}"><img align="absmiddle" class="SmallPortrait rounded-circle" title="{$item['user']['username']}" alt="{$item['user']['username']}" src="{$item['user']['face']}"></a></span>
<div class="body">
<div>
<span class="user"><a href="{tsUrl('user','space',array('id'=>$item['user']['userid']))}">{$item['user']['username']}</a></span><span class="log">{$item['title']}</span>
</div>
{if $item['photo']}
<div class="d-flex">
{loop $item['photo'] $pkey $pitem}
<a class="w-25 p-1" href="{tsUrl('weibo','show',array('id'=>$item['weiboid']))}"><img class="w-100" src="{$pitem}"></a>
{/loop}
</div>
{/if}
<div class="time">{php echo getTime(strtotime($item['addtime']),time())} (<a href="{tsUrl('weibo','show',array('id'=>$item['weiboid']))}">{$item['count_comment']}评</a>)
</div>
</div>
<div class="clear"></div>
</li>
{/loop}
</ul>
</div>
</div>
</div>
</div>
+32
View File
@@ -0,0 +1,32 @@
function sendweibo(){
var title = $("#weibotitle").val();
if(title==''){
tsNotice('发布内容不能为空!');return false;
}
$("#weibosend").attr('disabled','disabled');
$.post(siteUrl+'index.php?app=weibo&ac=ajax&ts=add',{'title':title},function(rs){
if(rs==0){
tsNotice('请登陆后再发布唠叨!');
}else if(rs==1){
tsNotice('发布内容不能为空!');
}else if(rs==2){
$("#weibotitle").val('');
$("#weibosend").removeAttr('disabled');
weibolist();
}
});
}
function weibolist(){
$.get(siteUrl+'index.php?app=weibo&ac=ajax&ts=list',function(rs){
$("#weibolist").html(rs);
})
}
+28
View File
@@ -0,0 +1,28 @@
<?php
defined('IN_TS') or die('Access Denied.');
//首页登录框
function weibo(){
$arrWeibo = aac('weibo')->findAll('weibo',array(
'isaudit'=>0,
),'addtime desc',null,10);
foreach($arrWeibo as $key=>$item){
$arrWeibo[$key]['title'] = tsTitle($item['title']);
$arrWeibo[$key]['user'] = aac('user')->getSimpleUser($item['userid']);
$arrWeibo[$key]['photo'] = aac('weibo')->getWeiboPhoto($item['weiboid'],4);
}
include template('weibo','weibo');
}
function weibo_css(){
echo '<link href="'.SITE_URL.'plugins/home/weibo/style.css" rel="stylesheet" type="text/css" />';
}
function weibo_js(){
echo '<script src="'.SITE_URL.'plugins/home/weibo/weibo.js" type="text/javascript"></script>';
}
addAction('home_index_right','weibo');
addAction('pub_header_top','weibo_css');
addAction('pub_footer','weibo_js');