關於部落格
除了忙與盲之外,也要停下來想一想、看一看... 建議使用 FireFox 或 IE7 以上版本瀏覽。
使用 IE6 若看不到網頁請留個言唷








☞ 網誌分類列表 ☜

※ 網誌分類列表 ※
  自製軟體
  程式語言
  ├ 程式語言.BCB
  └ 程式語言.C#
  應用軟體
  └ MSN
  網站架設
  └ 部落軌道
  Ubuntu
  電腦硬體
  遊戲育樂
  日常生活
  └ 乾癬
  網路硬碟
 ◎不分類網誌列表◎ 





jQuery(document).ready(function(){
jQuery("#boxVisit a[class!='boxVisitSelf'],#boxRecommend a,#boxRecommended a").unbind('click');
jQuery("#boxVisit a[class!='boxVisitSelf'],#boxRecommend a,#boxRecommended a").click(function(){
window.open(this.href);return false;
}).attr('target','');
});



function toggle() {
var ele = document.getElementById("chromemenu");
var text = document.getElementById("displayText");
if(ele.style.display == "block") {
ele.style.display = "none";
text.innerHTML = "☞ 顯示工具列 ☜";
}
else {
ele.style.display = "block";
text.innerHTML = "☞ 隱藏工具列 ☜";
}
}


☞ 顯示工具列 ☜
  • 754912

    累積人氣

  • 9

    今日人氣

    14

    追蹤人氣

Discuz! 7 「我的帖子」按最後回覆排序

##############################################################
## MOD Title: Discuz! 7.0.0 add Sort by Last Reply for MyPosts
## MOD Author: dllee http://blog.yam.com/dllee
## MOD Description: Discuz! 7.0.0 add Sort by Last Reply for MyPosts
## MOD Version: 1.0.0
##
## Installation Level: Easy
## Installation Time: 2 Minutes
## Files To Edit: my.php, templates/default/my.htm, templates/default/templates.lang.php
## Included Files: n/a
##############################################################
## Author Notes: None
##
##############################################################
## MOD History:
##
##   2009-04-11 - Version 1.0.0
##      - First released.
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
############################################################## 
#
#-----[ OPEN ]------------------------------------------
#

/my.php

#
#-----[ FIND ]------------------------------------------
# line 105

	$query = $db->query("SELECT m.*, t.subject, t.fid, t.displayorder, t.closed, t.lastposter, t.lastpost FROM {$tablepre}mythreads m, {$tablepre}threads t
		WHERE m.uid = '$discuz_uid' $threadadd AND m.tid=t.tid ORDER BY m.dateline DESC LIMIT $start_limit, $tpp");
 
#
#-----[ MODIFY ]------------------------------------------
#

	$sortfield='m.dateline';	/* 2009-04-11 dllee : Add Sort by LastPost */
	if($type == 'lastpost') {
		$sortfield='t.lastpost';
	}
	$query = $db->query("SELECT m.*, t.subject, t.fid, t.displayorder, t.closed, t.lastposter, t.lastpost FROM {$tablepre}mythreads m, {$tablepre}threads t
		WHERE m.uid = '$discuz_uid' $threadadd AND m.tid=t.tid ORDER BY $sortfield DESC LIMIT $start_limit, $tpp");

#
#-----[ FIND ]------------------------------------------
# line 134

	$query = $db->query("SELECT m.uid, m.tid, m.pid, p.fid, p.invisible, p.dateline FROM {$tablepre}myposts m
		INNER JOIN {$tablepre}posts p ON p.pid=m.pid $postadd
		INNER JOIN {$tablepre}threads t ON t.tid=m.tid $threadadd
		WHERE m.uid = '$discuz_uid' ORDER BY m.dateline DESC LIMIT $start_limit, $tpp");
 
#
#-----[ MODIFY ]------------------------------------------
#

	$sortfield='m.dateline';	/* 2009-04-11 dllee : Add Sort by LastPost */
	if($type == 'lastpost') {
		$sortfield='t.lastpost';
	}
	$query = $db->query("SELECT m.uid, m.tid, m.pid, p.fid, p.invisible, p.dateline FROM {$tablepre}myposts m
		INNER JOIN {$tablepre}posts p ON p.pid=m.pid $postadd
		INNER JOIN {$tablepre}threads t ON t.tid=m.tid $threadadd
		WHERE m.uid = '$discuz_uid' ORDER BY $sortfield DESC LIMIT $start_limit, $tpp");

#
#-----[ OPEN ]------------------------------------------
#

/templates/default/my.htm

#
#-----[ FIND ]------------------------------------------
# line 19

						<li<!--{if empty($item) || $item == 'threads'}--> class="current"<!--{/if}-->><a href="my.php?item=threads$extrafid" hidefocus="true"><span>{lang thread}</span></a></li>
						<li<!--{if $item == 'posts'}--> class="current"<!--{/if}-->><a href="my.php?item=posts$extrafid" hidefocus="true"><span>{lang reply}</span></a></li>

#
#-----[ MODIFY ]------------------------------------------
#

						<li id="threads" onmouseover="showMenu(this.id)"<!--{if empty($item) || $item == 'threads'}--> class="current"<!--{/if}-->><a href="my.php?item=threads$extrafid" hidefocus="true" class="dropmenu"><span>{lang thread}</span></a></li>
						<li id="posts" onmouseover="showMenu(this.id)"<!--{if $item == 'posts'}--> class="current"<!--{/if}-->><a href="my.php?item=posts$extrafid" hidefocus="true" class="dropmenu"><span>{lang reply}</span></a></li>

#
#-----[ FIND ]------------------------------------------
# line 70

			{template my_buddylist}
		<!--{/if}-->
			</div>

#
#-----[ AFTER, ADD ]------------------------------------------
#

			<ul class="popupmenu_popup titlemenu_popup" id="threads_menu" style="display: none">
				<li <!--{if (empty($item) || $item == 'threads') && $type <> 'lastpost'}--> class="current"<!--{/if}-->><a href="my.php?item=threads&type=postdate$extrafid">{lang my_sortbypostdate}</a></li>
				<li <!--{if (empty($item) || $item == 'threads') && $type == 'lastpost'}--> class="current"<!--{/if}-->><a href="my.php?item=threads&type=lastpost$extrafid">{lang my_sortbylastpost}</a></li>
			</ul>
			<ul class="popupmenu_popup titlemenu_popup" id="posts_menu" style="display: none">
				<li <!--{if $item == 'posts' && $type <> 'lastpost'}--> class="current"<!--{/if}-->><a href="my.php?item=posts&type=postdate$extrafid">{lang my_sortbypostdate}</a></li>
				<li <!--{if $item == 'posts' && $type == 'lastpost'}--> class="current"<!--{/if}-->><a href="my.php?item=posts&type=lastpost$extrafid">{lang my_sortbylastpost}</a></li>
			</ul>

#
#-----[ OPEN ]------------------------------------------
#

/templates/default/templates.lang.php

#
#-----[ FIND ]------------------------------------------
# line 739

	'my_forum_all' => '顯示全部',

#
#-----[ AFTER, ADD ]------------------------------------------
#

	'my_sortbypostdate' => '按發表時間排序',
	'my_sortbylastpost' => '按最後回覆排序',

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM

以上格式在使用 phpBB 時蠻常見也蠻常用的,我就用相同的格式來記錄修改囉

最近需要把論壇加上圖檔 Hosting 的功能,因為論壇的空間及頻寬有限,希望使用 Picasa, flickr, ImageShack 等支援圖片外連的網路相簿站,讓會員透過論壇上傳圖片到指定的空間,再貼到論壇內,讓論壇的文章有比較好的完整性。關於此部分,還在努力找資料中,如果有好的插件或建議,也歡迎您留言告知唷,萬分感謝


BO 樂區 紀事
2009-03-25 BO 樂區成立,由索尼斯找熱心部落軌道的Bo動客加入
2009-03-25 dllee 擔任BO 樂區 Windows 軟體版版主
2009-04-07 BO 樂區開放註冊
2009-04-11 dllee 加入BO 樂區管理團隊
相簿設定
標籤設定
相簿狀態