Debug and Optimize vBulletin with Config Constants

If you use vBulletin forum software, you probably know what a wonderful piece of code it is and type of features, enhancements it offers for you as administrator as well as to your visitor is truly amazing. At some point you would need to debug, fine tune, troubleshoot or fix some problems with vBulletin then you can use these constants to further optimize and enhance your vbulletin forum software.

Please use this at your own risk in the config.php file.

// Force all userinfo queries to include avatar information. This can be used to show the browsing user’s avatar in the navbar, for example.
define(‘AVATAR_ON_NAVBAR’, 1);

// Skip check for install and tools files. Potential security risk! If you define this, vBulletin won’t show the normal error that you get when you have not yet deleted the tools.php and installation files.
define(‘BYPASS_FILE_CHECK’, 1);

// Set whether or not vBulletin is running in demo mode
define(‘DEMO_MODE’, 1);

// Use this to unconditionally disable all hooks/plugins/products on vBulletin. Useful for debugging or for fixing broken boards.
define(‘DISABLE_HOOKS’, 1);

// Force hooks to be used, even if they are not enabled in the settings. DISABLE_HOOKS (above) overrides FORCE_HOOKS
define(‘FORCE_HOOKS’, 1);

// Good for test boards. This unconditionally disables all emails that vBulletin might have tried to send.
define(‘DISABLE_MAIL’, 1);

// Define this if you don’t want the password in the login box to be zapped on-submit. This is useful for integrating vBulletin with other software when you want the user’s password to be submitted in plain-text instead of MD5.
define(‘DISABLE_PASSWORD_CLEARING’, 1);

// Do not redirect/reload the ACP after importing a product XML file.
define(‘DISABLE_PRODUCT_REDIRECT’, 1);

// Send cron log entries to browser
define(‘ECHO_CRON_LOG’, 1);

// Windows servers may want lines delimited this way
define(‘FORCE_MAIL_CRLF’, 1);

// Automatic advance – enable if you want to get through upgrades quickly without reading the text
define(‘HIDEPROCEED’, 1);

// Secondary usergroup will not override Primary “Show on Members List” setting
define(‘MEMBERLIST_INCLUDE_SECONDARY’, 1);

// Set as false to disable the Javascript-based disabling of criteria in the notice add/edit code
define(‘NOTICE_CRITERIA_JS’, 0);

// Disable javascript progress meter in ACP
define(‘NO_IMPORT_DOTS’, 1);

// Use explain syntax for sql queries; good for checking during optimization
define(‘POST_EXPLAIN’, 1);

// Don’t use a vBulletin database connection; good for integration if your CMS has it’s own database suite
define(‘SKIPDB’, 1);

// Reduces the number of cookie headers returned – IIS might run better.
define(‘SKIP_AGGRESSIVE_LOGOUT’, 1);

// Skip check of Post requests against the referrer domain white-list. Potential security risk!
define(‘SKIP_REFERRER_CHECK’, 1);

//Skip the CSRF check when($_POST[‘postnews’] == ‘postnews’)
define(‘CSRF_SKIP_LIST’, ‘postnews’);

//Enable the CSRF PROTECTION for the current script.
define(‘CSRF_PROTECTION’, true);

//Useful to run some scripts based on the script being used.
define(‘THIS_SCRIPT’, ‘index’);
Example: caching some templates for certain script instead of caching them for every page, this will help to reduce the memory usages.

//Disable the PM pop up dialog.
define(‘NOPMPOPUP’, true);

//Don’t update the lastactivity or lastvisit fields for the current logged in user.
define(‘SESSION_BYPASS’, true);

//Don’t register where is the user (in which forum or thread, etc.).
define(‘LOCATION_BYPASS’, true);

//Don’t send any cookies.
define(‘NOCOOKIES’, true);

//Don’t check the referrer website, this will help to accept post requests from other websites.
define(‘SKIP_REFERRER_CHECK’, true);

I hope this post was useful for all vbulletin software script users. Please be careful how you use these constants in the config.php file as I take no responsibility for any damage. Thanks to Tomisimo and Milado users over at vbcodex.net forum for compiling this wonderful and helpful list.