inherit
222468
0
Oct 21, 2016 12:11:49 GMT -8
TheOrlandoGray
14
June 2015
theorlandogray
|
Post by TheOrlandoGray on Jun 19, 2015 16:28:01 GMT -8
<script type='text/javascript'>
/* Hide 'delete' button from none staff members
created by CrAzY_J
do not redistribute this code without the creator's permission*/
if( this.location.href.match(/display&/) )
{
var StaffCheck = false;
var Admin = /Admin\sFunctions:\s/;
var Delete = /deletepost&thread=/;
var TD = document.body.getElementsByTagName('td');
for( var t = TD.length-1 ; t > 0 ; t -- )
{
if( TD[t].colSpan == '2' && TD[t].vAlign == 'middle' && TD[t].align == 'left' && Admin.test( TD[t].firstChild.innerHTML ) )
StaffCheck = true;
if( !StaffCheck && TD[t].width == '40%' && TD[t].vAlign == 'bottom' && TD[t].align == 'right' && Delete.test( TD[t].firstChild.lastChild))
TD[t].firstChild.lastChild.style.display = 'none';
}
}
</script>
|
|
inherit
I need a new CT, thinking.... [insert Jeopardy theme song here]
110769
0
Aug 21, 2021 0:07:21 GMT -8
Tumbleweed
20,825
September 2007
tumbleweed
|
Post by Tumbleweed on Jun 19, 2015 21:08:44 GMT -8
<script type='text/javascript'> /* Hide 'delete' button from none staff members created by CrAzY_J do not redistribute this code without the creator's permission*/ if( this.location.href.match(/display&/) ) { var StaffCheck = false; var Admin = /Admin\sFunctions:\s/; var Delete = /deletepost&thread=/; var TD = document.body.getElementsByTagName('td'); for( var t = TD.length-1 ; t > 0 ; t -- ) { if( TD[t].colSpan == '2' && TD[t].vAlign == 'middle' && TD[t].align == 'left' && Admin.test( TD[t].firstChild.innerHTML ) ) StaffCheck = true; if( !StaffCheck && TD[t].width == '40%' && TD[t].vAlign == 'bottom' && TD[t].align == 'right' && Delete.test( TD[t].firstChild.lastChild)) TD[t].firstChild.lastChild.style.display = 'none'; } } </script> Hi there, That code you posted is an old v4 code so it will no longer work but one of the admin here on Proboards posted what I have below in bold and I can't find the original thread but if you just want the "delete" gone for everyone but staff, this will do it but it was also supposed to remove the edit button too so I commented out (in blue) that line so the edit button will still work.
<script type="text/javascript"> $(document).ready(function(){ if(!proboards.data('user').is_staff){ /*$('.button.edit-button').remove();*/ $('.options_menu li').each(function(){ if($(this).html().indexOf('Delete Post') != -1) $(this).remove(); }); } }); </script>
I have it in my global footers but you can use it in your board footers if it is a specific board or if for a certain theme, go into your wrapper template and I'd just put it right below the <body> tag on about line 8.
|
|
inherit
222468
0
Oct 21, 2016 12:11:49 GMT -8
TheOrlandoGray
14
June 2015
theorlandogray
|
Post by TheOrlandoGray on Jun 19, 2015 22:47:09 GMT -8
Thank You
|
|
inherit
I need a new CT, thinking.... [insert Jeopardy theme song here]
110769
0
Aug 21, 2021 0:07:21 GMT -8
Tumbleweed
20,825
September 2007
tumbleweed
|
Post by Tumbleweed on Jun 19, 2015 23:44:40 GMT -8
Your welcome and thanks to which ever admin I got that from. lol
|
|