Source of trunk/settings.php at revision 416 (04/16/2009 9:04:13, 4578 bytes, 139 lines, language: php) [download]:
| 1 | <?php |
| 2 | |
| 3 | /* |
| 4 | ** CodewiseBlog Settings File |
| 5 | */ |
| 6 | |
| 7 | // if settings.local.php exists, its settings are used instead of this file. |
| 8 | if (file_exists('settings.local.php')) { |
| 9 | require_once 'settings.local.php'; |
| 10 | return; |
| 11 | } |
| 12 | |
| 13 | // Where CodewiseBlog is located in the filesystem. Do not append a trailing |
| 14 | // slash. |
| 15 | define('FSPATH', '/var/www/htdocs/blogs'); |
| 16 | |
| 17 | // If Subdomain Mode is enabled, each user will get their own subdomain the |
| 18 | // same as their username. This works well with wildcard DNS. |
| 19 | // If Subdomain Mode is disabled, the username is appended to the URL. |
| 20 | define('SUBDOMAIN_MODE', FALSE); |
| 21 | |
| 22 | // The domain name CodewiseBlog is installed at |
| 23 | define('BASE_DOMAIN', 'www.example.com'); |
| 24 | |
| 25 | // If Custom URLs are enabled, selected users can use URL redirection to have |
| 26 | // their blog appear somewhere else. Custom URL Mode changes the links to |
| 27 | // use their Custom URL. |
| 28 | define('CUSTOM_URL_ENABLED', TRUE); |
| 29 | |
| 30 | // The path CodewiseBlog is located at in the URL. Do not append a trailing |
| 31 | // slash. |
| 32 | define('INSTALLED_PATH', '/blogs'); |
| 33 | |
| 34 | // If Subdomain Mode is enabled, this is the subdomain used when not displaying |
| 35 | // a user's blog. It may be set to the empty string to use the Base Domain. |
| 36 | // If Subdomain Mode is disabled, this is ignored and Base Domain is always |
| 37 | // used. |
| 38 | define('DEFAULT_SUBDOMAIN', ''); |
| 39 | |
| 40 | // How many blog entries to display per page? |
| 41 | define('TOPICS_PER_PAGE', '5'); |
| 42 | |
| 43 | // How many replies to display per page? |
| 44 | define('POSTS_PER_PAGE', '10'); |
| 45 | |
| 46 | // How many shoutbox posts to display? |
| 47 | define('SHOUTS_PER_PAGE', '10'); |
| 48 | |
| 49 | // Date format. See http://www.php.net/date for info. |
| 50 | define('DATE_FORMAT', 'F jS, Y \a\t g:i A'); |
| 51 | |
| 52 | // Anonymous users get this name. |
| 53 | define('ANONYMOUS_NAME', 'Anonymous'); |
| 54 | |
| 55 | // Tripcodes have this text appended to them before hashing. This makes sure |
| 56 | // nobody can bruteforce the resultant hash to find tripcodes. Keep this |
| 57 | // text secret! |
| 58 | define('TRIPCODE_SALT', 'playwithfire'); |
| 59 | |
| 60 | // Do we send out emails? (Disable this for testing.) |
| 61 | define('EMAIL', TRUE); |
| 62 | |
| 63 | // Who do we email when something goes wrong accessing the database? |
| 64 | |
| 65 | |
| 66 | // SQL server access settings |
| 67 | define('SQL_HOST', 'localhost'); |
| 68 | define('SQL_USER', 'codewiseblog'); |
| 69 | define('SQL_PASS', 'password'); |
| 70 | define('SQL_DB', 'codewiseblog'); |
| 71 | |
| 72 | // The name of the site. Used in lots of places. |
| 73 | define('SITE_TITLE', 'Example Blog Site'); |
| 74 | |
| 75 | // Sub-title of the site. |
| 76 | define('SITE_MOTTO', 'A Really Nice Bunch of Folks'); |
| 77 | |
| 78 | // Make users type CAPTCHAs when replying to blog posts? (Reccomended) |
| 79 | define('IMAGEVERIFY', TRUE); |
| 80 | |
| 81 | // The skin used for the Control Panel |
| 82 | define('CONTROLPANEL_SKINID', '00000000000000000000000000000000'); |
| 83 | |
| 84 | // Skin used for closed accounts |
| 85 | define('CLOSED_SKINID', '00000000000000000000000000000002'); |
| 86 | |
| 87 | // Skin used for user blogs by default |
| 88 | define('DEFAULT_SKINID', '00000000000000000000000000000003'); |
| 89 | |
| 90 | // If the file 'TERMS' exists in the CodewiseBlog main folder, a link to it is |
| 91 | // displayed in the footer of each page. |
| 92 | // Existence of the TERMS file is also what enables new account registration. |
| 93 | if(file_exists(FSPATH."/TERMS")) { |
| 94 | if (SUBDOMAIN_MODE && DEFAULT_SUBDOMAIN != "") |
| 95 | $terms = ", subject to <a href=\"http://".DEFAULT_SUBDOMAIN.".".BASE_DOMAIN.INSTALLED_PATH."TERMS\">terms</a>"; |
| 96 | else |
| 97 | $terms = ", subject to <a href=\"http://".BASE_DOMAIN.INSTALLED_PATH."TERMS\">terms</a>"; |
| 98 | } else { |
| 99 | $terms = ""; |
| 100 | } |
| 101 | |
| 102 | // The copright footer. Do not remove the attribution to CodewiseBlog. Doing so |
| 103 | // violates the terms of your license. You may, however, append additional text |
| 104 | // to this string. |
| 105 | define("CWB_COPYRIGHT", |
| 106 | "<a href=\"http://gna.org/projects/codewiseblog\">CodewiseBlog</a> © 2004-2009 " |
| 107 | . "<a href=\"http://www.codewise.org/~wrf/\">William R. Fraser</a> / " |
| 108 | . "<a href=\"http://www.codewise.org/\">Codewise.org</a>.<br />" |
| 109 | . "All textual content is the property of its author$terms.<br />" |
| 110 | . "CodewiseBlog is free software under the <a href=\"COPYING\">GNU General Public License</a>" |
| 111 | ); |
| 112 | |
| 113 | unset($terms); |
| 114 | |
| 115 | // This defines which HTML tags are allowed in replies. The array after each |
| 116 | // tag defines which HTML attributes are allowed. All others are stripped out. |
| 117 | $ALLOWED_TAGS = array |
| 118 | ( |
| 119 | 'b' => array(), |
| 120 | 'i' => array(), |
| 121 | 'u' => array(), |
| 122 | 'p' => array(), |
| 123 | 'br' => array(), |
| 124 | 'a' => array('href', 'name'), |
| 125 | 'ol' => array(), |
| 126 | 'ul' => array(), |
| 127 | 'li' => array(), |
| 128 | 'em' => array(), |
| 129 | 'strong' => array(), |
| 130 | 'strike' => array(), |
| 131 | 'font' => array('color', 'size'), |
| 132 | 'tt' => array(), |
| 133 | 'blockquote' => array(), |
| 134 | 'sub' => array(), |
| 135 | 'sup' => array(), |
| 136 | ); |
| 137 | |
| 138 | ?> |
| 139 |