This was the button:
PHP Code:
<img src="$skin_icon_url/quote.gif" title="Copy highlighted text to new message" alt="Copy highlighted text to new message" border="0" height="16" onMouseDown="copy_selection('$message->{author}','<#date $message->{time} format "$L{LONGDATE}"#>','#POST$message->{number}')" onMouseOver="javascript:if (style) style.cursor = 'pointer';">
and this was in the skin:
PHP Code:
function copy_selection(message_author,post_date,link_post,author_profile) {
if (document.getSelection) {
//for Netscape
var str = document.getSelection();
document.userpass.message.value+="\\quote_with_link{"+message_author+","+post_date+","+link_post+","+message_author+","+str+"}";
document.userpass.message.focus();
} else if (document.selection) {
//for Internet Explorer
var str = document.selection.createRange().text;
document.userpass.message.value+="\\quote_with_link{"+message_author+","+post_date+","+link_post+","+message_author+","+str+"}";
document.userpass.message.focus();
var rng = document.userpass.message.createTextRange();
rng.collapse(false);
rng.select();
} else {
//display message if browser does not support above methods.
window.alert("Your browser does not support this feature");
return;
}
}