Post by SubDevo on Jun 25, 2010 10:36:44 GMT -8
Add Modify Profile and Ban links to Mini-Profile by SubDevo
Tested in IE, FF, Opera, Safari and Chrome.
This code adds a "Modify Profile" and a "Ban User" link to the top of the mini-profile in every post.
The links will only be visible to the user names put into the code.
To add the links to the bottom instead of the top, see the "Note" after the code.
Enjoy!!!
SubDevo
Variables:
var fStaff=/^(admin|staff1)$/i; // Staff usernames allowed to see links.
Enter the user names (NOT display names) of the users that are allowed to see the links.
Separate each name with a "|". Do NOT put a "|" after the last name in the list.
For best results, place this code AFTER any mini-profile mod codes.
Location: Global Footer
<script type="text/javascript">
/* Add Modify Profile and Ban links to Mini-Profile by SubDevo */
/* Global Footer - Please leave this header intact. Do not repost. */
/* interoceandesigns.com or lsdp.proboards.com */
var fStaff=/^(admin|staff1)$/i; // Staff usernames allowed to see links.
if(fStaff.test(pb_username)&&(/viewprofile|search2|display/i).test(pb_action)){
var nl=' <a href="/index.cgi?action=',nm=/user=(.+?)\"/i;
var td=document.getElementsByTagName("td"),x=0,i,n,a;
while(td[++x]){ a=td[x-1];
if(a.width=="20%"&&td[x].width=="80%"&&a.innerHTML.match(nm)){
i="&user="+RegExp.$1; n=document.createElement("div"); n.style.textAlign="center";
n.innerHTML='['+nl+'modifyprofile'+i+'">Modify </a> |'+nl+'banuser'+i+'"> Ban</a> ]';
a.insertBefore(n,a.firstChild);
}}}
</script>
NOTE:
If you are using "Quote Multiple Posts/Selections" by Eton Bones, place this code below/under it.
To add the links to the bottom of the MP instead of the top, find this line in the code (last line):
a.insertBefore(n,a.firstChild);
And replace it with this:
a.appendChild(n);
Tested in IE, FF, Opera, Safari and Chrome.
This code adds a "Modify Profile" and a "Ban User" link to the top of the mini-profile in every post.
The links will only be visible to the user names put into the code.
To add the links to the bottom instead of the top, see the "Note" after the code.
Enjoy!!!
SubDevo
Variables:
var fStaff=/^(admin|staff1)$/i; // Staff usernames allowed to see links.
Enter the user names (NOT display names) of the users that are allowed to see the links.
Separate each name with a "|". Do NOT put a "|" after the last name in the list.
For best results, place this code AFTER any mini-profile mod codes.
Location: Global Footer
<script type="text/javascript">
/* Add Modify Profile and Ban links to Mini-Profile by SubDevo */
/* Global Footer - Please leave this header intact. Do not repost. */
/* interoceandesigns.com or lsdp.proboards.com */
var fStaff=/^(admin|staff1)$/i; // Staff usernames allowed to see links.
if(fStaff.test(pb_username)&&(/viewprofile|search2|display/i).test(pb_action)){
var nl=' <a href="/index.cgi?action=',nm=/user=(.+?)\"/i;
var td=document.getElementsByTagName("td"),x=0,i,n,a;
while(td[++x]){ a=td[x-1];
if(a.width=="20%"&&td[x].width=="80%"&&a.innerHTML.match(nm)){
i="&user="+RegExp.$1; n=document.createElement("div"); n.style.textAlign="center";
n.innerHTML='['+nl+'modifyprofile'+i+'">Modify </a> |'+nl+'banuser'+i+'"> Ban</a> ]';
a.insertBefore(n,a.firstChild);
}}}
</script>
NOTE:
If you are using "Quote Multiple Posts/Selections" by Eton Bones, place this code below/under it.
To add the links to the bottom of the MP instead of the top, find this line in the code (last line):
a.insertBefore(n,a.firstChild);
And replace it with this:
a.appendChild(n);