Permalinks in topic.asp

Snitz™ Forums 2000
https://forum.snitz.com/forumTopic/Posts/67303?pagenum=1
05 November 2025, 00:20

Topic


MarcelG
Permalinks in topic.asp
20 June 2008, 10:54


Yesterday evening I've added a simple feature to the forumtopics on oxle.com ; 'permalinks'. Just click on the # shown in the reply-header, and your browser address bar will show the link. example:
It'll make the page hop to that post (html bookmark) and in the address bar you'll see the address that links directly to that post. You can use this to refer to a specific post in a topic. For consistency the link is also shown for the startingpost of a topic, but besides the # nothing is added to the address.
I am going to try and improve it a bit, to arrange that it actually is a real permalink (a link that never changes, even when the topic is split and the pagenumber the reply is on changes), but that'll take some time. I vaguely remember that someone else here has tried to make a function for that, but I cannot remember who that was.
For those who want to build this small feature into their own Snitz forum, here's the how to. Topic.asp (version 3.4.06). Find this code: (in a standard topic.asp you'll find it on line 585)
Code:
	' DEM --> End of Code added for moderation.
	Response.Write	"                       " & profileLink(getCurrentIcon(strIconProfile,"Show Profile","align=""absmiddle"" hspace=""6"""),Reply_MemberID) & vbNewLine
Insert the following line of code right inbetween those two lines:
Code:
	Response.Write	"<font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>nbsp;<b><a href=""#" & Reply_ReplyID & """ title=""permalink to this post"">#</a></b> </font>"
The end result is this:
Code:
	' DEM --> End of Code added for moderation.
	Response.Write	"<font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """> <b><a href=""#" & Reply_ReplyID & """ title=""permalink to this post"">#</a></b> </font>"
Response.Write " " & profileLink(getCurrentIcon(strIconProfile,"Show Profile","align=""absmiddle"" hspace=""6"""),Reply_MemberID) & vbNewLine
Then, find this line: (around 790 in a standard topic.asp).
Code:
	Response.Write	"                       " & profileLink(getCurrentIcon(strIconProfile,"Show Profile","align=""absmiddle"" hspace=""6"""),TMember_ID) & vbNewLine
Directly above it, add this:
Code:
	Response.Write	"<font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """> <b><a href=""#"" title=""permalink to this post"">#</a></b> </font>"
The endresult will look like this:
Code:
	Response.Write	"<font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """> <b><a href=""#"" title=""permalink to this post"">#</a></b> </font>"
Response.Write " " & profileLink(getCurrentIcon(strIconProfile,"Show Profile","align=""absmiddle"" hspace=""6"""),TMember_ID) & vbNewLine
<

 

Replies ...


AnonJr
20 June 2008, 11:06


Sweet. I think Shaggy was working on something similar.<
Shaggy
24 June 2008, 05:24


I was?
Sure you're not thinking of my "jump to last post permalink" included in v3.4.06?
<
MarcelG
24 June 2008, 06:31


Yup, that was it.
The real permalink function is working now, however it's based on a custom 404.
My permalinks at oxle now look like this:
http://oxle.com/topic/5337 (for a topic)
http://oxle.com/reply/38648 (reply from a multipage topic).<
AnonJr
24 June 2008, 06:36


Originally posted by Shaggy
I was?
Sure you're not thinking of my "jump to last post permalink" included in v3.4.06?
That could easily have been it. My memory is getting bad for a man of my young years. sleepy<
bobby131313
24 June 2008, 09:17


My memory is getting bad for a man of my young years.
You do have it backed up on CD somewhere right?<
Carefree
24 June 2008, 09:32


I backed mine up on a floppy (had plenty of room), then forgot where I put it.<
© 2000-2021 Snitz™ Communications