GolfHos

Support => Help and Site Suggestions => Topic started by: Aske on April 04, 2008, 07:59:58 AM



Title: Quote vs. MultiQuote
Post by: Aske on April 04, 2008, 07:59:58 AM
Is there a way to get 2 different quote buttons, one that will quote multiple posts (quote of a quote of a quote..) vs  one that will just quote the newest (in a quote of a quote of a quote). 


Title: Re: Quote vs. MultiQuote
Post by: Uisce Beatha on April 04, 2008, 08:01:08 AM
Yes.


Title: Re: Quote vs. MultiQuote
Post by: Clive on April 04, 2008, 08:07:44 AM

... and do it manually.


Title: Re: Quote vs. MultiQuote
Post by: Aske on April 04, 2008, 08:32:24 AM
Yes.


... and do it manually.


hate !


Title: Re: Quote vs. MultiQuote
Post by: stroh on April 04, 2008, 08:36:44 AM
T/J:  Can we get a hate emoticon?


Title: Re: Quote vs. MultiQuote
Post by: Clive on April 04, 2008, 09:13:59 AM
T/J:  Can we get a hate emoticon?
(http://img153.imageshack.us/img153/2557/askexm4.jpg)


Title: Re: Quote vs. MultiQuote
Post by: dystopia on April 04, 2008, 11:32:46 AM
Is there a way to get 2 different quote buttons, one that will quote multiple posts (quote of a quote of a quote..) vs  one that will just quote the newest (in a quote of a quote of a quote). 

I started working on this, but then I realized I may have interpreted it incorrectly.  I just read it again, and now I have no idea what you're saying.  In each subsequent reading, I understand less what you mean by  :airquotes: quote of a quote of a quote :airquotes:

Could you dumb it down a shade?

Didn't there used to be some dude on FGI that would comprehend Aske posts and translate them for the rest of us to understand?  Some sort of Asshat Whisperer.

Aske, do you know of another forum that has an example of multiquote functionality that I can look at?


Title: Re: Quote vs. MultiQuote
Post by: gleek on April 04, 2008, 11:34:17 AM
Is there a way to get 2 different quote buttons, one that will quote multiple posts (quote of a quote of a quote..) vs  one that will just quote the newest (in a quote of a quote of a quote). 

I started working on this, but then I realized I may have interpreted it incorrectly.  I just read it again, and now I have idea what you're saying.  In each subsequent reading, I understand less what you mean by  :airquotes: quote of a quote of a quote :airquotes:

Could you dumb it down a shade?

Didn't there used to be some dude on FGI that would comprehend Aske posts and translate them for the rest of us to understand?  Some sort of Asshat Whisperer.

Aske, do you know of another forum that has an example of multiquote functionality that I can look at?

I like the current implementation of the feature.


Title: Re: Quote vs. MultiQuote
Post by: gleek on April 04, 2008, 11:40:02 AM
BTW, translation of Aske's post:

The current "Quote" button already is the "MultiQuote" feature. What Aske wants is another quoting mechanism that quotes ONLY the crap typed by the poster that you are quoting rather than all the other crap in the post that were quotes of another post.

i.e. "shallow copy" vs. "deep copy"

I think the implementation would be difficult as some people break up other's posts and respond in between.


Title: Re: Quote vs. MultiQuote
Post by: dystopia on April 04, 2008, 11:41:24 AM
T/J:  Can we get a hate emoticon?

Do you have any in mind?


Title: Re: Quote vs. MultiQuote
Post by: dystopia on April 04, 2008, 11:44:43 AM
BTW, translation of Aske's post:

The current "Quote" button already is the "MultiQuote" feature. What Aske wants is another quoting mechanism that quotes ONLY the crap typed by the poster that you are quoting rather than all the other crap in the post that were quotes of another post.

i.e. "shallow copy" vs. "deep copy"

I think the implementation would be difficult as some people break up other's posts and respond in between.

Ah, ok.  got it.  That's tougher than I expected, mainly because since my regex skillz suck.  I'll look around and see if someone has already written something like this.


Title: Re: Quote vs. MultiQuote
Post by: Clive on April 04, 2008, 11:48:47 AM
Didn't there used to be some dude on FGI that would comprehend Aske posts and translate them for the rest of us to understand?  Some sort of Asshat Whisperer.
I vaguely remember that.  He was a total jackass, IIRC.


Title: Re: Quote vs. MultiQuote
Post by: Aske on April 04, 2008, 12:29:48 PM
Is there a way to get 2 different quote buttons, one that will quote multiple posts (quote of a quote of a quote..) vs  one that will just quote the newest (in a quote of a quote of a quote). 

I started working on this, but then I realized I may have interpreted it incorrectly.  I just read it again, and now I have idea what you're saying.  In each subsequent reading, I understand less what you mean by  :airquotes: quote of a quote of a quote :airquotes:

Could you dumb it down a shade?

Didn't there used to be some dude on FGI that would comprehend Aske posts and translate them for the rest of us to understand?  Some sort of Asshat Whisperer.

Aske, do you know of another forum that has an example of multiquote functionality that I can look at?

I like the current implementation of the feature.


LOL.


yeh,  if there's 3 nested quotes,  it would sometimes be nice to hit a 'quote' button that only quotes the outermost shell of that nest


Title: Re: Quote vs. MultiQuote
Post by: Clive on April 04, 2008, 12:44:05 PM
Another forum I'm on, that's the default for the "Quote" button.  If you want to nest quotes, you have to add them in manually.


Title: Re: Quote vs. MultiQuote
Post by: dystopia on April 04, 2008, 03:37:00 PM
D'oh!  [sm_oops]

There's a forum option to set this.  :-[

Quote
Remove nested quotes when posting - This will only show the quote of the post in question, not any quoted posts from that post.

At this point, it's either one way or the other, there's no option for buttons for both.  I don't have time now to get both options to work, so let's try having it default to a simple, non-nested quote and see if anyone cares.


Title: Re: Quote vs. MultiQuote
Post by: spacey on April 04, 2008, 04:12:48 PM
D'oh!  [sm_oops]

There's a forum option to set this.  :-[

At this point, it's either one way or the other, there's no option for buttons for both.  I don't have time now to get both options to work, so let's try having it default to a simple, non-nested quote and see if anyone cares.
The only potential drawback I can see is that now anything in quote tags is eliminated, as you can see with the above demonstration. Whether people will care?  [sm_dontknow]


Title: Re: Quote vs. MultiQuote
Post by: gleek on April 04, 2008, 04:23:35 PM
I think the new setting is a little strange. I'd prefer that there be something there to indicate that something was removed.


Title: Re: Quote vs. MultiQuote
Post by: dystopia on April 04, 2008, 04:30:39 PM
Hmm, tough call.  On the plus side, maybe it cuts back on this (http://www.golfhos.com/topic-7144.msg89416#msg89416)?  [sm_devil]


Title: Re: Quote vs. MultiQuote
Post by: Uisce Beatha on April 04, 2008, 04:47:13 PM

i.e. "shallow copy" vs. "deep copy"


Geek. ;)


I don't have time now to get both options to work...


"Lazy copy" ftw.   [sm_shock] [sm_shock] [sm_shock]


Title: Re: Quote vs. MultiQuote
Post by: gleek on April 04, 2008, 04:54:10 PM
If you want to try using JavaScript, this might give you an idea about how to implement it. This code will strip out any quotes that came from another post (as opposed to regular text wrapped in quote tags), and it will also leave any quotes that are inside code tags as-is. Whatever is stripped out is replaced with a brief message. You'll still have to wrap the resultant text in quote tags with references to the original post.

You can try it out here (http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_input). Copy the code into the left textarea, and click the button. Then on the right-hand side, paste the message into the top textarea. Ah, you can figure it out.  :D


Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>Test</title>
<script type="text/javascript">
function sortnum(a, b)
{
return a - b;
}

function Strip()
{
var quoterep = '~~inane crap snipped~~';
var txtsrc = document.getElementById('txtSource');
var strsrc = txtsrc.value;
var QS$ = '[' + 'quote]';
var QS = '[' + 'quote';
var QE = '[' + '/quote]';
var CS = '[' + 'code]';
var CE = '[' + '/code]';

var tags = {};
var aryq1 = LoadHash(tags, strsrc, QS);
var aryq2 = LoadHash(tags, strsrc, QE);
var aryc1 = LoadHash(tags, strsrc, CS);
var aryc2 = LoadHash(tags, strsrc, CE);

var indices = new Array();
indices = indices.concat(aryq1,aryq2,aryc1,aryc2);
indices = indices.sort(sortnum);

var section = new Array();
var mode = level = sectionstart = curpos = 0;
var index, tag;
for (var i in indices)
{
    curpos = indices[i];
    tag = tags['i' + curpos];
    if (tag == QS && strsrc.substr(curpos, QS$.length) == QS$)
    {
        tag = QS$;
    }
   
    if (mode == 0)
    {
        if (tag == QS || tag == QS$ || tag == CS)
        {
            section.push(strsrc.substring(sectionstart, curpos - 1));
            sectionstart = curpos;
            switch (tag)
            {
                case CS:
                    mode = 1;
                    break;
                case QS$:
                    mode = 2;
                    break;
                default:
                    mode = 3;
            }
            level = 1;
        }
    }
    else if (mode == 1)
    {
        if (tag == CS)
        {
            level++;
        }
        else if (tag == CE)
        {
            level--;
            if (level == 0)
            {
                section.push(strsrc.substring(sectionstart, curpos += tag.length));
                mode = 0;
                sectionstart = curpos;
            }
        }
    }
    else if (mode == 2)
    {
        if (tag == QS$ || tag == QS)
        {
            level++;
        }
        else if (tag == QE)
        {
            level--;
            if (level == 0)
            {
                section.push(strsrc.substring(sectionstart, curpos += tag.length));
                mode = 0;
                sectionstart = curpos;
            }
        }
    }
    else if (mode == 3)
    {
        if (tag == QS$ || tag == QS)
        {
            level++;
        }
        else if (tag == QE)
        {
            level--;
            if (level == 0)
            {
                section.push(quoterep + '\r\n');
                sectionstart = curpos + tag.length;
                mode = 0;
            }
        }
    }
}
if (curpos < strsrc.length - 1)
{
    if (mode == 3)
    {
        section.push(quoterep + '\r\n');
    }
    else
    {
        section.push(strsrc.substring(sectionstart, strsrc.length - 1));
    }
}

document.getElementById('txtResult').value = section.join('');

}

function LoadHash(ohash, strsrch, strfind)
{
    var aryfind = new Array();
    var i = 0;
    var index;
    do
    {
        i = strsrch.indexOf(strfind, i);
        if (i != -1)
        {
            index = 'i' + i;
            ohash[index] = strfind;
            aryfind.push(i);
            i += strfind.length;
        }
    } while (i != -1)
    return aryfind;
}

</script>
  </head>
  <body>
  <div>
<input type="button" id="btnQuote" name="btnQuote" value="Strip Quotes" onclick="Strip(); return false;"/><br />
<span>Original Post:</span><br/>
<textarea id="txtSource" cols="50" rows="2" style="width:100%;height:100px;" /></textarea><br /><br />
<span>Stripped Post:</span><br/>
<textarea id="txtResult" cols="50" rows="2" style="width:100%;height:100px;" /></textarea>
  </div>
  </body>
</html>


Title: Re: Quote vs. MultiQuote
Post by: spacey on April 04, 2008, 05:53:05 PM
Hmm, tough call.  On the plus side, maybe it cuts back on this (http://www.golfhos.com/topic-7144.msg89416#msg89416)?  [sm_devil]

Sold!


Title: Re: Quote vs. MultiQuote
Post by: gleek on April 04, 2008, 05:58:33 PM
Sold!
[sm_thumbsup2]


Title: Re: Quote vs. MultiQuote
Post by: dystopia on April 05, 2008, 01:34:47 PM
Grim.  I don't have time today to look at the smiley bug when nested quotes are removed, so I put it back to the way it used to be. :-[


Title: Re: Quote vs. MultiQuote
Post by: Aske on April 05, 2008, 05:34:23 PM
D'oh!  [sm_oops]

There's a forum option to set this.  :-[

Quote
Remove nested quotes when posting - This will only show the quote of the post in question, not any quoted posts from that post.

At this point, it's either one way or the other, there's no option for buttons for both.  I don't have time now to get both options to work, so let's try having it default to a simple, non-nested quote and see if anyone cares.

test


Title: Re: Quote vs. MultiQuote
Post by: Aske on April 05, 2008, 05:35:25 PM
D'oh!  [sm_oops]

There's a forum option to set this.  :-[

Quote
Remove nested quotes when posting - This will only show the quote of the post in question, not any quoted posts from that post.

At this point, it's either one way or the other, there's no option for buttons for both.  I don't have time now to get both options to work, so let's try having it default to a simple, non-nested quote and see if anyone cares.

test

test2


Title: Re: Quote vs. MultiQuote
Post by: dystopia on April 05, 2008, 06:58:04 PM
Grim.  I don't have time today to look at the smiley bug when nested quotes are removed, so I put it back to the way it used to be. :-[

test


Title: Re: Quote vs. MultiQuote
Post by: stroh on April 06, 2008, 08:35:03 AM
Quote
Related Posts

None