inherit
139970
0
Dec 31, 2013 3:41:16 GMT -8
Luke
Rawhhh =D
1,780
April 2009
harry12345
|
Post by Luke on May 24, 2011 1:22:43 GMT -8
Name of code: [CB] Ban/warn/modify profile links in mini-profile Created by: Me, though thanks for the mega helpful things you showed me Jordan Placement: Place in the footers of the board you wish this to have in. Quick Description: I figured the admin is the one who does most of the warnings, banning and modifying profiles so I made it just for the admin, it could be easily customized for more staff members. <script type="text/javascript"> <!-- // [CB] Ban/warn/modify profile links in mini-profile // http://codercommunity.proboards.com if(pb_username=='admin'){ if(pb_action == "display" || pb_action == "viewprofile") { for(var td = document.getElementsByTagName("td"), x = 6; x < td.length; x++) { if(td[x].width == "20%" && td[x].getElementsByTagName("center")[0]) { var a = td[x].getElementsByTagName("a"), b = a.length, c = 0, username; while(c < b){
if(a[c].className && a[c].className.match(/group/i)){ username = a[c].href.split("=")[2]; break; } c++; } td[x].innerHTML += "<br> <a href='index.cgi?action=warnuser&user="+username+"'>Warn User</a> - <a href='index.cgi?action=banuser&user="+username+"'>Ban User</a> - <a href='index.cgi?action=modifyprofile&user="+username+"'>Modify Profile</a> ";
} } } } //--> </script>
Thanks
|
|