Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 Permalinks in Topic.asp part 2 (beta!)

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!
Before posting, make sure you have read this topic!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
MarcelG Posted - 24 June 2008 : 10:18:17
This is a new version of this mod.
Warning! : this mod is written in half an hour, and has NOT been tested!
Permalink.asp is made from scratch by heart, and not executed at all...(I don't have FTP access to my site to test it).
So, it may work right away if I paid attention, but it may just as well fail....

What this mod will do is this:
  • it will add a small box with a number in it to the header of each reply. This number is the position of this reply in that topic.

  • it will add a small box with a link showing a permalink (¤) to the header of each post (topic and replies).
    The permalink will take you to the topic, or to the reply regardless of the pagenumber it's on (for replies) and regardless if it's archived or not (for topics and replies).
    For people who've implemented the split topic mod, moved replies will also be found using the permalink (except for the startpost, which is in fact a deleted reply that's inserted as a topic)


How to implement it ?

When coming from the previous version of this mod:
	' 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>"

with this:
' DEM --> End of Code added for moderation.	
Response.Write "<span style=""border:1px solid "& strTableBorderColor & ";background-color:white;height=auto;margin:1px;""><font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """> <a href=""#" & Reply_ReplyID & """ title=""jump to this post"">#" & (((mypage-1) * strPageSize) + iForum + 1)& "</a> </font></span>"
Response.Write "<span style=""border:1px solid "& strTableBorderColor & ";background-color:white;height=auto;margin:1px;""><font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """> <a href=""permalink.asp?r" & Reply_ReplyID & """ title=""permalink to this post"">¤</a> </font></span><link rel=""permalink"" href=""permalink.asp?r" & Reply_ReplyID & """ />"


Then, replace this:
	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

by this:
response.write"<span style=""border:1px solid "& strTableBorderColor & ";background-color:white;height=auto;margin:1px;""><font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """> <a href=""permalink/asp?t" & Topic_ID & """ title=""permalink to this topic"">¤</a> </span><link rel=""permalink"" href=""permalink.asp?t" & Topic_ID & """ /></font></span>"
Response.Write " " & profileLink(getCurrentIcon(strIconProfile,"Show Profile","align=""absmiddle"" hspace=""6"""),TMember_ID) & vbNewLine


Then, finally, download this file, and save it as permalink.asp (remove the .txt extension):

Text File: read permalink.asp.txt 7638 bytes

Again a warning: it has NEVER been tested! At oxle I use a custom 404 to handle the permalinks, so I migrated the code I used there to this code, without the ability to test it.

[edit:first theoretical bugfix ]
[edit 28-7-2008 :bugfix in startpost permalink (permalink/asp?t replaced by permalink.asp?t) ]<
15   L A T E S T    R E P L I E S    (Newest First)
Carefree Posted - 30 July 2008 : 05:50:22
Classicmotorcycling Posted - 30 July 2008 : 04:58:34
MarcelG Posted - 30 July 2008 : 04:10:27
This is getting stranger by the minute...those last two links take me to default.asp, and not to a reply or even to a specific topic.
Which version of permalink.asp are you using?<
Classicmotorcycling Posted - 29 July 2008 : 16:27:21
There is an issue where if the reply is is not on the first page of the topic then it will not go to the reply, but just to the topic. As an example using the same topic that is spread over 2 pages:

Main Topic
Reply on Page 1
Reply on Page 2 - puts you at the top of the main topic
<
Carefree Posted - 29 July 2008 : 11:38:41
They work properly for me, also.<
leatherlips Posted - 29 July 2008 : 08:33:30
That's odd. Both links take me to the reply when I clicked on them.<
MarcelG Posted - 29 July 2008 : 05:08:26
Sorry, but http://www.mangionemagic.com/forumbeta/permalink.asp?r5433 takes me to default.asp as well, while it should take me to http://www.mangionemagic.com/forumbeta/topic.asp?topic_id=914#5433
<
leatherlips Posted - 28 July 2008 : 10:24:45
Only the topic permalink takes me to default.asp. The replies seem to work.<
MarcelG Posted - 28 July 2008 : 10:15:47
all your permalinks take you to default.asp....something wrong in permalink.asp ?<
leatherlips Posted - 28 July 2008 : 08:06:03
quote:
Originally posted by Carefree

Well, I remember the /asp error - but it doesn't exist in the file I posted ...

You're right. The /asp error is in MarcelG's code at the top of this topic. I changed the /asp to .asp but now instead of getting the 404 error, the permalink takes me to default.asp.<
Carefree Posted - 28 July 2008 : 04:14:54
Well, I remember the /asp error - but it doesn't exist in the file I posted ...<
MarcelG Posted - 28 July 2008 : 03:54:21
quote:
For people who've implemented the split topic mod, moved replies will also be found using the permalink (except for the startpost, which is in fact a deleted reply that's inserted as a topic)


The 404 ; your startpost permalink goes to http://www.mangionemagic.com/forumbeta/permalink/asp?t914 instead of http://www.mangionemagic.com/forumbeta/permalink.asp?t914
(So, a / instead of a .)
Replace this:
permalink/asp?t
with this:
permalink.asp?t
I've updated the startpost.<
leatherlips Posted - 27 July 2008 : 13:16:46
I'm not getting any errors, but either I don't understand what it is supposed to do or it doesn't work.

For example:

I had a reply that had this URL -
http://www.mangionemagic.com/forumbeta/topic.asp?topic_id=914#5443

In the status bar in the lower left corner of IE when hovering over the permalink it displayed this url -
http://www.mangionemagic.com/forumbeta/permalink.asp?r5443

I then split that reply to its own topic and it became -
http://www.mangionemagic.com/forumbeta/topic.asp?TOPIC_ID=917

Now the original permalink can not find that reply. Does that make sense?

Also, clicking on the topic permalink still goes to a 404 error page.<
Carefree Posted - 27 July 2008 : 11:23:23
leatherlips Posted - 27 July 2008 : 08:28:47
The newer code worked better.

However, when I split the topic (with the split topic mod) and moved one of the replies to its own topic, it's permalink no longer works and I get this error:

Microsoft VBScript runtime  error '800a01a8'

Object required: ''

/forumbeta/permalink.asp, line 60


Also clicking on its new permalink topic link I get a 404 page not found error.<

Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000 Version 3.4.07