[ Index ]
 

Code source de GeekLog 1.4.1

Accédez au Source d'autres logiciels libres

title

Body

[fermer]

/ -> config.php (source)

   1  <?php
   2  
   3  /* Reminder: always indent with 4 spaces (no tabs). */
   4  // +---------------------------------------------------------------------------+
   5  // | Geeklog 1.4                                                               |
   6  // +---------------------------------------------------------------------------+
   7  // | config.php                                                                |
   8  // |                                                                           |
   9  // | Geeklog configuration file.                                               |
  10  // +---------------------------------------------------------------------------+
  11  // | Copyright (C) 2001-2006 by the following authors:                         |
  12  // |                                                                           |
  13  // | Authors: Tony Bibbs - tony AT tonybibbs DOT com                           |
  14  // |          Dirk Haun  - dirk AT haun-online DOT de                          |
  15  // +---------------------------------------------------------------------------+
  16  // |                                                                           |
  17  // | This program is free software; you can redistribute it and/or             |
  18  // | modify it under the terms of the GNU General Public License               |
  19  // | as published by the Free Software Foundation; either version 2            |
  20  // | of the License, or (at your option) any later version.                    |
  21  // |                                                                           |
  22  // | This program is distributed in the hope that it will be useful,           |
  23  // | but WITHOUT ANY WARRANTY; without even the implied warranty of            |
  24  // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the             |
  25  // | GNU General Public License for more details.                              |
  26  // |                                                                           |
  27  // | You should have received a copy of the GNU General Public License         |
  28  // | along with this program; if not, write to the Free Software Foundation,   |
  29  // | Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.           |
  30  // |                                                                           |
  31  // +---------------------------------------------------------------------------+
  32  // | See the docs/install.html and docs/config.html files for more information |
  33  // | on configuration.                                                         |
  34  // +---------------------------------------------------------------------------+
  35  //
  36  // $Id: config.php,v 1.240 2006/12/30 17:43:18 dhaun Exp $
  37  
  38  // When setting up Geeklog for the first time, you need to make sure the
  39  // settings in the following 3 sections are correct:
  40  // (1) Database Settings
  41  // (2) Paths
  42  // (3) Site Settings
  43  // You can adjust the other settings once your site is up and running.
  44  
  45  // +---------------------------------------------------------------------------+
  46  // | (1) Database Settings                                                     |
  47  // +---------------------------------------------------------------------------+
  48  
  49  $_DB_host         = 'localhost';   // host name or IP address of your DB server
  50  $_DB_name         = 'geeklog';     // name of your database,
  51                                     // must exist before running the installer!
  52  $_DB_user         = 'username';    // MySQL user name
  53  $_DB_pass         = 'password';    // MySQL password
  54  
  55  // The table prefix is prepended to each table used by Geeklog to avoid name
  56  // collisions with other tables that may already exist in your database.
  57  $_DB_table_prefix = 'gl_';         // e.g. 'gl_'
  58  
  59  
  60  // +---------------------------------------------------------------------------+
  61  // | (2) Paths                                                                 |
  62  // +---------------------------------------------------------------------------+
  63  
  64  // Note for Windows users: It's safe to use the forward slash '/' instead of
  65  // the backslash '\' in paths. Make sure each path starts with a drive letter!
  66  
  67  // This should point to the directory where your config.php file resides.
  68  $_CONF['path']            = '/path/to/geeklog/'; // should end in a slash
  69  
  70  // You only need to change this if you moved or renamed the public_html
  71  // directory. In that case, you should specify the complete path to the
  72  // directory (i.e. without the $_CONF['path']) like this:
  73  // $_CONF['path_html']      = '/path/to/your/public_html/';
  74  $_CONF['path_html']         = $_CONF['path'] . 'public_html/';
  75  
  76  
  77  // +---------------------------------------------------------------------------+
  78  // | (3) Site Settings                                                         |
  79  // +---------------------------------------------------------------------------+
  80  
  81  // Make sure this is the correct URL to your site, i.e. to where Geeklog's
  82  // index.php file resides (no trailing slash).
  83  $_CONF['site_url']          = 'http://www.example.com';
  84  
  85  // Some hosting services have a preconfigured admin directory. In that case,
  86  // you need to rename Geeklog's admin directory to something like "myadmin"
  87  // and change the following URL as well. Leave as is until you experience any
  88  // problems accessing Geeklog's admin menu.
  89  $_CONF['site_admin_url']    = $_CONF['site_url'] . '/admin';
  90  
  91  // This is the return address for all email sent by Geeklog and contact info
  92  // displayed in syndication feeds:
  93  $_CONF['site_mail']         = 'admin@example.com';
  94  
  95  // Name and slogan of your site
  96  $_CONF['site_name']         = 'Geeklog Site';
  97  $_CONF['site_slogan']       = 'Another Nifty Geeklog Site';
  98  
  99  
 100  // ****************************************************************************
 101  // * If you set up Geeklog for the first time, you shouldn't need to change   *
 102  // * anything below this line. Come back here once the site is up and running.*
 103  // ****************************************************************************
 104  
 105  
 106  // Note: See the file docs/config.html for more information on the settings.
 107  
 108  // +---------------------------------------------------------------------------+
 109  // | OTHER PATH SETTINGS                                                       |
 110  // |                                                                           |
 111  // | All paths must have a trailing slash ('/').                               |
 112  // +---------------------------------------------------------------------------+
 113  
 114  // you shouldn't need to edit theses
 115  $_CONF['path_system']   = $_CONF['path'] . 'system/';
 116  $_CONF['path_log']      = $_CONF['path'] . 'logs/';
 117  $_CONF['path_language'] = $_CONF['path'] . 'language/';
 118  $_CONF['backup_path']   = $_CONF['path'] . 'backups/';
 119  $_CONF['path_data']     = $_CONF['path'] . 'data/';
 120  
 121  // If you set path_images to something other than the default, you will need to
 122  // make sure that you add the following subdirectories to that directory:
 123  // articles/, userphotos/
 124  $_CONF['path_images']   = $_CONF['path_html'] . 'images/';
 125  
 126  // +---------------------------------------------------------------------------+
 127  // | PEAR Settings                                                             |
 128  // |                                                                           |
 129  // | Geeklog uses PEAR to send emails (see "Email Settings" below). Here you   |
 130  // | can tell Geeklog whether to use the PEAR packages installed on your       |
 131  // | server or to use the included packages.                                   |
 132  // +---------------------------------------------------------------------------+
 133  
 134  // If your server is running PHP 4.3.0 (or newer) then chances are that PEAR
 135  // is already installed and you can change this to: $_CONF['have_pear'] = true;
 136  $_CONF['have_pear'] = false;
 137  
 138  // Geeklog comes with the necessary PEAR packages and will pick them up from
 139  // the following directory if $_CONF['have_pear'] = false (above).
 140  $_CONF['path_pear'] = $_CONF['path_system'] . 'pear/';
 141  
 142  // +---------------------------------------------------------------------------+
 143  // | Email Settings                                                            |
 144  // |                                                                           |
 145  // | Configure how Geeklog sends email: Via PHP's mail() function, sendmail,   |
 146  // | or via an SMTP server.                                                    |
 147  // +---------------------------------------------------------------------------+
 148  
 149  // To send email from Geeklog, you will need to select one of the following
 150  // email backends:
 151  // - 'mail', i.e. use PHP's built-in mail() function
 152  // - 'sendmail', i.e. use the sendmail utility
 153  // - 'smtp', i.e. talk directly to your SMTP server
 154  // The default is 'mail' and will work in most environments.
 155  
 156  $_CONF['mail_settings'] = array (
 157      'backend' => 'mail', // can be one of 'mail', 'sendmail', 'smtp'
 158  
 159      // sendmail parameters (only needed for 'backend' => 'sendmail')
 160      'sendmail_path' => '/usr/bin/sendmail',
 161      'sendmail_args' => '',
 162  
 163      // SMTP parameters (only needed for 'backend' => 'smtp')
 164      'host'     => 'smtp.example.com',
 165      'port'     => '25',
 166      'auth'     => false,
 167      'username' => 'smtp-username',
 168      'password' => 'smtp-password'
 169  );
 170  
 171  // +---------------------------------------------------------------------------+
 172  // | OTHER DATABASE SETTINGS                                                   |
 173  // |                                                                           |
 174  // | Database type and database backup settings.                               |
 175  // +---------------------------------------------------------------------------+
 176  
 177  $_DB_dbms = 'mysql'; // can be either 'mysql' or 'mssql' (Microsoft SQL Server)
 178  
 179  
 180  // the following options are for MySQL only
 181  
 182  // optional settings for making database backups from within Geeklog
 183  $_CONF['allow_mysqldump']   = 1;      // 1 = on, 0 = off
 184  
 185  // full path of the mysqldump executable (Windows users: add ".exe"!)
 186  $_DB_mysqldump_path = '/usr/bin/mysqldump';
 187  
 188  // additional options for mysqldump
 189  // If you're using InnoDB tables, include '--single-transaction' or you
 190  // may end up with inconsistent backups!
 191  $_CONF['mysqldump_options'] = '-Q';
 192  
 193  
 194  // +---------------------------------------------------------------------------+
 195  // | SITE SETTINGS                                                             |
 196  // |                                                                           |
 197  // | These settings help define your Geeklog site.                             |
 198  // +---------------------------------------------------------------------------+
 199  $_CONF['theme']             = 'professional';  // default theme
 200  
 201  // List of entries that you want to see in the site's menu bar (if you're using
 202  // a theme that uses the {menu_elements} variable in its header.thtml).
 203  // Choose any combination of the following (order here = order in the menu).
 204  $_CONF['menu_elements'] = array
 205  (
 206      // 'home',      // link to homepage
 207      'contribute',   // contribute / "submit a story" link
 208      'search',       // link to advanced search
 209      'stats',        // link to site stats
 210      'directory',    // link to list of past stories
 211      // 'prefs',     // link to user's preferences
 212      'plugins'       // links added by plugins, like {plg_menu_elements}
 213      // 'custom'     // for custom links (see lib-custom.php)
 214  );
 215  
 216  // you shouldn't need to edit the following
 217  $_CONF['layout_url']        = $_CONF['site_url'] . '/layout/' . $_CONF['theme'];
 218  $_CONF['path_themes']       = $_CONF['path_html'] . 'layout/';
 219  $_CONF['path_layout']       = $_CONF['path_themes'] . $_CONF['theme'] . '/';
 220  
 221  // stops new registrations if set to true.
 222  $_CONF['disable_new_user_registration'] = false; // set to true to block users.
 223  
 224  // optional settings (1 = on, 0 = off)
 225  $_CONF['allow_user_themes']   = 1;
 226  $_CONF['allow_user_language'] = 1;
 227  $_CONF['allow_user_photo']    = 1; // allow users to upload self-photo
 228  
 229  // Allow users to change their username (if set to 1).
 230  $_CONF['allow_username_change'] = 0;
 231  
 232  // Allow users to delete their account (if set to 1).
 233  $_CONF['allow_account_delete']  = 0;
 234  
 235  // hides the list of authors from the preferences
 236  $_CONF['hide_author_exclusion'] = 0;
 237  
 238  // Used by COM_getDisplayName to return Members's Full Name else username
 239  $_CONF['show_fullname'] = 0; // 1 = show user's full name
 240  
 241  // Used by COM_getDisplayName to return users remote login service, if they have one.
 242  $_CONF['show_servicename'] = true; // Set to false to not show it.
 243  
 244  // +---------------------------------------------------------------------------+
 245  // | Support for custom user registration form and account details             |
 246  // | Requires custom functions to be written that can be placed in lib-custom  |
 247  // | Function hooks are in users.php, usersettings.php and admin/user.php      |
 248  // +---------------------------------------------------------------------------+
 249  $_CONF['custom_registration'] = false;  // Set to true if you have custom code
 250  
 251  // +---------------------------------------------------------------------------+
 252  // | Support for remote authentication of users, i.e. logging in via other     |
 253  // | supported remote servers. Requires custom classes in:                     |
 254  // | system/classes/authentication/                                            |
 255  // +---------------------------------------------------------------------------+
 256  $_CONF['remoteauthentication'] = false;  // Set to true to enable remote logins.
 257  
 258  // +---------------------------------------------------------------------------+
 259  // | Define action to be taken by Spam-X module if spam detected               |
 260  // | Current Spam-X module supports two actions which can be combined          |
 261  // | Additional classes can be added as well as other plugin extensions        |
 262  // | Actions: 128 = ignore comment and redirect to homepage                    |
 263  // |            8 = mail admin message                                         |
 264  // |          136 (SUM) ignore and email admin                                 |
 265  // +---------------------------------------------------------------------------+
 266  $_CONF['spamx'] = 128;  // Default to ignore comment.
 267  
 268  // +---------------------------------------------------------------------------+
 269  // | Sort the links in the admin block and the admin panel.                    |
 270  // +---------------------------------------------------------------------------+
 271  $_CONF['sort_admin'] = true;
 272  
 273  // +---------------------------------------------------------------------------+
 274  // | Path to user files relative to the $_CONF['site_url'] (no trailing slash) |
 275  // | Relative Directory where the Editor Image Library store                   |
 276  // +---------------------------------------------------------------------------+
 277  $_CONF_FCK['imagelibrary'] = '/images/library';
 278  
 279  // +---------------------------------------------------------------------------+
 280  // | LOCALE SETTINGS                                                           |
 281  // |                                                                           |
 282  // | see docs/config.html#locale for details                                   |
 283  // +---------------------------------------------------------------------------+
 284  
 285  $_CONF['language']        = 'english';
 286  $_CONF['default_charset'] = 'iso-8859-1';
 287  
 288  // Note: You may want to consider using 'utf-8' as the default character set
 289  // for new sites, especially when using the multi-language support (see below).
 290  // Make sure to use a matching language file, e.g. 'english_utf-8' then.
 291  
 292  $_CONF['locale']          = 'en_GB';
 293  $_CONF['date']            = '%A, %B %d %Y @ %I:%M %p %Z';
 294  $_CONF['daytime']         = '%m/%d %I:%M%p';
 295  $_CONF['shortdate']       = '%x';
 296  $_CONF['dateonly']        = '%d-%b';
 297  $_CONF['timeonly']        = '%I:%M%p';
 298  $_CONF['week_start']      = 'Sun'; // can be 'Sun' or 'Mon'
 299  $_CONF['hour_mode']       = 12;    // 12 hour am/pm or 24 hour format
 300  
 301  // Number formatting
 302  $_CONF['thousand_separator'] = ",";  // could be ' , . etc.
 303  $_CONF['decimal_separator']  = ".";  // could be , . etc.
 304  $_CONF['decimal_count']      = "2";  // if a number has decimals,
 305                                       //  force to this depth
 306  
 307  // Multi-language support
 308  // (note that this section is commented out - remove the '/*' and '*/' lines
 309  //  below to activate it and make sure you understand what it does)
 310  /*
 311  
 312  // IMPORTANT!
 313  // 1) Both the $_CONF['language_files'] and the $_CONF['languages'] arrays
 314  //    (see below) must have the same number of elements.
 315  // 2) The shortcuts used must be the same in both arrays.
 316  // 3) All shortcuts must have the same length, e.g. 2 characters.
 317  
 318  // The shortcuts are to be used in IDs of objects that are multi-language
 319  // aware, e.g. /article.php/introduction_en and /article.php/introduction_de
 320  // for the English and German version of an introductory article.
 321  
 322  // Supported languages
 323  // Maps a shortcut to a Geeklog language file (without the '.php' extension)
 324  $_CONF['language_files'] = array (
 325      'en' => 'english_utf-8',
 326      'de' => 'german_formal_utf-8'
 327  );
 328  
 329  // Display names of supported languages
 330  // Maps the same shortcuts as above to a language name. The language names
 331  // are used to let users switch languages, e.g. in a drop-down menu.
 332  $_CONF['languages'] = array (
 333      'en' => 'English',
 334      'de' => 'Deutsch'
 335  );
 336  
 337  */
 338  
 339  // "Timezone Hack"
 340  // If your webserver is located in a different timezone than yourself but you
 341  // prefer Geeklog to post stories in your local time, then set your local
 342  // timezone here.
 343  //
 344  // Please note that this does not work when safe_mode is on!
 345  //
 346  // For more information, see this discussion on geeklog.net:
 347  // http://www.geeklog.net/forum/viewtopic.php?showtopic=21232
 348  // $_CONF['timezone'] = 'Etc/GMT-6'; // e.g. 6 hours behind GMT
 349  
 350  
 351  // +---------------------------------------------------------------------------+
 352  // | SITE STATUS                                                               |
 353  // |                                                                           |
 354  // | To disable your Geeklog site quickly, simply set this flag to false       |
 355  // +---------------------------------------------------------------------------+
 356  $_CONF['site_enabled'] = true;  // true or false
 357  
 358  // Message shown when site is down
 359  // When this starts with 'http:' visitors are redirected to that URL
 360  $_CONF['site_disabled_msg'] = 'Geeklog Site is down. Please come back soon.';
 361  
 362  // When set to true, this will display /detailed/ debug information in the event
 363  // of a PHP error. ONLY set this to true with your non-production development
 364  // environments!
 365  $_CONF['rootdebug'] = false;
 366  
 367  // +---------------------------------------------------------------------------+
 368  // | SESSION SETTINGS                                                          |
 369  // |                                                                           |
 370  // | cookie_ip will store md5(remoteip + randomnum) as the session ID in the   |
 371  // | cookie. This is more secure but will more than likely require dialed up   |
 372  // | users to login each and every time.  If ipbasedsessid is turned off       |
 373  // | (which it is by default) it will just store a random number as the        |
 374  // | session ID in the cookie.                                                 |
 375  // |                                                                           |
 376  // | default_perm_cookie_timeout is how long you want the permanent cookie     |
 377  // | to persist for (in seconds).  This can be overridden by the user in       |
 378  // | their user prefs if they want.  If you set the default to 0, users will   |
 379  // | have to log in again once their session expired.                          |
 380  // |                                                                           |
 381  // | session_cookie_time is how long you want the session cookie to persist    |
 382  // | for.  Only really useful in scenarios where you don't want to allow       |
 383  // | permanent cookies                                                         |
 384  // +---------------------------------------------------------------------------+
 385  
 386  $_CONF['cookie_session']                = 'gl_session';
 387  $_CONF['cookie_name']                   = 'geeklog';
 388  $_CONF['cookie_password']               = 'password';
 389  $_CONF['cookie_theme']                  = 'theme';
 390  $_CONF['cookie_language']               = 'language';
 391  
 392  $_CONF['cookie_ip']                     = 0;
 393  $_CONF['default_perm_cookie_timeout']   = 28800;
 394  $_CONF['session_cookie_timeout']        = 7200;
 395  $_CONF['cookie_path']                   = '/';
 396  $_CONF['cookiedomain']                  = ''; // e.g. '.example.com'
 397  $_CONF['cookiesecure']                  = 0;
 398  
 399  // Geeklog keeps track of when a user last logged in. Set this to false
 400  // if you don't want that.
 401  $_CONF['lastlogin']                     = true;
 402  
 403  
 404  // +---------------------------------------------------------------------------+
 405  // | This is really redundant but I am including this as a reminder that those |
 406  // | people writing Geeklog Plugins that are OS dependent should check either  |
 407  // | the $_CONF variable below or PHP_OS directly.  If you are writing an      |
 408  // | addon that is OS specific your addon should check the system is using the |
 409  // | right OS.  If not, be sure to show a friendly message that says their GL  |
 410  // | distro isn't running the right OS. Do not modify this value               |
 411  // +---------------------------------------------------------------------------+
 412  
 413  $_CONF['ostype']    = PHP_OS;
 414  
 415  
 416  // Note: PDF conversion didn't make it into this release. Leave as is.
 417  $_CONF['pdf_enabled'] = 0;
 418  
 419  
 420  // +---------------------------------------------------------------------------+
 421  // | SEARCH SETTINGS                                                           |
 422  // +---------------------------------------------------------------------------+
 423  
 424  // default number of search results (per type) to be displayed per page
 425  $_CONF['num_search_results'] = 10;
 426  
 427  
 428  // +---------------------------------------------------------------------------+
 429  // | MISCELLANEOUS SETTINGS                                                    |
 430  // |                                                                           |
 431  // | These are other various Geeklog settings.  The defaults should work OK    |
 432  // | for most situations.                                                      |
 433  // +---------------------------------------------------------------------------+
 434  
 435  // this lets you select which functions are available for registered users only
 436  $_CONF['loginrequired'] = 0; // all of them, if set to 1 will override all else
 437  $_CONF['submitloginrequired']     = 0;
 438  $_CONF['commentsloginrequired']   = 0;
 439  $_CONF['statsloginrequired']      = 0;
 440  $_CONF['searchloginrequired']     = 0;
 441  $_CONF['profileloginrequired']    = 0;
 442  $_CONF['emailuserloginrequired']  = 0;
 443  $_CONF['emailstoryloginrequired'] = 0;
 444  $_CONF['directoryloginrequired']  = 0;
 445  
 446  // Submission Settings
 447  
 448  // enable (set to 1) or disable (set to 0) submission queues:
 449  $_CONF['storysubmission'] = 1;
 450  $_CONF['usersubmission']  = 0; // 1 = new users must be approved
 451  
 452  // When set to 1, this will display an additional block on the submissions page
 453  // that lists all stories that have the 'draft' flag set.
 454  $_CONF['listdraftstories'] = 0;
 455  
 456  // Send an email notification when a new submission has been made. The contents
 457  // of the array can be any combination of 'story', 'comment', 'trackback',
 458  // 'pingback', and 'user'.
 459  // Example: $_CONF['notification'] = array ('story', 'comment');
 460  // The email will be sent to $_CONF['site_mail'] (see above).
 461  $_CONF['notification'] = array ();
 462  
 463  $_CONF['postmode']      = 'plaintext';  // can be 'plaintext' or 'html'
 464  $_CONF['speedlimit']    = 45;           // in seconds
 465  $_CONF['skip_preview']  = 0; // If = 1, allow user to submit comments and stories without previewing
 466  
 467  // +---------------------------------------------------------------------------+
 468  // | Support for custom templates to support advanced Rich Text Editor         |
 469  // | Checked in comment.php, submit.php, admin/story.php and                   |
 470  // | staticpages/index.php. If set true and advanced template exists           |
 471  // | Note: If enabled, the default postmode will be html                       |
 472  // +---------------------------------------------------------------------------+
 473  $_CONF['advanced_editor'] = false;
 474  
 475  // +---------------------------------------------------------------------------+
 476  // | Internal Geeklog CRON or scheduled Task/Function setting                  |
 477  // | Plugins can use the runScheduledTask API to activate any automated tasks  |
 478  // | or add code in lib-custom to the CUSTOM_runScheduledTask function         |
 479  // +---------------------------------------------------------------------------+
 480  $_CONF['cron_schedule_interval']        = 86400;   // Seconds - Default 1 day
 481  
 482  
 483  // Topic Settings
 484  
 485  // Topics can be assigned a sort number so that you can control what order they
 486  // appear in the 'Topics' block on the homepage.  If you prefer you can also
 487  // have this sort alphabetically by changing the value to 'alpha' (default is
 488  // by 'sortnum'
 489  
 490  $_CONF['sortmethod'] = 'sortnum'; // or 'alpha'
 491  
 492  // Show the number of stories in a topic in Topics Block
 493  $_CONF['showstorycount'] = 1;
 494  
 495  // Show the number of story submissions for a topic in Topics Block
 496  $_CONF['showsubmissioncount'] = 1;
 497  
 498  // Hide 'Home' link from Topics block (if set to 1)
 499  $_CONF['hide_home_link'] = 0;
 500  
 501  
 502  // Who's Online block settings
 503  
 504  // How long an anonymous (guest) user session is good for
 505  $_CONF['whosonline_threshold'] = 300; // in seconds
 506  
 507  // If set to 1, don't show names of registered users to anonymous users
 508  $_CONF['whosonline_anonymous'] = 0; // 1 = don't show names to anon. users
 509  
 510  
 511  // "Daily Digest" settings
 512  
 513  // Let users get stories emailed to them
 514  // Requires cron and the use of php as a shell script
 515  $_CONF['emailstories'] = 0;
 516  
 517  // Specify length of stories in those emails:
 518  // 0 = send only title + link, 1 = send entire introtext,
 519  // any other number = max. number of characters per story
 520  $_CONF['emailstorieslength'] = 1;
 521  
 522  // New users get stories emailed to them per default (= 1) or not (= 0)
 523  $_CONF['emailstoriesperdefault'] = 0;
 524  
 525  
 526  // When user submission is activated, allow users from these domains to
 527  // register without having to go through the submission queue.
 528  $_CONF['allow_domains'] = ''; // e.g. 'mycompany.com,myothercompany.com'
 529  
 530  // Comma-separated list of domain names that are not allowed for new user
 531  // signups (for all new registrations - not only for the user submission queue)
 532  $_CONF['disallow_domains'] = ''; // e.g. 'somebaddomain.com,anotherbadone.com'
 533  
 534  
 535  // Following times are in seconds
 536  $_CONF['newstoriesinterval']   =   86400; // = 24 hours
 537  $_CONF['newcommentsinterval']  =  172800; // = 48 hours
 538  $_CONF['newtrackbackinterval'] =  172800; // = 48 hours
 539  
 540  // Set to 1 to hide a section from the What's New block:
 541  $_CONF['hidenewstories']    = 0;
 542  $_CONF['hidenewcomments']   = 0;
 543  $_CONF['hidenewtrackbacks'] = 0;
 544  $_CONF['hidenewplugins']    = 0;
 545  
 546  // max. length of titles to be displayed in the What's New block
 547  $_CONF['title_trim_length'] = 20;
 548  
 549  // Disable trackback comments by setting this to 'false'
 550  $_CONF['trackback_enabled'] = true;
 551  
 552  // Disable pingbacks by setting this to 'false'
 553  $_CONF['pingback_enabled'] = true;
 554  
 555  // Disable pinging weblog directory services by setting this to 'false'.
 556  $_CONF['ping_enabled'] = true;
 557  
 558  // Allow / disallow trackbacks and pingbacks to stories by default
 559  // (can be changed individually for every story)
 560  $_CONF['trackback_code'] = 0;   // 0 = trackbacks enabled, -1 = disabled
 561  
 562  // how to handle multiple trackbacks and pingbacks from the same URL:
 563  // 0 = reject, 1 = only keep the latest, 2 = allow multiple posts
 564  $_CONF['multiple_trackbacks'] = 0;
 565  
 566  // min. time between trackbacks or pingbacks, in seconds
 567  $_CONF['trackbackspeedlimit'] = 300;
 568  
 569  // Use this option to check the validity of Trackbacks:
 570  // 0 = don't check anything,
 571  // 1 = check against $_CONF['site_url'], 2 = check full URL
 572  // 4 = check IP address of sender against the site's IP in the Trackback
 573  // add the values to do more than one check, e.g. 2 + 4 = 6, i.e. check URL + IP
 574  $_CONF['check_trackback_link'] = 2;
 575  
 576  // how to handle pingbacks from one article on our site to another:
 577  // 0 = skip, 1 = allow, with speed limit, 2 = allow, without speed limit
 578  $_CONF['pingback_self'] = 0;
 579  
 580  // Link to the documentation from the Admin block (0 = hide link, 1 = show)
 581  $_CONF['link_documentation'] = 1;
 582  
 583  // Story Settings
 584  $_CONF['maximagesperarticle']   = 5;
 585  $_CONF['limitnews']             = 10;
 586  $_CONF['minnews']               = 1;        // minimum number of stories per page
 587  $_CONF['contributedbyline']     = 1;        // If 1, show contributed by line
 588  $_CONF['hideviewscount']        = 0;        // If 1, hide Viewed X times line
 589  $_CONF['hideemailicon']         = 0;    // If 1, hide "email story" option
 590  $_CONF['hideprintericon']       = 0;    // If 1, hide "printer friendly" option
 591  $_CONF['allow_page_breaks']     = 1;    // allow [page_break] in stories
 592  $_CONF['page_break_comments']   = 'last';  // When an article has a page break,
 593                                             // show comments on the 'first',
 594                                             //'last' or 'all' pages?
 595  $_CONF['article_image_align']   = 'right'; // Topic icon on left or right.
 596  $_CONF['show_topic_icon']       = 1;       // default for new stories
 597  $_CONF['draft_flag']            = 0;       // default for new stories
 598  $_CONF['frontpage']             = 1;       // default for new stories
 599  $_CONF['hide_no_news_msg']      = 0;       // If 1, hide No News To Display msg
 600  $_CONF['hide_main_page_navigation'] = 0;   // hide "google paging" on index.php
 601  
 602  // When set to 1, only root users will be able to feature a story
 603  $_CONF['onlyrootfeatures'] = 0;
 604  
 605  
 606  // Advanced theme settings
 607  
 608  // Set the default whether to display the right-side blocks (= true) or not
 609  // (= false). In the default configuration, Geeklog will only display the
 610  // right-side blocks on the index page. Please note that setting this to true
 611  // will reduce the amount of space available for the actual page content,
 612  // especially for users with narrow browser windows.
 613  // May require theme changes in article/article.thtml (depending on the theme
 614  // used) to avoid the What's Related and Story Options "blocks" showing up in
 615  // an extra (fourth) column.
 616  $_CONF['show_right_blocks'] = false;
 617  
 618  // It is recommended to leave these unchanged and overwrite them in the theme's
 619  // functions.php instead.
 620  
 621  // When set to 1, this will render the first story on any page using the
 622  // templates for featured stories - even if that story is not featured.
 623  $_CONF['showfirstasfeatured'] = 0;
 624  
 625  // When set to 1, this will make the {left_blocks} variable available in
 626  // footer.thtml (and disable it in header.thtml). This is really only useful
 627  // for two-column layouts where you want the left column contain the stories
 628  // and the right column contain the standard blocks.
 629  $_CONF['left_blocks_in_footer'] = 0;
 630  
 631  // +---------------------------------------------------------------------------+
 632  // | RSS feed settings                                                         |
 633  // |                                                                           |
 634  // | Settings for RSS feeds (aka RDF feeds). Please note that most of these    |
 635  // | are merely default settings for the feeds created from the "Content       |
 636  // | Syndication" entry in the Admin's menu.                                   |
 637  // +---------------------------------------------------------------------------+
 638  
 639  $_CONF['backend']       = 1;    // 1 = activate feeds, 0 = off
 640  
 641  // path to your site's default RSS feed
 642  $_CONF['rdf_file']      = $_CONF['path_html'] . 'backend/geeklog.rss';
 643  
 644  // This allows a person to limit the rss feed to a certain number of stories
 645  // (e.g. 10 or 12) or else limit the rss feed to all stories within a certain
 646  // period of time in hours (e.g. 24h or 168h).
 647  $_CONF['rdf_limit']     = 10;   // number of stories (10) or hours (24h)
 648  
 649  // Include the story's entire intro text in the feed (= 1) or limit the number
 650  // of characters from the intro text (any number > 1) or don't include the text
 651  // at all (= 0).
 652  $_CONF['rdf_storytext'] = 1;
 653  
 654  // Default language for the feed - may have to be different than the locale
 655  $_CONF['rdf_language']  = 'en-gb';
 656  
 657  // Upper limit for all imported feeds (0 = unlimited, i.e. import all of the
 658  // headlines from the feed).
 659  // Individual limits can be set for every feed in the portal block's settings.
 660  $_CONF['syndication_max_headlines'] = 0;
 661  
 662  
 663  // Uncomment the following line to set the copyright year in the site's footer
 664  // to a specific year. Otherwise, the current year will be used.
 665  // $_CONF['copyrightyear'] = '2006';
 666  
 667  
 668  // Optional Image Settings
 669  
 670  // If you set $_CONF['image_lib'] below, you must supply a path for the library
 671  // you will use.  Setting this also assumes that if a photo is uploaded that is
 672  // too big either by the image sizes below or by overriding them using the
 673  // upload object then the library you choose will attempt to resize the image.
 674  // Leaving this value empty disables this feature
 675  $_CONF['image_lib'] = ''; // can be one of 'netpbm', 'imagemagick', 'gdlib'
 676  
 677  // If you set image_lib to 'imagemagick' give the complete path to mogrify
 678  // here (i.e. including the name of the executable), otherwise comment it out
 679  // NOTE: requires ImageMagick version 5.4.9 (or newer)
 680  //$_CONF['path_to_mogrify']       = '/path/to/mogrify';
 681  
 682  // If you set image_lib to 'netpbm' give the path to the netpbm directory, you
 683  // need the trailing slash here.
 684  // NOTE: if you use NETPBM, use the latest package from the Gallery package for
 685  // your operating system found at http://sourceforge.net/projects/gallery in
 686  // the download section.  You need to take the netpbm tarball from them and
 687  // uncompress the file which will create a netpbm directory.  If you plan to
 688  // only use netpbm with Geeklog, put that entire folder in /path/to/geeklog and
 689  // adjust the path below.  The only programs you need from netpbm are giftopnm,
 690  // jpegtopnm, pngtopnm, ppmtogif, pnmtojpeg, pnmtopng and pnmscale
 691  //$_CONF['path_to_netpbm']        = '/path/to/netpbm/';
 692  
 693  // Uncomment the following line if you experience problems with the image
 694  // upload. Debug messages will be added to the error.log file.
 695  // $_CONF['debug_image_upload'] = true;
 696  
 697  // When set to 1, Geeklog will keep the original, unscaled images and make
 698  // the smaller image link to the unscaled image.
 699  $_CONF['keep_unscaled_image']   = 0; // 1 = keep original images
 700  
 701  // when above is set to one and this here also, the user can choose between
 702  // using the original or scaled image in a story
 703  $_CONF['allow_user_scaling']    = 1; // 1 = allow the user to choose
 704  
 705  // Story image settings
 706  $_CONF['max_image_width']       = 160;  // In pixels
 707  $_CONF['max_image_height']      = 160;  // In pixels
 708  $_CONF['max_image_size']        = 1048576; // 1048576 = 1MB
 709  
 710  // Topic icon settings
 711  $_CONF['max_topicicon_width']   = 48; // In pixels
 712  $_CONF['max_topicicon_height']  = 48; // In pixels
 713  $_CONF['max_topicicon_size']    = 65536; // 65536 = 64KB
 714  
 715  // User photo settings
 716  $_CONF['max_photo_width']       = 128; // In pixels
 717  $_CONF['max_photo_height']      = 128; // In pixels
 718  $_CONF['max_photo_size']        = 65536; // 65536 = 64KB
 719  
 720  // Use avatars from gravatar.com (if set = true).
 721  // A gravatar will only be requested if there is no uploaded photo.
 722  $_CONF['use_gravatar'] = false;
 723  
 724  // gravatar.com provides "movie-style" ratings of the avatars (G, PG, R, X).
 725  // Setting this to 'R' would allow avatars rated as G, PG, and R (but not X).
 726  // $_CONF['gravatar_rating'] = 'R';
 727  
 728  // Force a max. width when displaying the user photo (also used for gravatars)
 729  // $_CONF['force_photo_width'] = 75;
 730  
 731  // Use this image when there's neither an uploaded photo nor a gravatar.
 732  // Should be the complete URL of the image.
 733  // $_CONF['default_photo'] = 'http://example.com/default.jpg';
 734  
 735  // Comment Settings
 736  $_CONF['commentspeedlimit']     = 45;         // minimum time between comment posts, in seconds
 737  $_CONF['comment_limit']         = 100;        // Default Number of Comments under Story
 738  // Default Comment Mode; from 'threaded','nested', 'nocomments', or 'flat'
 739  $_CONF['comment_mode']          = 'threaded';
 740  // Allow / disallow comments to stories by default (can be changed individually for every story)
 741  $_CONF['comment_code']          = 0;          // 0 = comments enabled, -1 = disabled
 742  
 743  // Password setting: minimum time between two requests for a new password
 744  $_CONF['passwordspeedlimit'] = 300; // seconds = 5 minutes
 745  
 746  // Login Speedlimit.
 747  $_CONF['login_attempts']   = 3;   // number of login attempts allowed before speedlimit kicks in
 748  $_CONF['login_speedlimit'] = 300; // wait (in seconds) after $_CONF['login_attempts'] failed logins
 749  
 750  
 751  // Parameters for checking HTML tags
 752  
 753  // *** Warning: Adding the following tags to the list of allowable HTML can
 754  // *** make your site vulnerable to scripting attacks!
 755  // *** Use with care: <img> <span> <marquee> <script> <embed> <object> <iframe>
 756  
 757  /* This is a list of HTML tags that users are allowed to use in their posts.
 758   * Each tag can have a list of allowed attributes (see 'a' for an example).
 759   * Any attributes not listed will be filtered, i.e. removed.
 760   */
 761  $_CONF['user_html'] = array (
 762      'p'    => array(),
 763      'b'    => array(),
 764      'strong'  => array(),
 765      'i'    => array(),
 766      'a'    => array('href' => 1, 'title' => 1, 'rel' => 1),
 767      'em'   => array(),
 768      'br'   => array(),
 769      'tt'   => array(),
 770      'hr'   => array(),
 771      'li'   => array(),
 772      'ol'   => array(),
 773      'ul'   => array(),
 774      'code' => array(),
 775      'pre'  => array()
 776  );
 777  
 778  /* This is a list of HTML tags that Admins (site admin and story admins) can
 779   * use in their posts. It will be merged with the above list of user-allowable
 780   * tags ($_CONF['user_html']). You can also add tags that have already been
 781   * listed for the user-allowed HTML, so as to allow admins to use more
 782   * attributes (see 'p' for an example).
 783   */
 784  $_CONF['admin_html'] = array (
 785      'p'     => array('class' => 1, 'id' => 1, 'align' => 1),
 786      'div'   => array('class' => 1, 'id' => 1),
 787      'span'  => array('class' => 1, 'id' => 1),
 788      'table' => array('class' => 1, 'id' => 1, 'width' => 1, 'border' => 1,
 789                       'cellspacing' => 1, 'cellpadding' => 1),
 790      'tr'    => array('class' => 1, 'id' => 1, 'align' => 1, 'valign' => 1),
 791      'th'    => array('class' => 1, 'id' => 1, 'align' => 1, 'valign' => 1,
 792                       'colspan' => 1, 'rowspan' => 1),
 793      'td'    => array('class' => 1, 'id' => 1, 'align' => 1, 'valign' => 1,
 794                       'colspan' => 1, 'rowspan' => 1)
 795  );
 796  
 797  /* Optional HTML Tags that will be enabled if advanced editor is enabled
 798   * Posible to add tags to the allowable general USER $_CONF['user_html'] as well
 799  */
 800  if ($_CONF['advanced_editor']) {
 801      $_CONF['admin_html']['a']       = array('href' => 1, 'title' => 1, 'id' => 1, 'lang' => 1, 'name' => 1, 'type' => 1, 'rel' => 1);
 802      $_CONF['admin_html']['hr']      = array ('style' => 1);
 803      $_CONF['admin_html']['ol']      = array ('style' => 1);
 804      $_CONF['admin_html']['ul']      = array ('style' => 1);
 805      $_CONF['admin_html']['caption'] = array ();
 806      $_CONF['admin_html']['table']   = array ('class' => 1, 'id' => 1, 'style' => 1, 'align' => 1, 'width' => 1,
 807                                               'border' => 1, 'cellspacing' => 1, 'cellpadding' => 1);
 808      $_CONF['admin_html']['tbody']   = array ();
 809      $_CONF['admin_html']['img']     = array('src' => 1, 'width' => 1, 'height' => 1, 'vspace' => 1, 'hspace' => 1,
 810                                              'dir' => 1, 'align' => 1, 'valign' => 1, 'border' => 1, 'lang' => 1,
 811                                              'longdesc' => 1, 'title' => 1, 'id' => 1, 'alt' => 1);
 812      $_CONF['admin_html']['font']    = array('face' => 1, 'size' => 1, 'style' => 1);
 813  }
 814  
 815  // When set to 1, disables the HTML filter for all users in the 'Root' group.
 816  // Obviously, you should only enable this if you know what you're doing and
 817  // when you can trust all the users in the 'Root' group not to use this for
 818  // Cross Site Scripting, defacements, etc. USE AT YOUR OWN RISK!
 819  $_CONF['skip_html_filter_for_root'] = 0;
 820  
 821  // list of protocols that are allowed in links
 822  $_CONF['allowed_protocols'] = array ('http', 'https', 'ftp');
 823  
 824  // disables autolinks if set to 1
 825  $_CONF['disable_autolinks'] = 0; // 0 = autolinks enabled
 826  
 827  // Parameters for checking for "bad" words
 828  $_CONF['censormode']    = 1;
 829  $_CONF['censorreplace'] = '*censored*';
 830  $_CONF['censorlist']    = array('fuck','cunt','fucker','fucking','pussy','cock','c0ck',' cum ','twat','clit','bitch','fuk','fuking','motherfucker');
 831  
 832  
 833  // IP lookup support
 834  //
 835  // If $_CONF['ip_lookup'] contains the URL to a web-based service for IP
 836  // address lookups, Geeklog will let you click on IP addresses so that you
 837  // can find out where a visitor came from. This can either be a remote
 838  // service or a plugin like Tom Willet's Nettools.
 839  // The '*' in the URL will be replaced with the IP address to look up.
 840  //
 841  // uncomment this line if you have Tom Willet's Nettools installed
 842  // $_CONF['ip_lookup'] = $_CONF['site_url'] . '/nettools/whois.php?domain=*';
 843  
 844  
 845  // This feature, when activated, makes some of Geeklog's URLs more crawler
 846  // friendly, i.e. more likely to be picked up by search engines.
 847  // Only implemented for stories, static pages, and portal links right now.
 848  //
 849  // Note: Works with Apache (Linux and Windows successfully tested).
 850  //       Unresolvable issues with systems running IIS; known PHP CGI bug.
 851  $_CONF['url_rewrite'] = false; // false = off, true = on
 852  
 853  // Define default permissions for new objects created from the Admin panels.
 854  // Permissions are perm_owner, perm_group, perm_members, perm_anon (in that
 855  // order). Possible values:
 856  // 3 = read + write permissions (perm_owner and perm_group only)
 857  // 2 = read-only
 858  // 0 = neither read nor write permissions
 859  // (a value of 1, ie. write-only, does not make sense and is not allowed)
 860  $_CONF['default_permissions_block'] = array (3, 2, 2, 2);
 861  $_CONF['default_permissions_story'] = array (3, 2, 2, 2);
 862  $_CONF['default_permissions_topic'] = array (3, 2, 2, 2);
 863  
 864  
 865  // Define a few useful things for GL
 866  
 867  if (!defined ('LB')) {
 868      define('LB',"\n");
 869  }
 870  if (!defined ('VERSION')) {
 871      define('VERSION', '1.4.1');
 872  }
 873  
 874  $_STATES = array(
 875          '--'=>'',
 876          'AL'=>'Alabama',
 877          'AK'=>'Alaska',
 878          'AZ'=>'Arizona',
 879          'AR'=>'Arkansas',
 880          'CA'=>'California',
 881          'CO'=>'Colorado',
 882          'CT'=>'Connecticut',
 883          'DE'=>'Delaware',
 884          'DC'=>'District of Columbia',
 885          'FL'=>'Florida',
 886          'GA'=>'Georgia',
 887          'HI'=>'Hawaii',
 888          'ID'=>'Idaho',
 889          'IL'=>'Illinois',
 890          'IN'=>'Indiana',
 891          'IA'=>'Iowa',
 892          'KS'=>'Kansas',
 893          'KY'=>'Kentucky',
 894          'LA'=>'Louisiana',
 895          'ME'=>'Maine',
 896          'MD'=>'Maryland',
 897          'MA'=>'Massachusetts',
 898          'MI'=>'Michigan',
 899          'MN'=>'Minnesota',
 900          'MS'=>'Mississippi',
 901          'MO'=>'Missouri',
 902          'MT'=>'Montana',
 903          'NE'=>'Nebraska',
 904          'NV'=>'Nevada',
 905          'NH'=>'New Hampshire',
 906          'NJ'=>'New Jersey',
 907          'NM'=>'New Mexico',
 908          'NY'=>'New York',
 909          'NC'=>'North Carolina',
 910          'ND'=>'North Dakota',
 911          'OH'=>'Ohio',
 912          'OK'=>'Oklahoma',
 913          'OR'=>'Oregon',
 914          'PA'=>'Pennsylvania',
 915          'RI'=>'Rhode Island',
 916          'SC'=>'South Carolina',
 917          'SD'=>'South Dakota',
 918          'TN'=>'Tennessee',
 919          'TX'=>'Texas',
 920          'UT'=>'Utah',
 921          'VT'=>'Vermont',
 922          'VA'=>'Virginia',
 923          'WA'=>'Washington',
 924          'WV'=>'West Virginia',
 925          'WI'=>'Wisconsin',
 926          'WY'=>'Wyoming'
 927      );
 928  
 929  ?>


Généré le : Wed Nov 21 12:27:40 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics