Need "Topic" to show newest post first. - نوشته شده در (1325 Views)
Average Member
Panhandler
مطلب: 783
783
My forum has a Topic titled "Welcome New Members"

Each week I add a Reply to my welcoming message, welcoming the most recent registrants. My Reply shows at the bottom of the page, when it would be most appropriate if it showed as the very first post.
Is there a way that I could make that one Topic reverse the entry order of posts? <
 پیش‌فرض مرتب‌سازی برای تاریخ DESC به معنی جدیدترین است  
 تعداد در صفحه 
نوشته شده در
Average Member
phy1729
مطلب: 589
589
well my changing 309ish in topic.asp from
strSql4 = " ORDER BY R.R_DATE ASC"
to
strSql4 = " ORDER BY R.R_DATE DESC"
the first post is first an all replies are in reverse order hope this helps<
نوشته شده در
Average Member
cripto9t
مطلب: 881
881
If you just want it for the one forum
Code:
strSql4 = " ORDER BY R.R_DATE "
if Forum_ID = "ForumIDHere" then
strSql4 = strSql4 & "DESC"
else
strSql4 = strSql4 & "ASC"
end if
<
    _-/Cripto9t\-_
نوشته شده در
Average Member
Panhandler
مطلب: 783
783
One topic among many. Guess that won't work, eh?
phy1729 - I'm guessing that mod would apply to every topic in every forum?

cripto9t - Would that apply to all topic in just the one forum?
<
"5-in-1 Snitz Common Expansion Pack" - five popular mods packaged for easy install
". . .on a mote of dust, suspended in a sunbeam. . ."
HarborClassifieds Support Snitz Forums
نوشته شده در
Senior Member
MaD2ko0l
مطلب: 1053
1053
woudl somthign liek thsi not work...code may be different butim taking the abiove code

strSql4 = " ORDER BY R.R_DATE "
if Topic_ID = "TopicIDHere" then
strSql4 = strSql4 & "DESC"
else
strSql4 = strSql4 & "ASC"
end if


that way you wil be looking for that specific topic and it shodlnt mess with anythign else<
© 1999-2010 MaD2ko0l
نوشته شده در
Average Member
phy1729
مطلب: 589
589
mine applies to the entire board
cripto9t is just one forum
MaD2ko0l is one topic
and for sake of completion for just one category replace Topic_ID with Cat_ID .
<
نوشته شده در
Average Member
Panhandler
مطلب: 783
783
Okay. . .for just one topic this modification has been made:
--------------------------------
end if
strSql3 = strSql3 & " OR R.R_AUTHOR = " & MemberID & ")"
end if
'#### topic mod ###
strSql4 = " ORDER BY R.R_DATE "
if Topic_ID = "TOPIC_ID=111" then
strSql4 = strSql4 & "DESC"
else
strSql4 = strSql4 & "ASC"
end if
'### end Topic Mod ###

if strDBType = "mysql" then 'MySql specific code
if mypage > 1 then
intOffset = cLng((mypage-1) * strPageSize)
strSql5 = " LIMIT " & intOffset & ", " & strPageSize & " "
end if
---------------------------

However, it's had no effect on the topic! question<
"5-in-1 Snitz Common Expansion Pack" - five popular mods packaged for easy install
". . .on a mote of dust, suspended in a sunbeam. . ."
HarborClassifieds Support Snitz Forums
نوشته شده در
Average Member
phy1729
مطلب: 589
589
try
if Topic_ID = "111" then<
نوشته شده در
Average Member
Panhandler
مطلب: 783
783
Now that worked! --------------------------------
end if
strSql3 = strSql3 & " OR R.R_AUTHOR = " & MemberID & ")"
end if
'#### Reverse Topic Order Mod ###
strSql4 = " ORDER BY R.R_DATE "
if Topic_ID = "111" then
strSql4 = strSql4 & "DESC"
else
strSql4 = strSql4 & "ASC"
end if
'### end Reverse Topic Order ###

if strDBType = "mysql" then 'MySql specific code
if mypage > 1 then
intOffset = cLng((mypage-1) * strPageSize)
strSql5 = " LIMIT " & intOffset & ", " & strPageSize & " "
end if
---------------------------

I'll use it just for welcoming new members since it's unlikely that they will think to use the "last post first" feature. But just for curiosity's sake, what if I wanted to apply the reverse topic order mod to more than one topic?<
نوشته شده در
Senior Member
MaD2ko0l
مطلب: 1053
1053
coul not not just add and "or" statement onto it?? somthing like this

if Topic_ID = "111" or Topic_ID = "112" then

im sure that would work as well<
© 1999-2010 MaD2ko0l
نوشته شده در
Senior Member
muzishun
مطلب: 1079
1079
If you plan to have a large number of topics that will be reversed in order *plus* a large number of topics that are in normal order, you could add a field to the database that is a simple boolean. Add it to the TOPICS table. Basically have it set as false by default (normal order), then write the code for an admin/moderator to be able to check a box that will reverse the order for that topic.
That actually sounds like a fairly useful MOD.... any takers? My plate is fairly full right now.<
Bill Parrott
Senior Web Programmer, University of Kansas
Co-Owner and Code Monkey, Eternal Second Designs (www.eternalsecond.com)
Personal Website (www.chimericdream.com)
شما باید یک متن وارد کنید