Also Block Quotes of Members I've Blocked
Sept 4, 2015 4:25:55 GMT -8
Mandoli, Tumbleweed, and 2 more like this
Post by Chris on Sept 4, 2015 4:25:55 GMT -8
Code:
Add the following code to your Global Footer (how to edit your forum headers & footers)
<script type="text/javascript">
$(function (){
/* Also block the quotes of people I have blocked - Sep 4, 2015 */
var block_quotes = function block_quotes() {
var block_list = proboards.data("user").block_list;
if (block_list && block_list.user_ids && block_list.user_ids.length) { //no block list then no point
$('.quote[author]').each(function (i, quote) {
var user = $('.quote_header a.user-link', this);
if (user.length && (user.idFromClass('user')in block_list) ) {
var contents = $(quote).addClass('blocked').children()
contents.hide();
$('<div class="quote_body"><div class="quote note pad-bottom">This quote is hidden</div><a href="#" class="button display-blocked-quote" role="button">Display Quote</a></div>')
.insertAfter(contents)
.find('a')
.click(function(){
contents.show();
$(this).closest('.quote_body').remove();
return false;
})
}
})
}
}
proboards.on('afterSearch', block_quotes);
block_quotes()
})
</script>
Preview:
Code 1
Code 2
Updates:
- March 20, 2017 4:48PM CST
If you want to see the author of the quote (see second image under preview) then use this code instead<script>
$(function (){
/* Also block the quotes of people I have blocked - Mar 20, 2017 */
var block_quotes = function block_quotes() {
var block_list = proboards.data("user").block_list;
if (block_list && block_list.user_ids && block_list.user_ids.length) { //no block list then no point
$('.quote[author]').each(function (i, quote) {
var user = $('.quote_header a.user-link', this);
if (user.length && (user.idFromClass('user')in block_list) ) {
var contents = $(quote).addClass('blocked').children()
contents.hide();
$('<div class="quote_body"><div class="quote note pad-bottom">This quote by ' + user[0].outerHTML + ' is hidden</div><a href="#" class="button display-blocked-quote" role="button">Display Quote</a></div>')
.insertAfter(contents)
.find('a')
.click(function(){
contents.show();
$(this).closest('.quote_body').remove();
return false;
})
}
})
}
}
proboards.on('afterSearch', block_quotes);
block_quotes()
})
</script>