Permalinks in topic.asp - Posted (1536 Views)
Retired Support Moderator
MarcelG
Posts: 2625
2625
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
<
 Sort direction, for dates DESC means newest first  
 Page size 
Posted
Forum Moderator
AnonJr
Posts: 5768
5768
Sweet. I think Shaggy was working on something similar.<
Posted
Support Moderator
Shaggy
Posts: 6780
6780
I was?
Sure you're not thinking of my "jump to last post permalink" included in v3.4.06?
<
Search is your friend “I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Posted
Retired Support Moderator
MarcelG
Posts: 2625
2625
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).<
Posted
Forum Moderator
AnonJr
Posts: 5768
5768
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<
Posted
Senior Member
bobby131313
Posts: 1163
1163
My memory is getting bad for a man of my young years.
You do have it backed up on CD somewhere right?<
Posted
Advanced Member
Carefree
Posts: 4224
4224
I backed mine up on a floppy (had plenty of room), then forgot where I put it.<
 
You Must enter a message