123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657 |
- <!DOCTYPE HTML>
- <html lang="" >
- <head>
- <title>排行榜 · GitBook</title>
- <meta charset="UTF-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge" />
- <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
- <meta name="description" content="">
- <meta name="generator" content="GitBook 3.2.0">
-
-
-
-
- <link rel="stylesheet" href="../gitbook/style.css">
-
-
-
- <link rel="stylesheet" href="../gitbook/gitbook-plugin-prism/prism.css">
-
-
-
- <link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css">
-
-
-
- <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
-
-
-
-
-
-
- <link rel="stylesheet" href="../styles/website.css">
-
-
-
-
-
- <meta name="HandheldFriendly" content="true"/>
- <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
- <meta name="apple-mobile-web-app-capable" content="yes">
- <meta name="apple-mobile-web-app-status-bar-style" content="black">
- <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
- <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">
-
- <link rel="next" href="dwvideo.html" />
-
-
- <link rel="prev" href="piclist.html" />
-
- </head>
- <body>
-
- <div class="book">
- <div class="book-summary">
-
-
- <div id="book-search-input" role="search">
- <input type="text" placeholder="Type to search" />
- </div>
-
- <nav role="navigation">
-
- <ul class="summary">
-
-
-
-
-
-
-
- <li class="chapter " data-level="1.1" data-path="../">
-
- <a href="../">
-
-
- Introduction
-
- </a>
-
-
- </li>
-
- <li class="chapter " data-level="1.2" data-path="../new/new.html">
-
- <a href="../new/new.html">
-
-
- 新人入职后需要做的工作
-
- </a>
-
-
- </li>
-
- <li class="chapter " data-level="1.3" data-path="../host/host.html">
-
- <a href="../host/host.html">
-
-
- 常用HOST
-
- </a>
-
-
- </li>
-
- <li class="chapter " data-level="1.4" data-path="../workflow/workflow.html">
-
- <a href="../workflow/workflow.html">
-
-
- 前端工作流配置
-
- </a>
-
-
- </li>
-
- <li class="chapter " data-level="1.5" >
-
- <span>
-
-
- 多玩SVN和常用页面
-
- </span>
-
-
- <ul class="articles">
-
-
- <li class="chapter " data-level="1.5.1" data-path="../svn/address.html">
-
- <a href="../svn/address.html">
-
-
- svn及常用地址
-
- </a>
-
-
- </li>
-
- <li class="chapter " data-level="1.5.2" data-path="../svn/">
-
- <a href="../svn/">
-
-
- svn目录介绍
-
- </a>
-
-
- </li>
-
- </ul>
-
- </li>
-
- <li class="chapter " data-level="1.6" data-path="./">
-
- <a href="./">
-
-
- 发布器简介
-
- </a>
-
-
- <ul class="articles">
-
-
- <li class="chapter " data-level="1.6.1" data-path="all.html">
-
- <a href="all.html">
-
-
- 发布器调用大全
-
- </a>
-
-
- </li>
-
- <li class="chapter " data-level="1.6.2" >
-
- <span>
-
-
- 实用技巧
-
- </span>
-
-
- <ul class="articles">
-
-
- <li class="chapter " data-level="1.6.2.1" data-path="locate.html">
-
- <a href="locate.html">
-
-
- 定位相关
-
- </a>
-
-
- </li>
-
- <li class="chapter " data-level="1.6.2.2" data-path="quote.html">
-
- <a href="quote.html">
-
-
- 引用模板
-
- </a>
-
-
- </li>
-
- <li class="chapter " data-level="1.6.2.3" data-path="addredss.html">
-
- <a href="addredss.html">
-
-
- 预览地址和正式地址
-
- </a>
-
-
- </li>
-
- <li class="chapter " data-level="1.6.2.4" data-path="flesh.html">
-
- <a href="flesh.html">
-
-
- 刷新模板
-
- </a>
-
-
- </li>
-
- </ul>
-
- </li>
-
- <li class="chapter " data-level="1.6.3" >
-
- <span>
-
-
- 常用语法
-
- </span>
-
-
- <ul class="articles">
-
-
- <li class="chapter " data-level="1.6.3.1" data-path="alert.html">
-
- <a href="alert.html">
-
-
- 语法核心
-
- </a>
-
-
- </li>
-
- <li class="chapter " data-level="1.6.3.2" data-path="piclist.html">
-
- <a href="piclist.html">
-
-
- 图片列表
-
- </a>
-
-
- </li>
-
- <li class="chapter active" data-level="1.6.3.3" data-path="rank.html">
-
- <a href="rank.html">
-
-
- 排行榜
-
- </a>
-
-
- </li>
-
- <li class="chapter " data-level="1.6.3.4" data-path="dwvideo.html">
-
- <a href="dwvideo.html">
-
-
- 多玩视频
-
- </a>
-
-
- </li>
-
- <li class="chapter " data-level="1.6.3.5" data-path="huyavideo.html">
-
- <a href="huyavideo.html">
-
-
- 虎牙视频
-
- </a>
-
-
- </li>
-
- </ul>
-
- </li>
-
- <li class="chapter " data-level="1.6.4" data-path="special.html">
-
- <a href="special.html">
-
-
- 专区嵌套
-
- </a>
-
-
- <ul class="articles">
-
-
- <li class="chapter " data-level="1.6.4.1" data-path="./">
-
- <a href="./">
-
-
- 首页
-
- </a>
-
-
- </li>
-
- <li class="chapter " data-level="1.6.4.2" data-path="tag.html">
-
- <a href="tag.html">
-
-
- 标签和标签图
-
- </a>
-
-
- </li>
-
- <li class="chapter " data-level="1.6.4.3" data-path="art.html">
-
- <a href="art.html">
-
-
- 文章页
-
- </a>
-
-
- </li>
-
- </ul>
-
- </li>
-
- </ul>
-
- </li>
-
- <li class="chapter " data-level="1.7" data-path="../duowan/">
-
- <a href="../duowan/">
-
-
- 多玩网
-
- </a>
-
-
- </li>
-
- <li class="chapter " data-level="1.8" data-path="../box/">
-
- <a href="../box/">
-
-
- 盒子
-
- </a>
-
-
- <ul class="articles">
-
-
- <li class="chapter " data-level="1.8.1" data-path="../box/lolbox.html">
-
- <a href="../box/lolbox.html">
-
-
- LOL盒子
-
- </a>
-
-
- </li>
-
- </ul>
-
- </li>
-
- <li class="chapter " data-level="1.9" data-path="../book/README.html">
-
- <span>
-
-
- 文档制作简介
-
- </a>
-
-
- </li>
-
-
- <li class="divider"></li>
- <li>
- <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
- Published with GitBook
- </a>
- </li>
- </ul>
- </nav>
-
-
- </div>
- <div class="book-body">
-
- <div class="body-inner">
-
-
- <div class="book-header" role="navigation">
-
- <!-- Title -->
- <h1>
- <i class="fa fa-circle-o-notch fa-spin"></i>
- <a href=".." >排行榜</a>
- </h1>
- </div>
- <div class="page-wrapper" tabindex="-1" role="main">
- <div class="page-inner">
-
- <div id="book-search-results">
- <div class="search-noresults">
-
- <section class="normal markdown-section">
-
- <h1 id="排行榜">排行榜</h1><h2 id="调用语法参数说明">调用语法参数说明</h2><table>
- <thead>
- <tr><th>名字</th>
- <th>描述</th>
- <th>备注</th>
- </tr></thead><tbody>
- <tr><td>频道id/频道中文名</td>
- <td>专区名字或中文名</td>
- <td></td>
- </tr><tr><td>tag</td>
- <td>获取排名的标签</td>
- <td></td>
- </tr><tr><td>start</td>
- <td>开始的位置</td>
- <td></td>
- </tr><tr><td>len</td>
- <td>获取的数量</td>
- <td></td>
- </tr><tr><td>startTime</td>
- <td>文章发表开始时间</td>
- <td>可用具体日期,格式是:yyyy-MM-dd 如:2011-01-01;或者相对日期 $tools.getNDateBefore(n) 前n天 可以为0或者负数,负数代表今天后,0代表今天,1代表昨天的0时</td>
- </tr><tr><td>endTime</td>
- <td>文章发表结束时间</td>
- <td>可用具体日期,格式是:yyyy-MM-dd 如: 2011-01-01;或者相对日期 $tools.getNDateLater(n) n天后 可以为0或者负数,负数代表今天前,0代表今天,1代表明天的0时</td>
- </tr><tr><td>统计类型</td>
- <td>按什么排名</td>
- <td>可选“day_statistic_article”,“week_statistic_article”,“month_statistic_article” ,分别是按天,按周,按月</td>
- </tr></tbody></table>
- <pre><code>按天排名
- $data.getVoteRankDataByArticle(频道id/频道中文名,tag,start,len,"$tools.getNDateBefore(1)","$tools.getNDateLater(1)","day_statistic_article")
- 按周排名
- $data.getVoteRankDataByArticle(频道id/频道中文名,tag,start,len,"$tools.getNDateBefore(6)","$tools.getNDateLater(1)","week_statistic_article")
- 按月排名
- $data.getVoteRankDataByArticle(频道id/频道中文名,tag,start,len,"$tools.getNDateBefore(30)","$tools.getNDateLater(1)","month_statistic_article")</code></pre>
- <h2 id="代码示例">代码示例</h2><pre><code>#set ($channelid='首页')
- #foreach($one in $data.getVoteRankDataByArticle("lol","重点",0,10,"$tools.getNDateBefore(1)","$tools.getNDateLater(1)","day_statistic_article"))
- #set ($reallink=$data.getUrl($channelid,$one.getString("articleid")))
- #set ($title=$one.getString("title"))
- #set ($sum=$one.sum)
- #set ($author=$one.getString('author'))
- <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>li</span><span class="token punctuation">></span></span>
- <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>a</span> <span class="token attr-name">href</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>$reallink<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>$title<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>a</span><span class="token punctuation">></span></span>
- <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>span</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>num<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>$sum<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>span</span><span class="token punctuation">></span></span>
- <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>span</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>author<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>$author<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>span</span><span class="token punctuation">></span></span>
- <span class="token tag"><span class="token tag"><span class="token punctuation"></</span>li</span><span class="token punctuation">></span></span>
- #end</code></pre>
-
- </section>
-
- </div>
- <div class="search-results">
- <div class="has-results">
-
- <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
- <ul class="search-results-list"></ul>
-
- </div>
- <div class="no-results">
-
- <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
-
- </div>
- </div>
- </div>
- </div>
- </div>
-
- </div>
-
-
- <a href="piclist.html" class="navigation navigation-prev " aria-label="Previous page: 图片列表">
- <i class="fa fa-angle-left"></i>
- </a>
-
-
- <a href="dwvideo.html" class="navigation navigation-next " aria-label="Next page: 多玩视频">
- <i class="fa fa-angle-right"></i>
- </a>
-
-
-
- </div>
- <script>
- var gitbook = gitbook || [];
- gitbook.push(function() {
- gitbook.page.hasChanged({"page":{"title":"排行榜","level":"1.6.3.3","depth":3,"next":{"title":"多玩视频","level":"1.6.3.4","depth":3,"path":"cms/dwvideo.md","ref":"cms/dwvideo.md","articles":[]},"previous":{"title":"图片列表","level":"1.6.3.2","depth":3,"path":"cms/piclist.md","ref":"cms/piclist.md","articles":[]},"dir":"ltr"},"config":{"plugins":["prism","-highlight"],"styles":{"website":"styles/website.css"},"pluginsConfig":{"prism":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":false,"twitter":false,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":[]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"level_number":true,"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"links":{"sharing":{"all":false,"google":false,"facebook":false,"twitter":false,"weibo":false}},"gitbook":"3.2.0"},"file":{"path":"cms/rank.md","mtime":"2016-11-24T06:09:45.000Z","type":"markdown"},"gitbook":{"version":"3.2.0","time":"2018-03-19T02:13:33.701Z"},"basePath":"..","book":{"language":""}});
- });
- </script>
- </div>
-
- <script src="../gitbook/gitbook.js"></script>
- <script src="../gitbook/theme.js"></script>
-
-
- <script src="../gitbook/gitbook-plugin-search/search-engine.js"></script>
-
-
-
- <script src="../gitbook/gitbook-plugin-search/search.js"></script>
-
-
-
- <script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
-
-
-
- <script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
-
-
-
- <script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script>
-
-
-
- <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
-
-
- </body>
- </html>
|