@@ -93,39 +93,116 @@ <h1 id="h_title">{{$wiki_page.title}}
93
93
</ article >
94
94
< hr />
95
95
<!-- Duoshuo Comment BEGIN -->
96
- < div class ="ds-thread " data-thread-key ="wiki-{{$wiki_page.id}} " data-title ="{{$wiki_page.title}} "
97
- data-url ="http://wiki.swoole.com/wiki/page/{{$wiki_page.id}}.html "> </ div >
96
+ {{if $wiki_page.close_comment == 0}}
97
+ < div class ="ds-thread " data-thread-key ="wiki-106 " data-title ="Swoole扩展 "
98
+ data-url ="http://wiki.swoole.com/wiki/page/106.html " id ="ds-thread ">
99
+ < div id ="ds-reset ">
100
+ < div class ="ds-meta "> < a href ="javascript:void(0) "
101
+ class ="ds-like-thread-button ds-rounded ds-thread-liked "> < span
102
+ class ="ds-icon ds-icon-heart "> </ span > < span class ="ds-thread-like-text "> 已喜欢</ span > < span
103
+ class ="ds-thread-cancel-like "> 取消喜欢</ span > </ a > < span class ="ds-like-panel "> < span
104
+ class ="ds-highlight "> {{$thread.likes}}</ span > 人喜欢</ span > </ div >
105
+ < div class ="ds-comments-info ">
106
+ < div class ="ds-sort "> < a class ="ds-order-desc "> 最新</ a > < a class ="ds-order-asc ds-current "> 最早</ a > < a
107
+ class ="ds-order-hot "> 最热</ a > </ div >
108
+ < ul class ="ds-comments-tabs ">
109
+ < li class ="ds-tab "> < a class ="ds-comments-tab-duoshuo ds-current "
110
+ href ="javascript:void(0); "> < span class ="ds-highlight "> {{$comments|@count}}</ span > 条评论</ a >
111
+ </ li >
112
+ </ ul >
113
+ </ div >
114
+
115
+ < ul class ="ds-comments ">
116
+ {{foreach item=v from=$comments}}
117
+ < li class ="ds-post " >
118
+ < div class ="ds-post-self ">
119
+ < div class ="ds-avatar " data-user-id ="8435783 "> < a rel ="nofollow author " target ="_blank "
120
+ href ="{{$v.author_url}} "
121
+ title ="{{$v.author_name}} "> < img
122
+ src ="https://wiki.swoole.com/static/images/default.png "
123
+ alt ="{{$v.author_name}} "> </ a > </ div >
124
+ < div class ="ds-comment-body ">
125
+ < div class ="ds-comment-header "> < a class ="ds-user-name ds-highlight " data-qqt-account =""
126
+ href ="{{$v.author_url}} "
127
+ rel ="nofollow " target ="_blank " data-user-id ="8435783 "> {{$v.author_name}}</ a >
128
+ </ div >
129
+ < p > {{$v.message}}</ p >
130
+
131
+ < div class ="ds-comment-footer ds-comment-actions "> < span class ="ds-time "> {{$v.created_at|substr:0:10}}</ span > < a
132
+ class ="ds-post-reply " href ="javascript:void(0); "> < span
133
+ class ="ds-icon ds-icon-reply "> </ span > 回复</ a > < a class ="ds-post-likes "
134
+ href ="javascript:void(0); "> < span
135
+ class ="ds-icon ds-icon-like "> </ span > 顶</ a > < a class ="ds-post-repost "
136
+ href ="javascript:void(0); ">
137
+ </ div >
138
+ </ div >
139
+ </ li >
140
+ {{/foreach}}
141
+ </ ul >
142
+ < div class ="ds-paginator " style ="display: none; ">
143
+ < div class ="ds-border "> </ div >
144
+ < a data-page ="1 " href ="javascript:void(0); " class ="ds-current "> 1</ a > </ div >
145
+ < div class ="ds-toolbar ">
146
+ < div class ="ds-account-control "> < span class ="ds-icon ds-icon-settings "> </ span > < span > 帐号管理</ span >
147
+ < ul >
148
+ < li > < a class ="ds-bind-more " href ="javascript:void(0); " style ="border-top: none "> 绑定更多</ a >
149
+ </ li >
150
+ < li > < a target ="_blank " href ="http://duoshuo.com/settings/ "> 设置</ a > </ li >
151
+ < li > < a rel ="nofollow " href ="http://www4swoole.duoshuo.com/logout/ "
152
+ style ="border-bottom: none "> 登出</ a > </ li >
153
+ </ ul >
154
+ </ div >
155
+ < div class ="ds-visitor "> < a class ="ds-visitor-name " href ="http://weibo.com/hantianfeng "
156
+ target ="_blank "> Rango-韩天峰</ a > < a class ="ds-unread-comments-count "
157
+ href ="javascript:void(0); " title ="你没有新回复 "
158
+ style ="display: none; "> 0</ a > </ div >
159
+ </ div >
160
+ < div class ="ds-replybox "> < a class ="ds-avatar " href ="http://duoshuo.com/settings/avatar/ " target ="_blank "
161
+ title ="设置头像 "> < img
162
+ src ="http://tva4.sinaimg.cn/crop.1.1.561.561.50/3fecf63djw8f7t533npdhj20g00i5dgz.jpg "
163
+ alt ="Rango-韩天峰 "> </ a >
164
+
165
+ < form method ="post "> < input type ="hidden " name ="thread_id " value ="1163167853466092117 ">
166
+ < input type ="hidden " name ="parent_id " value ="">
167
+ < input type ="hidden " name ="nonce " value ="573edf51578e7 ">
168
+
169
+ < div class ="ds-textarea-wrapper ds-rounded-top "> < textarea name ="message " title ="Ctrl+Enter快捷提交 "
170
+ placeholder ="说点什么吧… "> </ textarea >
171
+ < pre class ="ds-hidden-text "> </ pre >
172
+ </ div >
173
+ < div class ="ds-post-toolbar ">
174
+ < div class ="ds-post-options ds-gradient-bg "> < span class ="ds-sync "> < input
175
+ id ="ds-sync-checkbox " type ="checkbox " name ="repost " checked ="checked " value ="weibo "> < label
176
+ for ="ds-sync-checkbox "> 分享到:</ label > < a href ="javascript:void(0) "
177
+ class ="ds-service-icon ds-weibo "
178
+ data-service ="weibo " title ="新浪微博 "> </ a > </ span >
179
+ </ div >
180
+ < button class ="ds-post-button " type ="submit "> 发布</ button >
181
+ < div class ="ds-toolbar-buttons "> < a class ="ds-toolbar-button ds-add-emote " title ="插入表情 "> </ a >
182
+ </ div >
183
+ </ div >
184
+ </ form >
185
+ </ div >
186
+ </ div >
187
+ </ div >
188
+ < link href ="/static/css/duoshuo.css " rel ="stylesheet ">
189
+ {{/if}}
98
190
< script type ="text/javascript ">
99
191
var _bdhmProtocol = ( ( "https:" == document . location . protocol ) ? "https://" : "http://" ) ;
100
- // {{if $wiki_page.close_comment=='0' and $project.close_comment=='0'}}
101
192
102
- var duoshuoQuery = { short_name :"www4swoole" } ;
103
- ( function ( ) {
104
- var ds = document . createElement ( 'script' ) ;
105
- ds . type = 'text/javascript' ;
106
- ds . async = true ;
107
- ds . src = _bdhmProtocol + 'static.duoshuo.com/embed.js' ;
108
- ds . charset = 'UTF-8' ;
109
- ( document . getElementsByTagName ( 'head' ) [ 0 ]
110
- || document . getElementsByTagName ( 'body' ) [ 0 ] ) . appendChild ( ds ) ;
111
- $ ( ds ) . ready ( function ( ) {
112
- var resize_count = 0 ;
113
- var timer = setInterval ( function ( ) {
114
- if ( $ ( 'div#ds-thread' ) [ 0 ] . clientHeight < 100 ) {
115
- return ;
116
- }
117
- var a = $ ( "#sidebar" ) [ 0 ] ;
118
- var b = $ ( "div.wiki_content" ) [ 0 ] ;
119
- if ( a . clientHeight < b . clientHeight ) {
120
- a . style . height = ( b . clientHeight + 2 ) + "px" ;
121
- } else {
122
- b . style . height = ( a . clientHeight + 2 ) + "px" ;
123
- }
124
- window . clearInterval ( timer ) ;
125
- } , 300 ) ;
126
- } ) ;
127
- } ) ( ) ;
128
- // {{/if}}
193
+ $ ( document ) . ready ( function ( ) {
194
+ var resize_count = 0 ;
195
+ var timer = setInterval ( function ( ) {
196
+ var a = $ ( "#sidebar" ) [ 0 ] ;
197
+ var b = $ ( "div.wiki_content" ) [ 0 ] ;
198
+ if ( a . clientHeight < b . clientHeight ) {
199
+ a . style . height = ( b . clientHeight + 2 ) + "px" ;
200
+ } else {
201
+ b . style . height = ( a . clientHeight + 2 ) + "px" ;
202
+ }
203
+ window . clearInterval ( timer ) ;
204
+ } , 300 ) ;
205
+ } ) ;
129
206
130
207
$ ( document ) . ready ( function ( ) {
131
208
$ ( 'a' ) . each ( function ( e ) {
0 commit comments