How to add "Too many quotes" - Spoiled Quotes

by Aoki - 15-01-2015, 07:06 AM
selling fadeds nudes
Posts:
5,384
Joined:
Jan 2015
Likes:
1,470
Credits:
20,504
Reputation:
216
2 Years of Service
#1
OP
Posted: 15-01-2015, 07:06 AM
Today I'm going to explain, how to put quoted replies in a spoiler.
It'll look like this:

Quote:
Quote:Reply #1


Quote:Reply #2


All you have to do is to put the code below in your headerinclude template. (AdminCP > Templates & Style > Templates > Your Themes Templates > Ungrouped Templates > headerinclude

Code:
<script type="text/javascript">

var quoteMsg = "View More";
var quotePop = "Too Many Quotes";

jQuery(function() {
jQuery('blockquote:not(blockquote > blockquote)').each(function(a, b) {
jQuery(this).children('blockquote').each(function() {
jQuery(this).html("<div><div class=\"spoilerheader\">" + quoteMsg + " <a href=\"javascript:void(0);\" class=\"spoilerclick\">(" + quotePop + ")</a></div><div class=\"spoilerbody\" style=\"display: none;\">" + jQuery(this).html() + "</div></div>");
});

});
jQuery(".spoilerclick").click(function() {

var spoiler = jQuery(this).parent().parent();
jQuery(spoiler).children(".spoilerbody").show();
jQuery(spoiler).children(".spoilerheader").hide();
})
});

</script>

All credits go to Cake for writing this little nice script.
Also credits to Unsuspicious for fixing it.
Send me a message for help. (Read the help docs first)
Steam Wishlist - Anime Watchlist
The last reply on this thread is older than a month. Please do not unnecessarily bump it.
Register an account or login to reply
Create an account
Create a free account today and start posting right away. It only takes a few seconds.
Login
Log into an existing account.
1 Guest(s)