Author |
Topic |
work mule
Senior Member
USA
1358 Posts |
Posted - 27 May 2001 : 05:25:18
|
JUMP TO 1ST NEW POST & LAST POST OF TOPIC
May 27, 2001 This MOD allows the forum user to jump directly to the first unread/new post or the last post of a topic. This is based upon the functionality seen on other forum products and has now been assimilated into the Snitz collective.
DEMO: Main Board then click on the forum titled: A is for Apple (a simple demo for a simple mod)
DOWNLOAD: jumpto_new_and_old_posts.zip
The download file includes instructions and the two arrow graphics.
The new post (blue) arrow only appears if the last topic date is greater than the last visit date stored in the session object. The last post link is always visible.
For mySQL users, this mod will probably not work for you at this time. Sorry. If someone, who is familiar with mySQL, could take a look at this, I would appreciate it.
The topic paging and sorting mod can be found here.
"Do not go where the path may lead, go instead where there is no path and leave a trail." -Ralph Waldo Emerson
Edited by - work mule on 28 May 2001 10:00:45 |
|
tteal
Junior Member
USA
438 Posts |
|
Flaimo
New Member
Austria
72 Posts |
Posted - 27 May 2001 : 21:08:22
|
couldn't test it much, but it seems to work fine on my board. thanks for the mod!
flaimo,
http://flaimo.com/famousfonts |
|
|
Freeman II
Junior Member
232 Posts |
Posted - 28 May 2001 : 01:09:03
|
work mule nice mod this is exactly what i was talking about =)
could you make the last post link visible in default.asp like in VBB2.0
|
|
|
Freeman II
Junior Member
232 Posts |
Posted - 28 May 2001 : 01:33:19
|
Error Type: Microsoft VBScript runtime (0x800A01A8) Object required: 'my_Conn' inc_functions.asp, line 635
Edited by - freeman ii on 28 May 2001 01:50:21 |
|
|
Dan03
Starting Member
Australia
17 Posts |
Posted - 28 May 2001 : 01:48:52
|
quote:
Get this error: Microsoft VBScript runtime error '800a01a8'
Object required: 'my_Conn'
/demo/sf2000_v3sr4_paging/inc_functions.asp, line 634
Cheers, Tim
If you navigate to the correct forum and topic manually, you can bypass this error. But yes, this does occur...
And BTW - when I tested it, it didn't quite take me to the bottom on the page. I still had to scroll down...
- Dan. _______________________________ http://www.zer03.com/ |
|
|
Flaimo
New Member
Austria
72 Posts |
Posted - 28 May 2001 : 10:22:33
|
ok, first problmen: work on my computer with W2K and IIS5 but not on an older NT4 with IIS4.
Kompilierungsfehler in Microsoft VBScript-Fehler '800a0400'
Anweisung erwartet
/forum/topic.asp, Zeile 134
with rs ^
now, that's this code:
'##### Jump to Last Post MOD (May 27, 2001) ##### totalreplies = rs.Recordcount Select Case request("jump") Case "lastpost" rs.absolutepage = maxpages mypage = maxpages Case "newpost" with rs if .recordcount <> 0 then 'set recordset filter .filter = ("R_DATE > '" & lastDate & "'") if .recordcount = 1 then .movefirst newrecpos = .absoluteposition if ((newrecpos mod strPageSize) > 0) then mypage = Int(Abs(newrecpos/strPageSize))+1 else mypage = Int(Abs(newrecpos/strPageSize)) end if end if end if 'take out filter .filter = "" end with rs.absolutepage = mypage Case Else rs.absolutepage = mypage End Select '##### Jump to Last Post MOD ##### |
|
|
work mule
Senior Member
USA
1358 Posts |
Posted - 28 May 2001 : 10:25:11
|
In regards to the error with the demo link, I don't know why it's doing that. Like a couple of you suggested, if you go to the main board, and then navigate down, it'll work. I modified the demo link in the original post to get people to go in that way. Thanks for letting me know.
I have the # of topics per page set low for the paging demo and the topics were short so the anchor link didn't bring it right up to the top. It's a quirky thing. I added two deeper topics to the topic titled "A popular topic - many replies" to provide a better example. If you shorten up your browser window for the demo, it'll work better.
I have some more work to do to get this on the default page. The problem is that I don't know which topic was last updated. The only thing recorded in the Forum table is the last post date. So either the topic id has to be recorded in the forum table or I have to create a page similiar to links.asp but it would have to look up the topic id for that forum. I haven't decided which is the best option.
"Do not go where the path may lead, go instead where there is no path and leave a trail." -Ralph Waldo Emerson |
|
|
Flaimo
New Member
Austria
72 Posts |
|
Freeman II
Junior Member
232 Posts |
Posted - 28 May 2001 : 21:30:00
|
work mule
when i installed your mod i get this Get this error: Microsoft VBScript runtime error '800a01a8'
Object required: 'my_Conn'
_functions.asp, line 634
|
|
|
lcs78816
Junior Member
195 Posts |
Posted - 29 May 2001 : 19:51:20
|
lol-- now Snitz looks so similiar to VBulletin now..
|
|
|
work mule
Senior Member
USA
1358 Posts |
Posted - 29 May 2001 : 20:33:34
|
quote:
ok, first problmen: work on my computer with W2K and IIS5 but not on an older NT4 with IIS4.
It's working with PWS and Win98. I didn't get the chance to test this at work with NT4 and IIS4. I wouldn't see why it wouldn't work. We've done "with xxxx" (where xxxx is an object) type of code before. That could probably be rewritten though if that was the problem, which I'm not disputing, but I can't explain the error.
--The Writer Community
"Do not go where the path may lead, go instead where there is no path and leave a trail." -Ralph Waldo Emerson |
|
|
work mule
Senior Member
USA
1358 Posts |
Posted - 29 May 2001 : 21:33:33
|
quote:
when i installed your mod i get this Get this error: Microsoft VBScript runtime error '800a01a8'
Object required: 'my_Conn'
_functions.asp, line 634
DOH!
I totally apologize for the mistake. It's so obvious now.
Here's the problem, when I'm looking for the lastdate, sometimes the code uses the function, ReadLastHereDate, which requires the connection object, my_Conn. Well the problem is that this variable section is placed before the include for inc_top.asp where the connection object is created. So when the function is called, the connection object doesn't exist yet, thus the error.
To fix the problem, the block of code for the variables should be moved directly after the inc_top.asp include!
forum.asp - @Line 152 topic.asp - mine is @Line 152
I had totally missed this because I'm used to working on my forum code for The Writer and I have the code for the connection object outside of the inc_top.asp file.
Let me know if this fixes everyone's problem or if there's something else I'm missing here.
--The Writer Community
"Do not go where the path may lead, go instead where there is no path and leave a trail." -Ralph Waldo Emerson |
|
|
Flaimo
New Member
Austria
72 Posts |
Posted - 29 May 2001 : 23:40:27
|
i still get the "with rs" error on the server of my provider. could it be that this only works with IIS5?
oh, and those arrows would also be very useful on the active.asp page |
|
|
work mule
Senior Member
USA
1358 Posts |
Posted - 29 May 2001 : 23:54:22
|
quote:
i still get the "with rs" error on the server of my provider. could it be that this only works with IIS5?
I'll try this out tomorrow while I'm at work and let you know. We are using IIS4 there. I really wouldn't think so becuase I'm running this on PWS.
quote:
oh, and those arrows would also be very useful on the active.asp page
noted!
--The Writer Community
"Do not go where the path may lead, go instead where there is no path and leave a trail." -Ralph Waldo Emerson |
|
|
e3stone
Average Member
USA
885 Posts |
Posted - 10 June 2001 : 18:31:31
|
I can't get mine to position itself on the last post. The new post option works, but the "last post" option just takes you to the last page at the top. (plus the page # still says page 1) check it out on my forum: http://www.insidewaco.com/forum/forum.asp?FORUM_ID=2&CAT_ID=1 I can't figure out what's wrong. Here's my topic.asp page: http://www.insidewaco.com/forum/topic.txt
this is the link I have on forum.asp: <!-- Jump to Last Post --><a href="topic.asp?jump=lastpost&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") %>#lastpost"><img border="0" width="10" height="9" alt="Go To Last Post" src="lastpost.gif"></a>
<-- Eric -->
InsideWaco.com |
|
|
Topic |
|