b2evolution

Multilingual multiuser multiblog engine

b2evolution Technical Documentation (0.9.x) [ class tree: conf ] [ index: conf ] [ all elements ]

Source for file _advanced.php

Documentation is available at _advanced.php

  1. <?php
  2. /**
  3.  * This is b2evolution's advanced config file
  4.  *
  5.  * This file includes advanced settings for b2evolution
  6.  * Last significant changes to this file: version 0.9.0.11
  7.  *
  8.  * b2evolution - {@link http://b2evolution.net/}
  9.  * Released under GNU GPL License - {@link http://b2evolution.net/about/license.html}
  10.  * @copyright (c)2003-2005 by Francois PLANQUE - {@link http://fplanque.net/}
  11.  *
  12.  * @package conf
  13.  */
  14. if!defined('DB_USER') ) die'Please, do not access this page directly.' );
  15.  
  16. # General params:
  17. # (these must be forced to prevent URL overrides).
  18. $debug false;
  19. $obhandler_debug false;
  20. $demo_mode false;
  21.  
  22.  
  23. /**
  24.  * Comments: set this to 1 to require e-mail and name, or 0 to allow comments without e-mail/name
  25.  * @global boolean $require_name_email 
  26.  */
  27. $require_name_email 1;
  28.  
  29. /**
  30.  * Minimum interval (in seconds) between consecutive comments from same IP
  31.  * @global int $minimum_comment_interval 
  32.  */
  33. $minimum_comment_interval 30;
  34.  
  35.  
  36. # Set the blog number to be used when not otherwise specified
  37. # 2 is the default setting, since it is the first user blog created by b2evo
  38. # 1 is also a popular choice, since it is a special blog aggregating all the others
  39. if!isset($default_to_blog) ) $default_to_blog 2;
  40.  
  41. /**
  42.  * Set the length of the online session time out (in seconds).
  43.  *
  44.  * This is for the Who's Online block.
  45.  *
  46.  * @global int $online_session_timeout 
  47.  */
  48. $online_session_timeout 300// default: 5 minutes
  49.  
  50.  
  51. /**
  52.  * How many days of stats do you want to keep before auto pruning them?
  53.  *
  54.  * Set to 0 to disable auto pruning
  55.  *
  56.  * @global int $stats_autoprune 
  57.  */
  58. $stats_autoprune 30// Default: 30 days
  59.  
  60.  
  61. // Get hostname out of baseurl
  62. // YOU SHOULD NOT EDIT THIS unless you know what you're doing
  63. ifpreg_match'#(https?://(.+?)(:.+?)?)/#'$baseurl.'/'$matches ) )
  64. {
  65.     $baseurlroot $matches[1];
  66.     // echo "baseurlroot=$baseurlroot <br />";
  67.     $basehost $matches[2];
  68.     // echo "basehost=$basehost <br />";
  69. }
  70. else
  71. {
  72.     die'Your baseurl ('.$baseurl.') set in _config.php seems invalid. You probably missed the "http://" prefix. Please correct that.' );
  73. }
  74.  
  75. # Short name of this system (will be used for cookies and notification emails)
  76. # Change this only if you install mutliple b2evolutions on the same website.
  77. # WARNING: don't play with this or you'll have tons of cookies sent away and your
  78. # readers surely will complain about it!
  79. # You can change notification email address alone a few lines below
  80. $b2evo_name 'b2evo';        // MUST BE A SINGLE WORD! NO SPACES!!
  81.  
  82.  
  83. # default email address for sending notifications (comments, trackbacks, user registrations...)
  84. # Set a custom address like this:
  85. # $notify_from = 'b2evolution@your_server.com'; // uncomment this line if you want to customize
  86. # Alternatively you can use this automated address generation
  87. $notify_from $b2evo_name.'@'.$basehost// comment this line if you want to customize
  88.  
  89.  
  90. // ** Configuration for htsrv/getmail.php **
  91. // (skip this if you don't intend to blog via email)
  92. # mailserver settings
  93. $mailserver_url 'mail.example.com';
  94. $mailserver_login 'login@example.com';
  95. $mailserver_pass 'password';
  96. $mailserver_port 110;
  97. # by default posts will have this category
  98. $default_category 1;
  99. # subject prefix
  100. $subjectprefix 'blog:';
  101. # body terminator string (starting from this string, everything will be ignored, including this string)
  102. $bodyterminator "___";
  103. # set this to 1 to run in test mode
  104. $thisisforfunonly 0;
  105. ### Special Configuration for some phone email services
  106. # some mobile phone email services will send identical subject & content on the same line
  107. # if you use such a service, set $use_phoneemail to 1, and indicate a separator string
  108. # when you compose your message, you'll type your subject then the separator string
  109. # then you type your login:password, then the separator, then content
  110. $use_phoneemail 0;
  111. $phoneemail_separator ':::';
  112.  
  113.  
  114. # When pinging http://blo.gs, use extended ping to RSS?
  115. $use_rss 1;
  116.  
  117. # If a particular post is requested (by id or title) but on the wrong blog,
  118. # do you want to automatically redirect to the right blog?
  119. # This is overly usefull if you move posts or categories from one blog to another
  120. # If this is disabled, the post will be displayed in the wrong blog template.
  121. $redirect_to_postblog false;
  122.  
  123.  
  124. // ** DB table names **
  125.  
  126. /**#@+
  127.  * database tables' names
  128.  *
  129.  * (change them if you want to have multiple b2's in a single database)
  130.  */
  131. $tableposts      'evo_posts';
  132. $tableusers      'evo_users';
  133. $tablesettings   'evo_settings';
  134. $tablecategories 'evo_categories';
  135. $tablecomments   'evo_comments';
  136. $tableblogs      'evo_blogs';
  137. $tablepostcats   'evo_postcats';
  138. $tablehitlog     'evo_hitlog';
  139. $tableantispam   'evo_antispam';
  140. $tablegroups     'evo_groups';
  141. $tableblogusers  'evo_blogusers';
  142. $tablelocales    'evo_locales';
  143. /**#@-*/
  144.  
  145. /**
  146.  * Aliases for class DB:
  147.  */
  148. $db_aliases array(
  149.         'T_posts'        => $tableposts       ,
  150.         'T_users'        => $tableusers       ,
  151.         'T_settings'     => $tablesettings    ,
  152.         'T_categories'   => $tablecategories  ,
  153.         'T_comments'     => $tablecomments    ,
  154.         'T_blogs'        => $tableblogs       ,
  155.         'T_postcats'     => $tablepostcats    ,
  156.         'T_hitlog'       => $tablehitlog      ,
  157.         'T_antispam'     => $tableantispam    ,
  158.         'T_groups'       => $tablegroups      ,
  159.         'T_blogusers'    => $tableblogusers   ,
  160.         'T_locales'      => $tablelocales     ,
  161.     );
  162.  
  163. /**#@+
  164.  * Old b2 tables used exclusively by the upgrade mode of the install script
  165.  *
  166.  * You can ignore those if you're not planning to upgrade from an original b2 database.
  167.  */
  168. $oldtableposts      'b2posts';
  169. $oldtableusers      'b2users';
  170. $oldtablesettings   'b2settings';
  171. $oldtablecategories 'b2categories';
  172. $oldtablecomments   'b2comments';
  173. /**#@-*/
  174.  
  175. /**
  176.  * WordPress table prefix used exclusively by the upgrade script
  177.  * You can ignore this if you're not planning to upgrade from a WordPress database.
  178.  */
  179. $wp_prefix 'wp_';
  180.  
  181.  
  182. // ** Saving bandwidth **
  183.  
  184. /**
  185.  * use output buffer.
  186.  *
  187.  * This is required for gzip and ETags (see below).
  188.  *
  189.  * Disabled by default.
  190.  *
  191.  * Even without using gzip compression or ETags this allows to send a Content-Length.
  192.  *
  193.  * Warning: this will prevent from sending the output progressively to the webserver.
  194.  * If a long page takes 2 seconds to be generated completely on a loaded server, the top
  195.  * of the page will only be sent after those 2 seconds, and the user won't see anything
  196.  * during at least 2 seconds (generation + transmission time). Without this setting, the
  197.  * output will be sent progressively starting at 0 seconds and the user will start seeing
  198.  * something earlier (0 + transmission time).
  199.  *
  200.  * @global boolean $use_obhandler 
  201.  */
  202. $use_obhandler 0;
  203.  
  204. /**
  205.  * GZip compression.
  206.  *
  207.  * Disabled by default.
  208.  *
  209.  * Can actually be done either by PHP or your webserver [default]
  210.  * (for example if you use Apache with mod_gzip).
  211.  * - Set this to 1 if you want PHP to do gzip compression
  212.  * - Set this to 0 if you want to let Apache do the job instead of PHP (you must enable this there)
  213.  * Letting apache do the compression will make PHP debugging easier.
  214.  * Thus it is recommended to keep it that way.
  215.  *
  216.  * @global boolean $use_gzipcompression 
  217.  */
  218. $use_gzipcompression 0;
  219.  
  220. /**
  221.  * ETags support.
  222.  *
  223.  * Disabled by default.
  224.  *
  225.  * This will send an ETag with every page, so we can say "Not Modified." if exactly the same
  226.  * page had been sent before.
  227.  *
  228.  * Etags don't work right in some versions of IE. You won't be able to force refreshment of a page.
  229.  *
  230.  * @global boolean $use_etags 
  231.  */
  232. $use_etags 0;
  233.  
  234.  
  235. // ** Cookies **
  236.  
  237. /**
  238.  * This is the path that will be associated to cookies
  239.  *
  240.  * That means cookies set by this b2evo install won't be seen outside of this path on the domain below
  241.  *
  242.  * @global string $cookie_path 
  243.  */
  244. $cookie_path preg_replace('#https?://[^/]+#'''$baseurl ).'/';
  245.  
  246. /**
  247.  * Cookie domain.
  248.  *
  249.  * That means cookies set by this b2evo install won't be seen outside of this domain.
  250.  *
  251.  * This setting gets uses for blogs which are not on an own domain. See {@link Blog::get_cookie_domain()}.
  252.  *
  253.  * We'll take {@link $basehost} by default (the leading dot includes subdomains), but
  254.  * when there's no dot in it, at least Firefox will not set the cookie. The best
  255.  * example for having no dot in the host name is 'localhost', but it's the case for
  256.  * host names in an intranet also.
  257.  *
  258.  * @global string Default: ( strpos($basehost, '.') ) ? '.'. $basehost : '';
  259.  */
  260. $cookie_domain strpos($basehost'.') ) '.'$basehost '';
  261. //echo 'cookie_domain='. $cookie_domain. ' cookie_path='. $cookie_path;
  262.  
  263. /**#@+
  264.  * Names for cookies.
  265.  */
  266. $cookie_user  'cookie'$b2evo_name'user';
  267. $cookie_pass  'cookie'$b2evo_name'pass';
  268. $cookie_state 'cookie'$b2evo_name'state';
  269. $cookie_name  'cookie'$b2evo_name'name';
  270. $cookie_email 'cookie'$b2evo_name'email';
  271. $cookie_url   'cookie'$b2evo_name'url';
  272. /**#@-*/
  273.  
  274. /**
  275.  * Expiration for cookies.
  276.  *
  277.  * Value in seconds, set this to 0 if you wish to use non permanent cookies (erased when browser is closed).
  278.  *
  279.  * @global int $cookie_expires 
  280.  */
  281. $cookie_expires time(31536000;        // Default: one year from now
  282.  
  283. /**
  284.  * Expired-time used to erase cookies.
  285.  *
  286.  * @global int $cookie_expired 
  287.  */
  288. $cookie_expired time(86400;                // Default: 24 hours ago
  289.  
  290.  
  291. // ** Location of the b2evolution subdirectories **
  292.  
  293. /*
  294.     - You should only move these around if you really need to.
  295.     - You should keep everything as subdirectories of the base folder
  296.         ($baseurl which is set in _config.php, default is the /blogs folder)
  297.     - Remember you can set the baseurl to your website root (-> _config.php).
  298.  
  299.     NOTE: ALL PATHS MUST HAVE NO LEADING AND NO TRAILING SLASHES !!!
  300.  
  301.     Example of a possible setting:
  302.         $admin_subdir = 'backoffice/b2evo';                // Subdirectory relative to base
  303.         $admin_dirout = '../..';                                    // Relative path to go back to base
  304. */
  305. /**
  306.  * Location of the configuration files.
  307.  * @global string $conf_subdir 
  308.  */
  309. $conf_subdir 'conf';                       // Subdirectory relative to base
  310. $conf_dirout '..';                         // Relative path to go back to base
  311.  
  312. $conf_path str_replace'\\''/'dirname(__FILE__) );
  313. $basepath preg_replace'#/'.$conf_subdir.'$#'''$conf_path );    // Remove his file's subpath
  314.  
  315. /**
  316.  * Location of the backoffice (admin) folder.
  317.  * @global string $admin_subdir 
  318.  */
  319. $admin_subdir 'admin';                     // Subdirectory relative to base
  320. $admin_dirout '..';                        // Relative path to go back to base
  321. $admin_url $baseurl.'/'.$admin_subdir;     // You should not need to change this
  322. /**
  323.  * Location of the HTml SeRVices folder.
  324.  * @global string $htsrv_subdir 
  325.  */
  326. $htsrv_subdir 'htsrv';                     // Subdirectory relative to base
  327. $htsrv_dirout '..';                        // Relative path to go back to base
  328. $htsrv_url $baseurl.'/'.$htsrv_subdir;     // You should not need to change this
  329. /**
  330.  * Location of the XML SeRVices folder.
  331.  * @global string $xmlsrv_subdir 
  332.  */
  333. $xmlsrv_subdir 'xmlsrv';                   // Subdirectory relative to base
  334. $xmlsrv_dirout '..';                       // Relative path to go back to base
  335. $xmlsrv_url $baseurl.'/'.$xmlsrv_subdir;   // You should not need to change this
  336. /**
  337.  * Location of the IMG folder.
  338.  * @global string $img_subdir 
  339.  */
  340. $img_subdir 'img';                     // Subdirectory relative to base
  341. $img_url $baseurl.'/'.$img_subdir;     // You should not need to change this
  342. /**
  343.  * Location of the skins folder.
  344.  * @global string $skins_subdir 
  345.  */
  346. $skins_subdir 'skins';                     // Subdirectory relative to base
  347. $skins_dirout '..';                        // Relative path to go back to base
  348. $skins_url $baseurl.'/'.$skins_subdir;     // You should not need to change this
  349. /**
  350.  * Location of the core (the "includes") files.
  351.  * @global string $core_subdir 
  352.  */
  353. $core_subdir 'b2evocore';                  // Subdirectory relative to base
  354. $core_dirout '..';                         // Relative path to go back to base
  355. /**
  356.  * Location of the locales folder.
  357.  * @global string $locales_subdir 
  358.  */
  359. $locales_subdir 'locales';                 // Subdirectory relative to base
  360. $locales_dirout '..';                      // Relative path to go back to base
  361. /**
  362.  * Location of the plug-ins.
  363.  * @global string $plugins_subdir 
  364.  */
  365. $plugins_subdir 'plugins';                 // Subdirectory relative to base
  366. $plugins_subdir_dirout '..';               // Relative path to go back to base
  367. /**
  368.  * Location of the install folder.
  369.  * @global string $install_subdir 
  370.  */
  371. $install_subdir 'install';                 // Subdirectory relative to base
  372. $install_dirout '..';                      // Relative path to go back to base
  373.  
  374.  
  375. // ----- CHANGE THE FOLLOWING ONLY IF YOU KNOW WHAT YOU'RE DOING! -----
  376. $use_cache 1;                          // Not using this will dramatically overquery the DB !
  377. $sleep_after_edit 0;                   // let DB do its stuff...
  378.  
  379. $evonetsrv_host 'b2evolution.net';
  380. $evonetsrv_port 80;
  381. $evonetsrv_uri '/evonetsrv/xmlrpc.php';
  382.  
  383. $antispamsrv_host 'antispam.b2evolution.net';
  384. $antispamsrv_port 80;
  385. $antispamsrv_uri '/evonetsrv/xmlrpc.php';
  386. ?>

Documentation generated on Tue, 20 May 2008 01:52:12 +0200 by phpDocumentor 1.4.2