Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: digger on August 22, 2009, 08:49:34 AM

Title: dQuoteSelection
Post by: digger on August 22, 2009, 08:49:34 AM
Link to Mod (https://custom.simplemachines.org/mods/index.php?mod=2086)

This mod adds ability to quote any selected text into the QuickReply area.
Send email notifications to quote authors.
===
For SMF1 use 2.4 version
For SMF2 use 2.5 version
===
GitHub repository: https://github.com/realdigger/SMF-dQuote

Заменяет стандартную кнопку "Цитировать" на "Цитировать выделенное". При наличии выделенного текста - копирует цитату с ним в форму быстрого ответа. Если форма быстрого ответа свернута - разворачивает и вставляет выделенную цитату. Если форма быстрого ответа отключена - копирует цитату целиком в полный ответ, независимо от того выделено что-то или нет.
Также, работает и на странице полного ответа.
Отправляет уведомления на почту пользователям, которых процитировали.
===
Для SMF1 используйте версию 2.4
Для SMF2 используйте версию 2.5 и старше
===
GitHub репозиторий: https://github.com/realdigger/SMF-dQuote
Title: Re: dQuoteSelection
Post by: Gmans on August 22, 2009, 11:39:49 AM
Спасибо, классный мод :)
Title: Re: dQuoteSelection
Post by: poolhall on August 22, 2009, 11:45:27 AM
awesome, thanks a lot!
Title: Re: dQuoteSelection
Post by: Sevgiformu.com on August 22, 2009, 01:42:20 PM
Turkish Translate.

Code: [Select]
// Begin mod 'dQuoteSelection'
$txt['dQuoteSelection_txt'] = 'Alıntı Yap (Seçim)';
// End mod 'dQuoteSelection'


Thank You Very Nice Mod
Title: Re: dQuoteSelection
Post by: digger on August 22, 2009, 01:54:21 PM
Turkish Translate.

Code: [Select]
// Begin mod 'dQuoteSelection'
$txt['dQuoteSelection_txt'] = 'Alıntı Yap (Seçim)';
// End mod 'dQuoteSelection'


Thank You Very Nice Mod

Thank you for Turkish Translate.

I will look into default smf language files and try to change my mod for work without custom string.
Title: Re: dQuoteSelection
Post by: Sevgiformu.com on August 22, 2009, 05:13:14 PM
Never have a problem:)
Title: Re: dQuoteSelection
Post by: Blinker on August 22, 2009, 11:12:42 PM
This is an excellent mod digger, thank you.

Installed and working perfectly on 1.1.10 w/custom theme.
Title: Re: dQuoteSelection
Post by: Bluey on August 23, 2009, 06:53:54 AM
I have v1.1.10  Mod installed ok no errors. I cleared the cache after install as stated but the mod fails to work. It quotes the whole post as normal. Even uninstalled and reinstalled still the same. Any ideas
Title: Re: dQuoteSelection
Post by: digger on August 23, 2009, 12:46:13 PM
I have v1.1.10  Mod installed ok no errors. I cleared the cache after install as stated but the mod fails to work. It quotes the whole post as normal. Even uninstalled and reinstalled still the same. Any ideas

Try another browser.
Title: Re: dQuoteSelection
Post by: WVPreacher on August 24, 2009, 10:20:16 PM
I had the same problem as Bluey, and as suggested, tried another browser and it worked great.

But is there a way too make it work with Firefox???  It's my favorite browser.

BTW, thanks for the great mod!!!  The quote feature has always been my only hang-up with SMF.
Title: Re: dQuoteSelection
Post by: Bluey on August 24, 2009, 10:29:59 PM
Seems this mod is not compatible with Firefox.  I only use Firefox and many of my userr have it as well so it is of no use really if it won't work on that browser. I suggest you may want to warn people it is not compatible with Firefox to save them having to go through this. If you upgrade the mod to be compatible I will definitely use it.
Title: Re: dQuoteSelection
Post by: digger on August 24, 2009, 10:44:32 PM
But is there a way too make it work with Firefox???  It's my favorite browser.

I'v tested mod with Firefox 3.5 and it works for me.
Title: Re: dQuoteSelection
Post by: poolhall on August 24, 2009, 11:48:21 PM
confirmed, it works with FF 3.5.
Title: Re: dQuoteSelection
Post by: WVPreacher on August 25, 2009, 12:45:35 AM
I just upgraded to FF 3.5 and still no worky.

But don't sweat it, sometimes my PC takes a few days to react to new changes.

Thanks once again for the mod.
Title: Re: dQuoteSelection
Post by: digger on August 25, 2009, 12:58:08 AM
I just upgraded to FF 3.5 and still no worky.

But don't sweat it, sometimes my PC takes a few days to react to new changes.

Thanks once again for the mod.

Empty browser's cache and check JavaScript settings page in Firefox.
Title: Re: dQuoteSelection
Post by: lovearat on August 27, 2009, 12:06:37 PM
I use IE 8 and I am having the same problem. It quotes the whole thing. I've cleared my cache. but it didn't help. Any suggestions?
Title: Re: dQuoteSelection
Post by: AnHELLuS on September 01, 2009, 04:14:34 AM
Hello!

Thanks for the great mod.  Sending files from the Polish translation: ISO-8859-2 and utf8.
Title: Re: dQuoteSelection
Post by: lovearat on September 02, 2009, 09:47:59 AM
I use IE 8 and I am having the same problem. It quotes the whole thing. I've cleared my cache. but it didn't help. Any suggestions?

Can someone please help me with this?  Thanks :)
Title: Re: dQuoteSelection
Post by: digger on September 02, 2009, 06:52:17 PM
I use IE 8 and I am having the same problem. It quotes the whole thing. I've cleared my cache. but it didn't help. Any suggestions?

Can someone please help me with this?  Thanks :)

Mod tested and working with IE8.
Title: Re: dQuoteSelection
Post by: lovearat on September 06, 2009, 01:44:37 AM
I use IE 8 and I am having the same problem. It quotes the whole thing. I've cleared my cache. but it didn't help. Any suggestions?

Sorry but it still doesn't work for me.  I've been waiting a long time for a mod like this.
Can someone please help me with this?  Thanks :)

Mod tested and working with IE8.
I use IE 8 and I am having the same problem. It quotes the whole thing. I've cleared my cache. but it didn't help. Any suggestions?

Can someone please help me with this?  Thanks :)

Mod tested and working with IE8.

I'm sorry but it just won't work for me.  Guess I will just have to uninstall it.  :(
Title: Re: dQuoteSelection
Post by: lovearat on September 14, 2009, 12:45:38 PM
I've got it going now.  :)  And I love it!! Thanks for this mod. Great job!!
Title: Re: dQuoteSelection
Post by: Sysgen on November 05, 2009, 04:38:03 PM
Would it be possible to modify this Mod to use the Normal reply insead of the quick reply? I've got quick reply disabled beause my forum is used mainly by elderly's and I've turned off every bells and whisles in order to not confuse them.

Thanks for letting me know.
Title: Re: dQuoteSelection
Post by: digger on November 06, 2009, 02:20:20 AM
Would it be possible to modify this Mod to use the Normal reply insead of the quick reply? I've got quick reply disabled beause my forum is used mainly by elderly's and I've turned off every bells and whisles in order to not confuse them.

Thanks for letting me know.

It's not easy to send selected text into normal reply page.
Title: Re: dQuoteSelection
Post by: poolhall on November 23, 2009, 11:45:46 PM
This is one of the most useful modifications out there. Thanks a lot for updating!
Title: Re: dQuoteSelection
Post by: saosangmo on January 03, 2010, 03:48:14 AM
Thank digger for your nice mod.

When users don't select any text, the function of this mod will quote the whole of post?

thanks!
-saosangmo
Title: Re: dQuoteSelection
Post by: digger on January 06, 2010, 03:25:52 AM
When users don't select any text, the function of this mod will quote the whole of post?

Yes
Title: Re: dQuoteSelection
Post by: Enders on January 24, 2010, 02:24:46 AM
You should be able to select the text in the full reply and quote them also.... not just on post view
Title: Re: dQuoteSelection
Post by: luismanson on January 29, 2010, 05:02:50 PM
thanks for this mod!:

Spanish:
Code: [Select]
$txt['dQuoteSelection_txt'] = 'Quote (selección)';
Title: Re: dQuoteSelection
Post by: tripl3r on February 01, 2010, 06:46:03 AM
I agree excellent mod!, if only we could get it to work in normal reply also then I'd be so happy!!
Title: Re: dQuoteSelection
Post by: Zmey on March 04, 2010, 06:20:08 PM
When using WYSIWYG quick reply mod (http://custom.simplemachines.org/mods/index.php?mod=1299) on SMF 2 RC2 the text is not quoted if WYSIWYG mode is enabled in editor.

The fix:
in Themes/default/scripts/topic.js in quote_selection function change
Code: [Select]
      document.postmodify.message.value += '[quote author=' + cAuthor + ' link=' + quote_link + ' date=' + cDate + ']' + TextSelection.replace(/(^\s+)|(\s+$)/g, "") + '[/quote]\n';
to:
Code: [Select]
      oEditorHandle_message.insertText('[quote author=' + cAuthor + ' link=' + quote_link + ' date=' + cDate + ']' + TextSelection.replace(/(^\s+)|(\s+$)/g, "") + '[/quote]\n', false, true);

If using SMF 2 RC1 use "editorHandlemessage" instead of "oEditorHandle_message".
Title: Re: dQuoteSelection
Post by: steve51184 on March 04, 2010, 06:37:19 PM
any chance of a fix for rc2? :-*
Title: Re: dQuoteSelection
Post by: Zmey on March 05, 2010, 07:51:22 AM
any chance of a fix for rc2? :-*

This fix is for RC2. :)
Title: Re: dQuoteSelection
Post by: steve51184 on March 09, 2010, 07:36:17 PM
rc3 update?
Title: Re: dQuoteSelection
Post by: digger on March 09, 2010, 07:43:00 PM
rc3 update?

Wait for weekend.
Title: Re: dQuoteSelection
Post by: steve51184 on March 09, 2010, 07:52:25 PM
thank you very much :)
Title: Re: dQuoteSelection
Post by: TurtleKicker on March 10, 2010, 05:14:07 PM
It doesn't make sense to change the text of the [Quote] button to "[Quote] (Selected)" since it won't quote the selected text unless using quickreply. You should just leave the button text alone.
Title: Re: dQuoteSelection
Post by: steve51184 on March 14, 2010, 12:45:37 AM
rc3 update?

Wait for weekend.

w00t any time now :)
Title: Re: dQuoteSelection
Post by: steve51184 on March 15, 2010, 05:44:55 PM
When using WYSIWYG quick reply mod (http://custom.simplemachines.org/mods/index.php?mod=1299) on SMF 2 RC2 the text is not quoted if WYSIWYG mode is enabled in editor.

The fix:
in Themes/default/scripts/topic.js in quote_selection function change
Code: [Select]
      document.postmodify.message.value += '[quote author=' + cAuthor + ' link=' + quote_link + ' date=' + cDate + ']' + TextSelection.replace(/(^\s+)|(\s+$)/g, "") + '[/quote]\n';
to:
Code: [Select]
      oEditorHandle_message.insertText('[quote author=' + cAuthor + ' link=' + quote_link + ' date=' + cDate + ']' + TextSelection.replace(/(^\s+)|(\s+$)/g, "") + '[/quote]\n', false, true);

If using SMF 2 RC1 use "editorHandlemessage" instead of "oEditorHandle_message".


i've done that fix but when i select some text and click quote it goes to the quick reply box but there's nothing there

normal quotes work fine though and it also works with wysiwyg turned off on the quick reply box
Title: Re: dQuoteSelection
Post by: kfiasche on March 17, 2010, 12:17:06 PM
attach italian language
Title: Re: dQuoteSelection
Post by: atfosan on March 28, 2010, 12:58:54 AM
Ну что, когда ждать новую версию и ждать ли вообще?
Title: Re: dQuoteSelection
Post by: KidCactus on March 31, 2010, 01:04:38 PM
It seems like this mod for some reason adds one hour to the time stamp of the quote after change to Daylight Saving Time. I have +1 now on my server, and if someone quote using this mod, the quote time stamp will show the wrong time. Quoting the normal way shows the correct time.

Anyone else experiencing this?
Title: Re: dQuoteSelection
Post by: poolhall on March 31, 2010, 01:10:57 PM
Anyone else experiencing this?
I am not.
Title: Re: dQuoteSelection
Post by: steve51184 on March 31, 2010, 01:18:14 PM
i'm not ether
Title: Re: dQuoteSelection
Post by: KidCactus on March 31, 2010, 01:19:51 PM
And you both have set the server clock to +1 hour?

This is what I get, by selecting and quoting:

test

And this is what I get quoting the normal way:

test
Title: Re: dQuoteSelection
Post by: poolhall on March 31, 2010, 01:37:49 PM
I apologize. Yep, you're right, I am experiencing a similar issue which I never noticed before. I have a zero overall time offset in the admin panel but -8 in my profile and when I quote a selection, 8 hours add to the quote stamp, e.g. quoting a message from 03/31/2010, 06:16:46 and get 03/30/2010, 22:16:46 in the quote stamp.
Title: Re: dQuoteSelection
Post by: KidCactus on March 31, 2010, 01:47:08 PM
Ah, ok, good to know it's not just me then. Now onto trying to figure out how to fix it...
Title: Re: dQuoteSelection
Post by: KidCactus on April 01, 2010, 03:46:37 AM
Not a bug fix, but at least a workaround in the meantime — in ./Themes/default/xml_topic.js:

Find this:

Code: [Select]
document.postmodify.message.value += '[quote author=' + author + ' link=' + link + ' date=' + date + ']' + selected.replace(/(^\s+)|(\s+$)/g, "") + '[/quote]\n';
Replace with (if you have +1 hour in your settings):

Code: [Select]
document.postmodify.message.value += '[quote author=' + author + ' link=' + link + ' date=' + (date-3600) + ']' + selected.replace(/(^\s+)|(\s+$)/g, "") + '[/quote]\n';
That 3600 number is the time offset in seconds, so you'd need to change that to whatever you have in your settings.
Title: Re: dQuoteSelection
Post by: matiaz on April 04, 2010, 06:23:56 PM
¿Is possible quote with BBcode format?
Title: Re: dQuoteSelection
Post by: MothMan on May 25, 2010, 08:16:10 PM
I noticed a while back someone commented that an RC3 update was incoming... any word on that?
Title: Re: dQuoteSelection
Post by: Mandoleran on June 01, 2010, 07:56:34 AM
I noticed a while back someone commented that an RC3 update was incoming... any word on that?

+1
any progres in that direction?
Title: Re: dQuoteSelection
Post by: woodscooter on June 29, 2010, 05:54:40 PM
Two points to make about this mod.  I'll put them in two separate posts so as not to confuse myself.

Some people were asking why it couldn't be applied to the "normal" reply box, why the quote has to go into Quick Reply. 

Well, if you click Preview in Quick Reply, you get switched to the "normal" reply box.  I wonder whether an extra line of Javascript could simulate a click on the Preview button, straight after rendering the Quick Reply with the quoted text in it?
Title: Re: dQuoteSelection
Post by: woodscooter on June 29, 2010, 06:18:40 PM
It is a great mod, and it works for me.  Version is  1.1.11.

There is an oddity in my installation, though.  After selecting text and clicking on Quote (selected), the Page Up and Page Down keys, and the line up/line down (arrow) keys often stop working.

I haven't yet found what causes them to come back again, but it may be that I have to close the browser.

This behaviour was first reported to me from a Forum Member using Firefox on Ubuntu, but subsequently I've seen it happen on a Chrome browser and on Internet Explorer, both on a Windows system.  I've also confirmed it with Firefox on Ubuntu.

If anyone can suggest what mechanism may be affecting the browser's behaviour, I would be pleased to hear about it.  If I know where to look, I can experiment to get to the cause.

Thanks.
Title: Re: dQuoteSelection
Post by: atfosan on June 30, 2010, 03:09:17 AM
Two points to make about this mod.  I'll put them in two separate posts so as not to confuse myself.

Some people were asking why it couldn't be applied to the "normal" reply box, why the quote has to go into Quick Reply. 

Well, if you click Preview in Quick Reply, you get switched to the "normal" reply box.  I wonder whether an extra line of Javascript could simulate a click on the Preview button, straight after rendering the Quick Reply with the quoted text in it?

Quote (selected) in normal reply box would be great! :)
Title: Re: dQuoteSelection
Post by: miro-ppb on November 16, 2010, 11:06:51 PM
Any chance of this being updated to work on RC4?
Title: Re: dQuoteSelection
Post by: digger on November 16, 2010, 11:17:11 PM
Any chance of this being updated to work on RC4?

yes
Title: Re: dQuoteSelection
Post by: miro-ppb on November 23, 2010, 07:40:38 PM
Any chance of this being updated to work on RC4?

yes
ETA?
Title: Re: dQuoteSelection
Post by: miro-ppb on December 18, 2010, 05:48:52 PM
Anyone working on this?
Title: Re: dQuoteSelection
Post by: smldmr on January 04, 2011, 05:04:59 PM
search in display.template for

Code: [Select]
<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></li>';
replace it with:

Code: [Select]
<li class="quote_button"><a href="', $scripturl, '?action=post;quote=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';last_msg=', $context['topic_last_message'], '" onmouseover="selected=get_text_selection();" onclick="return oQuickReply.quote_selection(', $message['id'], ', \'', $context['session_id'], '\', \'', $context['session_var'], '\', true, selected, \'' , $message['member']['name'] , '\', ' , $message['timestamp'] , ');">', $txt['quote'], '</a></li>';
all the other codes are compatible with RC4. And if you use another template as default, then copy the topix.js from default/scripts/ in your custom tamplates scripts directors. If you have there one topic.js, then add the code

Code: [Select]
// * Mod dQuoteSelection
// Get selected text
function get_text_selection() {
 var txt = '';
    if (txt = window.getSelection)
      txt = window.getSelection().toString();
    else
      txt = document.selection.createRange().text;
    return txt;
}

// When a user select text and presses quote, put it in the quick reply box (if expanded).
QuickReply.prototype.quote_selection = function (iMessageId, sSessionId, sSessionVar, bTemplateUpgraded, TextSelection, cAuthor, cDate)
{

// Add backwards compatibility with old themes.
if (sSessionVar == true)
{
bTemplateUpgraded = true;
sSessionVar = 'sesc';
}

if (this.bCollapsed)
{
// This is for compatibility.
if (bTemplateUpgraded)
return true;
else
{
window.location.href = smf_prepareScriptUrl(this.opt.sScriptUrl) + 'action=post;quote=' + iMessageId + ';topic=' + this.opt.iTopicId + '.' + this.opt.iStart + ';' + sSessionVar + '=' + sSessionId;
return false;
}
}
else
{
    // If some text selected, insert into quick reply box
    if (TextSelection)
    {
      var quote_link = 'topic=' + this.opt.iTopicId + '.msg' + iMessageId + '#msg' + iMessageId;
      document.postmodify.message.value += '[quote author=' + cAuthor + ' link=' + quote_link + ' date=' + cDate + ']' + TextSelection.replace(/(^\s+)|(\s+$)/g, "") + '[/quote]\n';

    }
// Doing it the XMLhttp way?
else if (window.XMLHttpRequest)
{
ajax_indicator(true);
getXMLDocument(smf_prepareScriptUrl(this.opt.sScriptUrl) + 'action=quotefast;quote=' + iMessageId + ';' + sSessionVar + '=' + sSessionId + ';xml', this.onQuoteReceived);
}
// Or with a smart popup!
else
reqWin(smf_prepareScriptUrl(this.opt.sScriptUrl) + 'action=quotefast;quote=' + iMessageId + ';' + sSessionVar + '=' + sSessionId, 240, 90);

// Move the view to the quick reply box.
if (navigator.appName == 'Microsoft Internet Explorer')
window.location.hash = this.opt.sJumpAnchor;
else
window.location.hash = '#' + this.opt.sJumpAnchor;

return false;
}

on the end of your custom topic.js.

Offcourse you must add all other changes too :)
Title: Re: dQuoteSelection
Post by: ChaosEnergy on June 19, 2011, 06:45:01 PM
any update for 2.0 final?
Title: Re: dQuoteSelection
Post by: digger on November 08, 2011, 02:35:36 PM
Updated for SMF2 Gold
Title: Re: dQuoteSelection
Post by: Chalky on May 10, 2012, 01:26:55 PM
Has anyone found a way of using this alongside the normal quote facility rather than replacing it?  I like it, but not enough to forgo the one I already have.
Title: Re: dQuoteSelection
Post by: FrizzleFried on May 10, 2012, 05:30:08 PM
Not sure what you mean... if you don't select any text and just hit QUOTE... it works just like the normal QUOTE.  Otherwise,   highlight what you want and then click QUOTE to only quote what you highlighted.

Title: Re: dQuoteSelection
Post by: Chalky on May 10, 2012, 05:43:34 PM
Oh.  Mine doesn't.  It's installed on my test forum and if I don't select any text and press the button, it just takes me to the quick reply box and a blank one at that  (http://sabrinova.com/Smileys/fantasticsmileys/017.gif)

So any ideas what I'm doing wrong?  It installed ok and when I select text before hitting the button, it works just like it's supposed to.  I'm on 2.0.2.

Correction:  Sorry it does quote the whole text as normal, but still puts it in the QR box.  I don't want to use QR for normal quotes...
Title: Re: dQuoteSelection
Post by: FrizzleFried on May 10, 2012, 05:58:51 PM
AH... I like it going to the QR personally (I have the mod which includes the smileys/bbc buttons on it)...

I am sure it's just a setting somewhere... there is a mod on here that forces QUOTE to the full editor if I recall correctly...
Title: Re: dQuoteSelection
Post by: Chalky on May 10, 2012, 06:05:14 PM
Thanks, I'll have a play over the weekend :)  My normal quote was using the full reply box quite nicely without this mod - I don't like mods overwriting processes they don't need to...  ;)
Title: Re: dQuoteSelection
Post by: FrizzleFried on May 10, 2012, 06:20:52 PM
Strange... according to this mods author the normal behavior with QUICK REPLY enabled is for quote to go to QUICK REPLY... but this mod changes that.

What do I know?

:)

http://custom.simplemachines.org/mods/index.php?mod=1431
Title: Re: dQuoteSelection
Post by: DSystem on July 20, 2014, 12:04:40 PM
Working perfect smf 2.0.8

Brazil Portuguese translation attached.

Title: Re: dQuoteSelection
Post by: Westwegoman on October 21, 2014, 12:07:03 AM
In SMF 2.0.9, when using a regular quote, it shows the text as "Quote (selected)" instead of quote. How would this be changed so that "Quote" shows above the actual quote like so:

Quote
A quote
Title: Re: dQuoteSelection
Post by: Westwegoman on February 02, 2015, 11:04:34 PM
Figured it out.

Stop Quote (selected) from showing in post when a regular quote is used from the bbc buttons with "dQuoteSelection" mod installed.

In Sources/Subs.php

Find:
Code: [Select]
$txt['quote']
Replace with:
Code: [Select]
$txt['quoted']
In Themes/default/languages/index.english.php
Find:
Code: [Select]
$txt['quote'] = 'Quote';
Add after:
Code: [Select]
$txt['quoted'] = 'Quote';
Title: Re: dQuoteSelection
Post by: zorer on February 13, 2015, 07:40:30 AM
Hi, i been installed this mod but nothing happens, no errors, it's just like the normal quote, my theme it's "Anecdota", the mod it's installed, the files are in the correct path, i have the option in the menu, but is not working.

Any hint?

Thanks.
Title: Re: dQuoteSelection
Post by: Steve on February 13, 2015, 06:00:32 PM
Are you highlighting text in the post you want to quote? Just highlight any text, click 'Quote (selected)' and the part you highlighted should show up in the post you're about to make. If you click Quote (selected) without highlighting anything, it quotes the whole post just like regular quote does.

If you've done this then obviously it's a theme problem and I'll leave that to the author of this mod.
Title: Re: dQuoteSelection
Post by: FrizzleFried on June 19, 2015, 12:13:27 PM
...care to elaborate on what bugfixes are included in the latest version?  I'm trying to determine if it's worth the hassle of upgrading my highly modified forum.

Thanks!
Title: Re: dQuoteSelection
Post by: digger on June 20, 2015, 07:06:51 PM
...care to elaborate on what bugfixes are included in the latest version?  I'm trying to determine if it's worth the hassle of upgrading my highly modified forum.
Thanks!
There is two changes:
1) Input focus set to the textarea when you quote text selected.
2) If nothing selected and quick reply collapsed - full quote goes to a full reply form (like default SMF behavior).

You can upgrade mod easily, because it works without forum and themes code changes.
Title: Re: dQuoteSelection
Post by: Steve on July 27, 2015, 04:27:05 PM
Hey digger ... how difficult would it be to add a context menu function? In other words, one would highlight the text to be quoted and then right-click and select 'quote selected' which would do the same as scrolling up and clicking the 'quote selected' button.
Title: Re: dQuoteSelection
Post by: digger on July 28, 2015, 03:42:19 PM
Hey digger ... how difficult would it be to add a context menu function? In other words, one would highlight the text to be quoted and then right-click and select 'quote selected' which would do the same as scrolling up and clicking the 'quote selected' button.
I have a test version with this feature. I will add it to the mod as additional option.
Title: Re: dQuoteSelection
Post by: Steve on July 28, 2015, 08:38:43 PM
Awesome! Thanks! ;D
Title: Re: dQuoteSelection
Post by: brynn on November 21, 2015, 06:22:17 PM
Love this mod!

Any chance to have it work in PMs?
Title: dQuoteSelection: Quoting problems or operator error?
Post by: debiwebi on May 19, 2016, 11:07:32 AM
I apologize for the length of this post, thanks for your patience.

I've had my forum for about a year and a half. I'd been using the Sunset theme, and then a few months ago decided to eliminate it because there were some Mods I wanted that would not work with it, so now everyone is using the default theme Curve.

I have a member who has problems taking partial quotes. Most of my other members don't use quoting at all, they don't understand the concept. ONE member who was always using the Insert Quote button has since learned how to take partial quotes and seems to be okay with it. The member with problems is insisting that the quoting problems started when I eliminated the Sunset theme. I'm sharing his complaints below. He says brackets get inserted into the post, extra formatting tags, font size changes—and they can't be deleted or cleaned up. I've noticed a few times he was missing the end quote tag.

Note: About 2 weeks ago I moved my forum to a different server: fresh install of SMF, fresh install of plugins. The transition went smoothly, no problems. Everything appears to be working just fine—for me.

So my questions are, has anyone heard of these types of problems associated with using dQuoteSelection with the SMF default theme? If so, how do I fix this? Or is it operator error? This member does tend to cut and paste from other web sites, which causes a lot of formatting tag problems, but he's saying that even quoting within my forum causes big problems for him.

From the member (I'd direct quote here but it's in an area not accessible to Guests, http://speakingofseth.com/index.php?msg=5932):

The main recurring things I have seen for me and other users:

*Quoting from any other site will cause all sorts of craziness  in formatting(I stopped quoting from any website a week after the change, noticing it was happening

*Quoting just from this website, literally a thread where you quote what someone said with the Quote button will cause extra [ ] brackets to show up all over the place. I've had as many as ten or more where there should have been none, other than open quote / end quote etc.

*Manually removing the weird formatting used to work, like say 8 weeks ago, I did that as a workaround to get my posts readable again.
Now, when I quote anything, it forces anything I write inside the [ end quote] tag, no matter how many times I retype it, or how it is formatted, it wont show any non quote text, and all the tags were in their normal places.

*Quoting anything (when it works normally) will result in extremely small text font size for one or two lines, or entire paragraphs. Sometimes manually highlighting and changing it works, other times not.

**Quoting anything (when it works normally) will result in extremely small text font size for one or two lines, or entire paragraphs. Sometimes manually highlighting and changing it works, other times not.  The smallest selectable font size is 8 PT, but the weird glitch makes the text about 1 or 2 PT size font.

I manually removed the CODE tag at the start of this post, but it keep putting everything in blue here, I didn't even do it on purpose.
Title: errors from dQuoteSelection
Post by: SethStudent on July 18, 2016, 12:37:56 PM
Type of error: Undefined
8: Undefined index:
File: .../Themes/default/languages/Dquote/.english.php (main sub template - eval?)
Line: 704

I'm getting this error from one member when she takes partial quotes. Her posts look fine. Any idea what this is about?

Title: Re: errors from dQuoteSelection
Post by: digger on July 18, 2016, 12:47:03 PM
Type of error: Undefined
8: Undefined index:
File: .../Themes/default/languages/Dquote/.english.php (main sub template - eval?)
Line: 704

I'm getting this error from one member when she takes partial quotes. Her posts look fine. Any idea what this is about?
There is no 700 lines in the /Dquote/.english.php file. Search this error somewhere else.
Title: Re: errors from dQuoteSelection
Post by: SethStudent on July 18, 2016, 02:13:04 PM
There is no 700 lines in the /Dquote/.english.php file. Search this error somewhere else.

OK, thank you. I've gotten this error 40 times in the past month.
I don't know how to search the error somewhere else, I'm not a very technical person.

Title: Re: errors from dQuoteSelection
Post by: Shambles on July 18, 2016, 03:08:56 PM
Type of error: Undefined
8: Undefined index:
File: .../Themes/default/languages/Dquote/.english.php (main sub template - eval?)
Line: 704

Go into your admin control panel and disable template evaluation. The error you're being shown is disguising the root cause of your problem.
Title: Re: errors from dQuoteSelection
Post by: SethStudent on July 19, 2016, 03:36:24 PM
Go into your admin control panel and disable template evaluation. The error you're being shown is disguising the root cause of your problem.

Thank you! I'm up to 46 of these errors now and they are only coming from one particular member. I'll ask her to post/quote again and will update with any new clues. She says she's not noticed any problems on her end.

Title: Re: errors from dQuoteSelection
Post by: SethStudent on July 19, 2016, 09:16:49 PM
Go into your admin control panel and disable template evaluation. The error you're being shown is disguising the root cause of your problem.

OK Shambles, that was a great idea. The error is now with this file, and still only for the one specific member:
.../Themes/default/Display.template.php Line: 704
[<input type="hidden" name="seqnum" value="', $context['form_sequence_number'], '" />';]

Should I just start a new topic? I don't have the ability to split or delete my own posts here...

Title: Re: dQuoteSelection
Post by: Shambles on July 20, 2016, 03:38:57 AM
The error message you're posting here, is it the whole error message? I'd expect to see the name of the missing index in there.

Try to replicate what your member is doing. Ask her if she's using the "quick reply" box or hitting the reply button, then you do the same and see if you get the same "undefined index".
Title: Re: dQuoteSelection
Post by: SethStudent on July 20, 2016, 10:33:17 AM
The error message you're posting here, is it the whole error message? I'd expect to see the name of the missing index in there.

Try to replicate what your member is doing. Ask her if she's using the "quick reply" box or hitting the reply button, then you do the same and see if you get the same "undefined index".

Yes, the whole error message other than member name, date, link to post.

One of my other forum members (he's brilliant) figured out her setting was Use quick reply on topic display: Don't show at all. This causes problems with the dQuoteSelection mod? I tested by changing my own profile setting and got the same error message. I'll be testing with the member today, with a change in her settings. If you don't hear back from me, that means changing her setting has eliminated the problem.

Thanks for your help!
Title: Re: dQuoteSelection
Post by: brynn on November 10, 2017, 09:48:48 AM
Thanks for this mod - I love it!

One thing though.  It will not capture nested quotes.  I've made a demo on my site:  https://forum.inkscapecommunity.com/index.php?topic=831.0

SMF 2.0.14 with Tiny Portal 1.2 and around 45 other mods.

Note that I do not have Admin panel > Posts and Topics > Post Settings > Remove nested quotes when quoting, enabled.

Is there any chance of updating this mod, so that it will capture the nested quotes?

Thank you very much!
Title: Re: dQuoteSelection
Post by: Arantor on November 10, 2017, 10:00:59 AM
It would be extremely difficult to actually do as suggested. If not actually impossible to do correctly in all cases.
Title: Re: dQuoteSelection
Post by: digger on November 10, 2017, 01:00:54 PM
It would be extremely difficult to actually do as suggested. If not actually impossible to do correctly in all cases.
Totally agree.
Title: Re: dQuoteSelection
Post by: brynn on November 21, 2017, 11:02:09 AM
Sorry for the delay.

Aah, well.  Couldn't hurt to ask.  I guess I'll still keep using it, unless my members want the nested quotes. 

Thanks anyway :)

Hey, one last thought.  I guess there wouldn't be any way to have regular quotes with an option for selected?  So that you could use one or the other?



Title: Re: dQuoteSelection
Post by: Rock Lee on November 21, 2017, 12:51:52 PM
There is already the Spanish but Spanish version, I leave the Latin version! ;)


Regards!
Title: Re: dQuoteSelection
Post by: digger on November 21, 2017, 01:05:43 PM
Hey, one last thought.  I guess there wouldn't be any way to have regular quotes with an option for selected?  So that you could use one or the other?
If you don't select any text it works as regular quote.
Title: Re: dQuoteSelection
Post by: digger on November 21, 2017, 01:08:52 PM
There is already the Spanish but Spanish version, I leave the Latin version! ;)

Regards!
Will add this in the next release. Thanks!
Title: Re: dQuoteSelection
Post by: Dwev on January 27, 2018, 05:04:54 AM
Great Mod!

Added both of the Dutch translations.
Title: Re: dQuoteSelection
Post by: digger on January 27, 2018, 05:20:05 AM
Added both of the Dutch translations.
Thanks! Will add this to the next release.
Title: Re: dQuoteSelection
Post by: jsx on April 14, 2020, 08:32:08 AM
Hi,

I installed this modification on my forum and unfortunately the selected text to quote does not work. Simply the Quote button does not have this Quote function (selected). Then I installed this modification on a clean test forum and everything works fine there. Please help me how to fix it.
Title: Re: dQuoteSelection
Post by: digger on April 14, 2020, 08:34:44 AM
Hi,

I installed this modification on my forum and unfortunately the selected text to quote does not work. Simply the Quote button does not have this Quote function (selected). Then I installed this modification on a clean test forum and everything works fine there. Please help me how to fix it.
You should have quick reply enabled.
Title: Re: dQuoteSelection
Post by: jsx on April 14, 2020, 08:58:29 AM
I had no idea about it. Now everything works fine. Thank you for help. :)
Title: Re: dQuoteSelection
Post by: Shambles on April 14, 2020, 12:15:54 PM
I had no idea about it.


This mod adds ability to quote any selected text into the QuickReply area.
Title: Re: dQuoteSelection
Post by: pocttopus on May 20, 2020, 06:04:10 AM
Hello,

This is a nice mod, is there any chance to be available for 2.1rc2 version?
Title: Re: dQuoteSelection
Post by: digger on May 20, 2020, 06:30:06 AM
This is a nice mod, is there any chance to be available for 2.1rc2 version?
SMF 2.1 have this feature.
Title: Re: dQuoteSelection
Post by: pocttopus on May 20, 2020, 06:44:21 AM
It quotes the whole post, not just selected text from the post.
Or maybe there is a new way to use it?  :(
Title: Re: dQuoteSelection
Post by: digger on May 20, 2020, 06:49:06 AM
It quotes the whole post, not just selected text from the post.
Or maybe there is a new way to use it?  :(
It shows new button "Quote Selected" if there is a selection.
Title: Re: dQuoteSelection
Post by: pocttopus on May 20, 2020, 06:56:00 AM
There is no such button.  :(
Title: Re: dQuoteSelection
Post by: Arantor on May 20, 2020, 08:46:55 AM
If you select some text, the button appears.
Title: Re: dQuoteSelection
Post by: pocttopus on May 20, 2020, 10:27:53 AM
No, it didn't appear.  :(
I'm on localhost testing RC2 for my new forum.