示例#1
0
<?php

// custom extensions override defaults
if (file_exists(__DIR__ . "/../config/config.php")) {
    require __DIR__ . "/../config/config.php";
}
Openclerk\Config::merge(array("site_name" => "Openclerk", "site_email" => "*****@*****.**", "site_id" => "openclerk", "openid_host" => "localhost", "absolute_url" => "http://localhost/clerk/", "openclerk_version" => "0.35", "display_errors" => is_localhost(), "database_slave" => true, "database_host_master" => "localhost", "database_host_slave" => "localhost", "database_port" => 3306, "database_name" => "clerk", "database_username" => "clerk", "database_password" => "clerk", "database_timezone" => false, "phpmailer_host" => "mail.example.com", "phpmailer_username" => "sync", "phpmailer_password" => base64_decode("xxx"), "phpmailer_from" => "*****@*****.**", "phpmailer_from_name" => "*****@*****.**", "phpmailer_reply_to" => "*****@*****.**", "phpmailer_bcc" => "*****@*****.**", "admin_email" => "*****@*****.**", "password_salt" => "abc123", "password_reset_salt" => "abc456", "unsubscribe_salt" => "123abc", "user_graph_hash_salt" => "456789", "google_analytics_account" => "UA-12345678-1", "automated_key" => "abc123", "refresh_queue_hours" => 2, "refresh_queue_hours_premium" => 1, "refresh_queue_hours_system" => 0.1, "refresh_queue_hours_ticker" => 0.1, "system_user_id" => 100, "get_contents_timeout" => 5, "get_openid_timeout" => 5, "default_login" => 'user', "signup_login" => 'wizard_currencies', "autologin_expire_days" => 30, "autologin_cookie_seconds" => 60 * 60 * 24 * 30, "external_sample_size" => 10000, "default_cache_seconds" => 60 * 60 * 24 * 7, "vote_coins_multiplier" => 10, "metrics_enabled" => true, "metrics_db_enabled" => true, "metrics_page_enabled" => true, "metrics_curl_enabled" => true, "metrics_store" => true, "show_i18n" => false, "log_missing_i18n" => false, "allow_fake_login" => false, "performance_metrics_enabled" => false, "performance_metrics_slow_query" => 250, "performance_metrics_repeated_query" => 5, "performance_metrics_slow_curl" => 2000, "performance_metrics_repeated_curl" => 2, "jobs_enabled" => !file_exists(__DIR__ . "/../deploy.lock"), "maximum_jobs_running" => 20, "max_job_executions" => 5, "throttle_btcguild" => 30, "throttle_blockchain" => 5, "external_sample_size" => 10000, "default_job_priority" => 10, "premium_job_priority" => 5, "job_test_priority" => 5, "heavy_requests_seconds" => 10, "default_graph_width" => 110, "default_graph_height" => 110, "default_user_graph_width" => 4, "default_user_graph_height" => 2, "default_user_graph_days" => 45, "graph_refresh_public" => 30, "graph_refresh_free" => 30, "graph_refresh_premium" => 1, "technical_period_max" => 365, "ftc_address_url" => "http://explorer.feathercoin.com/address/%s", "ftc_block_url" => "http://explorer.feathercoin.com/chain/Feathercoin/q/getblockcount", "ppc_address_url" => "http://ppc.blockr.io/api/v1/address/info/%s", "ppc_block_url" => "http://ppc.blockr.io/api/v1/block/info/last", "nvc_address_url" => "https://explorer.novaco.in/address/%s", "nvc_block_url_html" => "https://explorer.novaco.in/", "xpm_address_url" => "https://coinplorer.com/XPM/Addresses/%s", "xpm_block_url_html" => "http://xpm.cryptocoinexplorer.com/block/-1", "trc_address_url" => "http://trc.cryptocoinexplorer.com/address/%s", "trc_block_url_html" => "http://trc.cryptocoinexplorer.com/block/-1", "dog_address_url" => "http://dogechain.info//address/%s", "dog_block_url" => "http://dogechain.info//chain/Dogecoin/q/getblockcount", "mec_address_url" => "http://mega.rapta.net:2750/address/%s", "mec_block_url" => "http://mega.rapta.net:2750/chain/Megacoin/q/getblockcount", "xrp_address_url" => "https://ripple.com/graph/#%s", "nmc_address_url" => "http://namecha.in/address/%s", "nmc_block_url_html" => "http://namecha.in/", "dgc_address_url" => "http://dgc.blockr.io/api/v1/address/info/%s", "dgc_block_url" => "http://dgc.blockr.io/api/v1/block/info/last", "wdc_address_url" => "http://www.worldcoinexplorer.com/api/address/%s", "wdc_block_url" => "http://www.worldcoinexplorer.com/api/coindetails", "ixc_address_url" => "http://block.al.tcoin.info/address/%s", "ixc_block_url" => "http://block.al.tcoin.info/chain/Ixcoin/q/getblockcount", "vtc_address_url" => "https://explorer.vertcoin.org/address/%s", "vtc_block_url" => "https://explorer.vertcoin.org/chain/Vertcoin/q/getblockcount", "net_address_url" => "http://explorer.netcoinfoundation.org/address/%s", "net_block_url" => "http://explorer.netcoinfoundation.org/chain/Netcoin/q/getblockcount", "hbn_address_url" => "http://162.217.249.198:1080/address/%s", "hbn_block_url" => "http://162.217.249.198:1080/chain/Hobonickels/q/getblockcount", "drk_address_url" => "http://explorer.darkcoin.io/address/%s", "drk_block_url" => "http://explorer.darkcoin.io/chain/Darkcoin/q/getblockcount", "vrc_address_url" => "https://chainz.cryptoid.info/vrc/address.dws?%s", "vrc_balance_url" => "http://chainz.cryptoid.info/vrc/api.dws?q=getbalance&a=%s", "vrc_received_url" => "http://chainz.cryptoid.info/vrc/api.dws?q=getreceivedbyaddress&a=%s", "vrc_block_url" => "http://chainz.cryptoid.info/vrc/api.dws?q=getblockcount", "nxt_address_url" => "http://nxtexplorer.com/nxt/nxt.cgi?action=3000&acc=%s", "rdd_address_url" => "http://live.reddcoin.com/address/%s", "rdd_block_url" => "http://live.reddcoin.com/api/status?q=getInfo", "via_address_url" => "http://explorer.viacoin.org/address/%s", "via_block_url" => "http://explorer.viacoin.org/api/status?q=getInfo", "nbt_address_url" => "https://blockexplorer.nu/address/%s/1/newest", "nsr_address_url" => "https://blockexplorer.nu/address/%s/1/newest", "ftc_confirmations" => 6, "ppc_confirmations" => 6, "nvc_confirmations" => 6, "trc_confirmations" => 6, "dog_confirmations" => 6, "mec_confirmations" => 6, "nmc_confirmations" => 6, "dgc_confirmations" => 6, "ixc_confirmations" => 6, "vtc_confirmations" => 6, "net_confirmations" => 6, "hbn_confirmations" => 6, "drk_confirmations" => 6, "blockchain_api_key" => false, "anxpro_example_api_key" => '...', "anxpro_example_api_secret" => '...', "exchange_cryptsy_key" => "...", "exchange_cryptsy_secret" => "...", "premium_currencies" => array('btc', 'ltc'), "premium_btc_monthly" => 0.02, "premium_btc_yearly" => 0.2, "premium_ltc_monthly" => 1, "premium_ltc_yearly" => 10, "premium_reminder_days" => 7, "outstanding_reminder_hours" => 24, "outstanding_abandon_days" => 7, "premium_user_votes" => 10, "btc_confirmations" => 6, "ltc_confirmations" => 6, "dog_confirmations" => 6, "premium_btc_discount" => 0, "premium_ltc_discount" => 0, "premium_welcome" => false, "new_user_premium_update_hours" => 24, "user_expiry_days" => 30, "taxable_countries" => array(), "archive_ticker_data" => "-31 days", "archive_summary_data" => "-31 days", "archive_balances_data" => "-31 days", "default_css" => "styles/default.css", "custom_css" => false, "forum_link" => "http://bitcointalk.org/", "blog_link" => "http://blog.cryptfolio.com/", "google_groups_announce" => "openclerk-announce", "version_history_link" => "https://groups.google.com/forum/#!forum/cryptfolio-announce"));
// absolute URLs as necessary
Openclerk\Config::merge(array('coinbase_redirect_uri' => absolute_url(url_for('coinbase'))));
$global_get_site_config = null;
/**
 * @deprecated use {@link config()} instead
 */
function get_site_config($key = null, $fail_if_missing = true)
{
    return \Openclerk\Config::get($key, $fail_if_missing === false ? false : null);
}
function config($key, $default = null)
{
    return \Openclerk\Config::get($key, $default);
}
$global_get_premium_config = null;
/**
 * This function provides the premium account configuration for an Openclerk instance,
 * based on {@link #get_default_premium_config()} and {@link #get_premium_config_ext()}
 * It can be extended by defining a function 'get_premium_config_ext()'
 * and providing a new map of keys to values.
 *
 * Config values here will never change between calls so can be cached.
 * TODO this should be moved into `\Openclerk\Config::get("premium_$key")`
 */
示例#2
0
<?php

require __DIR__ . "/../vendor/autoload.php";
require __DIR__ . "/functions.php";
// set up config
Openclerk\Config::merge(array("site_name" => "genealogy", "absolute_url" => is_localhost() ? "http://localhost/genealogy/" : "http://example.com/", "display_errors" => is_localhost()));
// set up routes
\Openclerk\Router::addRoutes(array(":page" => "pages/:page.php"));
// set up pages
\Pages\PageRenderer::addTemplatesLocation(__DIR__ . "/../site/templates");
\Pages\PageRenderer::addStylesheet(\Openclerk\Router::urlFor("css/default.css"));
\Pages\PageRenderer::addJavascript("https://code.jquery.com/jquery-2.1.1.min.js");
\Pages\PageRenderer::addJavascript(\Openclerk\Router::urlFor("js/default.js"));
require __DIR__ . "/tree.php";