![]() |
|
論壇說明 |
歡迎您來到『史萊姆論壇』 ^___^ 您目前正以訪客的身份瀏覽本論壇,訪客所擁有的權限將受到限制,您可以瀏覽本論壇大部份的版區與文章,但您將無法參與任何討論或是使用私人訊息與其他會員交流。若您希望擁有完整的使用權限,請註冊成為我們的一份子,註冊的程序十分簡單、快速,而且最重要的是--註冊是完全免費的! 請點擊這裡:『註冊成為我們的一份子!』 |
![]() ![]() |
|
主題工具 | 顯示模式 |
![]() |
#1 |
長老會員
![]() |
![]() 1.新增一個片語
短語類型:全域(GLOBAL) 變數名:newpostslist 內容最:新回覆主題列表 2.新增設定 進入 http://www.你的論壇網址.com/admincp/options.php?do=addsetting 新增------ 變數名:newpostlimit 設定組:首頁顯示選項 標題:最新文章列表顯示筆量 描述:設定在首頁的最新文章列表顯示主題數量 預設:10 顯示順序:121 新增------ 變數名:shownewpost 設定組:首頁顯示選項 標題:首頁顯示最新文章列表 描述:在首頁顯示最新文章列表 選項代碼:yesno 預設:1 顯示順序:120 3.編輯index.php ----------------------------------------------------------------------------------------------- || 搜尋 ----------------------------------------------------------------------------------------------- // ### ALL DONE! SPIT OUT THE HTML AND LET'S GET OUTA HERE... ### ----------------------------------------------------------------------------------------------- || 下面貼上 ----------------------------------------------------------------------------------------------- // 最新回覆主題列表===================================================================== if($vboptions['shownewpost']){ $limits['latest_threads'] = $vboptions['newpostlimit']; // 最新文章顯示數量 $q = $DB_site->query("SELECT thread.threadid, thread.postusername , thread.title AS thread_title, thread.replycount, thread.views, thread.votenum, thread.votetotal, thread.lastpost, thread.dateline, thread.lastposter, forum.forumid, forum.title AS forum_title, user.userid, user.username FROM ".TABLE_PREFIX."thread AS thread, ".TABLE_PREFIX."forum AS forum, ".TABLE_PREFIX."user AS user LEFT JOIN ".TABLE_PREFIX."deletionlog AS deletionlog ON (deletionlog.primaryid = thread.threadid AND deletionlog.type = 'thread') WHERE forum.forumid = thread.forumid AND user.userid = thread.postuserid AND thread.visible = 1 AND open <> 10 AND deletionlog.primaryid IS NULL ORDER BY thread.lastpost DESC LIMIT {$limits['latest_threads']}"); while($thread = $DB_site->fetch_array($q)) { $thread['lastposttime'] = vbdate($vboptions['timeformat'], $thread['lastpost']); $thread[lastpostdate] = vbdate($vboptions['dateformat'], $thread['dateline']); eval('$su[\'latest_threads\'] .= "' . fetch_template('su-latest_threads') . '";'); } $DB_site->free_result($q); unset($q,$limits, $thread); } // 最新回覆主題列表===================================================================== 4.修改模板FORUMHOME ----------------------------------------------------------------------------------------------- || 搜尋 ----------------------------------------------------------------------------------------------- $header $navbar ----------------------------------------------------------------------------------------------- || 後面貼上 ----------------------------------------------------------------------------------------------- <!-- 最新回覆主題列表 --> <if condition="$vboptions['shownewpost']"> <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center"> <tr> <if condition="$show['threadicons']"> <td class="thead" colspan="2"> </td> <else /> <td class="thead"> </td> </if> <td class="thead" width="100%"> <if condition="$show['threadratings']"><span style="float:$stylevar[right]">$vbphrase[rating] $sortarrow[voteavg]</span></if> $vbphrase[newpostslist] </td> <td class="thead" width="150" align="center" nowrap="nowrap"><span style="white-space:nowrap">$vbphrase[thread_starter]</span></td> <td class="thead" width="150" align="center" nowrap="nowrap"><span style="white-space:nowrap">$vbphrase[last_post] $sortarrow[lastpost]</span></td> <td class="thead" align="center" nowrap="nowrap"><span style="white-space:nowrap">$vbphrase[replies] $sortarrow[replycount]</span></td> <td class="thead" align="center" nowrap="nowrap"><span style="white-space:nowrap">$vbphrase[views] $sortarrow[views]</span></td> </tr> $su[latest_threads] </table> <br> </if> <!-- 最新回覆主題列表 --> 5.新增模板su-latest_threads ----------------------------------------------------------------------------------------------- || 貼上 ----------------------------------------------------------------------------------------------- <tr> <td class="alt1"><img src="$stylevar[imgdir_statusicon]/thread$thread[statusicon].gif" alt="<if condition="$show['threadcount']"><phrase 1="$thread[dot_count]" 2="$thread[dot_lastpost]">$vbphrase[have_x_posts_in_thread_last_y]</phrase></if>" border="" /></td> <if condition="$show['threadicons']"> <td class="alt2"><if condition="$show['threadicon']"><img src="$thread[threadiconpath]" alt="$thread[threadicontitle]" border="0" /><else /> </if></td> </if> <td class="alt1Active" id="t$thread[threadid]" title="$thread[preview]"> <div> <span style="float:$stylevar[right]"> <if condition="$show['paperclip']"><img class="inlineimg" src="$stylevar[imgdir_misc]/paperclip.gif" alt="<phrase 1="$thread[attach]">$vbphrase[x_attachments]</phrase>" /></if> <if condition="$show['subscribed']"><img class="inlineimg" src="$stylevar[imgdir_misc]/subscribed.gif" alt="$vbphrase[you_are_subscribed_to_this_thread]" /></if> <if condition="$show['sticky']"><img class="inlineimg" src="$stylevar[imgdir_misc]/sticky.gif" alt="$vbphrase[sticky_thread]" /></if> </span> <if condition="$show['gotonewpost']"><a href="showthread.php?$session[sessionurl]goto=newpost&t=$thread[threadid]"><img class="inlineimg" src="$stylevar[imgdir_button]/firstnew.gif" alt="$vbphrase[go_to_first_new_post]" border="0" /></a></if> $thread[movedprefix] $thread[typeprefix] <a href="showthread.php?$session[sessionurl]t=$thread[threadid]$thread[highlight]"><if condition="$show['gotonewpost']"><strong>$thread[thread_title]</strong><else />$thread[thread_title]</if></a> <if condition="$thread['pagenav']"><span class="smallfont" style="white-space:nowrap">( <img class="inlineimg" src="$stylevar[imgdir_misc]/multipage.gif" alt="$vbphrase[multipage_thread]" border="0" /> $thread[pagenav] <if condition="$show[pagenavmore]">... <a href="showthread.php?$session[sessionurl]t=$thread[threadid]&goto=lastpost$thread[highlight]">$vbphrase[last_page]</a></if> )</span></if> </div> <td class="alt2" align="center">$thread[postusername]</td> <td class="alt2"> <div class="smallfont" style="text-align:$stylevar[right]; white-space:nowrap"> <!--<span class="time">$thread[lastpostdate] $thread[lastposttime]</span><br />--> <phrase 1="member.php?find=lastposter&t=$thread[threadid]" 2="$thread[lastposter]">$vbphrase[by_x]</phrase> <a href="showthread.php?$session[sessionurl]goto=lastpost&t=$thread[threadid]"><img class="inlineimg" src="$stylevar[imgdir_button]/lastpost.gif" alt="$vbphrase[go_to_last_post]" border="0" /></a> </div> </td> <td class="alt1" align="center"><if condition="$show['threadmoved']">-<else /><a href="#" onclick="who($thread[threadid]); return false;">$thread[replycount]</a></if></td> <td class="alt2" align="center">$thread[views]</td> </tr> ----------------------------------------------------------------------------------------------- || 完成 ----------------------------------------------------------------------------------------------- |
__________________ 給自己看也給所有需要這些話鼓勵的人看! 認真不一定會得到美好的結果,但是不認真就一定沒有 想要有什麼結果,就秉持你的雙手 放手去做 總比什麼都沒付出最後失敗了才嘆氣來的好吧 沒努力的人.沒有資格說放棄 努力過的人.更要有勇氣繼續努力下去
|
|
![]() |
送花文章: 1,
![]() |