// Can they reply? Have they turned on quick reply?
if ($context['can_quote'] && !empty($options['display_quick_reply']))
echo '
<li class="quote_button"><a href="', $scripturl, '?action=post;quote=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';last_msg=', $context['topic_last_message'], '" onclick="return oQuickReply.quote(', $message['id'], ');">', $txt['quote'], '</a> <img src="', $settings['images_url'], '/quote2.png" alt="Quote" style="cursor:pointer; cursor:hand;" onclick="quote_selection(\'', $message['member']['name'], '\', \'', 'topic=', $context['current_topic'],'.msg', $message['id'],'#msg', $message['id'], '\', \'', time(), '\')" /></li>';
// quote
function quote_selection(char_name, post_link, post_date)
{
selection = document.getSelection ? document.getSelection() : document.selection.createRange().text;
if (selection != '')
{
document.postmodify.message.value += '[quote author=' + char_name + ' ' + 'link=' + post_link + ' ' + 'date=' + post_date + ']' + selection + '[/quote]\n';
}
else
{
alert('Select text on the page and try again');
return;
}
window.location.hash = '#quickreply';
}