Cam
Administrator
[M:5000]
Posts: 6,381
|
Post by Cam on Apr 29, 2011 3:17:05 GMT
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
|
|
|
Post by Mark Knight Day on Apr 29, 2011 3:26:18 GMT
Cool code!
|
|
Cam
Administrator
[M:5000]
Posts: 6,381
|
Post by Cam on Apr 29, 2011 3:26:39 GMT
Thanks Mark =]
|
|
|
Post by patrick on Apr 30, 2011 23:18:03 GMT
Good code
|
|
Cam
Administrator
[M:5000]
Posts: 6,381
|
Post by Cam on Apr 30, 2011 23:20:17 GMT
I'm glad to see my codes and the codes on this forum are getting used
|
|
CåñåÐå™
Senior Poster
[M:0]
v5 Beta Tester
Posts: 74
|
Post by CåñåÐå™ on May 2, 2011 3:03:11 GMT
If i want it in my mini profile on every board, it will have to be put in every board footers ?
|
|
Cam
Administrator
[M:5000]
Posts: 6,381
|
Post by Cam on May 2, 2011 4:35:41 GMT
If i want it in my mini profile on every board, it will have to be put in every board footers ? Global Footers
|
|