source: trunk/admin/config.default.php @ 902

Last change on this file since 902 was 902, checked in by moo, 2 years ago

improve config handling

  • Property svn:eol-style set to native
File size: 1.8 KB
RevLine 
[34]1<?php
2
[902]3// this is default config, DO NOT modify this file
4// copy this file and write your own config and name it as config.php
[34]5
[123]6// detected by browser
[902]7// $config['lang'] = 'en-us';
[123]8
[902]9$config['charset'] = "UTF-8";
[34]10
[902]11// translators only
12$config['show_todo_strings'] = false;
[123]13
[526]14// width of graph for free or usage blocks
[902]15$config['percent_graph_width'] = 120;
16$config['percent_graph_type'] = 'used'; // either 'used' or 'free'
[517]17
[591]18// only enable if you have password protection for admin page
19// enabling this option will cause user to eval() whatever code they want
[902]20$config['enable_eval'] = false;
[591]21
[34]22// this ob filter is applied for the cache list, not the whole page
[902]23$config['path_nicer'] = 'ob_filter_path_nicer_default';
24
25/*
26function custom_ob_filter_path_nicer($list_html)
[34]27{
[902]28    $list_html = ob_filter_path_nicer_default($list_html); // this function is from common.php
29    return $list_html;
[34]30}
[902]31$config['path_nicer'] = 'custom_ob_filter_path_nicer';
32*/
[34]33
34// you can simply let xcache to do the http auth
35// but if you have your home made login/permission system, you can implement the following
36// {{{ home made login example
37// this is an example only, it's won't work for you without your implemention.
[902]38/*
[34]39function check_admin_and_by_pass_xcache_http_auth()
40{
41    require("/path/to/user-login-and-permission-lib.php");
42    session_start();
43
44    if (!user_logined()) {
45        if (!ask_the_user_to_login()) {
46            exit;
47        }
48    }
49
50    user_load_permissions();
51    if (!user_is_admin()) {
52        die("Permission denied");
53    }
54
55    // user is trusted after permission checks above.
56    // tell XCache about it (the only way to by pass XCache http auth)
57    $_SERVER["PHP_AUTH_USER"] = "moo";
58    $_SERVER["PHP_AUTH_PW"] = "your-xcache-password";
59    return true;
60}
61
[902]62check_admin_and_by_pass_xcache_http_auth();
63*/
[34]64// }}}
65
[902]66/* by pass XCache http auth
67$_SERVER["PHP_AUTH_USER"] = "moo";
68$_SERVER["PHP_AUTH_PW"] = "your-xcache-password";
69*/
70
[34]71?>
Note: See TracBrowser for help on using the repository browser.