Add files via upload
This commit is contained in:
159
z_postEx/hook/footer_js_after.htm
Normal file
159
z_postEx/hook/footer_js_after.htm
Normal file
@@ -0,0 +1,159 @@
|
||||
<!-- 独立的
|
||||
<div class="test">这是test</div>
|
||||
<p>这是p</p>
|
||||
<button onclick="afterText()">在图片后面添加文本</button>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<script>
|
||||
//确认上面已经引用过JQ库文件
|
||||
function afterText(){
|
||||
var txt1=$("<i></i>").text("love "); // 通过 jQuery 创建元素
|
||||
$(".test").after(txt1); // 在 img 之后插入新元素
|
||||
}
|
||||
</script>
|
||||
-->
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- 正式回复 -->
|
||||
|
||||
<!--script src="//www-static.diyidan.net/static/addface/js/main.js?v=f9faff63b439fec824edbde022b77397"></script-->
|
||||
<script src="plugin/z_post/main.js?v=f9faff63b439fec824edbde022b77397"></script>
|
||||
|
||||
|
||||
<!-- 二级回复中的一段 -->
|
||||
|
||||
<script type="text/javascript">
|
||||
/*二级回复*/
|
||||
function send_comment(item) {
|
||||
do_l2commit(item);
|
||||
/*if(getCookie('token_id') != null && getCookie('token_id')!=''){
|
||||
do_l2commit(item);
|
||||
}else{
|
||||
onlyLogin()
|
||||
}*/
|
||||
|
||||
|
||||
|
||||
//var p_inner_value = $('div.edit_container p.p_emoji_content')
|
||||
//发送Ajax请求
|
||||
}
|
||||
|
||||
function do_l2commit(item) {
|
||||
var comment_id = $(item).closest('.reply_right').find('.comment_id_hidden').val();
|
||||
var reply = getPcontentText($(item).closest('.write_reply').find('#write_container').get(0));
|
||||
var ajax_url = "/main/post/l2comment";
|
||||
var louzhu_id = "6293877835964134301";
|
||||
$.ajax({
|
||||
url: ajax_url, //登陆页面
|
||||
type: "POST",
|
||||
async: true,
|
||||
timeout: 3000,
|
||||
data: {
|
||||
"l1CommentId": comment_id,
|
||||
"comment": reply,
|
||||
"commentPage": parseInt('1', 10),
|
||||
},
|
||||
dataType: "json",
|
||||
error: function() {},
|
||||
success: function(data, status) { //如果调用成功
|
||||
// var jsonObject = JSON.parse(data);
|
||||
var code = data.code;
|
||||
if (code != 200) {
|
||||
if (data.message != null) {
|
||||
showMessagePopup(data.message);
|
||||
}
|
||||
} else {
|
||||
//TODO:后台会回传有多少二层回复的页数的
|
||||
var totalCount = data.data.totalCommentCount;
|
||||
var page_total_num = parseInt((totalCount - 1) / 10) + 1;
|
||||
$.ajax({
|
||||
url: "/main/post/l2comment",
|
||||
type: "GET",
|
||||
data: {
|
||||
"l1CommentId": comment_id,
|
||||
"page": page_total_num
|
||||
},
|
||||
async: true,
|
||||
timeout: 3000,
|
||||
dataType: "json",
|
||||
error: function() {},
|
||||
success: function(data, status) { //如果调用成功
|
||||
// var jsonObject = JSON.parse(data);
|
||||
var code = data.code;
|
||||
if (code != 200) {
|
||||
if (data.message != null) {
|
||||
showMessagePopup(data.message)
|
||||
}
|
||||
} else {
|
||||
displayAjaxL2commentList(item, $('script[type="text/template"]').html(), data.data, page_total_num, page_total_num, ajax_url, comment_id, louzhu_id);
|
||||
$(item).closest('.write_reply').remove();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- 底部js -->
|
||||
<script type="text/template">
|
||||
<li class="clr" {display_str}>
|
||||
<div class="user_ti f1">
|
||||
<img src="{avatar}" onclick="{url_to_user}">
|
||||
</div>
|
||||
<div class="more_reply_right f1">
|
||||
<div class="l2_comment user_name">
|
||||
<span class="user_reply_name" onclick="{url_to_user}">{nickName}</span>
|
||||
<span class="user_reply_level">Lv{level}</span> {louzhu_span}
|
||||
<p>: {commentContent}</p>
|
||||
<!--safe咋办-->
|
||||
</div>
|
||||
<div class="user_reply_time">
|
||||
|
||||
<span>{commentTime}</span>
|
||||
<span class="to_reply f2" onclick="showReply(this)">回复</span>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</script>
|
||||
<script type="text/templateCommentItem">
|
||||
{anchor_str}
|
||||
<li class="clr" style="margin-left:70px;position: relative">
|
||||
<div class="user_ti f1">
|
||||
<img src="{avatar}" onclick="{url_to_user}">
|
||||
</div>
|
||||
<div class="reply_right f1 " >
|
||||
<input type="hidden" name="comment_id_hidden" class="comment_id_hidden" value="{commentId}" data-floor-num="{commentFloorNum}" />
|
||||
<div class="user_name">
|
||||
<span onclick="{url_to_user}">{nickName}</span>
|
||||
<span class="user_reply_level">Lv{level}</span> {louzhu_span}
|
||||
<span class="f2 ie2">{commentFloorNum}楼</span>
|
||||
</div>
|
||||
|
||||
{pic_or_music_container_div}
|
||||
<ul class="more_user_reply">
|
||||
<div class="user_reply_time">
|
||||
{commentJudge_judgerRecommendStmt_div} {commentReward_rewardAmount_div}
|
||||
<span>{commentTime}</span>
|
||||
<span class="to_reply f2" onclick="showReply(this)">回复</span>
|
||||
<!--<span class="to_hide_reply f2" onclick="hidel2comments(this)">收起回复({commentl2TotalCount})</span>-->
|
||||
</div>
|
||||
{reply_li_container_div}
|
||||
</ul>
|
||||
{l2_comment_page_nav_div}
|
||||
</div>
|
||||
{commentJudge_judgeStampUrl_span} {commentReward_rewardStampUrl_span}
|
||||
</li>
|
||||
</script>
|
108
z_postEx/hook/post_list_inc_filelist_after.htm
Normal file
108
z_postEx/hook/post_list_inc_filelist_after.htm
Normal file
@@ -0,0 +1,108 @@
|
||||
<!-- 一级回复 -->
|
||||
<div class="reply_right f1 " >
|
||||
<div class="user_reply_time">
|
||||
<span>03-14</span>
|
||||
<span class="to_reply f2" onclick="showReply(this)" style="cursor:pointer">一级回复</span>
|
||||
<!--<span class="to_hide_reply f2" onclick="hidel2comments(this)">收起回复(1)</span>-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
//创建回复信息 直接从表中读取本次post的ID有多少回复
|
||||
$postreply = db_find('post_reply', array('pid'=>$_post['pid']), array('create_date'=>1));
|
||||
if($postreply) { foreach($postreply as $_posts) {
|
||||
//创建回复人的信息,每条回复都会被查询一遍似乎很消耗资源
|
||||
$userz = user_read_cache($_posts['uid']);
|
||||
$postz['username'] = array_value($userz, 'username');
|
||||
$postz['user_avatar_url'] = array_value($userz, 'avatar_url');
|
||||
$postz['user'] = $userz ? $userz : user_guest();
|
||||
!isset($postz['floor']) AND $postz['floor'] = '';
|
||||
?>
|
||||
<!-- 剩下的就是细化UI了 -->
|
||||
<br>
|
||||
<a href="<?php echo url("user-$_posts[uid]");?>" tabindex="-1">
|
||||
<img class="avatar" src="<?php echo $postz['user_avatar_url'];?>">
|
||||
</a>
|
||||
<?php echo $postz['username'];?>
|
||||
<span class="user_reply_level">Lv7</span>
|
||||
<?php echo $_posts['message'];?>
|
||||
<!-- 二级回复 -->
|
||||
<div class="reply_right f1 " >
|
||||
<div class="user_reply_time">
|
||||
<span>03-14</span>
|
||||
<span class="to_reply f2" onclick="showReply(this)" style="cursor:pointer">二级回复按钮</span>
|
||||
<!--<span class="to_hide_reply f2" onclick="hidel2comments(this)">收起回复(1)</span>-->
|
||||
</div>
|
||||
</div>
|
||||
<?php }} ?>
|
||||
|
||||
|
||||
<!-- 以下是全新的 POST -->
|
||||
<div class="list-item reply-wrap" data-id="461068570" data-index="0">
|
||||
<div class="user-face">
|
||||
<a href='<?php echo url("user-$_posts[uid]");?>' target="_blank" data-usercard-mid="14589321">
|
||||
<img src="<?php echo $postz['user_avatar_url'];?>" alt="">
|
||||
</a>
|
||||
</div>
|
||||
<div class="con ">
|
||||
|
||||
<div class="user">
|
||||
<a data-usercard-mid="14589321" href='<?php echo url("user-$_posts[uid]");?>' target="_blank" class="name "><?php echo $postz['username'];?></a>
|
||||
<a href="//www.bilibili.com/html/help.html#k_3" target="_blank"><i class="level l4"></i></a>
|
||||
</div>
|
||||
|
||||
<p class="text">这标题不是化学,是哲学<img src="//i0.hdslb.com/bfs/vip/f8219e484d5a55787c3f1722dc3112d0eba03a69.png@50w_50h.webp" alt="思索"></p>
|
||||
|
||||
<div class="info">
|
||||
<span class="floor">#22</span>
|
||||
<span class="plad">来自<a href="//app.bilibili.com/" target="_blank">安卓客户端</a></span>
|
||||
<span class="time">45分钟前</span>
|
||||
<span class="like "><i></i><span>2</span></span>
|
||||
<span class="hate "><i></i></span>
|
||||
<span class="reply btn-hover btn-highlight">回复</span>
|
||||
<div class="operation">
|
||||
<div class="spot"></div>
|
||||
<div class="opera-list" style="display: none;">
|
||||
<ul>
|
||||
<li class="blacklist">加入黑名单</li>
|
||||
<li class="report">举报</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="reply-box">
|
||||
<div class="reply-item reply-wrap" data-id="461092529" data-index="0">
|
||||
<a href="//space.bilibili.com/43646124" data-usercard-mid="43646124" target="_blank" class="reply-face">
|
||||
<img src="//i0.hdslb.com/bfs/face/ba27db05e3f0808b8ee0f19c817fb6219cf9e921.jpg@52w_52h.webp" alt="">
|
||||
</a>
|
||||
<div class="reply-con">
|
||||
<div class="user">
|
||||
<a href="//space.bilibili.com/43646124" target="_blank" data-usercard-mid="43646124" class="name ">美丽科学-BOS</a>
|
||||
<a href="//www.bilibili.com/html/help.html#k_3" target="_blank"><i class="level l5"></i></a>
|
||||
<span class="text-con">科学的尽头是艺术更是哲学 没毛病 哈哈哈哈</span>
|
||||
</div>
|
||||
<div class="info">
|
||||
<span class="time">7分钟前</span>
|
||||
<span class="like "><i></i><span></span></span>
|
||||
<span class="reply btn-hover">回复</span>
|
||||
<div class="operation btn-hover btn-hide-re">
|
||||
<div class="spot"></div>
|
||||
<div class="opera-list" style="display: none;">
|
||||
<ul>
|
||||
<li class="blacklist">加入黑名单</li>
|
||||
<li class="report">举报</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="paging-box"></div>
|
||||
|
||||
</div>
|
||||
</div>
|
Reference in New Issue
Block a user