Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 Need "Topic" to show newest post first.
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Panhandler
Average Member

USA
783 Posts

Posted - 26 October 2007 :  15:18:12  Show Profile  Visit Panhandler's Homepage  Reply with Quote
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  Show Profile  Reply with Quote
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<
Go to Top of Page

cripto9t
Average Member

USA
881 Posts

Posted - 27 October 2007 :  08:03:35  Show Profile  Reply with Quote
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\-_
Go to Top of Page

Panhandler
Average Member

USA
783 Posts

Posted - 27 October 2007 :  09:56:20  Show Profile  Visit Panhandler's Homepage  Reply with Quote
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


Go to Top of Page

MaD2ko0l
Senior Member

United Kingdom
1053 Posts

Posted - 27 October 2007 :  10:46:43  Show Profile  Visit MaD2ko0l's Homepage  Reply with Quote
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
Go to Top of Page

phy1729
Average Member

USA
589 Posts

Posted - 27 October 2007 :  12:16:51  Show Profile  Reply with Quote
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 .

<
Go to Top of Page

Panhandler
Average Member

USA
783 Posts

Posted - 27 October 2007 :  21:58:40  Show Profile  Visit Panhandler's Homepage  Reply with Quote
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


Go to Top of Page

phy1729
Average Member

USA
589 Posts

Posted - 27 October 2007 :  22:27:52  Show Profile  Reply with Quote
try
if Topic_ID = "111" then<
Go to Top of Page

Panhandler
Average Member

USA
783 Posts

Posted - 28 October 2007 :  09:23:12  Show Profile  Visit Panhandler's Homepage  Reply with Quote
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?<
Go to Top of Page

MaD2ko0l
Senior Member

United Kingdom
1053 Posts

Posted - 28 October 2007 :  09:45:03  Show Profile  Visit MaD2ko0l's Homepage  Reply with Quote
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
Go to Top of Page

muzishun
Senior Member

United States
1079 Posts

Posted - 28 October 2007 :  14:24:46  Show Profile  Visit muzishun's Homepage  Reply with Quote
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)
Go to Top of Page

Panhandler
Average Member

USA
783 Posts

Posted - 28 October 2007 :  15:29:20  Show Profile  Visit Panhandler's Homepage  Reply with Quote
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
Go to Top of Page

phy1729
Average Member

USA
589 Posts

Posted - 28 October 2007 :  18:53:46  Show Profile  Reply with Quote
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.<
Go to Top of Page

Etymon
Advanced Member

United States
2385 Posts

Posted - 29 October 2007 :  08:52:34  Show Profile  Visit Etymon's Homepage  Reply with Quote
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
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.12 seconds. Powered By: Snitz Forums 2000 Version 3.4.07