Author |
Topic |
kwhipp
Junior Member
USA
407 Posts |
Posted - 17 November 2003 : 19:20:40
|
Title: Reply URL
Version: 3.4d
Tested on Snitz Forums version: 3.4.03
Database Tested on: MS Access 2000
Author: Kevin Whipp
Ease of Installation (1=easy, 10=hard): 1
Download: http://whipp.us/download.asp?t=file&f=reply_url_34.zip
Support: http://whipp.us/forum.asp?FORUM_ID=19
Demo: http://whipp.us/topic.asp?TOPIC_ID=42#51
Description:
Adds a link to each reply that identifies the direct URL of the reply. You nolonger have to say, "See the third reply of this topic." Just say, "Click here.
Screenshot(s):
Non-IE browser display this alert box
Development History: November 17, 2003 - Initial release November 18, 2003 - Added JavaScript for one-click copying November 18, 2003 - No longer IE dependent November 19, 2003 - One-click copy using IE, other browsers open a javascript alert box November 26, 2003 - Better browser identification and pop up acknowledgment in IE (thanks dayve) |
- Kevin |
Edited by - kwhipp on 26 November 2003 10:48:59 |
|
Ryan
Average Member
USA
858 Posts |
Posted - 17 November 2003 : 23:21:09
|
I was thinking of doing this but in a different way. Great idea though! Now I won't need to do it. |
The Poultry Link - "Serving the best of the fancy with the best of the web" Forum Setup Help |
|
|
dayve
Forum Moderator
USA
5820 Posts |
Posted - 17 November 2003 : 23:39:04
|
You were thinking of doing this Ryan? I didn't know you knew how develop mods around Snitz code. |
|
|
|
Ez4arab
Junior Member
479 Posts |
|
RichardKinser
Snitz Forums Admin
USA
16655 Posts |
Posted - 18 November 2003 : 06:46:50
|
quote: Originally posted by Ez4arab
Demo does not work
sure it does, just place your mouse pointer over the and then right click and choose "Copy Shortcut".
Functionality of the MOD has changed so the above is no longer applicable. |
|
|
DavidRhodes
Senior Member
United Kingdom
1222 Posts |
Posted - 18 November 2003 : 06:57:17
|
Would it not be better to copy the URL to the clipboard as the image title suggests? |
The UK MkIVs Forum |
|
|
kwhipp
Junior Member
USA
407 Posts |
Posted - 18 November 2003 : 08:04:58
|
quote: Originally posted by DavidRhodes
Would it not be better to copy the URL to the clipboard as the image title suggests?
Yes it would. I'm not a programmer and I have not figured out how to do just that. Any suggestions are welcome.
|
- Kevin |
|
|
dayve
Forum Moderator
USA
5820 Posts |
Posted - 18 November 2003 : 10:41:15
|
I think I have 2 ideas for this. Let me dig up my resources. |
|
|
|
RichardKinser
Snitz Forums Admin
USA
16655 Posts |
Posted - 18 November 2003 : 13:31:38
|
quote: Originally posted by DavidRhodes
Would it not be better to copy the URL to the clipboard as the image title suggests?
It can be done, but it's Internet Explorer specific, it wouldn't work in other browsers.
http://www.htmlgoodies.com/beyond/clipboard.html |
|
|
dayve
Forum Moderator
USA
5820 Posts |
Posted - 18 November 2003 : 14:55:27
|
quote: Originally posted by RichardKinser
quote: Originally posted by DavidRhodes
Would it not be better to copy the URL to the clipboard as the image title suggests?
It can be done, but it's Internet Explorer specific, it wouldn't work in other browsers.
http://www.htmlgoodies.com/beyond/clipboard.html
DOH! I was going to try and impress everyone around here with what I was doing. Guess I was trying to reinvent the wheel. And yes, it is IE specific, but still worth implementing I think.
Here is the idea I was running with:
<html>
<head>
<title>Untitled</title>
</head>
<script type="text/javascript" language="JavaScript1.2">
<!--
function getIt(id){
alert(id);
}
// -->
</script>
</head>
<body>
<a href="http://www.somesite.com?blah=1&blah=2" id="site1" onclick="getIt(this.href); return false;">Cool Site</a><br>
<a href="http://www.somesite.com?blah=3&blah=4" id="site2" onclick="getIt(this.href); return false;">Cool Site2</a>
</body>
</html>
instead of alerting the value, I would use the IE specific code for placing the value in the clipboard. |
|
|
|
kwhipp
Junior Member
USA
407 Posts |
Posted - 18 November 2003 : 17:28:14
|
quote: Originally posted by RichardKinser
http://www.htmlgoodies.com/beyond/clipboard.html
Okay, I've tried. I just cannot figure out how, using javascript, to copy the text that is currently in the link. I can do it if I output the link into a textbox. But you do not what that all over the topic page. |
- Kevin |
|
|
RichardKinser
Snitz Forums Admin
USA
16655 Posts |
|
Davio
Development Team Member
Jamaica
12217 Posts |
Posted - 18 November 2003 : 18:25:23
|
Hmm, I use a different javascript function to copy the data to the clipboard.function copySel(field){
field.focus();
field.select();
// The following code copies the selected text to the clip board
// This only works in IE and will be ignored by other browsers
txtRange = field.createTextRange()
txtRange.execCommand("Copy")
} This is used in conjunction with a text box. Of course it's IE only too. But I didn't know there were other ways of copying info to the clipboard. |
Support Snitz Forums
|
|
|
kwhipp
Junior Member
USA
407 Posts |
Posted - 18 November 2003 : 19:24:39
|
quote: Originally posted by RichardKinser
found an easier way to do it from this page (I am only using the IE specific code):
http://www.krikkit.net/howto_javascript_copy_clipboard.html
<html>
<head>
<title>Untitled Document</title>
<SCRIPT LANGUAGE="JavaScript">
function ClipBoard(cpyurl)
{
window.clipboardData.setData("Text", cpyurl);
}
</SCRIPT>
</head>
<body bgcolor="#FFFFFF">
<a href="Javascript:ClipBoard('http://forum.snitz.com/forum/topic.asp?TOPIC_ID=49278#266757');"><img src="http://forum.snitz.com/forum/icon_url.gif" /></a>
</body>
</html>
Thanks Richard. Nothing like having it spelled out for you. It works perfectly.
quote: Originally posted by DavidRhodes
Would it not be better to copy the URL to the clipboard as the image title suggests?
It does now. Well, for IE anyway. |
- Kevin |
|
|
kwhipp
Junior Member
USA
407 Posts |
Posted - 18 November 2003 : 19:53:22
|
I was just thinking. Since this only works for IE, should not even display in other browsers? |
- Kevin |
|
|
dayve
Forum Moderator
USA
5820 Posts |
Posted - 18 November 2003 : 20:10:04
|
quote: Originally posted by kwhipp
I was just thinking. Since this only works for IE, should not even display in other browsers?
I would alert a message when the icon is clicked for Netscape users letting them know to right click and select copy shortcut. |
|
Edited by - dayve on 18 November 2003 20:10:58 |
|
|
Topic |
|