当前位置: 首页>>代码示例>>PHP>>正文


PHP UserConfig::header方法代码示例

本文整理汇总了PHP中UserConfig::header方法的典型用法代码示例。如果您正苦于以下问题:PHP UserConfig::header方法的具体用法?PHP UserConfig::header怎么用?PHP UserConfig::header使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UserConfig的用法示例。


在下文中一共展示了UserConfig::header方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: dirname

require_once dirname(__FILE__) . '/global.php';
#UserConfig::$DEBUG = true;
UserConfig::$mysql_host = $host;
UserConfig::$mysql_db = $db;
UserConfig::$mysql_user = $user;
UserConfig::$mysql_password = $pass;
UserConfig::$mysql_port = $port;
// TODO - implement accounts and then switch it to true.
UserConfig::$useAccounts = false;
#UserConfig::$enableInvitations = true;
UserConfig::$supportEmailFrom = $supportEmailFrom;
UserConfig::$supportEmailReplyTo = $supportEmailReplyTo;
UserConfig::$SESSION_SECRET = $sessionSecret;
UserConfig::$admins = $instanceAdmins;
UserConfig::$dont_display_activity_for = $instanceAdmins;
UserConfig::$header = dirname(__FILE__) . '/header.php';
UserConfig::$footer = dirname(__FILE__) . '/footer.php';
UserConfig::$rememberMeDefault = true;
define('SHOWSLOW_ACTIVITY_ADD_URL', 1);
define('SHOWSLOW_ACTIVITY_PAGETEST_START', 2);
define('SHOWSLOW_ACTIVITY_URL_SEARCH', 3);
// array of activities in the system velue is an array of label and value of activity
UserConfig::$activities[SHOWSLOW_ACTIVITY_ADD_URL] = array('Added URL for monitoring', 5);
UserConfig::$activities[SHOWSLOW_ACTIVITY_PAGETEST_START] = array('Started WebPagetest test', 2);
UserConfig::$activities[SHOWSLOW_ACTIVITY_URL_SEARCH] = array('Searched a URL in the list', 1);
if ($facebookAPIKey) {
    UserConfig::loadModule('facebook');
    new FacebookAuthenticationModule($facebookAPIKey, $facebookSecret);
}
if ($googleFriendConnectSiteID) {
    UserConfig::loadModule('google');
开发者ID:ryandoherty,项目名称:showslow,代码行数:31,代码来源:users_config.php

示例2: init

 public static function init()
 {
     UserConfig::$ROOTPATH = dirname(__FILE__);
     // Chopping of trailing slash which is not supposed to be there in Apache config
     // See: http://httpd.apache.org/docs/2.0/mod/core.html#documentroot
     $docroot = $_SERVER['DOCUMENT_ROOT'];
     if (substr($docroot, -1) == '/') {
         $docroot = substr($docroot, 0, -1);
     }
     $docrootlength = strlen($docroot);
     UserConfig::$USERSROOTURL = substr(UserConfig::$ROOTPATH, $docrootlength);
     // we assume that package is extracted into the root of the site
     UserConfig::$SITEROOTURL = substr(dirname(UserConfig::$ROOTPATH), $docrootlength) . '/';
     UserConfig::$DEFAULTLOGINRETURN = UserConfig::$SITEROOTURL;
     UserConfig::$DEFAULTLOGOUTRETURN = UserConfig::$SITEROOTURL;
     UserConfig::$DEFAULTREGISTERRETURN = UserConfig::$SITEROOTURL;
     UserConfig::$DEFAULTUPDATEPASSWORDRETURN = UserConfig::$SITEROOTURL;
     if (array_key_exists('HTTP_HOST', $_SERVER)) {
         $host = $_SERVER['HTTP_HOST'];
     } else {
         error_log("[UserBase config] Warning: Can't determine site's host name, using www.example.com");
         $host = 'www.example.com';
     }
     UserConfig::$SITEROOTFULLURL = 'http://' . $host . UserConfig::$SITEROOTURL;
     UserConfig::$USERSROOTFULLURL = 'http://' . $host . substr(UserConfig::$ROOTPATH, $docrootlength);
     UserConfig::$supportEmailXMailer = 'UserBase (PHP/' . phpversion();
     UserConfig::$header = dirname(__FILE__) . '/header.php';
     UserConfig::$footer = dirname(__FILE__) . '/footer.php';
     // Built in activities
     define('USERBASE_ACTIVITY_LOGIN_UPASS', 1000);
     define('USERBASE_ACTIVITY_LOGIN_FB', 1001);
     define('USERBASE_ACTIVITY_LOGIN_GFC', 1002);
     define('USERBASE_ACTIVITY_ADDED_UPASS', 1003);
     define('USERBASE_ACTIVITY_ADDED_FB', 1004);
     define('USERBASE_ACTIVITY_ADDED_GFC', 1005);
     define('USERBASE_ACTIVITY_REMOVED_FB', 1006);
     define('USERBASE_ACTIVITY_REMOVED_GFC', 1007);
     define('USERBASE_ACTIVITY_LOGOUT', 1008);
     define('USERBASE_ACTIVITY_REGISTER_UPASS', 1009);
     define('USERBASE_ACTIVITY_REGISTER_FB', 1010);
     define('USERBASE_ACTIVITY_REGISTER_GFC', 1011);
     define('USERBASE_ACTIVITY_UPDATEUSERINFO', 1012);
     define('USERBASE_ACTIVITY_UPDATEPASS', 1013);
     define('USERBASE_ACTIVITY_RESETPASS', 1014);
     define('USERBASE_ACTIVITY_RETURN_DAILY', 1015);
     define('USERBASE_ACTIVITY_RETURN_WEEKLY', 1016);
     define('USERBASE_ACTIVITY_RETURN_MONTHLY', 1017);
     // Array of activities in the system.
     // Key must be integer (best if specified using a constant).
     // The values are an array with label and "points" value of activity.
     UserConfig::$activities = array(USERBASE_ACTIVITY_LOGIN_UPASS => array('Logged in using username and password', 1), USERBASE_ACTIVITY_LOGIN_FB => array('Logged in using Facebook', 1), USERBASE_ACTIVITY_LOGIN_GFC => array('Logged in using Google Friend Connect', 1), USERBASE_ACTIVITY_ADDED_UPASS => array('Added username and password', 1), USERBASE_ACTIVITY_ADDED_FB => array('Added Facebook credential', 1), USERBASE_ACTIVITY_ADDED_GFC => array('Added Google Friend Connect credential', 1), USERBASE_ACTIVITY_REMOVED_FB => array('Removed Facebook Connect', 0), USERBASE_ACTIVITY_REMOVED_GFC => array('Removed Google Friend Connect credential', 0), USERBASE_ACTIVITY_LOGOUT => array('Logged out', 0), USERBASE_ACTIVITY_REGISTER_UPASS => array('Registered using a form', 1), USERBASE_ACTIVITY_REGISTER_FB => array('Registered using Facebook', 1), USERBASE_ACTIVITY_REGISTER_GFC => array('Registered using Google Friend Connect', 1), USERBASE_ACTIVITY_UPDATEUSERINFO => array('Updated user info', 0), USERBASE_ACTIVITY_UPDATEPASS => array('Updated their password', 0), USERBASE_ACTIVITY_RESETPASS => array('Reset forgotten password', 0), USERBASE_ACTIVITY_RETURN_DAILY => array('Returned to the site within a day', 3), USERBASE_ACTIVITY_RETURN_WEEKLY => array('Returned to the site within a week', 2), USERBASE_ACTIVITY_RETURN_MONTHLY => array('Returned to the site within a month', 1));
     UserConfig::$cohort_providers[] = new GenerationCohorts(GenerationCohorts::MONTH);
     UserConfig::$cohort_providers[] = new GenerationCohorts(GenerationCohorts::WEEK);
     UserConfig::$cohort_providers[] = new GenerationCohorts(GenerationCohorts::YEAR);
     UserConfig::$cohort_providers[] = new RegMethodCohorts();
 }
开发者ID:russelldavis,项目名称:UserBase,代码行数:56,代码来源:default_config.php


注:本文中的UserConfig::header方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。