Is there any way that allows users to quote selected text in quick reply form from messages when they are looking a thread?
I don't understand how to do it in MyBB. Please, don't tell me that I need to press quote and delete the text I don't want.
Thanks.
If I press this button, the whole text of message will appear in quick reply form. But I want ability to quote only selected text. This is very important when you quote big posts.
This can't be done by default you would need to find or request a plugin for this.
I tired.
Can anybody help to solve those request?
As uncontrol said
(2010-11-12, 07:03 PM)Uncontrol Wrote: [ -> ]No, there's no way to do this as far as I know. And I find it an unusually demanding request.
You can request one but it would be a hard plugin to make.
Here is the code I used to use in phpbb3
I pasted here, in hope that it will give some ideas to mybb coders
Text to add to template/
editor.js
/**
* Add quote text to message in viewtopic page
*/
function addquoteviewt(post_id, username)
{
var message_name = 'message_' + post_id;
var theSelection = '';
var divarea = false;
if (document.all)
{
divarea = document.all[message_name];
}
else
{
divarea = document.getElementById(message_name);
}
// Get text selection - not only the post content :(
if (window.getSelection)
{
theSelection = window.getSelection().toString();
}
else if (document.getSelection)
{
theSelection = document.getSelection();
}
else if (document.selection)
{
theSelection = document.selection.createRange().text;
}
if (theSelection == '' || typeof theSelection == 'undefined' || theSelection == null)
{
alert(LANG_L_NO_TEXT_SELECTED);
}
if (theSelection)
{
if (bbcodeEnabled)
{
insert_text('[quote="' + username + '"]' + theSelection + '[/quote]');
}
else
{
var lines = split_lines(theSelection);
for (i = 0; i < lines.length; i++)
{
insert_text('> ' + lines[i] + '\n')
}
}
}
return;
}
Text to add to veiwtopic.html
This to add the 'Quote Selected TExt" into each post in the thread
<!-- IF
S_QR_ACTIVE -->
<li class="icon-quote"><a href="#postform" onclick="addquoteviewt({postrow.POST_ID},'{postrow.POSTER_QUOTE}'); insert_text('\r\n'); return false;" title="{L_QUOTE_SELECTED}">{L_QUOTE_SELECTED}</a></li>
<!-- ENDIF -->