Floris
14th November 2004, 08:24 PM
When you run version 3.0.x of vBulletin you might want to secure your forum by making yourself an undeletable user. But if you are also the site owner, you might want to be the super admin, and the only one with debug powers! Here is how:
Open the config.php file and find the variables $undeletableusers and $superadministrators and set the userid for yourself. Usually if you own the site, the userid is 1. You find your userid by going to the who is online and hover over your own username, you will see in the status bar of your browser an url that ends with a number, that number is the userid.
// ****** UNDELETABLE / UNALTERABLE USERS ******
// The users specified here will not be deletable or alterable from the control panel by any users.
// To specify more than one user, separate userids with commas.
$undeletableusers = '1';
// ****** SUPER ADMINISTRATORS ******
// The users specified below will have permission to access the administrator permissions
// page, which controls the permissions of other administrators
$superadministrators = '1';
The above example shows how to set this to 1 properly.
Now, below the variable $superadministrators you can add the following code to turn on debug, but limit it to your own account only.
if ($_SERVER['REMOTE_ADDR'] == '123.123.123.123')
{
$debug = 1;
} else {
$debug = 0;
}
Now, before you save the config.php file you must replace the 123.123.123.123 with your own IP address. You can find your own IP by surfing to this web site: http://www.whatismyip.com/
Changed it? Good, now save the config.php file.
Optional tip: If you want even more options, you can set your userid to the variables $canrunqueries and $canpruneadminlog and $canviewadminlog
Open the config.php file and find the variables $undeletableusers and $superadministrators and set the userid for yourself. Usually if you own the site, the userid is 1. You find your userid by going to the who is online and hover over your own username, you will see in the status bar of your browser an url that ends with a number, that number is the userid.
// ****** UNDELETABLE / UNALTERABLE USERS ******
// The users specified here will not be deletable or alterable from the control panel by any users.
// To specify more than one user, separate userids with commas.
$undeletableusers = '1';
// ****** SUPER ADMINISTRATORS ******
// The users specified below will have permission to access the administrator permissions
// page, which controls the permissions of other administrators
$superadministrators = '1';
The above example shows how to set this to 1 properly.
Now, below the variable $superadministrators you can add the following code to turn on debug, but limit it to your own account only.
if ($_SERVER['REMOTE_ADDR'] == '123.123.123.123')
{
$debug = 1;
} else {
$debug = 0;
}
Now, before you save the config.php file you must replace the 123.123.123.123 with your own IP address. You can find your own IP by surfing to this web site: http://www.whatismyip.com/
Changed it? Good, now save the config.php file.
Optional tip: If you want even more options, you can set your userid to the variables $canrunqueries and $canpruneadminlog and $canviewadminlog