Support Forum

Limiting quotes

AT Alex T
Alex T
Member

Is there a way that I can limit the number of times someone quotes another user in a thread?  I want to limit quotes to last two quotes, instead of showing every single time someone quotes.  

13 Answers

New Answer

IK Ike
Ike
Member

Hey Alex,

So the idea being that if someone quotes a post that already has 2 quotes in, you only get the post you’re quoting and the latest of the 2 quoted posts – So in total 2 quotes max?

If so, I would need Andy or Steve’s input. I’ve managed to find one reference to this being done in the past but that’s all. Actually if you were handy with a bit of coding you could probably tweak it to allow 2 rather than just 1 quote to pass.

https://simple-press.com/support-forum/sp5-general-topics/just-one-reply-blockquote-per-reply/

AT Alex T
Alex T
Member

Ike said
Hey Alex,

So the idea being that if someone quotes a post that already has 2 quotes in, you only get the post you’re quoting and the latest of the 2 quoted posts – So in total 2 quotes max?

If so, I would need Andy or Steve’s input. I’ve managed to find one reference to this being done in the past but that’s all. Actually if you were handy with a bit of coding you could probably tweak it to allow 2 rather than just 1 quote to pass.

https://simple-press.com/support-forum/sp5-general-topics/just-one-reply-blockquote-per-reply/

Yes, basically to just show the last two previously quoted.  Showing every single quote, especially in long discussions, makes the quoting look pretty silly.  You end up with this long pyramid of quotes.  I read that thread, though don’t really follow it.  Can you do a for dummies version 🙂

YS Yellow Swordfish
Yellow Swordfish
Member

Actually we do have an open ticket on this and have been wanting to improve it for some time.

The problem is designing both a UI  and technical solution that can be implemented successfully. I have one or two ideas to put forward so who knows…

AP Apopas
Apopas
Member

To me happens the opposite!

When someone quotes a post with multiple quotes, it displays only the last one.  This happens in a lot of posts, but not always. In other posts it displays all the quotes confused

YS Yellow Swordfish
Yellow Swordfish
Member

it will probably depend on how old the posts were – i,e., what version of SP they were made in.

Most users wanted just the one, single, last quote and that is what we changed it to some time last year. It is still possible to quote more than in post if it is on the same page as the new one you are making. Just by clicking on the quote button of the second post you want quoted,

AP Apopas
Apopas
Member

This happens with new posts as well.

For example today I quoted a post with 7 quotes (this is very common in my forum) and it worked fine.

Then I tried to quote a post with 2 quotes and displayed only the last one.

MP Mr Papa
Mr Papa
Member

I would have to see the before markup…  it doesnt matter about the date your are making the post, but the date of the post you are quoting…  the generated markup from before would have done things in html with the quoting… as Andy says, today we try to strip down to just a single quote…  think universally, folks wanted the multiple ones stripped.. you would be the first who wants to keep them 😉

in some testing today, I cannot get multiple to stay, but again, its all current posts… I dont have any old ones lying around with multiple quotes…

AP Apopas
Apopas
Member

The posts I quoted are new. They have been posted few hours ago.

Unfortunately, this problem doesn’t affect only the tree-like quotes but every quote in a single post. Here I’ll quote my post to show what I mean.

 

1) Opinion 1

2) Opinion 2

3) Opinion 3

4) Opinion 4

5) Opinion 5

AP Apopas
Apopas
Member

Apopas said

1) Opinion 1

I agree.

2) Opinion 2

Impossible.

3) Opinion 3

Are you sure?

4) Opinion 4

Yes, absolutely!

5) Opinion 5  

OK to this as well.

AP Apopas
Apopas
Member

Apopas said

OK to this as well.  

Here when I quote, it displays only the above answer while my member would like to comment to the other ones as well.

Sometimes it displays them all, sometimes (as here) displays only the last one.

MP Mr Papa
Mr Papa
Member

hmmmm.. perhaps there is a terminology issue here… 

quoting means using the quote button on an individual post… see the post icon toolbar…  you quote an entire post…

in your post #10, you didnt quote there…  did you blockquote??  that would be highlight some text and then hit the blockquote button (the one that looks like double quotes) in the tinymce editor??

Quoting is where @yellow-swordfish and I have been talking about…  again, you quote a whole post… you blockquote sections (ie block) of text within a post…

If you quote a post, its limited to the last single blockquote from the quoted post…

if you add individual blockquotes while editing a post, there is no limit…

so basically, it sounds like you want to remove quoting a post limiting it to single blockquote (from previous quoting)???   I dont think that will really do what you want…  remember, each time you will get a new set of blockquote display elements… but its possible by adding this code to your sp theme spFunctions.php file

add_filter('sph_quote_content', 'my_quote_content', 10, 2);
function my_quote_content($content, $original) {
    return $original;
}

this basically restores the multiple quoting…  again, dont think its in the end what you will want, but give it a try…

AP Apopas
Apopas
Member

I’m a bit confused hehehe laugh

So quote and blockquote are two different things and if you quote a post that has multiple blockquotes, it gets only the last one (but why this limitation?).

So, what I really need, is the ability to quote a whole post with multiple blockquotes and the code you gave me seems to work great atm. I will test it further and I’ll give feedback.

THANKS A TON!

 

Btw what these two numbers, in the first row of the code, mean? That the blockquote limit is 10?

MP Mr Papa
Mr Papa
Member

the html/markdown term is blockquote…  quoting is just a term we use for when you want to blockquote a whole post…  main diff, is as I said, quoting does whole post vs just a section of text… 

so the process is two completely different things..  when you quote a post, and another quotes a post with a quote, you get these nested blockquotes…  works fine, just most folks found it cumbersome in display because of the nesting…  many, many users requested this because of the display oddity…

so when you quote a post, at that time, we strip to the last blockquote…

when you add a blockquote while making a post, the logic/sequence is completely different… Now, when you save a post, we could also apply the blockquote stripping but, of course, we dont..

technically speaking, we could change the code that limits the blockquote to only strip when you have nested blockqotes vs any block quotes…  but the code and resources to do so is orders of magnitude larger… so was deemed unnecessary –  borne out by nobody complaining until now 🙂

but a filter was put in place so it could be bypassed if needed…

No, the 10 refers to the priority of the filter..  the 2 refers to the number of arguments passed by the filter…