GBM Documentation
Configuration File Notes
Currently this file is a bit of a mess, and requires some serious streamlining / revamping. However, almost (if not) all of the definitions in the configuration file are currently required by the core distribution of this software. It's on the list of "to do's" for this to be pared down, removing the last vestiges of really old config definitions.
Database Parameters
These variables have been left such as they are, instead of converting them to global definitions in order to support some of the old data importation code (InfoSite) that has been kept from the original WOW Guild Bank Manager. (Marshall Silverwings)
Customize to fit your database parameters (set by your service provider or your systems administrator.) I suggest that you leave the $dbprefix as it is unless you happen to be running multiple versions of this software in the same database, or it conflicts with something else.
// Mysql info
$mysqlserver = "dbserver";
$mysqldb = "databasename";
$mysqlun = "dbusername";
$mysqlpass = "dbpassword";
$dbprefix = "gms_";
System User & Other Misc. Info
This section sets certain information that is occasionally needed for processes to fall back on; mostly for mailing processes to report a correct "From" header, but also for various error messages to display contact information for users to make use of when things go awry.
When reporting this information, it should accurately represent a user that is in the database. Currently it is set up to match the default administrator that is provided with the database setup (SQL) file. The Guild Banker should be the user that is in charge of tracking the addition / deletion / etc. of items to / from the Guild Bank.
// Gulid Information
define ('WOWGBM_GUILD_NAME', 'The Basic Guild');
define ('WOWGBM_BANKER_NAME', 'Administrator');
define ('WOWGBM_BANKER_USERID', '1');
define ('WOWGBM_BANKER_EMAIL', 'admin@guildbank.ca');
define ('GBM_REGISTRATION_COUNCIL', 'admin@guildbank.ca');
This information is primarily required in the instance that an error occurs and a user needs to be given information on who to contact, or some kind of basic information is sent out to an e-mail address from the system.
// Site Administrator Info:
define('CB_WEBMASTER_USERID', '3');
define('CB_WEBMASTER_NAME', 'Guild Bank Tech Support');
define('CB_WEBMASTER_EMAIL', 'techsupport@guildbank.ca');
I believe this is fairly straightforward information, given that this is your basic mailer user. Anything sent from an automated form, or related item, if it is not to be sent from a db-registered user, functions (or modules) should be programmed to fall back on the PostMaster? user.
The error reports email address is primarily required for debug purposes in the software. However, if you are experiencing difficulties with a plug-in or other function in the software, enabling error reports would be a good idea. (This function is currently on by default, but it can be disabled later on in the config file.)
// Mailer Configuration Settings...
define('CB_POSTMASTER_DEFAULT', 'PostMaster?');
define ('CB_POSTMASTER', 'PostMaster?');
define ('CB_POSTMASTER_EMAIL', 'postmaster@guildbank.ca');
define ('CB_ERROR_LOG_EMAIL', 'error_reports@guildbank.ca');
Mail Server Configuration
This section should be self-explanatory. If you are using a linux-based system to run this software, it is likely that you already have an smtp server running in the background, and these settings below should work fine. However, if you are running this off a Windows box, you will likely need to track yourself down an smtp server, either by using your hosting provider's (and the information they'll have provided you), or install one on your system.
/* Mailer Host Confirugration */
define ('CB_MAIL_HOST', 'localhost'); // Address for SMTP server
define ('CB_MAIL_PORT', 25); // SMTP Port your server listens on
define ('CB_MAIL_AUTH', false); // Whether your SMTP server requires authentication
define ('CB_MAIL_USERNAME', 'smtpusername'); // If CB_MAIL_AUTH is true, you need a username here for authentication
define ('CB_MAIL_PASSWORD', 'smtpuserpass'); // And if you need a username, chances are, you need a password
Guild Bank Item Request Msgs
These variables are just basic, default messages that the system spits out to a user when their request is approved / declined by the Guild Banker.
// Accepted text for Request page
$accepted = "Your Item will be waiting for you in the mail within 24 hours of the request. <br> Thanks for using our Guild bank";
// Declined text for Request page
$declined = "Sorry you have not been given the item, Please try again at a later time when ether you have enough funds or get more status within the guild. <br><br>Sorry for the inconviniance. <br><br> Thank you for using our Guild bank";
Theme Settings
$theme = "default_gbm";
This should be set to the name of the directory that you have stored your template files in.
define('WOWGBM_THEME_NAME', $theme);
Don't edit this, it simply sets up a constant that can be used to easily reference your theme's directory.
define('WOWGBM_THEME_DIR', 'gbm-themes'); // defines the name of the directory yours themes are stored in.
If, for some crazy reason, you really want to change the name on the directory that is storing your templates, modify that here. (Please note that it has been a while since this was implemented, and it has not been tested lately.)
System Directory Info
Set these variables to reflect the location of your gbm install both on the system, and in relation to your website root in the URL.
define('WOWGBM_URL_PATH', '/gbm_dev/'); Set this to reflect the relative path to root for your gbm installation's URL. For example, if you are settings this up to be the root of a domain, then you should leave it set as '/'. Otherwise, if you are installing it as a subdirectory of a domain, (http://yourguild.guildaxis.net/gbm) then you should set it as the relative path to root, '/gbm/'
Note: It is important that you include a backslash at the end of your path.
define('WOWGBM_SYSTEM_PATH', '/webroot/cbrooks/gbm_dev/');
Simply put, this is the path to your gbm installation on the hard drive. (For windows users, here's an example: C:/webroot/gbm/ and for linux users, this example: /home/username/web/gbm/
Note: It is important that you include a backslash at the end of your path.
ini_set('include_path', (get_include_path() . PATH_SEPARATOR . WOWGBM_SYSTEM_PATH . 'gbm-functions'));
I would not suggest modifying this line unless you are familiar with setting system include paths in php. This line gives us the ability to easily call files in the gbm-functions directory without having to set system path variables for each file we want to include, every time we want to include it for something.
Misc Customizations
define('WOWGBM_NEWS_DISPCOUNT', 0);
This will allow you to determine the number of news posts that are displayed in the 'summary' or 'Guild Hall' module. Set it to '0' for all, or give it a specific number if you wish.
define('ICON_STORE_LOCATION', 'http://wow.allakhazam.com/images/icons/');]]BR\\ You can specify the location from which the GBM software will load the icon files displayed in the items catalogue.
define('ICON_EXTENSION', '.png'); Fairly straightforward: this determines what extension is being used for icons on the site. (More specifically, I believe, for the items catalogue icons.)
Authentication Configuration
Bootstrapped onto the back-end of this software is the cBrooks User Authentication model, which uses Sessions (basically, Cookies) to authenticate users and determine whether they are logged in each time they request a page. SHA1 is used for password encryption.
Session Info
define('CB_SITE_DOMAIN', 'guildbank.ca');
Specify the domain that your software is running under. (This is very important for multiple subdomain authentication; but otherwise can be left alone.)
define('CB_SESSION_ALL_SUBDOMAINS', false);
Settings this to true will tell the authentication system that when the session is created, it should be in effect for all subdomains of CB_SITE_DOMAIN.
$timed_out = false;
The authentication system sets this bit. (So leave it false). When it is set to TRUE, the user has timed out.
Otherwise, I expect that settings this to true would likely make for an excellent way to time every user out on the site somewhat permanently.
define('CB_SESSION_USER_OBJ', 'cb_user_obj');
In the event that you have a variable clash, or a desire to change the key used to store the user object in the $_SESSION array, set this to something else.
Passwords
define('CB_PASSWORD_ALLOWED_CHARS', "abcdefghijklmnopqrstuvwxyz1234567890");
Note: Currently, this is only used for displaying the error message, and is not, in fact, implemented as the method for controlling what characters may be used in a user's password.
The string of characters (case-sensitive) that are allowed in user passwords I would like to have this set up so that whatever characters are in this string really determine what's allowed in a password, but at the moment this is not the case. The string is merely used in error messages to tell users what they can put in their passwords.
Misc Messages
define('CB_LOGIN_ERR', '<p class="alert">You have supplied an invalid username and / or password. Please re-enter them to ensure that they are correct. If you continue to have problems, please contact '.CB_WEBMASTER_NAME.' at <a href="mailto:'.CB_WEBMASTER_EMAIL.'">'.CB_WEBMASTER_EMAIL.'</a>, so that they can look at your account, or possibly re-set your password. Thank you.</p>');
Default Login Error message. (Displayed when a user inputs an incorrect username and / or password during the login procedure.
define('CB_PASSWORD_NOT_CHANGED', "Password not changed. A user's password must be a minimum of 8 characters and contain both letters as well as numbers for security purposes. It must also contain only these characters: ".CB_PASSWORD_ALLOWED_CHARS);
I will assume that you will get the gist of this one.
Error Messages (Debug)
Every so often it's useful to try and figure out why something isn't working, and here's where you can turn on / off the inherent debug utilities that have been incorporated into the software.
define('CB_ERROR_HTML', true);
Determines whether or not error messages should be output in standard html
define ('CB_DBERROR_TRIGGER', true);
Determines whether or not the queryDB script should trigger on an error from its query. Should an error occur in the situation where this is set 'true', the Site Administrator will receive an error report via e-mail (providing accurate and working mail server settings) with the details of the error.
System Flags
define('GBM_PHPBB_INSTALLED', true);
This is simply a system bit for determining whether or not the software has been installed. You can ignore it, but make sure that it is there and set to 'true'.
Logs
define ('GMS_TRANSACTION_LOG', true);
This will keep a rather hefty log of all the database transactions done on the item-related tables for the gms. No private user information is recorded by this, and not all item data is recorded at this time. This is merely a debugging / optional transaction backup tool.
