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

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 Sticky Topic Mod 1.0 Troubles
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Slaid99
New Member

Canada
67 Posts

Posted - 09 June 2002 :  16:27:47  Show Profile  Visit Slaid99's Homepage
Using Aaron's bug fixed version 3.3.03

Have Poll Mod installed (with some problems), Active Users 4.0, File Library 1.0, Advanced Color Correction, Avatar Mod 2.0 (works).

Any topic I press now, I get the following error:

quote:
Microsoft OLE DB Provider for SQL Server error '80040e14'

Incorrect syntax near the keyword 'ORDER'.

/wov/forums/forum.asp, line 254




Ignore this post for now... I think I may have located problem.

Edited by - Slaid99 on 09 June 2002 17:31:07

Slaid99
New Member

Canada
67 Posts

Posted - 09 June 2002 :  17:42:16  Show Profile  Visit Slaid99's Homepage
Nope... located ONE problem...not this one...

Here is line 220 - 271 (Sticky Topic and Poll Mod edits in this forum.asp) of forum.asp

quote:
'###################### Sticky Topic Mod ############################
if request("ARCHIVE") = "true" then
strSql = strSql & " ORDER BY " & strActivePrefix & "TOPICS.T_LAST_POST DESC "
else
strSql = strSql & " ORDER BY " & strActivePrefix & "TOPICS.T_TOPSTICKY DESC "
strSql = strSql & " , " & strActivePrefix & "TOPICS.T_STICKY DESC "
strSql = strSql & " , " & strActivePrefix & "TOPICS.T_LAST_POST DESC "
end if
'###################### Sticky Topic Mod ############################

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

'## Forum_SQL - Get the total pagecount
strSql2 = "SELECT COUNT(" & strActivePrefix & "TOPICS.TOPIC_ID) AS PAGECOUNT "
strSql2 = strSql2 & " FROM " & strActivePrefix & "TOPICS "
strSql2 = strSql2 & " WHERE " & strActivePrefix & "TOPICS.TOPIC_ID > 0 "
strSql2 = strSql2 & " AND " & strActivePrefix & "TOPICS.FORUM_ID = " & Forum_ID & " "
if nDays = "-1" then
strSql2 = strSql2 & " AND " & strActivePrefix & "TOPICS.T_STATUS <> 0 "
end if
if nDays > "0" then
strSql2 = strSql2 & " AND " & strActivePrefix & "TOPICS.T_LAST_POST > '" & defDate & "'"
end if

set rsCount = my_Conn.Execute(strSql2)
if not rsCount.eof then
maxpages = (rsCount("PAGECOUNT") \ strPageSize )
if rsCount("PAGECOUNT") mod strPageSize <> 0 then
maxpages = maxpages + 1
end if
else
maxpages = 0
end if

rsCount.close

set rs = Server.CreateObject("ADODB.Recordset")

rs.open strSql, my_Conn, 3
if not (rs.EOF or rs.BOF) then
rs.movefirst
end if

else 'end MySql specific code

set rs = Server.CreateObject("ADODB.Recordset")
rs.cachesize=20

rs.open strSql, my_Conn, 3
if not (rs.EOF or rs.BOF) then
rs.movefirst
rs.pagesize = strPageSize
maxpages = cint(rs.pagecount)
rs.absolutepage = mypage
end if

end if

%>
<script language="JavaScript">
<!-----
function jumpTo(s) {if (s.selectedIndex != 0) top.location.href = s.options[s.selectedIndex].value;return 1;}

function setDays() {document.DaysFilter.submit(); return 0;}
// -->
</script>




Go to Top of Page

Slaid99
New Member

Canada
67 Posts

Posted - 09 June 2002 :  17:50:49  Show Profile  Visit Slaid99's Homepage
Okay... at line 200 I found this...

quote:
end if
strSql = strSql & " ORDER BY " & strActivePrefix & "TOPICS.T_LAST_POST DESC "
'###################### Sticky Topic Mod ############################
if request("ARCHIVE") = "true" then
strSql = strSql & " ORDER BY " & strActivePrefix & "TOPICS.T_LAST_POST DESC "
else
strSql = strSql & " ORDER BY " & strActivePrefix & "TOPICS.T_TOPSTICKY DESC "
strSql = strSql & " , " & strActivePrefix & "TOPICS.T_STICKY DESC "
strSql = strSql & " , " & strActivePrefix & "TOPICS.T_LAST_POST DESC "
end if
'###################### Sticky Topic Mod ############################



I just removed a line so it looks like this...

quote:
end if
'###################### Sticky Topic Mod ############################
if request("ARCHIVE") = "true" then
strSql = strSql & " ORDER BY " & strActivePrefix & "TOPICS.T_LAST_POST DESC "
else
strSql = strSql & " ORDER BY " & strActivePrefix & "TOPICS.T_TOPSTICKY DESC "
strSql = strSql & " , " & strActivePrefix & "TOPICS.T_STICKY DESC "
strSql = strSql & " , " & strActivePrefix & "TOPICS.T_LAST_POST DESC "
end if
'###################### Sticky Topic Mod ############################



and voila... it works...

cool :)

Go to Top of Page

Slaid99
New Member

Canada
67 Posts

Posted - 09 June 2002 :  19:29:44  Show Profile  Visit Slaid99's Homepage
So.. now that I think I have this solved, I have 2 problems...

One... The first message is duplicated on the forum so that it is at the very top and also the first message. I would like to disable this...how?

Two.. I have to "New Topic" links with icons. Hmmm... double code entry? Where do I look for that?


Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 1.79 seconds. Powered By: Snitz Forums 2000 Version 3.4.07