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)
 Link To Reply MOD
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

leatherlips
Senior Member

USA
1838 Posts

Posted - 01 August 2008 :  13:08:42  Show Profile  Visit leatherlips's Homepage  Reply with Quote
I made a new little mod that I use on my forum. It is called Link To Reply.

This mod allows the users of your forum to click an icon that displays the link to any topic or reply which they can then copy and paste.

This gives your users the ability to link to the exact reply they were referring to rather than linking to the topic and then trying to explain which reply they were talking about.

If interested you can download it from SnitzBitz.<

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

HuwR
Forum Admin

United Kingdom
20580 Posts

Posted - 01 August 2008 :  14:20:35  Show Profile  Visit HuwR's Homepage  Reply with Quote
isn't that the same as marcels permalink MOD ?<
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 01 August 2008 :  14:28:48  Show Profile  Visit leatherlips's Homepage  Reply with Quote
No. His does not give you a pop up with the URL in it. Also, mine uses just the normal reply and topic links, not permalinks.

I could never get his to work on my forum.<

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 01 August 2008 14:34:07
Go to Top of Page

Massimo
Junior Member

Italy
125 Posts

Posted - 01 August 2008 :  15:16:12  Show Profile  Visit Massimo's Homepage  Reply with Quote
The mods use .swf file?
i use firefox and addon block flash if not autorizated<

Massimo Farieri
Snitz Italian Community
===============
http://www.snitz.it
http://www.superdeejay.net/forum/

Go to Top of Page

MaD2ko0l
Senior Member

United Kingdom
1053 Posts

Posted - 01 August 2008 :  15:36:30  Show Profile  Visit MaD2ko0l's Homepage  Reply with Quote
swf file is needed to allow the website to send the contents of the text box to your clipboard.<

© 1999-2010 MaD2ko0l
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 01 August 2008 :  19:20:04  Show Profile  Visit leatherlips's Homepage  Reply with Quote
It was very difficult to find a cross browser select and copy script. This was the only one I could find. It does it through the .swf file. All other scripts I found were only workable for IE. I wanted it to be easy for people to copy. This way lets them do it with one click. They don't have to first highlight it and then right click to select copy.

I thought this was the best and easiest way to do it. <

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 01 August 2008 19:21:57
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 01 August 2008 :  23:23:55  Show Profile  Reply with Quote
topic.asp requires the code to be changed in two places (for topics and for replies). Here's what I did to make everything work.

Replace pop_link_reply.asp with this:

<%
'#################################################################################
'## Snitz Forums 2000 v3.4.05
'#################################################################################
'## Copyright (C) 2000-05 Michael Anderson, Pierre Gorissen,
'##                       Huw Reddick and Richard Kinser
'##
'## This program is free software; you can redistribute it and/or
'## modify it under the terms of the GNU General Public License
'## as published by the Free Software Foundation; either version 2
'## of the License, or (at your option) any later version.
'##
'## All copyright notices regarding Snitz Forums 2000
'## must remain intact in the scripts and in the outputted HTML
'## The "powered by" text/logo with a link back to
'## http://forum.snitz.com in the footer of the pages MUST
'## remain visible when the pages are viewed on the internet or intranet.
'##
'## This program is distributed in the hope that it will be useful,
'## but WITHOUT ANY WARRANTY; without even the implied warranty of
'## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
'## GNU General Public License for more details.
'##
'## You should have received a copy of the GNU General Public License
'## along with this program; if not, write to the Free Software
'## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
'##
'## Support can be obtained from our support forums at:
'## http://forum.snitz.com
'##
'## Correspondence and Marketing Questions can be sent to:
'## manderson@snitz.com
'##
'#################################################################################
'#################################################################################
'# Link To Reply MOD by Leatherlips
'# Thanks Goes To MaD2ko0l For Helping Getting The Reply URL To Show
'#################################################################################
%>
<!--#INCLUDE FILE="config.asp" -->
<!--#INCLUDE FILE="inc_header_short.asp" -->
<%
strQSY = right(Request.QueryString,20)
	For i = 2 to 20
		strQy=mid(strQSY,i,2)
		strQS=mid(strQSY,i+3)	' Note:  Everything after final = sign
		if strQy = "ID" then exit for
	next
	For j = 1 to len(strQS)
		strQt=mid(strQs,j,1)
		strTopic=left(strQS,j-1)
		strReply=right(strQS, len(strQS)-j)
		if strQt="R" then exit for
	next
Response.Write   "<table border=""0"" width=""95%"" cellspacing=""0"" cellpadding=""0"" align=""center"">" & vbNewLine & _
   "  <tr>" & vbNewLine & _
   "     <td bgcolor=""" & strTableBorderColor & """>" & vbNewLine & _
   "        <table border=""0"" width=""100%"" cellspacing=""1"" cellpadding=""4"">" & vbNewLine & _
   "           <tr>" & vbNewLine & _
   "              <td align=""center"" bgcolor=""" & strHeadCellColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """><b>Link Directly To This Reply</b></font></td>" & vbNewLine & _
   "           </tr>" & vbNewLine & _
   "           <tr>" & vbNewLine & _
   "              <td align=""center"" bgcolor=""" & strCategoryCellColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strCategoryFontColor & """>To link directly to this reply, copy and paste the entire url below.</font></td>" & vbNewLine & _
   "           </tr>" & vbNewLine & _
   "           <tr>" & vbNewLine & _
   "              <td bgcolor=""#FFFFFF"" valign=""top"" align=""left""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """>" & vbNewLine
Response.Write  "<center>Clicking the button below will automatically select and copy the link to your clipboard.<br><br><form name=""replylink"" action="""">" & vbNewLine
Response.Write "<textarea name=""results"" cols=""70"" rows=""2"">" & strForumURL & "topic.asp?" & ArchiveLink & "whichpage=-1&TOPIC_ID=" & strTopic & "#" & strReply &"</textarea><br><br>" & vbNewLine
Response.Write "<input type=""button"" value=""Click To Select & Copy This Reply Link"" onclick=""copy(document.replylink.results.value);"">" & vbNewLine
Response.Write "</form></center>" & vbNewLine & _
   "</td></tr></table></td></tr></table>" & vbNewLine
WriteFooterShort
Response.End
%>


In topic.asp, look for the following 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, add the following:


				Response.Write "           <a href=""JavaScript:openWindowLink('pop_link_reply.asp?url=" & strForumURL & "topic.asp?TOPIC_ID=" & Topic_ID & "R" & Reply_ReplyID & "')"">" & getCurrentIcon(strIconLinkTo,"Link directly to this topic","align=""absmiddle"" hspace=""3""") & "</a>" & vbNewLine

<
Go to Top of Page

Etymon
Advanced Member

United States
2383 Posts

Posted - 02 August 2008 :  04:31:23  Show Profile  Visit Etymon's Homepage  Reply with Quote
Hi LL!

I don't want to sound like a dufus here, but in your travels did you find whether or not it was possible to make the code do the visual cue of highlighting the link in the textbox. I ask because the MOD worked on your site (using FireFox) as it should, just I did not know that anything had happened until I pasted the link into notepad. Is it supposed to show the link as highlighted after you click the "Click To Select & Copy This Topic Link" button.

Thanks for the MOD. I think it will be very useful! <
Go to Top of Page

Classicmotorcycling
Development Team Leader

Australia
2084 Posts

Posted - 02 August 2008 :  07:13:01  Show Profile  Reply with Quote
Carefree,

I had to change your code a little for the pop_link_reply.asp, I hope that you don't mind.

<%
'#################################################################################
'## Snitz Forums 2000 v3.4.06
'#################################################################################
'## Copyright (C) 2000-05 Michael Anderson, Pierre Gorissen,
'## Huw Reddick and Richard Kinser
'##
'## This program is free software; you can redistribute it and/or
'## modify it under the terms of the GNU General Public License
'## as published by the Free Software Foundation; either version 2
'## of the License, or (at your option) any later version.
'##
'## All copyright notices regarding Snitz Forums 2000
'## must remain intact in the scripts and in the outputted HTML
'## The "powered by" text/logo with a link back to
'## http://forum.snitz.com in the footer of the pages MUST
'## remain visible when the pages are viewed on the internet or intranet.
'##
'## This program is distributed in the hope that it will be useful,
'## but WITHOUT ANY WARRANTY; without even the implied warranty of
'## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
'## GNU General Public License for more details.
'##
'## You should have received a copy of the GNU General Public License
'## along with this program; if not, write to the Free Software
'## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
'##
'## Support can be obtained from our support forums at:
'## http://forum.snitz.com
'##
'## Correspondence and Marketing Questions can be sent to:
'## manderson@snitz.com
'##
'#################################################################################
'#################################################################################
'# Link To Reply MOD by Leatherlips
'# Thanks Goes To MaD2ko0l, Carefree and Classicmotorcycling For Helping Getting
'# The Reply URL To Show
'#################################################################################
%>
<!--#INCLUDE FILE="config.asp" -->
<!--#INCLUDE FILE="inc_header_short.asp" -->
<%
Response.Write " <script type=""text/javascript""> " & vbNewLine & _
" function copy(what) {" & vbNewLine & _
" window.clipboardData.setData('Text',what.value);" & vbNewLine & _
" }" & vbNewLine & _
" function paste(what) {" & vbNewLine & _
" what.value = window.clipboardData.getData('Text');" & vbNewLine & _
" }" & vbNewLine & _
" </script>" & vbNewLine

strQSY = right(Request.QueryString,20)
For i = 2 to 20
strQy=mid(strQSY,i,2)
strQS=mid(strQSY,i+3) ' Note: Everything after final = sign
if strQy = "ID" then exit for
next
For j = 1 to len(strQS)
strQt=mid(strQs,j,1)
strTopic=left(strQS,j-1)
strReply=right(strQS, len(strQS)-j)
if strQt="R" then exit for
next
Response.Write "<table border=""0"" width=""95%"" cellspacing=""0"" cellpadding=""0"" align=""center"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strTableBorderColor & """>" & vbNewLine & _
" <table border=""0"" width=""100%"" cellspacing=""1"" cellpadding=""4"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td align=""center"" bgcolor=""" & strHeadCellColor & """>" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """><b>Link Directly To This Reply</b></font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td align=""center"" bgcolor=""" & strCategoryCellColor & """>" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strCategoryFontColor & """>To link directly to this reply, copy and paste the entire url below.</font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""#FFFFFF"" valign=""top"" align=""left"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """>" & vbNewLine & _
" <center>Clicking the button below will automatically select and copy the link to your clipboard.<br><br>" & vbNewLine & _
" <form>" & vbNewLine & _
" <textarea name=""data"" cols=""70"" rows=""2"">" & strForumURL & "topic.asp?" & ArchiveLink & "whichpage=-1&TOPIC_ID=" & strTopic & "#" & strReply &"</textarea>" & vbNewLine & _
" <br />" & vbNewLine & _
" <input type=""button"" value=""Click To Select & Copy This Reply Link"" onclick=""copy(this.form.data)"">" & vbNewLine & _
" </form>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
"</table>" & vbNewLine

WriteFooterShort
Response.End
%>

Seems to work with a slight change.<

Cheers,

David Greening
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 02 August 2008 :  07:23:22  Show Profile  Reply with Quote
I don't mind at all, if you find a better way of making things work, feel free.

However, there's a better way of listing code here using just the code/code or just the scrollbox/scrollbox methods (which list the contents in a single line of type when you copy/paste).

Instead enclose the code within the scrollboxes. Like this: [ scrollbox ][ code ] blah blah blah [/ code ] [/ scrollbox ]. Then the code can be copied/pasted properly.<
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 02 August 2008 :  07:53:21  Show Profile  Visit leatherlips's Homepage  Reply with Quote
What did your changes do?<

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

leatherlips
Senior Member

USA
1838 Posts

Posted - 02 August 2008 :  08:21:27  Show Profile  Visit leatherlips's Homepage  Reply with Quote
quote:
Originally posted by Etymon

I don't want to sound like a dufus here, but in your travels did you find whether or not it was possible to make the code do the visual cue of highlighting the link in the textbox. I ask because the MOD worked on your site (using FireFox) as it should, just I did not know that anything had happened until I pasted the link into notepad. Is it supposed to show the link as highlighted after you click the "Click To Select & Copy This Topic Link" button.

This was the only cross browser copy to clipboard script that I could find. It does not visually show the text as being selected. However it still DOES select and copy it.

There are other scripts I found that do visually select and copy but they are IE specific. I chose not to use them because I wanted it to be cross browser. The one I am using works in IE, FF, Safari and Opera. I haven't tested any other browsers.<

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 02 August 2008 08:21:46
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 03 August 2008 :  00:33:00  Show Profile  Reply with Quote
quote:
Originally posted by leatherlips

What did your changes do?



Not sure who this question was addressed to, Leather. Me? Classic?

If me, my changes put the icon on the replies as well as topics, changed the query string to force it to include replies info, then parsed the query string (which doesn't seem to grab anything after the topic information) to get the pertinent data from which to build the link.

Classic's changes added the javascript routine into the reply page so that it isn't necessary to add it to func_common in order for it to work. He also changed the onclick routine to capture all the form information.<
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 03 August 2008 :  08:39:48  Show Profile  Visit leatherlips's Homepage  Reply with Quote
Thanks Carefree.

I'm a little confused though.

quote:
my changes put the icon on the replies as well as topics

In my mod the icon was already added to the replies.

quote:
Classic's changes added the javascript routine into the reply page so that it isn't necessary to add it to func_common in order for it to work

I did not add anything to inc_func_common.asp.<

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

leatherlips
Senior Member

USA
1838 Posts

Posted - 03 August 2008 :  21:31:57  Show Profile  Visit leatherlips's Homepage  Reply with Quote
quote:
Originally posted by Etymon

...I did not know that anything had happened until I pasted the link into notepad...


I have added a confirmation that the link was successfully copied.

In both pop_link_reply.asp and pop_link_topic.asp look for:
onclick=""copy(document.replylink.results.value);"">

Add the part in red:
onclick=""copy(document.replylink.results.value);this.value='Successfully Copied!';"">

What this does is change the text that appears on the button to say Successfully Copied! after the button is clicked.<

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
  Previous Topic Topic Next Topic  
 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.22 seconds. Powered By: Snitz Forums 2000 Version 3.4.07