From eec60a63f212ae290d280b1d5fe8d3bda878fa3c Mon Sep 17 00:00:00 2001 From: Last <32554200+InvisibleFuture@users.noreply.github.com> Date: Thu, 15 Nov 2018 17:39:11 +0800 Subject: [PATCH] Add files via upload --- z_daisy/conf.json | 10 + z_daisy/hook/forum_js.htm | 21 + z_daisy/hook/forum_start.htm | 32 ++ z_daisy/hook/post_js.htm | 58 +++ z_daisy/hook/post_start.htm | 20 + z_daisy/hook/thread_js.htm | 21 + z_daisy/hook/thread_start.htm | 35 ++ z_daisy/icon.png | Bin 0 -> 3719 bytes z_daisy/overwrite/view/htms/footer.inc.htm | 53 +++ .../overwrite/view/htms/footer_nav.inc.htm | 17 + z_daisy/overwrite/view/htms/header.inc.htm | 51 +++ .../overwrite/view/htms/header_nav.inc.htm | 168 ++++++++ z_daisy/overwrite/view/htms/thread.htm | 284 ++++++++++++++ z_daisy/route/doc.htm | 146 +++++++ z_daisy/route/doc.php | 146 +++++++ z_daisy/route/upload.php | 151 ++++++++ z_daisy/view/css/bubble.css | 170 ++++++++ z_daisy/view/htm/doc.htm | 366 ++++++++++++++++++ z_nav/conf.json | 10 + z_nav/hook/footer_js_after.htm | 41 ++ z_nav/hook/header_link_after.htm | 28 ++ z_nav/icon.png | Bin 0 -> 3719 bytes z_postEx/conf.json | 10 + z_postEx/hook/footer_js_after.htm | 159 ++++++++ .../hook/post_list_inc_filelist_after.htm | 108 ++++++ z_postEx/install.php | 46 +++ z_postEx/main.js | 171 ++++++++ z_postEx/unstall.php | 16 + 28 files changed, 2338 insertions(+) create mode 100644 z_daisy/conf.json create mode 100644 z_daisy/hook/forum_js.htm create mode 100644 z_daisy/hook/forum_start.htm create mode 100644 z_daisy/hook/post_js.htm create mode 100644 z_daisy/hook/post_start.htm create mode 100644 z_daisy/hook/thread_js.htm create mode 100644 z_daisy/hook/thread_start.htm create mode 100644 z_daisy/icon.png create mode 100644 z_daisy/overwrite/view/htms/footer.inc.htm create mode 100644 z_daisy/overwrite/view/htms/footer_nav.inc.htm create mode 100644 z_daisy/overwrite/view/htms/header.inc.htm create mode 100644 z_daisy/overwrite/view/htms/header_nav.inc.htm create mode 100644 z_daisy/overwrite/view/htms/thread.htm create mode 100644 z_daisy/route/doc.htm create mode 100644 z_daisy/route/doc.php create mode 100644 z_daisy/route/upload.php create mode 100644 z_daisy/view/css/bubble.css create mode 100644 z_daisy/view/htm/doc.htm create mode 100644 z_nav/conf.json create mode 100644 z_nav/hook/footer_js_after.htm create mode 100644 z_nav/hook/header_link_after.htm create mode 100644 z_nav/icon.png create mode 100644 z_postEx/conf.json create mode 100644 z_postEx/hook/footer_js_after.htm create mode 100644 z_postEx/hook/post_list_inc_filelist_after.htm create mode 100644 z_postEx/install.php create mode 100644 z_postEx/main.js create mode 100644 z_postEx/unstall.php diff --git a/z_daisy/conf.json b/z_daisy/conf.json new file mode 100644 index 0000000..8b65c52 --- /dev/null +++ b/z_daisy/conf.json @@ -0,0 +1,10 @@ +{ + "name": "「雏菊」 - 主题", + "brief": "雏菊 - xiuno 4.0 主题", + "version": "1.0", + "bbs_version": "4.0", + "installed": 0, + "enable": 0, + "hooks_rank": [], + "dependencies": [] +} \ No newline at end of file diff --git a/z_daisy/hook/forum_js.htm b/z_daisy/hook/forum_js.htm new file mode 100644 index 0000000..5438145 --- /dev/null +++ b/z_daisy/hook/forum_js.htm @@ -0,0 +1,21 @@ + \ No newline at end of file diff --git a/z_daisy/hook/forum_start.htm b/z_daisy/hook/forum_start.htm new file mode 100644 index 0000000..87a132d --- /dev/null +++ b/z_daisy/hook/forum_start.htm @@ -0,0 +1,32 @@ + + + + + + + + + + + +
+
+
+ +
+ + +
+ + + +
\ No newline at end of file diff --git a/z_daisy/hook/post_js.htm b/z_daisy/hook/post_js.htm new file mode 100644 index 0000000..247b9dc --- /dev/null +++ b/z_daisy/hook/post_js.htm @@ -0,0 +1,58 @@ + \ No newline at end of file diff --git a/z_daisy/hook/post_start.htm b/z_daisy/hook/post_start.htm new file mode 100644 index 0000000..958f7f9 --- /dev/null +++ b/z_daisy/hook/post_start.htm @@ -0,0 +1,20 @@ +$tid,'isimage'=>2)); + if ($u==NULL){ $viewimg = '';} + else{ $viewimg = 'url('.$conf['upload_url'].'attach/'.$u['filename'].')'; } +?> + + + + + + + + + +
+
+

+
+
\ No newline at end of file diff --git a/z_daisy/hook/thread_js.htm b/z_daisy/hook/thread_js.htm new file mode 100644 index 0000000..706b159 --- /dev/null +++ b/z_daisy/hook/thread_js.htm @@ -0,0 +1,21 @@ + \ No newline at end of file diff --git a/z_daisy/hook/thread_start.htm b/z_daisy/hook/thread_start.htm new file mode 100644 index 0000000..c2dd68f --- /dev/null +++ b/z_daisy/hook/thread_start.htm @@ -0,0 +1,35 @@ + +
+ +$tid,'isimage'=>2)); + if ($u==NULL){ $viewimg = '';} + else{ $viewimg = 'url('.$conf['upload_url'].'attach/'.$u['filename'].')'; } +?> + + + + + + + +
+
+
+

+

12 月 23 日 2015 年 • 已有 3952 位童鞋围观过

+
+ + +
+ + + +
\ No newline at end of file diff --git a/z_daisy/icon.png b/z_daisy/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..dc21cf89e7f8129e99b36387bf9099e458e30512 GIT binary patch literal 3719 zcmaJ^c|4R|8y>P{Ymi+TcjIp&)DI%iR zo?W8PQr0L$ma+>`-{^gNzweK)?>WzNo^#Icx~}^^_qqN#G4@BT#e@}v0RVuQ&0z}% z?%#L&6XNCe0KVEZZZFTYbY(hHiOfJOod7VyQ#}bF8$YZU!GVCqv;12L#sI($FxknK z>58#K;i!HP>^24x?)qG5491SZIn;6KS?fkZwW zOeZ)7A9cb7```@m;DaV0;~*4Qz>mPhf`a^fDGXE)8vIii#T{=iL&2b*5T*|r{8v)0 z7<-U8l}-TZK@i$F7#t2lA|Y^HJtPu-0Hgzh>p)@L7pV=`Md=|?I{Ki$A22r>9Zy6# zSXliXi#tPuNlYdU1%(C%20{W65GvgZ3O6(~+}6<1(dHtw87vAD8>CHPsQyy0ATV%r zGL1>5Qb5~^SWoIXC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0*NRob(e8?KqtJ!@Ao z>azk1?tc(4^DJg8JIU?J5*yvY!*cZRZXmkZ9kTmNC- zwewE)nbh@IOr*A3M40oNucl6rlTRck->`*Gm&@r%TMY%p2*_X}Zx6HOR}b}RL80=BP)HkL;%3J!UM{~MKldCUL+ literal 0 HcmV?d00001 diff --git a/z_daisy/overwrite/view/htms/footer.inc.htm b/z_daisy/overwrite/view/htms/footer.inc.htm new file mode 100644 index 0000000..fb0a913 --- /dev/null +++ b/z_daisy/overwrite/view/htms/footer.inc.htm @@ -0,0 +1,53 @@ + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/z_daisy/overwrite/view/htms/footer_nav.inc.htm b/z_daisy/overwrite/view/htms/footer_nav.inc.htm new file mode 100644 index 0000000..074dcec --- /dev/null +++ b/z_daisy/overwrite/view/htms/footer_nav.inc.htm @@ -0,0 +1,17 @@ + + \ No newline at end of file diff --git a/z_daisy/overwrite/view/htms/header.inc.htm b/z_daisy/overwrite/view/htms/header.inc.htm new file mode 100644 index 0000000..89b224d --- /dev/null +++ b/z_daisy/overwrite/view/htms/header.inc.htm @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + ' : '' ;?> + + + + + + + + + + + + <?php echo $header['title'];?> + + + + + + + + + + + + + + + + + + +
+ + + + \ No newline at end of file diff --git a/z_daisy/overwrite/view/htms/header_nav.inc.htm b/z_daisy/overwrite/view/htms/header_nav.inc.htm new file mode 100644 index 0000000..15e78df --- /dev/null +++ b/z_daisy/overwrite/view/htms/header_nav.inc.htm @@ -0,0 +1,168 @@ + + + + + + \ No newline at end of file diff --git a/z_daisy/overwrite/view/htms/thread.htm b/z_daisy/overwrite/view/htms/thread.htm new file mode 100644 index 0000000..09ffd09 --- /dev/null +++ b/z_daisy/overwrite/view/htms/thread.htm @@ -0,0 +1,284 @@ + +
+ + + + + + + +
+
+ + + +
+
+
+ " tabindex="-1"> + + +
+
+ +

+ + + +

+ +
+
+ + + "> + + + + +
+
+ + + " class="text-grey m-r-1 post_update"> + + + + " href="javascript:void(0);" class="text-grey post_delete" isfirst="1"> + + +
+
+
+
+
+
+ + + + + + + + + + + + +

">

+ + + +
+
+ + +
+ + + + + + + + + + + + + + + + + + + +
+
+
+ () +
+
+ +
+
+
+ " tabindex="-1"> + + + +
" method="post" id="quick_reply_form"> + + + +
+
+
+
+
+
+ +
+
+
+
+
+ + + +
+
+ + " id="advanced_reply"> + +
+
+
+
+
+
+ + + + + + + + + + +
+
+ +
+ + "> + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + +
+
+ + + + + + + + 5)) { ?> + + + +
\ No newline at end of file diff --git a/z_daisy/route/doc.htm b/z_daisy/route/doc.htm new file mode 100644 index 0000000..7c34acb --- /dev/null +++ b/z_daisy/route/doc.htm @@ -0,0 +1,146 @@ + 128 AND message('subject', lang('subject_length_over_limit', array('maxlength'=>128))); + + $message = param('message', '', FALSE); + empty($message) AND message('message', lang('please_input_message')); + $doctype = param('doctype', 0); + $doctype > 10 AND message(-1, lang('doc_type_not_supported')); + xn_strlen($message) > 2028000 AND message('message', lang('message_too_long')); + + $thread = array ( + 'fid'=>$fid, + 'uid'=>$uid, + 'sid'=>$sid, + 'subject'=>$subject, + 'message'=>$message, + 'time'=>$time, + 'longip'=>$longip, + 'doctype'=>$doctype, + ); + + // hook thread_create_thread_before.php + + $tid = thread_create($thread, $pid); + $pid === FALSE AND message(-1, lang('create_post_failed')); + $tid === FALSE AND message(-1, lang('create_thread_failed')); + + // hook thread_create_thread_end.php + message(0, lang('create_thread_sucessfully')); + } + +// 帖子详情 | post detail +} else { + + // thread-{tid}-{page}-{keyword}.htm + $tid = param(1, 0); + $page = param(2, 1); + $keyword = param(3); + $pagesize = $conf['postlist_pagesize']; + //$pagesize = 10; + //$page == 1 AND $pagesize++; + + // hook thread_info_start.php + + $thread = thread_read($tid); + empty($thread) AND message(-1, lang('thread_not_exists'));; + + $fid = $thread['fid']; + $forum = forum_read($fid); + empty($forum) AND message(3, lang('forum_not_exists')); + + $postlist = post_find_by_tid($tid, $page, $pagesize); + empty($postlist) AND message(4, lang('post_not_exists')); + + if($page == 1) { + empty($postlist[$thread['firstpid']]) AND message(-1, lang('data_malformation')); + $first = $postlist[$thread['firstpid']]; + unset($postlist[$thread['firstpid']]); + $attachlist = $imagelist = $filelist = array(); + + // 如果是大站,可以用单独的点击服务,减少 db 压力 + // if request is huge, separate it from mysql server + thread_inc_views($tid); + } else { + $first = post_read($thread['firstpid']); + } + + $keywordurl = ''; + if($keyword) { + $thread['subject'] = post_highlight_keyword($thread['subject'], $keyword); + //$first['message'] = post_highlight_keyword($first['subject']); + $keywordurl = "-$keyword"; + } + $allowpost = forum_access_user($fid, $gid, 'allowpost') ? 1 : 0; + $allowupdate = forum_access_mod($fid, $gid, 'allowupdate') ? 1 : 0; + $allowdelete = forum_access_mod($fid, $gid, 'allowdelete') ? 1 : 0; + + forum_access_user($fid, $gid, 'allowread') OR message(-1, lang('user_group_insufficient_privilege')); + + $pagination = pagination(url("thread-$tid-{page}$keywordurl"), $thread['posts'] + 1, $page, $pagesize); + + $header['title'] = $thread['subject'].'-'.$forum['name'].'-'.$conf['sitename']; + //$header['mobile_title'] = lang('thread_detail'); + $header['mobile_title'] = $forum['name'];; + $header['mobile_link'] = url("forum-$fid"); + $header['keywords'] = ''; + $header['description'] = $thread['subject']; + $_SESSION['fid'] = $fid; + + // hook thread_info_end.php + include _include(APP_PATH.'plugin/z_doc/view/htm/doc.htm'); + +} + +// hook thread_end.php + +?> \ No newline at end of file diff --git a/z_daisy/route/doc.php b/z_daisy/route/doc.php new file mode 100644 index 0000000..7c34acb --- /dev/null +++ b/z_daisy/route/doc.php @@ -0,0 +1,146 @@ + 128 AND message('subject', lang('subject_length_over_limit', array('maxlength'=>128))); + + $message = param('message', '', FALSE); + empty($message) AND message('message', lang('please_input_message')); + $doctype = param('doctype', 0); + $doctype > 10 AND message(-1, lang('doc_type_not_supported')); + xn_strlen($message) > 2028000 AND message('message', lang('message_too_long')); + + $thread = array ( + 'fid'=>$fid, + 'uid'=>$uid, + 'sid'=>$sid, + 'subject'=>$subject, + 'message'=>$message, + 'time'=>$time, + 'longip'=>$longip, + 'doctype'=>$doctype, + ); + + // hook thread_create_thread_before.php + + $tid = thread_create($thread, $pid); + $pid === FALSE AND message(-1, lang('create_post_failed')); + $tid === FALSE AND message(-1, lang('create_thread_failed')); + + // hook thread_create_thread_end.php + message(0, lang('create_thread_sucessfully')); + } + +// 帖子详情 | post detail +} else { + + // thread-{tid}-{page}-{keyword}.htm + $tid = param(1, 0); + $page = param(2, 1); + $keyword = param(3); + $pagesize = $conf['postlist_pagesize']; + //$pagesize = 10; + //$page == 1 AND $pagesize++; + + // hook thread_info_start.php + + $thread = thread_read($tid); + empty($thread) AND message(-1, lang('thread_not_exists'));; + + $fid = $thread['fid']; + $forum = forum_read($fid); + empty($forum) AND message(3, lang('forum_not_exists')); + + $postlist = post_find_by_tid($tid, $page, $pagesize); + empty($postlist) AND message(4, lang('post_not_exists')); + + if($page == 1) { + empty($postlist[$thread['firstpid']]) AND message(-1, lang('data_malformation')); + $first = $postlist[$thread['firstpid']]; + unset($postlist[$thread['firstpid']]); + $attachlist = $imagelist = $filelist = array(); + + // 如果是大站,可以用单独的点击服务,减少 db 压力 + // if request is huge, separate it from mysql server + thread_inc_views($tid); + } else { + $first = post_read($thread['firstpid']); + } + + $keywordurl = ''; + if($keyword) { + $thread['subject'] = post_highlight_keyword($thread['subject'], $keyword); + //$first['message'] = post_highlight_keyword($first['subject']); + $keywordurl = "-$keyword"; + } + $allowpost = forum_access_user($fid, $gid, 'allowpost') ? 1 : 0; + $allowupdate = forum_access_mod($fid, $gid, 'allowupdate') ? 1 : 0; + $allowdelete = forum_access_mod($fid, $gid, 'allowdelete') ? 1 : 0; + + forum_access_user($fid, $gid, 'allowread') OR message(-1, lang('user_group_insufficient_privilege')); + + $pagination = pagination(url("thread-$tid-{page}$keywordurl"), $thread['posts'] + 1, $page, $pagesize); + + $header['title'] = $thread['subject'].'-'.$forum['name'].'-'.$conf['sitename']; + //$header['mobile_title'] = lang('thread_detail'); + $header['mobile_title'] = $forum['name'];; + $header['mobile_link'] = url("forum-$fid"); + $header['keywords'] = ''; + $header['description'] = $thread['subject']; + $_SESSION['fid'] = $fid; + + // hook thread_info_end.php + include _include(APP_PATH.'plugin/z_doc/view/htm/doc.htm'); + +} + +// hook thread_end.php + +?> \ No newline at end of file diff --git a/z_daisy/route/upload.php b/z_daisy/route/upload.php new file mode 100644 index 0000000..6e55cab --- /dev/null +++ b/z_daisy/route/upload.php @@ -0,0 +1,151 @@ +"; +echo $user['uid']; +echo "
"; +echo xn_rand(15) ; +echo "
"; +$n=3; +//function () { + + $str = '0123456789abcdefghijklmnopqrstuvwxyz'; + $len = strlen($str); + $return = ''; + for($i=0; $i<$n; $i++) { + $r = xn_rand(1, $len); + $return = $str[$r - 1]; + } + return $return; +//} + + + +/* +$fileName = $uid.'_'.xn_rand(15).".".$typea; + +$fileName = iconv('UTF-8', 'GB2312', $fileName); +$filePath = $targetDir . DIRECTORY_SEPARATOR . $fileName; +$uploadPath = $uploadDir . DIRECTORY_SEPARATOR . $fileName; + + +$imgUrl= $uploadDir."/".$fileName; +echo str_replace("../../","",$imgUrl); + +$chunk = isset($_REQUEST["chunk"]) ? intval($_REQUEST["chunk"]) : 0; +$chunks = isset($_REQUEST["chunks"]) ? intval($_REQUEST["chunks"]) : 1; + + + +if ($cleanupTargetDir) { + if (!is_dir($targetDir) || !$dir = opendir($targetDir)) { + die('{"jsonrpc" : "2.0", "error" : {"code": 100, "message": "Failed to open temp directory."}, "id" : "id"}'); + } + + while (($file = readdir($dir)) !== false) { + $tmpfilePath = $targetDir . DIRECTORY_SEPARATOR . $file; + + if ($tmpfilePath == "{$filePath}_{$chunk}.part" || $tmpfilePath == "{$filePath}_{$chunk}.parttmp") { + continue; + } + + if (preg_match('/\.(part|parttmp)$/', $file) && (@filemtime($tmpfilePath) < time() - $maxFileAge)) { + @unlink($tmpfilePath); + } + } + closedir($dir); +} + + + +if (!$out = @fopen("{$filePath}_{$chunk}.parttmp", "wb")) { + die('{"jsonrpc" : "2.0", "error" : {"code": 102, "message": "Failed to open output stream."}, "id" : "id"}'); +} + +if (!empty($_FILES)) { + if ($_FILES["file"]["error"] || !is_uploaded_file($_FILES["file"]["tmp_name"])) { + die('{"jsonrpc" : "2.0", "error" : {"code": 103, "message": "Failed to move uploaded file."}, "id" : "id"}'); + } + + if (!$in = @fopen($_FILES["file"]["tmp_name"], "rb")) { + die('{"jsonrpc" : "2.0", "error" : {"code": 101, "message": "Failed to open input stream."}, "id" : "id"}'); + } +} else { + if (!$in = @fopen("php://input", "rb")) { + die('{"jsonrpc" : "2.0", "error" : {"code": 101, "message": "Failed to open input stream."}, "id" : "id"}'); + } +} + +while ($buff = fread($in, 4096)) { + fwrite($out, $buff); +} + +@fclose($out); +@fclose($in); + +rename("{$filePath}_{$chunk}.parttmp", "{$filePath}_{$chunk}.part"); + +$index = 0; +$done = true; +for( $index = 0; $index < $chunks; $index++ ) { + if ( !file_exists("{$filePath}_{$index}.part") ) { + $done = false; + break; + } +} +if ( $done ) { + if (!$out = @fopen($uploadPath, "wb")) { + die('{"jsonrpc" : "2.0", "error" : {"code": 102, "message": "Failed to open output stream."}, "id" : "id"}'); + } + + if ( flock($out, LOCK_EX) ) { + for( $index = 0; $index < $chunks; $index++ ) { + if (!$in = @fopen("{$filePath}_{$index}.part", "rb")) { + break; + } + + while ($buff = fread($in, 4096)) { + fwrite($out, $buff); + } + + @fclose($in); + @unlink("{$filePath}_{$index}.part"); + } + + flock($out, LOCK_UN); + } + @fclose($out); +} + +*/ \ No newline at end of file diff --git a/z_daisy/view/css/bubble.css b/z_daisy/view/css/bubble.css new file mode 100644 index 0000000..2c9d3e8 --- /dev/null +++ b/z_daisy/view/css/bubble.css @@ -0,0 +1,170 @@ +/* 这是主视图的样式, 放进气泡的 CSS 文件以减少占用 */ +/*#masthead{box-shadow:0 .125rem .4375rem rgba(0,0,0,0.7);-webkit-box-shadow:0 .125rem .4375rem rgba(0,0,0,0.7)}*/ +#masthead{position:relative;display:table;text-align:center;width:100%;overflow:hidden;transition:all 1s;color:#fff;background-color:#1e1e1f} +#masthead::before {content: "";position: absolute;top: 0;bottom: 0;left: 0;right: 0;background-color: rgba(0, 0, 0, 0.3);} +#masthead::after {content: '';width: 150%;height: 4.375rem;background: #EEEEF2;left: -25%;bottom: -2.875rem;border-radius: 100%;position: absolute;} + +/* 标题 12px等于0.75rem*/ +.blog-title {font-size: 2.625rem;line-height: 1.5;margin-bottom: .5rem;font-weight: 200;} +.light{font-weight:300 !important} +.inner{display:table-cell;vertical-align:middle;position:relative;z-index:10;width:100%} + +.blog-description {font-size: .75rem;} +.blog-background.loading{opacity:0} +.blog-background{ + /*background-attachment: fixed;*/ + display:block; + width:100%;height:100%; + background-repeat:no-repeat; + background-size:cover; + background-position:center; + position:absolute; + left:0;top:0; + -webkit-filter: brightness(0.7); + -moz-filter: brightness(0.7); + -o-filter: brightness(0.7); + filter: brightness(0.7); + -webkit-transition:1s ease all; + -moz-transition:1s ease all; + -o-transition:1s ease all; + transition:5s ease all; + opacity:1 +} + + +/*! + * CSS source:https://iu.tn/archives/qi-pao-piao-fu.html + */ + + .bg-bubbles { +display:block; +position: absolute; +top: 0; +left: 0; +width: 100%; +height: 100%; +z-index: 1; + } + + ul,li { +margin: 0; +padding: 0; + } + + .bg-bubbles li { +position: absolute; +list-style: none; +display: block; +width: 40px; +height: 40px; +background-color: rgba(255,255,255,.07); +bottom: -160px; +-webkit-animation: square 25s infinite; +animation: square 25s infinite; +-webkit-transition-timing-function: linear; +transition-timing-function: linear; +border-radius: 5rem; + } + + .bg-bubbles li:nth-child(1) { +left: 10% + } + + .bg-bubbles li:nth-child(2) { +left: 20%; +width: 80px; +height: 80px; +-webkit-animation-delay: 200ms; +animation-delay: 200ms; +-webkit-animation-duration: 17s; +animation-duration: 17s + } + + .bg-bubbles li:nth-child(3) { +left: 25%; +-webkit-animation-delay: 400ms; +animation-delay: 400ms + } + + .bg-bubbles li:nth-child(4) { +left: 40%; +width: 60px; +height: 60px; +-webkit-animation-duration: 30s; +animation-duration: 30s; +background-color: rgba(255, 255, 255, .1) + } + + .bg-bubbles li:nth-child(5) { +left: 70% + } + + .bg-bubbles li:nth-child(6) { +left: 80%; +width: 80px; +height: 80px; +-webkit-animation-delay: 5s; +animation-delay: 5s; +background-color: rgba(255, 255, 255, .15) + } + + .bg-bubbles li:nth-child(7) { +left: 32%; +width: 60px; +height: 60px; +-webkit-animation-delay: 7s; +animation-delay: 7s + } + + .bg-bubbles li:nth-child(8) { +left: 55%; +width: 20px; +height: 20px; +-webkit-animation-delay: 15s; +animation-delay: 15s; +-webkit-animation-duration: 40s; +animation-duration: 40s + } + + .bg-bubbles li:nth-child(9) { +left: 25%; +width: 10px; +height: 10px; +-webkit-animation-delay: 2s; +animation-delay: 2s; +-webkit-animation-duration: 40s; +animation-duration: 40s; +background-color: rgba(255, 255, 255, .1) + } + + .bg-bubbles li:nth-child(10) { +left: 90%; +width: 80px; +height: 80px; +-webkit-animation-delay: 11s; +animation-delay: 11s + } + + @-webkit-keyframes square { +0% { + -webkit-transform: translateY(0); + transform: translateY(0) +} + +100% { + -webkit-transform: translateY(-700px) rotate(600deg); + transform: translateY(-700px) rotate(600deg) +} + } + + @keyframes square { +0% { + -webkit-transform: translateY(0); + transform: translateY(0) +} + +100% { + -webkit-transform: translateY(-700px) rotate(600deg); + transform: translateY(-700px) rotate(600deg) +} + } /* 漂浮 */ \ No newline at end of file diff --git a/z_daisy/view/htm/doc.htm b/z_daisy/view/htm/doc.htm new file mode 100644 index 0000000..d252119 --- /dev/null +++ b/z_daisy/view/htm/doc.htm @@ -0,0 +1,366 @@ + + + + + + + +
+
+ +
+ + "> + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + + +开始 + + $tagcate) { ?> + + + + + + + 结束 + + + + + + + +
+ +
+ + +
+ + + +
+ + + + + + +
+
+
+ " tabindex="-1"> + + +
+
+ +

+ + + +

+ +
+
+ + + "> + + + + +
+
+ + + " class="text-grey m-r-1 post_update"> + + + + " href="javascript:void(0);" class="text-grey post_delete" isfirst="1"> + + +
+
+
+
+
+
+ + + + + + + + + + + + +

">

+ + + +
+
+ + +
+ + + + + + + + + + + + + + + + + + + +
+
+
+ () +
+
+ +
+
+
+ " tabindex="-1"> + + + +
" method="post" id="quick_reply_form"> + + + +
+
+
+
+
+
+ +
+
+
+
+
+ + + +
+
+ + " id="advanced_reply"> + +
+
+
+
+
+
+ + + + + + + + + + +
+
+ + + + + + + + 5)) { ?> + + + \ No newline at end of file diff --git a/z_nav/conf.json b/z_nav/conf.json new file mode 100644 index 0000000..fdd947d --- /dev/null +++ b/z_nav/conf.json @@ -0,0 +1,10 @@ +{ + "name": "自动隐藏导航栏", + "brief": "这是针对有大图(横向全屏的 页面制作的显隐导航, 如果不打算放置顶部图片 可以注释掉footer_jsafter.htm的第三行", + "version": "1.0", + "bbs_version": "4.0", + "installed": 1, + "enable": 0, + "hooks_rank": [], + "dependencies": [] +} \ No newline at end of file diff --git a/z_nav/hook/footer_js_after.htm b/z_nav/hook/footer_js_after.htm new file mode 100644 index 0000000..a4e8358 --- /dev/null +++ b/z_nav/hook/footer_js_after.htm @@ -0,0 +1,41 @@ + \ No newline at end of file diff --git a/z_nav/hook/header_link_after.htm b/z_nav/hook/header_link_after.htm new file mode 100644 index 0000000..8d16e71 --- /dev/null +++ b/z_nav/hook/header_link_after.htm @@ -0,0 +1,28 @@ + \ No newline at end of file diff --git a/z_nav/icon.png b/z_nav/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..dc21cf89e7f8129e99b36387bf9099e458e30512 GIT binary patch literal 3719 zcmaJ^c|4R|8y>P{Ymi+TcjIp&)DI%iR zo?W8PQr0L$ma+>`-{^gNzweK)?>WzNo^#Icx~}^^_qqN#G4@BT#e@}v0RVuQ&0z}% z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Z(Hjmr^?oRkbk9JxQV1L$*;$_U+2*cej4y~ z2l+y-37c4#eYwm@&bb|%Z$>X2ThqNACBZ9e_^nVgMEg-fCsJDdf#D78?0pDH!^DV# zI=^C!bv7{GD;akc4SW$@YbhG##``kaF>&qW2_6&Gw@`%$&r$WTd(|CXR&K&lJ$v~_ zN`vztqXou>ha<@(UbUI3~V3Fg#B_8IJ zk^B(7bwb6XBAv$xw;#f`tth|J@ymuOCp4OjrAwQR!%@=>^RkhawrkXZf@{aUMt$_9 z1pw_MrgcNxqy`h|(oN5sCaXh7%S{icS4&*^kQI3LMRJDlX=0*NRob(e8?KqtJ!@Ao z>azk1?tc(4^DJg8JIU?J5*yvY!*cZRZXmkZ9kTmNC- zwewE)nbh@IOr*A3M40oNucl6rlTRck->`*Gm&@r%TMY%p2*_X}Zx6HOR}b}RL80=BP)HkL;%3J!UM{~MKldCUL+ literal 0 HcmV?d00001 diff --git a/z_postEx/conf.json b/z_postEx/conf.json new file mode 100644 index 0000000..f083b8a --- /dev/null +++ b/z_postEx/conf.json @@ -0,0 +1,10 @@ +{ + "name": "帖内回复", + "brief": "热点讨论,已经是大势所趋", + "version": "1.0", + "bbs_version": "4.0", + "installed": 1, + "enable": 0, + "hooks_rank": [], + "dependencies": [] +} \ No newline at end of file diff --git a/z_postEx/hook/footer_js_after.htm b/z_postEx/hook/footer_js_after.htm new file mode 100644 index 0000000..08959cf --- /dev/null +++ b/z_postEx/hook/footer_js_after.htm @@ -0,0 +1,159 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/z_postEx/hook/post_list_inc_filelist_after.htm b/z_postEx/hook/post_list_inc_filelist_after.htm new file mode 100644 index 0000000..2823fac --- /dev/null +++ b/z_postEx/hook/post_list_inc_filelist_after.htm @@ -0,0 +1,108 @@ + +
+
+ 03-14 + 一级回复 + +
+
+ + + +$_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'] = ''; +?> + +
+ " tabindex="-1"> + + + + Lv7 + + +
+
+ 03-14 + 二级回复按钮 + +
+
+ + + + +
+
+ + + +
+
+ +
+ + +
+ +

这标题不是化学,是哲学思索

+ +
+ #22 + 来自安卓客户端 + 45分钟前 + + + 回复 +
+
+ +
+
+ +
+
+ + + +
+
+ 美丽科学-BOS + + 科学的尽头是艺术更是哲学 没毛病 哈哈哈哈 +
+
+ 7分钟前 + + 回复 +
+
+ +
+
+
+
+
+ +
+ +
+
diff --git a/z_postEx/install.php b/z_postEx/install.php new file mode 100644 index 0000000..a733c60 --- /dev/null +++ b/z_postEx/install.php @@ -0,0 +1,46 @@ +tablepre; + +$sql = "CREATE TABLE IF NOT EXISTS {$tablepre}post_reply ( + pid int(11) unsigned NOT NULL DEFAULT '0', + rid int(11) unsigned NOT NULL AUTO_INCREMENT, + uid int(11) unsigned NOT NULL DEFAULT '0', + isfirst int(11) unsigned NOT NULL DEFAULT '0', + create_date int(11) unsigned NOT NULL DEFAULT '0', + userip int(11) unsigned NOT NULL DEFAULT '0', + message text NOT NULL DEFAULT '', + PRIMARY KEY (pid), + KEY (rid) +) ENGINE=MyISAM DEFAULT CHARSET=utf8"; +$r = db_exec($sql); + +/* + + + + +目前不使用缓存 +// 缓存 tagid 10000,10000,10000,10000 +$sql = "ALTER TABLE {$tablepre}thread ADD COLUMN tagids char(32) NOT NULL DEFAULT ''"; +$r = db_exec($sql); + +// 缓存的时间,用来和 setting('tag_update_time') 对比 +$sql = "ALTER TABLE {$tablepre}thread ADD COLUMN tagids_time int(11) unsigned NOT NULL DEFAULT '0'"; +$r = db_exec($sql); + +// tag 缓存的时间 +setting_set('tag_update_time', $time); + + +//$r === FALSE AND message(-1, '创建表结构失败'); +*/ +?> \ No newline at end of file diff --git a/z_postEx/main.js b/z_postEx/main.js new file mode 100644 index 0000000..4ee0273 --- /dev/null +++ b/z_postEx/main.js @@ -0,0 +1,171 @@ +/*表情添加*/ +function showEmoji(ele){ + var the_face=$(ele).closest('.face_top').next() + if(the_face.hasClass('emoji_section')){ + $(ele).removeClass("to_show"); + the_face.removeClass('emoji_section').find('ul').remove() + }else{ + $(ele).addClass("to_show").siblings().removeClass("to_show") + the_face.find('ul').remove() + the_face.removeClass('face_section emoji_section').addClass('emoji_section').append(show_emojis()) + } +} +function showFace(ele){ + var the_face=$(ele).closest('.face_top').next() + if(the_face.hasClass('face_section')){ + $(ele).removeClass("to_show"); + the_face.removeClass('face_section').find('ul').remove() + }else{ + $(ele).addClass("to_show").siblings().removeClass("to_show") + the_face.find('ul').remove() + the_face.removeClass('face_section emoji_section').addClass('face_section').append(show_faces()) + } +} +function show_emojis(){ + var faceList = [" (๑• . •๑) ", " ˋ( ° ▽、° ) ", " (^人^) ", " _(:3」∠)_ ", " →_→ ", " ←_← ", " (*^.^*) ", " ٩(๑`^´๑)۶ ", " ╮(╯_╰)╭ ", + " ヾ(′▽`*)ゝ ", " o(≧v≦)o~~ ", " ↖(^ω^)↗ ", " ヽ( ^∀^)ノ ", " ‵(*∩_∩*)′ ", " (/≧▽≦)/~ ", " ㄟ( ▔, ▔ )ㄏ ", + " ~( ̄▽ ̄~) ", " (~ ̄▽ ̄)~ ", " /(ㄒoㄒ)/~~ ", " (*/ω\*) ", " ≧▽≦蛤蛤蛤 ", " (°ー°〃) ", " ヾ( ̄▽ ̄) ", + " (╯°Д°)╯︵ ", " (☆ω☆) ", " \@_\@ ", " (*´艸`)、 ", " QAQ ", " (⊙o⊙) ", " (×_×)昏倒 ", " ( ˘•㉨•˘ ) ", + " ヾ(´(エ)`ノ゙ ", " ฅ( ̳• ◡ • ̳)ฅ ", " ⊙﹏⊙‖∣ ", " (。•ˇ‸ˇ•。) ", " ╭(╯^╰)╮ ", " ( •̀∀•́ ) ", " o(>﹏<)o ", + " (ˉ▽ ̄~) 切~~ ", " ⊙ω⊙ ", " =。=b ", " =3333= ", " (ง •̀_•́)ง ", " <(_ _)> ", " o( ̄ヘ ̄o#) ", " ヽ( ̄д ̄;)ノ ", + " ヽ(=^・ω・^=)丿 ", " ( ^_^ )/~~拜 ", " Orz ", " ♪(^∇^*) ", " (ฅ´ω`ฅ)留爪 ", " ( ´◔ ‸◔') ", " (*^.^*) ", " p(^_^)q ", + " ┗( T﹏T )┛ ", " (ˉ▽ˉ;) ", " Õ_Õ ", " 눈_눈 ", " o(一︿一+)o ", " (〃 ̄︶ ̄)人( ̄︶ ̄〃) "] + + var reply_display_emoji =''; + var emoji_li=''; + var len_emoji=faceList.length; + for (var i=0; i"+faceList[i]+ ""; + } + reply_display_emoji ='
    '+emoji_li+'
'; + return reply_display_emoji +} +function addFace(item, imgUlr) { + var $write_reply=$(item).closest('.add_icons').parent(); + var img_str = ""; + $write_reply.find('.in_write').append(img_str).focus() + $write_reply.find('.add_icons').removeClass('face_section').find('ul').remove() + $write_reply.find('.face_top li').removeClass() + placeCaretAtEnd($write_reply.find('.in_write').get(0)); +} +function addEmoji(item, str) { + var $write_reply=$(item).closest('.add_icons').parent(); + $write_reply.find('.in_write').append(str).focus() + $write_reply.find('.add_icons').removeClass('emoji_section').find('ul').remove() + $write_reply.find('.face_top li').removeClass('to_show') + placeCaretAtEnd($write_reply.find('.in_write').get(0)); +} + +function placeCaretAtEnd(el) { + el.focus(); + if (typeof window.getSelection != "undefined" + && typeof document.createRange != "undefined") { + var range = document.createRange(); + range.selectNodeContents(el); + range.collapse(false); + var sel = window.getSelection(); + sel.removeAllRanges(); + sel.addRange(range); + } else if (typeof document.body.createTextRange != "undefined") { + var textRange = document.body.createTextRange(); + textRange.moveToElementText(el); + textRange.collapse(false); + textRange.select(); + } +} + +//这是增加回复输入框的调用按钮触发 +function showReply(ele){ + var toReply=null + if ($(ele).closest('.more_reply_right').length>0) { + toReply="回复 @"+$(ele).closest('.more_reply_right').find('.user_reply_name').html()+":" + }else{ + toReply='' + } + var replyDiv="
"+ + "
"+ + "
"+toReply+"
"+ + "
"+ + "
"+ + "
    "+ + "
  • (・ω・)颜文字
  • "+ + "
  • "+ + "
"+ + "
取消发送
"+ + "
"+ + "
"+ + "
" + if ($(ele).parents().find('.write_reply').length>0) { + if ($(ele).closest('.user_reply_time').siblings('.write_reply').length>0) { + $(ele).parents().find('.write_reply').detach() + }else{ + $(ele).parents().find('.write_reply').detach() + $(replyDiv).insertAfter($(ele).closest('.user_reply_time')) + } + }else{ + $(replyDiv).insertAfter($(ele).closest('.user_reply_time')) + + placeCaretAtEnd($(ele).closest('.reply_right').find('.in_write').get(0)); + } + $('[contenteditable]').each(function() { + // 干掉IE http之类地址自动加链接 + try { + document.execCommand("AutoUrlDetect", false, false); + } catch (e) {} + + $(this).on('paste', function(e) { + e.preventDefault(); + var text = null; + + if(window.clipboardData && clipboardData.setData) { + // IE + text = window.clipboardData.getData('text'); + } else { + text = (e.originalEvent || e).clipboardData.getData('text/plain') || prompt('在这里输入文本'); + } + if (document.body.createTextRange) { + if (document.selection) { + textRange = document.selection.createRange(); + } else if (window.getSelection) { + sel = window.getSelection(); + var range = sel.getRangeAt(0); + + // 创建临时元素,使得TextRange可以移动到正确的位置 + var tempEl = document.createElement("span"); + tempEl.innerHTML = "&#FEFF;"; + range.deleteContents(); + range.insertNode(tempEl); + textRange = document.body.createTextRange(); + textRange.moveToElementText(tempEl); + tempEl.parentNode.removeChild(tempEl); + } + textRange.text = text; + textRange.collapse(false); + textRange.select(); + } else { + // Chrome之类浏览器 + document.execCommand("insertText", false, text); + } + }); + // 去除Crtl+b/Ctrl+i/Ctrl+u等快捷键 + $(this).on('keydown', function(e) { + // e.metaKey for mac + if (e.ctrlKey || e.metaKey) { + switch(e.keyCode){ + case 66: //ctrl+B or ctrl+b + case 98: + case 73: //ctrl+I or ctrl+i + case 105: + case 85: //ctrl+U or ctrl+u + case 117: { + e.preventDefault(); + break; + } + } + } + }); +}); +} +function cancelReply(ele){ + $(ele).closest('.write_reply').detach() +} diff --git a/z_postEx/unstall.php b/z_postEx/unstall.php new file mode 100644 index 0000000..caae13d --- /dev/null +++ b/z_postEx/unstall.php @@ -0,0 +1,16 @@ +tablepre; +$sql = "DROP TABLE IF EXISTS {$tablepre}post_reply;"; +$r = db_exec($sql); + +$r === FALSE AND message(-1, '卸载表失败'); + +?> \ No newline at end of file