Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
coding-topic
Limiting quotes
Avatar
Apopas
Member
Offline
Feb 11, 2017 - 12:18 pm

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.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
Offline
Feb 11, 2017 - 1:27 pm

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...

Avatar
Apopas
Member
Offline
Feb 11, 2017 - 6:51 pm

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?

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
Offline
Feb 11, 2017 - 7:16 pm

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...

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 620
Members: 17365
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79626