Author |
Topic |
|
Panhandler
Average Member
USA
783 Posts |
Posted - 26 October 2007 : 15:18:12
|
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? < |
|
phy1729
Average Member
USA
589 Posts |
Posted - 26 October 2007 : 17:13:29
|
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< |
|
|
cripto9t
Average Member
USA
881 Posts |
Posted - 27 October 2007 : 08:03:35
|
If you just want it for the one forum
strSql4 = " ORDER BY R.R_DATE "
if Forum_ID = "ForumIDHere" then
strSql4 = strSql4 & "DESC"
else
strSql4 = strSql4 & "ASC"
end if
< |
_-/Cripto9t\-_ |
|
|
Panhandler
Average Member
USA
783 Posts |
Posted - 27 October 2007 : 09:56:20
|
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
|
|
|
MaD2ko0l
Senior Member
United Kingdom
1053 Posts |
Posted - 27 October 2007 : 10:46:43
|
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 |
|
|
phy1729
Average Member
USA
589 Posts |
Posted - 27 October 2007 : 12:16:51
|
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 .
< |
|
|
Panhandler
Average Member
USA
783 Posts |
Posted - 27 October 2007 : 21:58:40
|
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! < |
"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
|
|
|
phy1729
Average Member
USA
589 Posts |
Posted - 27 October 2007 : 22:27:52
|
try if Topic_ID = "111" then< |
|
|
Panhandler
Average Member
USA
783 Posts |
Posted - 28 October 2007 : 09:23:12
|
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?< |
|
|
MaD2ko0l
Senior Member
United Kingdom
1053 Posts |
Posted - 28 October 2007 : 09:45:03
|
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 |
|
|
muzishun
Senior Member
United States
1079 Posts |
Posted - 28 October 2007 : 14:24:46
|
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) |
|
|
Panhandler
Average Member
USA
783 Posts |
Posted - 28 October 2007 : 15:29:20
|
The simple Reverse Topic Order could get very confusing if applied to a large number of topics. . .especially if the users are trained to use the jump to last post feature.
Reverse Topic seems like a specialty mod. . .useful for one or perhaps two topics. That's the beauty of Snitz Forums - being able to make small modifications as needed. Thanks for the help on this one. . .it works just beautifully.
(It might make for a useful blog commentary for someone too. . .) < |
Edited by - Panhandler on 28 October 2007 17:27:04 |
|
|
phy1729
Average Member
USA
589 Posts |
Posted - 28 October 2007 : 18:53:46
|
I needed to be applied to a large number of topics you could make those topics one forum and use cripto9t's code or one category and replace Topic_ID with Cat_ID . Also I think if that wouldn't work for you I'd be better not to have a list but to mod the db so that all topics have an ASC or DESC value and the topic is sorted by that.< |
|
|
Etymon
Advanced Member
United States
2385 Posts |
Posted - 29 October 2007 : 08:52:34
|
quote: Originally posted by muzishun
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.
Just remember that that query may throw an error when viewing archived topics.
The table prefix used for queries in topic.asp is strActivePrefix which could mean either the FORUM_TOPICS table or the FORUM_A_TOPICS table depending on whether or not Request("ARCHIVE") = "TRUE" ... if the table prefix was just strTablePrefix, then you would be fine in those queries for that page, alone, but perhaps still not for other queries on other pages depending on what you have going on at your site.
Also, remember that when adding fields to the FORUM_A_TOPICS table that if you want the value stored in that table in the database you will have to add the field name and related code to your queries in the admin_forums.asp page.< |
Edited by - Etymon on 29 October 2007 09:21:12 |
|
|
|
Topic |
|