Do you think I could just leave this part blank and it'd be okay? We're just going to replace the whole thing with a header image anyway, right?
You are not logged in.
Pages: 1
Too many people quote the entire post that they're replying to, and you end up with massive quote chains filling up the thread.
If a player clicks the "Quote" button underneath a long post (which isn't already spoilered), make the generated quote include a spoiler which previews the first few words of the quote, like this:
▼Too many people quote...
Quote chains would work like this:
John wrote:Tomahawk wrote:▼Too many people quote...This is a short reply, so my post doesn't get put in a spoiler.
▼This is a long...
And if some nub quotes this entire post, even though you're not meant to quote the OP, it'll be put in a spoiler and the thread stays tidy.
One bot to rule them all, one bot to find them. One bot to bring them all... and with this cliché blind them.
Offline
If there's a way to detect if there's more than X characters inside <quote> tags, this would be great.
preferably with an option to change the X through display settings
Offline
Onjit wrote:If there's a way to detect if there's more than X characters inside <quote> tags, this would be great.
preferably with an option to change the X through display settings
I dont think that will be possible (well probably, but it wouldnt be easy), as currently all the replacements happen when you submit the post / press the quote button
Offline
maxi123 wrote:Onjit wrote:If there's a way to detect if there's more than X characters inside <quote> tags, this would be great.
preferably with an option to change the X through display settings
I dont think that will be possible (well probably, but it wouldnt be easy), as currently all the replacements happen when you submit the post / press the quote button
bbcode replacements? to html? or
I don't think we have any straightforward way to get legitimate height of the post. The post could have large images but little text, or small images and lots of text... line breaks are relatively reliable. I mean, it naturally could be implemented but I'd expect the cut-off to be glaring. Yeah, the character count might be misleading but doable. Make a line break count for like 50 characters or something?
Offline
Ideally the cut-off would be based on the vertical height of the quote, but as that's dependent on the device used to view the post idk if it's possible.
If the text-wrapping is entirely independent of the forum code then eh. Counting line breaks only works for posts with line breaks.
One bot to rule them all, one bot to find them. One bot to bring them all... and with this cliché blind them.
Offline
If the text-wrapping is entirely independent of the forum code then eh. Counting line breaks only works for posts with line breaks.
Yeah, but you see where "vertical height . . . dependent on the device used to view the post" becomes hard to generalize? Images can be many different sizes, but a line break (character) is still a line break (character). Just regular returns based on available width don't make sense, I agree.
Perhaps we're looking at this the wrong way. Instead of setting BBCode, what if the end page has some method for styling the message? A userscript could look at quote objects with large vertical widths and wrap them.
Offline
Perhaps we're looking at this the wrong way. Instead of setting BBCode, what if the end page has some method for styling the message? A userscript could look at quote objects with large vertical widths and wrap them.
I'm starting to think that you might be right about that
It would definitely be a lot harder, but would probably be the most reliable way to do it, and would even solve the problem of quoting spoilered quotes not returning the converted spoilers back to quotes (if that makes any sense)
Offline
you mean like if I were to quote something with our previous line of thinking, the quotes wouldn't really be pretty because they'd be back to weird spoiler + quote meshes?
yeah I could see that would be a bother.
Assuming a javascript solution, how should we go about this? Set a largest visible-quote value? Then we could take the parent-most .quotebox element and traverse the child quotes until parent.height - childQuote.height > desiredHeight, then we'd wrap the child in a spoiler (I suppose we could make a different visibility toggling system but what ain't broke...)
edit: work in progress
$(".postmsg>.quotebox").not(".spoilerbox")
yes that's all I have so far. This will give us the topmost quotes. Handling a straight chain of quotes is straightforward. What if we have a tree, though? two or three quotes in one quote... each with their own extensive parent nodes? Could we, perhaps, if the desired size cannot be determined outside of these branches, simply cut them at the shared trunk? Otherwise, wouldn't we potentially just be making this a rather complicated problem resulting in multiple spoilers later on out into the tree? IT'd just be simpler to err on the side of one sooner spoiler.
much later edit:
hey you! If you're still interested in this, do make a reply! I came back and made things work better. Not quite as tomahawk intended, but with the general concept.
var BOX_HEIGHT_MAX = 200;
var BOX_SPOILER_TITLE = "People said things...";
function getTallBoxes(){
return $(".quotebox").filter(function(e) { return $(this).height() > BOX_HEIGHT_MAX; }).sort(function (a, b) { return $(a).height() < $(b).height() ? 1 : -1; });
}
function spoilerify(title, content){
var replacement = $("<div><div class=\"quotebox spoilerbox\" style=\"padding: 0 5px;\"><div class=\"spoiler\" onclick=\"var e,d,c=this.parentNode,a=c.getElementsByTagName('div')[1],b=this.getElementsByTagName('span')[0];if(a.style.display!=''){while(c.parentNode&&(!d||!e||d==e)){e=d;d=(window.getComputedStyle?getComputedStyle(c, null):c.currentStyle)['backgroundColor'];if(d=='transparent'||d=='rgba(0, 0, 0, 0)')d=e;c=c.parentNode;}a.style.display='';b.innerHTML='▲';}else{a.style.display='none';b.innerHTML='▼';}\"><span class=\"spoiler\">▼</span>" + BOX_SPOILER_TITLE + "</div><div class=\"spoiled spoilercontent\" style=\"display:none\"></div></div></div>");
$(content).replaceWith(replacement);
replacement.find(".spoilercontent").append(content);
}
$(document).ready(function(){
var boxes = null;
while ((boxes = getTallBoxes()).length != 0){
spoilerify("Large box... ", boxes[0]);
}
});
Offline
Pages: 1
[ Started around 1732667728.5633 - Generated in 0.071 seconds, 12 queries executed - Memory usage: 1.56 MiB (Peak: 1.73 MiB) ]