It often happens that when we type long posts, they get 'eaten' by the forum.
So I'm wondering if it would be okay with Scott to implement some code that would add a button, to allow members to copy a post to the clipboard before posting, so that if it gets 'eaten', we still have a copy.
I have a small forum of my own (phpbb), which runs on php and mysql, I am note sure what the differences or similarities are with VB, however I have implemented such code, it's very simple, in my case I had to make only 2 additions to one .tpl file and it's working perfectly.
The author of this little MOD is:
MOD Author: cdkrg <
cdkrg@fluencynow.com >
www.able2know.com
Even though the file has been written for phpbb forums, perhaps it can be implemented here, or it could give you an idea of how this works in VB.
The MOD is called: Copy Post to Clipboard
And can be found here:
http://www.phpbbhacks.com/viewhack.php?id=795
Here's the script: (copyright cdkrg)
Quote:
<SCRIPT language="JavaScript">
<!--
function highlightmetasearch() {
document.post.message.select(); document.post.message.focus();
}
function copymetasearch() {
highlightmetasearch();
textRange = document.post.message.createTextRange();
textRange.execCommand("RemoveFormat");
textRange.execCommand("Copy");
alert("This post has been copied to your clipboard.\nIf this post is lost when you submit it you can easily repost it.\nAlways use this feature before posting! - \nwww.able2know.com");
}
// -->
</SCRIPT>
|
and here the code for the button:
Quote:
<tr><td colspan="9" align="right">
<script language="JavaScript" type="text/javascript">
<!--
if ((navigator.appName=="Microsoft Internet Explorer")&&(parseInt(navigator.appVersion)>=4)) {
document.write('<INPUT type="button" class="button" value="COPY TO CLIPBOARD" onClick="copymetasearch();">');
} else {
document.write('<INPUT type="button" class="button" value="HIGHLIGHT TEXT" onClick="highlightmetasearch();">');
}
// -->
</script>
</td></tr>
|
This hack should go into whatever tpl file is responsible for the posting page.
I'd be interested to hear thoughts and opinions from everyone, including Scott or anyone with the power to answer on his behalf