Author |
Topic |
bonkers
Junior Member
United Kingdom
122 Posts |
Posted - 16 July 2001 : 07:50:12
|
I have tried to add the Topic Sorting & Paging Mod It works fine on the members page but the forum page I get this error
Testing the forum
Microsoft VBScript runtime error '800a000d'
Type mismatch: 'TopicPaging'
/BTP/content/forum.asp, line 340
Line 340 is
<td bgcolor="<% =strForumCellColor %>" valign="center" align="left"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><a href="topic.asp?TOPIC_ID=<% =rs("TOPIC_ID") %>&FORUM_ID=<% =Request.QueryString("FORUM_ID") %>&CAT_ID=<% =Request.QueryString("CAT_ID") %>&Topic_Title=<% =ChkString(left(rs("T_SUBJECT"), 50),"urlpath") %>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"urlpath") %>"><% =ChkString(left(rs("T_SUBJECT"), 50),"display") %></a> </font><% if strShowPaging = "1" then TopicPaging() end if%></td>
As i dont know what is wrong can any body help please. ps forum code= portal_mod_2ka06_a02
bonkers |
|
|
GauravBhabu
Advanced Member
4288 Posts |
Posted - 16 July 2001 : 08:51:11
|
quote:
I have tried to add the Topic Sorting & Paging Mod It works fine on the members page but the forum page I get this error
Testing the forum
Microsoft VBScript runtime error '800a000d'
Type mismatch: 'TopicPaging'
/BTP/content/forum.asp, line 340
Line 340 is
<td bgcolor="<% =strForumCellColor %>" valign="center" align="left"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><a href="topic.asp?TOPIC_ID=<% =rs("TOPIC_ID") %>&FORUM_ID=<% =Request.QueryString("FORUM_ID") %>&CAT_ID=<% =Request.QueryString("CAT_ID") %>&Topic_Title=<% =ChkString(left(rs("T_SUBJECT"), 50),"urlpath") %>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"urlpath") %>"><% =ChkString(left(rs("T_SUBJECT"), 50),"display") %></a> </font><% if strShowPaging = "1" then TopicPaging() end if%></td>
As i dont know what is wrong can any body help please. ps forum code= portal_mod_2ka06_a02
bonkers
One reason you will get this error is because you do not have the sub TopicPaging () in your forum.asp. Check your file and add this at the bottom of your file:
<% sub TopicPaging() mxpages = (rs("T_REPLIES") / strPageSize) if mxPages <> cint(mxPages) then mxpages = int(mxpages) + 1 end if if mxpages > 1 then Response.Write("<table border=0 cellspacing=0 cellpadding=0><tr><td valign=""center""><font face=" & strDefaultFontFace & " size=" & strFooterFontSize & "><img src=""images/icon_posticon.gif"" border=""0""></font></td>") for counter = 1 to mxpages ref = "<td align=right bgcolor=" & strForumCellColor & "><font face=" & strDefaultFontFace & " size=" & strFooterFontSize & ">" if ((mxpages > 9) and (mxpages > strPageNumberSize)) or ((counter > 9) and (mxpages < strPageNumberSize)) then ref = ref & " " end if ref = ref & widenum(counter) & "<a href='topic.asp?" ref = ref & "TOPIC_ID=" & rs("TOPIC_ID") ref = ref & "&FORUM_ID=" & rs("FORUM_ID") ref = ref & "&CAT_ID=" & rs("CAT_ID") ref = ref & "&Topic_Title=" & ChkString(left(rs("T_SUBJECT"), 50),"urlpath") ref = ref & "&Forum_Title=" & ChkString(Request.QueryString("FORUM_Title"),"urlpath") ref = ref & "&whichpage=" & counter ref = ref & "'>" & counter & "</a></font></td>" Response.Write ref if counter mod strPageNumberSize = 0 then Response.Write("</tr><tr><td> </td>") end if next Response.Write("</tr></table>") end if end sub
%>
gauravbhabu
There is only one miracle...That is LIFE!
Edited by - GauravBhabu on 16 July 2001 08:52:20 |
|
|
bonkers
Junior Member
United Kingdom
122 Posts |
Posted - 17 July 2001 : 07:50:51
|
gauravbhabu Thank you I have it working now I think. It was the software I used to cut`n`paste it overwrote the section of code you gave above.
we live and learn bonkers
Edited by - bonkers on 17 July 2001 07:52:23 |
|
|
GauravBhabu
Advanced Member
4288 Posts |
Posted - 17 July 2001 : 14:52:40
|
Pleasure, you got it working.
gauravbhabu
There is only one miracle...That is LIFE! |
|
|
Freeman II
Junior Member
232 Posts |
|
dayve
Forum Moderator
USA
5820 Posts |
Posted - 05 August 2001 : 21:35:57
|
love this mod, just got it installed. thanks..
Dayve |
|
|
work mule
Senior Member
USA
1358 Posts |
Posted - 05 August 2001 : 22:24:41
|
quote:
love this mod, just got it installed. thanks..
Dayve
Thanks! Glad to see it's still seeing some use.
Does it work on v3.3+? I personally haven't tested the mod on the new version, but I can't imagine that much has changed that would have affected this mod.
The Work Mule Forums The Writer Community
|
|
|
dayve
Forum Moderator
USA
5820 Posts |
Posted - 05 August 2001 : 23:19:11
|
I have too many modifications from here and my own to upgrade to v3.3 so I can't say
Dayve |
|
|
Buckaroo
Starting Member
Canada
19 Posts |
Posted - 16 August 2001 : 17:45:39
|
I'm looking for a complete reverse thread order fix/config for Snitz. I was able to do this in UBB with the option in the cp.html control panel, and to some extent in Snitz (with a little editing help from Richard).
Here's what I mean (My UBB and Snitz):
UBB Reverse Thread View
-edit- I've changed the sort back from reverse now in preparation for implementing work mule's code. The below link will show a normal sort order. -edit-
Snitz Semi-Reverse Thread View
Any help is always appreciated.
Edited by - Buckaroo on 17 August 2001 02:35:28 |
|
|
work mule
Senior Member
USA
1358 Posts |
Posted - 16 August 2001 : 20:15:35
|
quote:
I'm looking for a complete reverse thread order fix/config for Snitz. I was able to do this in UBB with the option in the cp.html control panel, and to some extent in Snitz (with a little editing help from Richard).
Okay, should be simple enough....
Look for this code which is about Lines 263-267 and get ready to move it... (delete or comment it out)
<% if mypage = 1 then Call GetFirst() end if %>
Look for something that looks like this, which is about mid-400's on my code (heavily mod'ed so it won't be the same)
<% rs.MoveNext intI = intI + 1 if intI = 2 then intI = 0 end if rec = rec + 1 loop end if
rs.close set rs = nothing %> </table></td> </tr> </table>
<%
Once you found that here's what you do...
<% rs.MoveNext intI = intI + 1 if intI = 2 then intI = 0 end if rec = rec + 1 loop end if
rs.close set rs = nothing '------------------------ 'Show Topic Last!!! if (mypage = maxpages) OR (maxpages="") then Call GetFirst() end if '------------------------ %> </table></td> </tr> </table>
<%
What this does is only show the topic on the last page (mypage=maxpages) and only after all the replies have been displayed!
I tested this out and it works fine.
Happy Mod'ing!!
The Work Mule Forums The Writer Community
Edited by - work mule on 16 August 2001 20:18:39
Edited by - work mule on 16 August 2001 22:16:05 |
|
|
work mule
Senior Member
USA
1358 Posts |
|
Buckaroo
Starting Member
Canada
19 Posts |
Posted - 17 August 2001 : 01:44:43
|
I have to say I'm impressed! This is slick and exactly what I'm looking for.
Got a question or two though...
Should I implement your TOPIC SORTING & ALTERNATE PAGING STYLE mod first? Before I do these codes changes you've described (comment/delete first chunk of code and add the other little chunk there within the last code)?
Will this all give me your drop down arrow "ascend/descend" option?
|
|
|
Buckaroo
Starting Member
Canada
19 Posts |
Posted - 17 August 2001 : 01:55:25
|
Erg! Forgot to ask, what file are you referencing to change the code in?
-edit-
Ok, I found the code in topic.asp. But I have much more code than the first bit you mention and I'm not sure what all to comment out. I'm not a programmer. I'm not sure what the <% do. Describe a routine until a close %> ?? No idea, argh.
I'll give your stuff a try of course and see what I can work out.
Edited by - Buckaroo on 17 August 2001 02:04:18 |
|
|
work mule
Senior Member
USA
1358 Posts |
Posted - 17 August 2001 : 16:27:11
|
The code that I copied here will not give you the dropdown option that you saw. Give it a couple days and you'll probably see it posted tho.
The code here will make the topic display at the end tho'. And no, you don't need to install the paging mod to use it.
|
|
|
Buckaroo
Starting Member
Canada
19 Posts |
Posted - 17 August 2001 : 17:38:49
|
Hi work mule
* warning - longish post *
********** You wrote: ----------------------------------------------------------------
Look for this code which is about Lines 263-267 and get ready to move it... (delete or comment it out)
<% if mypage = 1 then Call GetFirst() end if %>
********** Mine looks like: ----------------------------------------------------------------
<% if mypage = 1 then Call GetFirst() end if rsTopic.close set rsTopic = Nothing
'## Forum_SQL strSql = "UPDATE " & strActivePrefix & "TOPICS " strSql = strSql & " SET " & strActivePrefix & "TOPICS.T_VIEW_COUNT = (" & strActivePrefix & "TOPICS.T_VIEW_COUNT + 1) " strSql = strSql & " WHERE (" & strActivePrefix & "TOPICS.TOPIC_ID = " & Topic_ID & ");"
my_conn.Execute (strSql) if rsReplies.EOF or rsReplies.BOF then '## No replies found in DB Response.Write "" else intI = 0 howmanyrecs = 0 rec = 1 do until rsReplies.EOF or (mypage = 1 and rec > CInt(strPageSize)) or (mypage > 1 and rec > CInt(strPageSize)) '**
Reply_Content = rsReplies("R_MESSAGE") if intI = 0 then CColor = strAltForumCellColor else CColor = strForumCellColor end if %>
********** You wrote: ----------------------------------------------------------------
Look for something that looks like this, which is about mid-400's on my code (heavily mod'ed so it won't be the same)
<% rs.MoveNext intI = intI + 1 if intI = 2 then intI = 0 end if rec = rec + 1 loop end if rs.close set rs = nothing %> </table></td> </tr> </table> <%
********** Mine looks like: ----------------------------------------------------------------
<% rsReplies.MoveNext intI = intI + 1 if intI = 2 then intI = 0 end if rec = rec + 1 loop end if %> </table></td> </tr> <tr> <td colspan="2"> <table border="0" width="100%"> <tr> <td> <% if maxpages > 1 then %> <table border=0> <tr> <td valign="top"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b>Topic is <% =maxpages %> Pages Long: </font></td> <td valign="top"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><% Call Paging() %></font></td> </tr> </table> <% else %> <td valign="top"> </td> <% end if %> </td> <td align="right" nowrap> <% if (AdminAllowed = 1) then %> <% call AdminOptions() %> <% else %> <% end if %> </td> </tr> </table></td> </tr> </table> </div>
<table width="100%"> <tr> <td align="center" valign="top" width="70%"><% Call PostingOptions() %></td> <td align="center" valign="top" width="30%"><!--#INCLUDE FILE="inc_jump_to.asp" --></td> </tr> </table>
<%
********** END: ----------------------------------------------------------------
So basically, it looks like I have a bunch of extra code in my topic.asp. I'm not sure what to do in regards to commenting out the extra code and inserting code into the right place.
I have installed the Smilies Mod and Private Messaging Mod. I don't think they account for the extra code.
I'm running on IIS5 and MS-SQL2000
I think this is a fairly important mod. On a heavily used forum with regular users, paging down constanly to get to the latest post is tedious. Having a reverse order let's your regular users save frustration time.
Thanks for your help.
|
|
|
Topic |
|