Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 Permalinks in Topic.asp part 2 (beta!)
 New Topic  Reply to Topic
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 24 June 2008 :  10:18:17  Show Profile  Visit MarcelG's Homepage  Reply with Quote
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) ]<

portfolio - linkshrinker - oxle - twitter

Edited by - MarcelG on 28 July 2008 03:59:14

leatherlips
Senior Member

USA
1838 Posts

Posted - 09 July 2008 :  18:49:46  Show Profile  Visit leatherlips's Homepage  Reply with Quote
I've tried this and there are a few issues.
  • In Firefox if you click the last couple of permalinks they go back up near the top.
  • The ¤ does not show. Instead it is a thick vertical line.
  • The address bar does not show the permalink. The URL shows the original topic thread.

Here is my test forum:

http://www.mangionemagic.com/forumbeta/topic.asp?TOPIC_ID=914

I would like to be able to instead of the number appear for the permalink to instead use an image instead. Also, instead of clicking the link to go to that post, I would like it to bring up a box with the link in it so users could easily copy and paste it. I saw that in this forum:

http://maynardfergusonboard.yuku.com/topic/1785

Just click on the permalinks and you'll see what I mean.

Would these be possible with your permalink?<

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD

Edited by - leatherlips on 09 July 2008 19:26:06
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 25 July 2008 :  20:20:18  Show Profile  Visit leatherlips's Homepage  Reply with Quote
When I click on the reply permalink link I get this error:

Microsoft VBScript compilation error '800a03f9'

Expected 'Then'

/forumbeta/permalink.asp, line 40

if left(posttofind),1) = "r" then

It's pointing to after the red comma.

Also, when I click on the topic permalink it takes me to my 404 error page saying the link doesn't exist.<

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD

Edited by - leatherlips on 25 July 2008 20:25:49
Go to Top of Page

phy1729
Average Member

USA
589 Posts

Posted - 25 July 2008 :  21:31:08  Show Profile  Reply with Quote
remove the extra parens
if left(posttofind,1) = "r" then<
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 25 July 2008 :  21:59:41  Show Profile  Visit leatherlips's Homepage  Reply with Quote
quote:
Originally posted by phy1729

remove the extra parens
if left(posttofind,1) = "r" then


I did that, but now am getting this error:

Microsoft VBScript compilation  error '800a0411'

Name redefined

/forumbeta/permalink.asp, line 66

dim topicnumber = linkRec("TOPIC_ID")
<

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD
Go to Top of Page

MaD2ko0l
Senior Member

United Kingdom
1053 Posts

Posted - 25 July 2008 :  22:14:17  Show Profile  Visit MaD2ko0l's Homepage  Reply with Quote
that means that there is 2 instances of dim topicnumber = linkRec("TOPIC_ID") you need to find them both and determine which 1 to get rid of and where they are used on the site.<

© 1999-2010 MaD2ko0l
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 25 July 2008 :  22:20:57  Show Profile  Visit leatherlips's Homepage  Reply with Quote
That line is used only once in the permalink.asp file. I have no idea where else it is. I'm only testing this mod. So far, I can't get it to work.<

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 25 July 2008 :  22:34:54  Show Profile  Reply with Quote
quote:
Originally posted by leatherlips

quote:
Originally posted by phy1729

remove the extra parens
if left(posttofind,1) = "r" then


I did that, but now am getting this error:

Microsoft VBScript compilation  error '800a0411'

Name redefined

/forumbeta/permalink.asp, line 66

dim topicnumber = linkRec("TOPIC_ID")




Strip the dim from that line, it should say only:

					topicnumber = linkRec("TOPIC_ID")
<
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 25 July 2008 :  22:39:26  Show Profile  Visit leatherlips's Homepage  Reply with Quote
After stripping out the dim I get this error:

Microsoft VBScript compilation  error '800a03f9'

Expected 'Then'

/forumbeta/permalink.asp, line 119

elseif left(posttofind),1) = "t" then

I took out the part in red because I thought it might be like the other error above but then got this error:

ADODB.Recordset error '800a0bb9'

Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.

/forumbeta/permalink.asp, line 48

Line 48 is:

linkRec.open strSql, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText

<

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 25 July 2008 :  22:46:22  Show Profile  Reply with Quote
Post a link to a .txt version, there must be another error.<
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 26 July 2008 :  08:11:30  Show Profile  Visit leatherlips's Homepage  Reply with Quote
Here it is. It's the exact same one that is posted at the top of this thread for download.<

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 26 July 2008 :  12:09:23  Show Profile  Reply with Quote
Try this, Leather:


Replaced - see below
<

Edited by - Carefree on 26 July 2008 22:42:26
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 26 July 2008 :  14:46:23  Show Profile  Visit leatherlips's Homepage  Reply with Quote
Sorry Carefree, no luck.

I'm now getting this error:

Microsoft VBScript runtime  error '800a01a8'

Object required: ''

/forumbeta/permalink.asp, line 49

You can go here to see how it behaves:

http://www.mangionemagic.com/forumbeta/topic.asp?TOPIC_ID=915

I had to change the ¤ to a * on mine because the ¤ never shows. It just puts a thick vertical line in its place and is unclickable.

<

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 26 July 2008 :  22:41:31  Show Profile  Reply with Quote

Edited by - Carefree on 27 July 2008 11:21:57
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 26 July 2008 :  22:54:15  Show Profile  Reply with Quote
For those who want to use their css and/or theme colors, here's how the topic.asp lines need to read:

Find this line (appx 789):


	Response.Write	"                       " & profileLink(getCurrentIcon(strIconProfile,"Show Profile","align=""absmiddle"" hspace=""6"""),TMember_ID) & vbNewLine

Above it, insert this:

		Response.Write"<span style=""border:0px solid "& strTableBorderColor & ";height=auto;margin:1px; bgcolor=""" & strForumFirstCellColor & """><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>"


Find these (lines appx 585-586):

			' DEM --> End of Code added for moderation.
			Response.Write	"                       " & profileLink(getCurrentIcon(strIconProfile,"Show Profile","align=""absmiddle"" hspace=""6"""),Reply_MemberID) & vbNewLine

Between them, insert these:

				Response.Write	"<span style=""border:0px solid "& strTableBorderColor & ";height=auto;margin:1px; bgcolor=""" & strForumFirstCellColor & """><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:0px solid "& strTableBorderColor & ";height=auto;margin:1px; bgcolor=""" & strForumFirstCellColor & """><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 & """ />"


This should make your icon symbols blend with the existing backgrounds.<
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 27 July 2008 :  08:28:47  Show Profile  Visit leatherlips's Homepage  Reply with Quote
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.<

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.12 seconds. Powered By: Snitz Forums 2000 Version 3.4.07