modification of cal hack
##
## HACK NAME : Mega Moderator ver 2.0 beta
##
## DESCRIPTION : Allows you to assign a moderator who can moderator all forums.
## (all bugs fixed...i hope... Give me feedback for if not)
## MegaMod name in general setting under admin name
##
## modifications made in files :
## cpanel2.cgi, cpanel4.cgi, archive.cgi, announce.cgi, ubb_library.pl, ubb_library2.pl,
## ubbmail.cgi, ubbmisc.cgi, posting.cgi, forumdisplay.cgi, edit.cgi, ultBB.setup
##
## AUTHOR : B -
[email protected] ##
## ORIGINAL HACK : Cal Henderson (cal) -
[email protected] ## DEMO : N/A
## CREDITS : Cal Henderson (cal) -
[email protected] (first hack)
## Armage Bedar -
[email protected] ## SanderS -
[email protected] ##
## If you feel you have contributed but not been given credit please email me -
[email protected] ##
## REQUIREMENTS : A full version of the UBB
##
##
## Beta version -
##
## INSTALLATION :
##
*************************************************************************
*************************** in cpanel4.cgi ******************************
*************************************************************************
##
##
## find:
##
##
if ($searchrow[3] eq "Administrator") {
$ThisStatus = "$AdminTitle";
}
##
## add after
##
elsif ($searchrow[3] eq "MegaModerator") {
$ThisStatus = "$MegaTitle";
}
##
##
## find:
##
##
&CheckPermissions;
$WriteYes = "";
$WriteNo = "";
$AdminYes="";
$AdminNo="";
##
## add before
##
$AdminMega="";
##
##
## find
##
##
if ($AdminPermission eq "true") {
$AdminYes = "CHECKED";
} else {
$AdminNo = "CHECKED";
}
##
## replace with
##
if ($AdminPermission eq "true") {
$AdminYes = "CHECKED";
} else {
if ($AdminMega eq "true"){
$AdminMega = "CHECKED";
} else {
$AdminNo = "CHECKED";
}
}
##
##
## find
##
##
Yes
No
##
## replace with
##
Admin
Mega Mod
No
##
##
## find
##
##
&CheckPermissions;
$DateReg = $searchrow[10];
$WriteYes = "";
$WriteNo = "";
$AdminYes="";
$AdminNo="";
##
## add before
##
$AdminMega="";
##
##
## find
##
##
if ($searchrow[8] eq "Administrator") {
$ThisStatus = "$AdminTitle";
}
##
## add after
##
elsif ($searchrow[8] eq "MegaModerator") {
$ThisStatus = "$MegaTitle";
}
##
##
## find
##
##
if ($AdminPermission eq "true") {
$AdminYes = "CHECKED";
} else {
$AdminNo = "CHECKED";
}
##
## replace with
##
if ($AdminPermission eq "true") {
$AdminYes = "CHECKED";
} else {
if ($AdminMega eq "true"){
$AdminMega = "CHECKED";
} else {
$AdminNo = "CHECKED";
}
}
##
##
## find
##
##
Yes
No
##
## replace with
##
Admin
Mega Mod
No
##
##
## find
##
##
if ($Status eq "Administrator") {
$Status = "$AdminTitle";
}
##
## add after
##
elsif ($Status eq "MegaModerator") {
$Status = "$MegaTitle";
}
##
##
## find
##
##
if ($Value eq "true") {
$Value = "Admin";
} else {
$Value = "";
}
##
## replace with
##
if ($Value eq "true") {
$Value = "Admin";
} else {
if ($Value eq "mega") {
$Value = "MegaMod";
} else {
$Value = "";
}
}
##
##
## find
##
##
} # end if/else admin
chomp($theprofile[4]);
##
## replace with
##
} # end if/else admin
if ($ThisPerm =~ m/MegaMod/) {$UserStatus = "MegaModerator";}
chomp($theprofile[4]);
*************************************************************************
*************************** in cpanel2.cgi ******************************
*************************************************************************
##
##
## find
##
##
if ($AdminTitle eq "") {
$AdminTitle = "Administrator";
}
##
## add after
##
if ($MegaTitle eq "") {
$MegaTitle = "MegaModerator";
}
##
##
## find
##
##
Administrator:
##
## add after
##
MegaModerator:
****************************************************************************
*************************** in ubb_library.pl ******************************
****************************************************************************
##
##
## find
##
##
if ($Permission =~ m/Moderator/) {
$AdminMod = "true";
} else {
$AdminMod = "false";
}
##
## add after
##
if ($Permission =~ m/MegaMod/) {
$AdminMega = "true";
} else {
$AdminMega = "false";
}
##
##
## find
##
##
if ($Permission =~ m/Write/) {
$AdminWrite = "true";
} else {
$AdminWrite = "false";
}
##
## add after
##
if ($Status =~ m/Mega/) {
$AdminMega = "true";
} else {
$AdminMega = "false";
}
##
##
## find
##
##
Only forum leaders ($AdminTitle, $ModeratorTitle) may perform this function. ##
## replace with
##
Only forum leaders ($AdminTitle, $MegaTitle, $ModeratorTitle) may perform this function. *****************************************************************************
*************************** in ubb_library2.pl ******************************
*****************************************************************************
##
##
## find
##
##
elsif ($ThisStatus eq "Moderator") {
$ThisStatus = "$ModeratorTitle";
}
##
## add (edit this to show a different status when posting)
##
elsif ($ThisStatus eq "MegaModerator") {
$ThisStatus = "$MegaTitle";
}
## under sub VerifyAdminMod
##
## find
##
##
if (($AdminPermission eq "true") | | ($Status eq "Moderator")) {
##
## replace with
##
if (($AdminPermission eq "true") | | ($Status eq "Moderator") | | ($Status eq "MegaModerator")) {
## under sub VerifyAdminModCP
##
## find
##
##
if (($AdminPermission eq "true") | | ($Status eq "Moderator")) {
##
## replace with
##
if (($AdminPermission eq "true") | | ($Status eq "Moderator") | | ($Status eq "MegaModerator")) {
## under sub VerifyAdminMod2
##
## find
##
##
if (($AdminPermission eq "true") | | ($ModMatch eq "yes")) {
##
## replace with
##
if (($AdminPermission eq "true") | | ($ModMatch eq "yes") | | ($AdminMega eq "true")) {
*************************************************************************
*************************** in posting.cgi ******************************
*************************************************************************
##
##
## find
##
##
if (($postUserName eq "$UserName") | | ($ModMatch eq "true") | | ($profileinfo[4] =~ m/Admin/)) {
##
## replace with
##
if (($postUserName eq "$UserName") | | ($ModMatch eq "true") | | ($profileinfo[4] =~ m/Admin/) | | ($profileinfo[4] =~ m/MegaMod/)) {
##
##
## find
##
##
unless (($profileinfo[8] eq "Administrator") | | ($ModMatch eq "true")) {
##
## replace with
##
unless (($profileinfo[8] eq "Administrator") | | ($ModMatch eq "true") | | ($profileinfo[4] =~ m/MegaMod/)) {
##
##
## find
##
##
unless ( ($ModMatch eq "true") | | ($profileinfo[4] =~ m/Admin/)) {
&StandardHTML("Sorry, you are not permitted to view IP Numbers.");
##
## replace with
##
unless (($ModMatch eq "true") | | ($profileinfo[4] =~ m/Admin/) | | ($profileinfo[4] =~ m/MegaMod/)) {
&StandardHTML("Sorry, you are not permitted to view IP Numbers.");
##
##
## find
##
##
if (($AdminStatus eq "true") | | ($ModMatch eq "true")) {
##
## replace with
##
if (($AdminStatus eq "true") | | ($ModMatch eq "true") | | ($AdminMega eq "true")) {
*************************************************************************
*************************** in archive.cgi ******************************
*************************************************************************
##
##
## find
##
##
unless (($Status eq "Administrator") | | ($ModMatch eq "true")) {
##
## replace with
##
&CheckTheStatus;
unless (($Status eq "Administrator") | | ($ModMatch eq "true") | | ($AdminMega eq "true")) {
**************************************************************************
*************************** in announce.cgi ******************************
**************************************************************************
## this give mega mod admin status for announcement
##
## find
##
##
if ($Status =~ m/Administrator/) {
$AdminStatus = "true";
} else {
$AdminStatus = "false";
}
##
## add after
##
if ($Status =~ m/Mega/) {
$AdminStatus = "true";
} else {
$AdminStatus = "false";
}
******************************************************************************
*************************** in forumdisplay.cgi ******************************(option)
******************************************************************************
## this allow mega mod to access all private forums like admin ( else, you need to grant access in c.p. )
##
## find
##
##
if (($Status eq "Administrator") | | ($PermissionCheck eq "true") | | ($ModMatch eq "yes") | | ($PasswordCheck eq "true")) {
&GrantAccess;
##
## replace with
##
if (($Status eq "Administrator") | | ($Status eq "MegaModerator") | | ($PermissionCheck eq "true") | | ($ModMatch eq "yes") | | ($PasswordCheck eq "true")) {
&GrantAccess;
**********************************************************************
*************************** in edit.cgi ******************************
**********************************************************************
##
##
## find
##
##
if ($AdminStatus eq "true") {
&PruneThis(Admin, $Type);
}
##
## add after
##
if ($AdminMega eq "true") {
&PruneThis(Admin, $Type);
}
##
##
## find
##
##
if (($AdminStatus eq "true") | | ($ModMatch eq "yes")){
&PerformTheEdit;
##
## replace with
##
if (($AdminStatus eq "true") | | ($ModMatch eq "yes") | | ($AdminMega eq "true")){
&PerformTheEdit;
##
##
## find
##
##
if ($Password eq "$profilestats[1]") {
$Status = "$profilestats[8]";
&CheckTheStatus;
if ($AdminStatus eq "true") {
&EditThis(Admin);
}
##
## add after
##
elsif ($AdminMega eq "true") {
&EditThis(Admin);
}
##
##
## find
##
##
if (($AdminStatus eq "true") | | ($ModMatch eq "yes")) {
&PerformTheDelete;
##
## replace with
##
if (($AdminStatus eq "true") | | ($ModMatch eq "yes") | | ($AdminMega eq "true")) {
&PerformTheDelete;
##
##
## find
##
##
if (($AdminStatus eq "true") | | ($ModMatch eq "yes")) {
&UpdateTheSubject;
##
## replace with
##
if (($AdminStatus eq "true") | | ($ModMatch eq "yes") | | ($AdminMega eq "true")) {
&UpdateTheSubject;
*************************************************************************
*************************** in ubbmisc.cgi ******************************
*************************************************************************
##
##
## find
##
##
if ($thisprofile[8] eq "Administrator") {
$ThisStatus = "$AdminTitle";
}
##
## add after
##
elsif ($thisprofile[8] eq "MegaModerator") {
$ThisStatus = "$MegaTitle";
}
##
##
## find
##
##
if ($Status eq "Administrator") {
$Status = "$AdminTitle";
}
##
## add after
##
elsif ($Status eq "MegaModerator") {
$Status = "$MegaTitle";
}
*************************************************************************
*************************** in UltBB.setup ******************************
*************************************************************************
##
##
## find
##
##
$AdminTitle = qq(Administrator) # may be different admin name
##
## add under that line
##
$MegaTitle = qq();
##
##
## done !...i hope nothing is missing !
##
##
[This message has been edited by B on July 09, 2000]