viewthread_album.htm 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315
  1. <!--{template common/header}-->
  2. <style>
  3. #hd,#comment { display:none;}
  4. </style>
  5. <script type="text/javascript">
  6. var albumback = 0;
  7. function changealbumback() {
  8. if(albumback == 0){
  9. $('nv_forum').style.background='#000';
  10. $('nv_forum').className = 'albumback';
  11. $('albumback_sw').innerHTML = '{lang lightopen}';
  12. albumback = 1;
  13. }else{
  14. $('nv_forum').style.background='#FFF';
  15. $('nv_forum').className = 'albumback_on';
  16. $('albumback_sw').innerHTML = '{lang lightclose}';
  17. albumback = 0;
  18. }
  19. }
  20. </script>
  21. <script type="text/javascript">var fid = parseInt('$_G[fid]'), tid = parseInt('$_G[tid]');</script>
  22. <!--{if $_G['forum']['ismoderator']}-->
  23. <script type="text/javascript" src="{$_G['setting']['jspath']}forum_moderate.js?{VERHASH}"></script>
  24. <!--{/if}-->
  25. <script type="text/javascript" src="{$_G['setting']['jspath']}forum_viewthread.js?{VERHASH}"></script>
  26. <script type="text/javascript">zoomstatus = parseInt($_G['setting']['zoomstatus']);var imagemaxwidth = '{$_G['setting']['imagemaxwidth']}';var aimgcount = new Array();</script>
  27. <div id="pt" class="bm cl">
  28. <div class="z">
  29. <a href="./" class="nvhm" title="{lang homepage}">$_G[setting][bbname]</a><em>&raquo;</em><a href="forum.php">{$_G[setting][navs][2][navname]}</a>$navigation <em>&rsaquo;</em> <a href="forum.php?mod=viewthread&tid=$_G[tid]">$_G[forum_thread][short_subject]</a>
  30. </div>
  31. </div>
  32. <style id="diy_style" type="text/css"></style>
  33. <div class="wp">
  34. <!--[diy=diy1]--><div id="diy1" class="area"></div><!--[/diy]-->
  35. </div>
  36. <!--{hook/viewthread_beginline}-->
  37. <div id="ct" class="ct2 wp cl">
  38. <div class="pic_h bm vw pl">
  39. <div class="h hm cl">
  40. <div class="img_tit_t cl">
  41. <h1 class="ph z">$_G[forum_thread][subject]</h1>
  42. <div class="ph_r_con xg1 y vm">{lang home_view_num}:<span class="xi1"> $_G[forum_thread][views]</span> <span class="pipe">|</span> {lang comment_num}: <span class="xi1">$_G[forum_thread][replies]</span> <span class="pipe">|</span> <a href="home.php?mod=spacecp&ac=favorite&type=thread&id=$_G[tid]" id="k_favorite" onclick="showWindow(this.id, this.href, 'get', 0);" onmouseover="this.title = $('favoritenumber').innerHTML + ' {lang activity_member_unit}{lang thread_favorite}'">{lang thread_favorite} <span id="favoritenumber" class="xi1">{$_G['forum_thread']['favtimes']}</span></a><!--{if (($_G['forum']['ismoderator'] && $_G['group']['alloweditpost'] && (!in_array($post['adminid'], array(1, 2, 3)) || $_G['adminid'] <= $post['adminid'])) || ($_G['forum']['alloweditpost'] && $_G['uid'] && ($post['authorid'] == $_G['uid'] && $_G['forum_thread']['closed'] == 0) && !(!$alloweditpost_status && $edittimelimit && TIMESTAMP - $post['dbdateline'] > $edittimelimit)))}-->
  43. <span class="pipe">|</span><a href="forum.php?mod=post&action=edit&fid=$_G[fid]&tid=$_G[tid]&pid=$post[pid]{if !empty($_GET[modthreadkey])}&modthreadkey=$_GET[modthreadkey]{/if}&page=$page{if $_GET[from]}&from=$_GET[from]{/if}"><!--{if $_G['forum_thread']['special'] == 2 && !$post['message']}-->{lang post_add_aboutcounter}<!--{else}--><span class="xi2">{lang edit}</span></a><!--{/if}-->
  44. <!--{/if}--></div>
  45. </div>
  46. <div class="xg1 z">
  47. <a id="albumback_sw" href="javascript:void(0);" onclick="changealbumback();">{lang lightclose}</a>
  48. <span class="pipe">|</span>
  49. <span class="keyboard-tip">{lang keyboard_tip}</span>
  50. </div>
  51. <div class="xg1 y"><a href="forum.php?mod=viewthread&tid=$_G[tid]" class="thread_mod xg1"><span>{lang thread_mod}</span></a></div>
  52. </div>
  53. <div class="d">
  54. <table cellpadding="0" cellspacing="0" width="100%">
  55. <tr>
  56. <td width="780">
  57. <div class="photo_pic">
  58. <div id="photo_pic" style="position: relative; text-align: center;">
  59. <img alt="" id="pic" style="max-width: 780px;_width: 780px;" src="$imglist['url'][0]">
  60. </div>
  61. <div id="imagelist_nav">
  62. <div class="imagelist_album">
  63. <a id="goleft" class="left" onclick="imagelist_go('prev');" href="javascript:void(0);"></a>
  64. <div id="imagelistwarp" class="left">
  65. <ul id="imagelistthumb" style="width: <!--{echo count($imglist[aid]) * 110;}-->px; left: 0px;"><img src="static/image/common/loading.gif" width="16" height="16" class="vm" /> {lang waitpicloading}......</ul>
  66. <a id="currentpic" class="mask" href="javascript:void(0)" style="left: 0px;"></a>
  67. </div>
  68. <a id="goright" class="right" onclick="imagelist_go('next');" href="javascript:void(0);"></a>
  69. </div>
  70. </div>
  71. </div>
  72. <!--{if !empty($imglist)}-->
  73. <script type="text/javascript" reload="1">
  74. var imagewidth = 110;
  75. var curnum = 0;
  76. var imagecount = '<!--{echo count($imglist[aid]);}-->';
  77. function imagelist_go(type) {
  78. var width = '<!--{echo count($imglist[aid]) * 110;}-->';
  79. var left = parseInt($('imagelistthumb').style.left.substr(0, ($('imagelistthumb').style.left.length - 2)));
  80. var curleft = parseInt($('currentpic').style.left.substr(0, ($('imagelistthumb').style.left.length - 2)));
  81. if(type == 'next') {
  82. if(left > -(width - 730)) {
  83. newleft = imagewidth * 4;
  84. if(left - newleft < -(width - 730)) {
  85. newleft = width - 730 - left;
  86. }
  87. imagelist_scrolleft('imagelistthumb', left, newleft);
  88. imagelist_scrolleft('currentpic', curleft, newleft);
  89. }
  90. } else {
  91. if(left < 0) {
  92. newleft = imagewidth * 4;
  93. if(left + newleft > 0) {
  94. newleft = -left;
  95. }
  96. imagelist_scrolleft('imagelistthumb', left, newleft, 'add');
  97. imagelist_scrolleft('currentpic', curleft, newleft, 'add');
  98. }
  99. }
  100. }
  101. function imagelist_scrolleft(id, left, num, type) {
  102. if(type == 'add') {
  103. left += num;
  104. } else {
  105. left -= num;
  106. }
  107. $(id).style.left = left +'px';
  108. }
  109. function current_pic(n) {
  110. curnum = n;
  111. var left = parseInt($('imagelistthumb').style.left.substr(0, ($('imagelistthumb').style.left.length - 2)));
  112. $('pic').src=imglist['url'][n];
  113. var curleft = imagewidth * n;
  114. if(imagecount > 7 && n >= 4) {
  115. if(n < (imagecount - 4)) {
  116. curleft = imagewidth * 3;
  117. imagelist_scrolleft('imagelistthumb', 0, imagewidth * (n-3));
  118. } else {
  119. curleft = imagewidth * (7 - (imagecount - n));
  120. imagelist_scrolleft('imagelistthumb', 0, imagewidth * (imagecount-7));
  121. }
  122. } else {
  123. imagelist_scrolleft('imagelistthumb', 0, 0);
  124. }
  125. $('currentpic').style.left = curleft+'px';
  126. }
  127. <!--{eval $imagelistkey = dsign($_G[tid].'|100|100')}-->
  128. var imagelistkey = '$imagelistkey';
  129. var imglist = new Array();
  130. var imagelist_html = '';
  131. imglist['aid'] = [<!--{echo dimplode($imglist[aid]);}-->];
  132. imglist['url'] = [<!--{echo dimplode($imglist[url]);}-->];
  133. var count = imglist['aid'].length;
  134. for(i = 0; i < count; i++) {
  135. imagelist_html += '<li><div class="">' +'<img src="forum.php?mod=image&aid=' + imglist['aid'][i] + '&size=100x100&key=' + imagelistkey + '&atid={$post[tid]}" width="100" height="100" onclick="current_pic('+i+');"/><span>'+(i+1)+'/'+count+'</span></div></li>';
  136. }
  137. $('imagelistthumb').innerHTML = imagelist_html;
  138. function createElem(e){
  139. var obj = document.createElement(e);
  140. obj.style.position = 'absolute';
  141. obj.style.zIndex = '1';
  142. obj.style.cursor = 'pointer';
  143. obj.onmouseout = function(){ this.style.background = 'none';}
  144. return obj;
  145. }
  146. function viewPhoto(){
  147. var divappend = 0;
  148. if(!$('pic-prev')) {
  149. var pager = createElem('div');
  150. var pre = createElem('div');
  151. var next = createElem('div');
  152. pager.id='pager';
  153. pre.id='pic-prev';
  154. next.id='pic-next';
  155. divappend = 1;
  156. } else {
  157. var pager = $('pager');
  158. var pre = $('pic-prev');
  159. var next = $('pic-next');
  160. }
  161. var cont = $('photo_pic');
  162. var tar = $('pic');
  163. var w = 390;
  164. var objpos = fetchOffset(tar);
  165. pager.style.position = 'absolute';
  166. pager.style.left = '0px';
  167. pager.style.top = '0px';
  168. pager.style.width = '780px';
  169. pager.style.height = tar.height + 'px';
  170. pre.style.left = 0;
  171. next.style.right = 0;
  172. pre.style.width = next.style.width = w + 'px';
  173. pre.style.height = next.style.height = tar.height + 'px';
  174. pre.innerHTML = next.innerHTML = '<img src="{IMGDIR}/emp.gif" width="' + w + '" height="' + tar.height + '" />';
  175. pre.onmouseover = function(){ this.style.background = 'url({IMGDIR}/pic-prev.png) no-repeat 0 50%'; }
  176. pre.onclick = function(){if(curnum>=1) {$('pic').src=imglist['url'][curnum-1];current_pic(curnum-1);}}
  177. pre.title = '';
  178. next.onmouseover = function(){ this.style.background = 'url({IMGDIR}/pic-next.png) no-repeat 100% 50%'; }
  179. next.onclick = function(){if(curnum < imagecount - 1) {$('pic').src=imglist['url'][curnum+1];current_pic(curnum+1);}}
  180. next.title = '';
  181. //cont.style.position = 'relative';
  182. if(divappend == 1) {
  183. cont.appendChild(pager);
  184. pager.appendChild(pre);
  185. pager.appendChild(next);
  186. }
  187. }
  188. var onopen = 0;
  189. $('pic').onload = function(){
  190. viewPhoto();
  191. if(onopen == 0) {
  192. onopen = 1;
  193. } else {
  194. var imagepos = fetchOffset($('photo_pic'));
  195. document.documentElement.scrollTop = imagepos['top'];
  196. }
  197. }
  198. document.onkeyup = function(e){
  199. e = e ? e : window.event;
  200. var tagname = BROWSER.ie ? e.srcElement.tagName : e.target.tagName;
  201. if(tagname == 'INPUT' || tagname == 'TEXTAREA') return;
  202. actualCode = e.keyCode ? e.keyCode : e.charCode;
  203. if(actualCode == 39) {
  204. $('pic-next').click();
  205. }
  206. if(actualCode == 37) {
  207. $('pic-prev').click();
  208. }
  209. }
  210. </script>
  211. <!--{/if}-->
  212. <!--{if !IS_ROBOT && $post['first'] && !$_G['forum_thread']['archiveid']}-->
  213. <!--{if !empty($lastmod['modaction'])}--><div class="modact xs1"><a href="forum.php?mod=misc&action=viewthreadmod&tid=$_G[tid]" title="{lang thread_mod}" onclick="showWindow('viewthreadmod', this.href)">{lang thread_mod_by}</a></div><!--{/if}-->
  214. <!--{if $post['invisible'] == 0}-->
  215. <div id="p_btn" class="mtw mbm cl xs1" style="display:none;">
  216. <!--{hook/viewthread_useraction_prefix}-->
  217. <!--{if helper_access::check_module('share')}-->
  218. <a href="home.php?mod=spacecp&ac=share&type=thread&id=$_G[tid]" id="k_share" onclick="showWindow(this.id, this.href, 'get', 0);" onmouseover="this.title = $('sharenumber').innerHTML + ' {lang activity_member_unit}{lang thread_share}'"><i><img src="{IMGDIR}/oshr.png" alt="{lang thread_share}" />{lang thread_share}<span id="sharenumber">{$_G['forum_thread']['sharetimes']}</span></i></a>
  219. <!--{/if}-->
  220. <a href="home.php?mod=spacecp&ac=favorite&type=thread&id=$_G[tid]" id="k_favorite" onclick="showWindow(this.id, this.href, 'get', 0);" onmouseover="this.title = $('favoritenumber').innerHTML + ' {lang activity_member_unit}{lang thread_favorite}'"><i><img src="{IMGDIR}/fav.gif" alt="{lang thread_favorite}" />{lang thread_favorite}<span id="favoritenumber">{$_G['forum_thread']['favtimes']}</span></i></a>
  221. <!--{if ($_G['group']['allowrecommend'] || !$_G['uid']) && $_G['setting']['recommendthread']['status']}-->
  222. <!--{if !empty($_G['setting']['recommendthread']['addtext'])}-->
  223. <a id="recommend_add" href="forum.php?mod=misc&action=recommend&do=add&tid=$_G[tid]&hash={FORMHASH}" {if $_G['uid']}onclick="ajaxmenu(this, 3000, 1, 0, '43', 'recommendupdate({$_G['group']['allowrecommend']})');return false;"{else} onclick="showWindow('login', this.href)"{/if} onmouseover="this.title = $('recommendv_add').innerHTML + ' {lang activity_member_unit}$_G[setting][recommendthread][addtext]'"><i><img src="{IMGDIR}/rec_add.gif" alt="$_G['setting']['recommendthread'][addtext]" />$_G['setting']['recommendthread'][addtext]<span id="recommendv_add">$_G[forum_thread][recommend_add]</span></i></a>
  224. <!--{/if}-->
  225. <!--{if !empty($_G['setting']['recommendthread']['subtracttext'])}-->
  226. <a id="recommend_subtract" href="forum.php?mod=misc&action=recommend&do=subtract&tid=$_G[tid]&hash={FORMHASH}" {if $_G['uid']}onclick="ajaxmenu(this, 3000, 1, 0, '43', 'recommendupdate(-{$_G['group']['allowrecommend']})');return false;"{else} onclick="showWindow('login', this.href)"{/if} onmouseover="this.title = $('recommendv_subtract').innerHTML + ' {lang activity_member_unit}$_G[setting][recommendthread][subtracttext]'"><i><img src="{IMGDIR}/rec_subtract.gif" alt="$_G['setting']['recommendthread'][subtracttext]" />$_G['setting']['recommendthread'][subtracttext]<span id="recommendv_subtract">$_G[forum_thread][recommend_sub]</span></i></a>
  227. <!--{/if}-->
  228. <!--{/if}-->
  229. <!--{if $_G['group']['raterange'] && $post['authorid']}-->
  230. <a href="javascript:;" id="ak_rate" onclick="showWindow('rate', 'forum.php?mod=misc&action=rate&tid=$_G[tid]&pid=$post[pid]{if $_GET[from]}&from=$_GET[from]{/if}');return false;" title="{echo count($postlist[$post[pid]][totalrate]);} {lang people_score}"><i><img src="{IMGDIR}/agree.gif" alt="{lang rate}" />{lang rate}</i></a>
  231. <!--{/if}-->
  232. <!--{if $post['first'] && $_G[uid] && $_G[uid] == $post[authorid]}-->
  233. <a href="misc.php?mod=invite&action=thread&id=$_G[tid]" onclick="showWindow('invite', this.href, 'get', 0);"><i><img src="{IMGDIR}/activitysmall.gif" alt="{lang invite}" />{lang invite}</i></a>
  234. <!--{/if}-->
  235. <!--{hook/viewthread_useraction}-->
  236. </div>
  237. <!--{/if}-->
  238. <!--{/if}-->
  239. </td>
  240. <td valign="top" class="album_side_r">
  241. <div class="album_side">
  242. <div class="hm mtn mbn">
  243. <a href="home.php?mod=space&uid=$post[authorid]" target="_blank" class="xi2"><img src="$_G[setting][ucenterurl]/avatar.php?uid=$post[authorid]&size=small" /></a>
  244. <span class="tit_author">
  245. <!--{if $_G[forum_thread][author] && $_G[forum_thread][authorid]}-->
  246. <a href="home.php?mod=space&uid=$_G[forum_thread][authorid]">$_G[forum_thread][author]</a>
  247. <!--{else}-->
  248. <!--{if $_G['forum']['ismoderator']}-->
  249. <a href="home.php?mod=space&uid=$_G[forum_thread][authorid]">{lang anonymous}</a>
  250. <!--{else}-->
  251. {lang anonymous}
  252. <!--{/if}-->
  253. <!--{/if}-->
  254. </span>
  255. </div>
  256. <div class="date"><span>{lang dateline}:</span> <!--{date($_G[forum_thread][dateline])}--></div>
  257. <div class="album_info">
  258. <h3>{lang text_summary}: </h3>
  259. <p>$post['message']</p>
  260. </div>
  261. </div>
  262. </td>
  263. </tr>
  264. </table>
  265. </div>
  266. </div>
  267. <div class="bm vw pl" id="comment">
  268. <div class="bm_h cl">
  269. <h2>{lang reply}</h2>
  270. </div>
  271. <!--{if $_G['setting']['fastpost'] && $allowpostreply && !$_G['forum_thread']['archiveid']}-->
  272. <div class="bm_c">
  273. <!--{subtemplate forum/viewthread_fastpost}-->
  274. </div>
  275. <!--{/if}-->
  276. <div class="bm_c">
  277. <div id="postlistreply" class="xld xlda mbm"><div id="post_new" class="viewthread_table" style="display: none"></div></div>
  278. <!--{eval $postcount = 0;}-->
  279. <!--{loop $postlist $postid $post}-->
  280. <!--{if $postid && !$post['first']}-->
  281. <div id="post_$post[pid]" class="xld xlda mbm">
  282. <!--{subtemplate forum/viewthread_from_node}-->
  283. </div>
  284. <!--{/if}-->
  285. <!--{eval $postcount++;}-->
  286. <!--{/loop}-->
  287. </div>
  288. </div>
  289. </div>
  290. <!--{hook/viewthread_bottom}-->
  291. <!--{if !IS_ROBOT && !empty($_G[setting][lazyload])}-->
  292. <script type="text/javascript">
  293. new lazyload();
  294. </script>
  295. <!--{/if}-->
  296. <div class="wp mtn">
  297. <!--[diy=diy3]--><div id="diy3" class="area"></div><!--[/diy]-->
  298. </div>
  299. <!--{template common/footer}-->