| 1 | <?php |
|---|
| 2 |
|
|---|
| 3 | include_once( dirname(__file__) . '/../common/omconfig.php' );
|
|---|
| 4 |
|
|---|
| 5 | /*
|
|---|
| 6 |
|
|---|
| 7 | This file is part of omCollab.
|
|---|
| 8 |
|
|---|
| 9 | Copyright (c) 2008 omCollab (Openmethodology Project)
|
|---|
| 10 | http://www.openmethodology.org
|
|---|
| 11 | http://mike2.openmethodology.org/wiki/OmCollab
|
|---|
| 12 |
|
|---|
| 13 | And parts copyright of Scuttle project
|
|---|
| 14 | (http://sourceforge.net/projects/scuttle/, http://scuttle.org/)
|
|---|
| 15 |
|
|---|
| 16 | omCollab is free software: you can redistribute it and/or modify
|
|---|
| 17 | it under the terms of the GNU General Public License as published by
|
|---|
| 18 | the Free Software Foundation, either version 3 of the License, or
|
|---|
| 19 | (at your option) any later version.
|
|---|
| 20 |
|
|---|
| 21 | omCollab is distributed in the hope that it will be useful,
|
|---|
| 22 | but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 23 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|---|
| 24 | GNU General Public License for more details.
|
|---|
| 25 |
|
|---|
| 26 | */
|
|---|
| 27 |
|
|---|
| 28 | ###################################################################### |
|---|
| 29 | # Database Configuration |
|---|
| 30 | # |
|---|
| 31 | # dbtype: Database driver - mysql, mysqli, mysql4, oracle, postgres, |
|---|
| 32 | # sqlite, db2, firebird, mssql, mssq-odbc |
|---|
| 33 | # dbhost: Database hostname |
|---|
| 34 | # dbport: Database port |
|---|
| 35 | # dbuser: Database username |
|---|
| 36 | # dbpass: Database password |
|---|
| 37 | # dbname: Database name |
|---|
| 38 | ###################################################################### |
|---|
| 39 | |
|---|
| 40 | $dbtype = 'mysql'; |
|---|
| 41 | $dbport = '3306'; |
|---|
| 42 | $dbhost = OMCOLLAB_DB_HOSTNAME; |
|---|
| 43 | $dbname = OMBOOKMARKS_DATABASE_NAME; |
|---|
| 44 | $dbuser = OMBOOKMARKS_DB_USERNAME; |
|---|
| 45 | $dbpass = OMBOOKMARKS_DB_PASSWORD; |
|---|
| 46 | $tableprefix = OMBOOKMARKS_DB_TABLE_PREFIX; |
|---|
| 47 | |
|---|
| 48 | |
|---|
| 49 | ###################################################################### |
|---|
| 50 | # Mediawiki integration |
|---|
| 51 | # |
|---|
| 52 | # dbtype: Database driver - mysql, mysqli, mysql4, oracle, postgres, |
|---|
| 53 | # sqlite, db2, firebird, mssql, mssq-odbc |
|---|
| 54 | # dbhost: Database hostname |
|---|
| 55 | # dbport: Database port |
|---|
| 56 | # dbuser: Database username |
|---|
| 57 | # dbpass: Database password |
|---|
| 58 | # dbname: Database name |
|---|
| 59 | # defaultredirect: redirect user after bookmark has been added - bookmark*, userhomepage |
|---|
| 60 | # targetserverlocation: URL to tags.php file of server to be displayed in tag links returned from posts_public.php |
|---|
| 61 | # wikiSuggestLocation: URL Suggest page of SelectCategoryTagCloud extension to retrieve categories and to display on add bookmarks page |
|---|
| 62 | # ABOUT message: all about content must be added directly to the about.tpl.php page |
|---|
| 63 | # mwCookieName: name of the Mediawiki cookie (databasename_databaseprefix plus _Token or _UserName etc. - only specify the first part |
|---|
| 64 | # registerUser: allow users to register via register.php (by default disabled to prevent spam). Don't forget to update toolbar.inc.php to enable registration link if applicable. |
|---|
| 65 | ###################################################################### |
|---|
| 66 | |
|---|
| 67 | $mwdbhost = OMCOLLAB_DB_HOSTNAME; |
|---|
| 68 | $mwdbuser = OMWIKI_DB_USERNAME; |
|---|
| 69 | $mwdbpass = OMWIKI_DB_PASSWORD; |
|---|
| 70 | $mwdbname = OMWIKI_DATABASE_NAME; |
|---|
| 71 | $mwtableprefix = OMWIKI_DB_TABLE_PREFIX; |
|---|
| 72 | $targetserverlocation = "http://{$_SERVER['HTTP_HOST']}" . RR_OMCOLLAB_DIRECTORY . "bookmarks/tags.php/"; |
|---|
| 73 | $wikiSuggestLocation = "http://{$_SERVER['HTTP_HOST']}" . OMWIKI_SCRIPT_PATH . "/extensions/SelectCategoryTagCloud/SelectCategoryTagCloudSuggestJSON.php";
|
|---|
| 74 |
|
|---|
| 75 | $mwdbtype = 'mysql'; |
|---|
| 76 | $mwdbport = '3306'; |
|---|
| 77 | $mwcookiename = "{$mwdbname}_{$mwtableprefix}"; |
|---|
| 78 | $defaultredirect = 'userhomepage'; |
|---|
| 79 | $registerUser = false; |
|---|
| 80 | |
|---|
| 81 | ###################################################################### |
|---|
| 82 | # ONLY EDIT THE INFORMATION BELOW IF YOU KNOW WHAT YOU ARE DOING. |
|---|
| 83 | ###################################################################### |
|---|
| 84 | # System Configuration |
|---|
| 85 | # |
|---|
| 86 | # sitename: The name of this site. |
|---|
| 87 | # locale: The locale used. |
|---|
| 88 | # top_include: The header file. |
|---|
| 89 | # bottom_include: The footer file. |
|---|
| 90 | # shortdate: The format of short dates. |
|---|
| 91 | # longdate: The format of long dates. |
|---|
| 92 | # nofollow: true - Include rel="nofollow" attribute on |
|---|
| 93 | # bookmark links. |
|---|
| 94 | # false - Don't include rel="nofollow". |
|---|
| 95 | # defaultPerPage: The default number of bookmarks per page. |
|---|
| 96 | # -1 means no limit! |
|---|
| 97 | # defaultRecentDays: The number of days that bookmarks or tags should |
|---|
| 98 | # be considered recent. |
|---|
| 99 | # defaultOrderBy: The default order in which bookmarks will appear. |
|---|
| 100 | # Possible values are: |
|---|
| 101 | # date_desc - By date of entry descending. |
|---|
| 102 | # Latest entry first. (Default) |
|---|
| 103 | # date_asc - By date of entry ascending. |
|---|
| 104 | # Earliest entry first. |
|---|
| 105 | # title_desc - By title, descending alphabetically. |
|---|
| 106 | # title_asc - By title, ascending alphabetically. |
|---|
| 107 | # url_desc - By URL, descending alphabetically. |
|---|
| 108 | # url_asc - By URL, ascending alphabetically. |
|---|
| 109 | # TEMPLATES_DIR: The directory where the template files should be |
|---|
| 110 | # loaded from (the *.tpl.php files) |
|---|
| 111 | # root : Set to NULL to autodetect the root url of the website |
|---|
| 112 | # cookieprefix : The prefix to use for the cookies on the site |
|---|
| 113 | # tableprefix : The table prefix used for this installation |
|---|
| 114 | # adminemail : Contact address for the site administrator. Used |
|---|
| 115 | # as the FROM address in password retrieval e-mails. |
|---|
| 116 | # cleanurls : true - Use mod_rewrite to hide PHP extensions |
|---|
| 117 | # : false - Don't hide extensions [Default] |
|---|
| 118 | # |
|---|
| 119 | # usecache : true - Cache pages when possible |
|---|
| 120 | # false - Don't cache at all [Default] |
|---|
| 121 | # dir_cache : The directory where cache files will be stored |
|---|
| 122 | # |
|---|
| 123 | # useredir : true - Improve privacy by redirecting all bookmarks |
|---|
| 124 | # through the address specified in url_redir |
|---|
| 125 | # false - Don't redirect bookmarks |
|---|
| 126 | # url_redir : URL prefix for bookmarks to redirect through |
|---|
| 127 | # |
|---|
| 128 | # filetypes : An array of bookmark extensions that omBookmarks should |
|---|
| 129 | # add system tags for. |
|---|
| 130 | # reservedusers : An array of usernames that cannot be registered |
|---|
| 131 | ###################################################################### |
|---|
| 132 | |
|---|
| 133 | $sitename = OMBOOKMARKS_APPLICATION_NAME; |
|---|
| 134 | $locale = 'en_GB'; |
|---|
| 135 | $top_include = 'top.inc.php'; |
|---|
| 136 | $bottom_include = 'bottom.inc.php'; |
|---|
| 137 | $shortdate = 'Y-m-d'; |
|---|
| 138 | $longdate = 'j F Y'; |
|---|
| 139 | $nofollow = true; |
|---|
| 140 | $defaultPerPage = 10; |
|---|
| 141 | $defaultRecentDays = 180; |
|---|
| 142 | $defaultOrderBy = 'popularity_desc'; |
|---|
| 143 | $TEMPLATES_DIR = dirname(__FILE__) .'/templates_omB/'; |
|---|
| 144 | $root = NULL; |
|---|
| 145 | $cookieprefix = 'OMBOOKMARKS'; |
|---|
| 146 | $adminemail = OMCOLLAB_ADMIN_EMAIL; |
|---|
| 147 | $cleanurls = false; |
|---|
| 148 | |
|---|
| 149 | $usecache = false; |
|---|
| 150 | $dir_cache = dirname(__FILE__) .'/cache/'; |
|---|
| 151 | |
|---|
| 152 | $useredir = false; |
|---|
| 153 | $url_redir = 'http://www.google.com/url?sa=D&q='; |
|---|
| 154 | |
|---|
| 155 | $filetypes = array( |
|---|
| 156 | 'audio' => array('mp3', 'ogg', 'wav'), |
|---|
| 157 | 'document' => array('doc', 'odt', 'pdf'), |
|---|
| 158 | 'image' => array('gif', 'jpeg', 'jpg', 'png'), |
|---|
| 159 | 'video' => array('avi', 'mov', 'mp4', 'mpeg', 'mpg', 'wmv') |
|---|
| 160 | ); |
|---|
| 161 | $reservedusers = array('all', 'watchlist'); |
|---|
| 162 | |
|---|
| 163 | /* |
|---|
| 164 | * Popularity Matrix defines how bookmark popularity is calculated |
|---|
| 165 | * |
|---|
| 166 | * Usage: |
|---|
| 167 | * |
|---|
| 168 | $popularity_matrix = array( array( 'days' => 7 // bookmarks rated in the last 0-7 days |
|---|
| 169 | , 'weight' => 10 ) // popularity is 10x their actual rating |
|---|
| 170 | , array( 'days' => 28 // bookmarks rated in the last 7-28 days |
|---|
| 171 | , 'weight' => 4 ) // popularity is 4x their actual rating |
|---|
| 172 | , array( 'days' => 180 // bookmarks rated in the last 28-180 days |
|---|
| 173 | , 'weight' => 2 ) ); // popularity is 2x their actual rating |
|---|
| 174 | * ( older than that, the rating *is* the popularity ) |
|---|
| 175 | * |
|---|
| 176 | * The outer array must contain at least 1 "array ( 'days' => d, 'weight' => w )" |
|---|
| 177 | */ |
|---|
| 178 | $popularity_matrix = array( array( 'days' => 7 |
|---|
| 179 | , 'weight' => 10 ) |
|---|
| 180 | , array( 'days' => 28 |
|---|
| 181 | , 'weight' => 4 ) |
|---|
| 182 | , array( 'days' => 180 |
|---|
| 183 | , 'weight' => 2 ) ); |
|---|
| 184 | |
|---|
| 185 | |
|---|
| 186 | /* |
|---|
| 187 | * User Activity |
|---|
| 188 | * ------------------------------------------------------------------------------ |
|---|
| 189 | * System measures user activity over time based on |
|---|
| 190 | * a) bookmarks and |
|---|
| 191 | * b) comments |
|---|
| 192 | * added during the previous configurable time periods |
|---|
| 193 | * |
|---|
| 194 | * You configure the number of users to display in each time period |
|---|
| 195 | * You configure the time periods |
|---|
| 196 | * |
|---|
| 197 | * There is just one array to configure: |
|---|
| 198 | * |
|---|
| 199 | $user_activity_config_matrix = array( |
|---|
| 200 | array( 'period_name' => 'Today' |
|---|
| 201 | , 'period_length_days' => 1 |
|---|
| 202 | , 'num_users_to_show' => 3 ) |
|---|
| 203 | , array( 'period_name' => 'This Week' |
|---|
| 204 | , 'period_length_days' => 7 |
|---|
| 205 | , 'num_users_to_show' => 3 ) |
|---|
| 206 | , array( 'period_name' => 'All Time' |
|---|
| 207 | , 'period_length_days' => 0 // 'zero' denotes all time |
|---|
| 208 | , 'num_users_to_show' => 3 ) |
|---|
| 209 | ); |
|---|
| 210 | * |
|---|
| 211 | * The above will generate something like this (names have been fabrcated to protect the innocent): |
|---|
| 212 | * |
|---|
| 213 | * ------------------------------- |
|---|
| 214 | * | Today: Jim, Fred, Sue | |
|---|
| 215 | * ------------------------------- |
|---|
| 216 | * | This Week: Jill, Fred, Jim | |
|---|
| 217 | * ------------------------------- |
|---|
| 218 | * | All Time: Jill, John, Mary | |
|---|
| 219 | * ------------------------------- |
|---|
| 220 | * |
|---|
| 221 | */ |
|---|
| 222 | |
|---|
| 223 | $user_activity_config_matrix = array( |
|---|
| 224 | array( 'period_name' => 'Today' |
|---|
| 225 | , 'period_length_days' => 1 |
|---|
| 226 | , 'num_users_to_show' => 5 ) |
|---|
| 227 | , array( 'period_name' => 'Past 30 days' |
|---|
| 228 | , 'period_length_days' => 30 |
|---|
| 229 | , 'num_users_to_show' => 5 ) |
|---|
| 230 | , array( 'period_name' => 'All Time' |
|---|
| 231 | , 'period_length_days' => 0 // a 'zero' denotes all time |
|---|
| 232 | , 'num_users_to_show' => 5 ) |
|---|
| 233 | ); |
|---|
| 234 | |
|---|
| 235 | include_once('debug.inc.php'); |
|---|
| 236 | ?> |
|---|