Post by snap2000 on Jul 30, 2006 16:16:15 GMT -8
This script makes any user of your choice to appear as a guest. The specifics are as follows:
And now, the script, which goes in your Global Footers:
<script type="text/javascript"><!--
/* Fake Guest Script by snap2000 */
function fake(user) {
for(i = 0; i < document.links.length; i++) {
if(document.links[i].href.match(new RegExp("&user=" + user + "$"))) {
var tmp = document.createElement("span");
if(document.links[i].parentNode.nodeName.toLowerCase() == "b"
&& document.links[i].parentNode.parentNode.width == "20%") {
document.links[i].parentNode.parentNode.innerHTML = user
+ "<br />Guest";
} else {
var modSpace = (document.links[i].parentNode.nodeName.toLowerCase() == "i") ? document.links[i].parentNode : false;
tmp.innerHTML = user;
document.links[i].parentNode.replaceChild(tmp, document.links[i]);
if(modSpace) {
var chunk = '<span>' + user + '</span>';
if(modSpace.innerHTML.match(new RegExp('^Moderator: ' + chunk + '$', 'i'))) {
modSpace.innerHTML = '';
} else {
modSpace.innerHTML = modSpace.innerHTML.replace(new RegExp(chunk, 'i'), '');
modSpace.innerHTML = modSpace.innerHTML.replace(/,(\s|$)/, '');
}
}
}
}
}
}
fake("admin");
//--></script>
Usage:
Simply add a fake("username"); statement for every user that you want to affect, where username is their username (not their display name). Easy.
The line in bold will obviously make the main admin appear to be deleted.
EDIT: This must be placed before any scripts that modify the profile or moderators sections.
8.03: Fixed bug preventing the quoting of a "fake guest"
- Every link pointing to the user's profile will be turned to plain text
- The user's mini-profile will have the features of a guest (this does not happen when viewing their full profile)
- If the user is a moderator, they will not appear on the list of moderators in the forum description
- If the user is the only moderator of a forum, the moderators list will not be shown at all
- The only real downside is that the users online numbers are not recalculated, since there is no easy way to tell if a user is staff or not (though if someone wishes to try by passing a parameter or something, go ahead)
And now, the script, which goes in your Global Footers:
<script type="text/javascript"><!--
/* Fake Guest Script by snap2000 */
function fake(user) {
for(i = 0; i < document.links.length; i++) {
if(document.links[i].href.match(new RegExp("&user=" + user + "$"))) {
var tmp = document.createElement("span");
if(document.links[i].parentNode.nodeName.toLowerCase() == "b"
&& document.links[i].parentNode.parentNode.width == "20%") {
document.links[i].parentNode.parentNode.innerHTML = user
+ "<br />Guest";
} else {
var modSpace = (document.links[i].parentNode.nodeName.toLowerCase() == "i") ? document.links[i].parentNode : false;
tmp.innerHTML = user;
document.links[i].parentNode.replaceChild(tmp, document.links[i]);
if(modSpace) {
var chunk = '<span>' + user + '</span>';
if(modSpace.innerHTML.match(new RegExp('^Moderator: ' + chunk + '$', 'i'))) {
modSpace.innerHTML = '';
} else {
modSpace.innerHTML = modSpace.innerHTML.replace(new RegExp(chunk, 'i'), '');
modSpace.innerHTML = modSpace.innerHTML.replace(/,(\s|$)/, '');
}
}
}
}
}
}
fake("admin");
//--></script>
Usage:
Simply add a fake("username"); statement for every user that you want to affect, where username is their username (not their display name). Easy.
The line in bold will obviously make the main admin appear to be deleted.
EDIT: This must be placed before any scripts that modify the profile or moderators sections.
8.03: Fixed bug preventing the quoting of a "fake guest"