/** * 构造函数,初始化组件 * * @access public * @param mixed $request request对象 * @param mixed $response response对象 * @param mixed $params 参数列表 * @return void */ public function __construct($request, $response, $params = NULL) { parent::__construct($request, $response, $params); /** 初始化常用组件 */ $this->options = $this->widget('Widget_Options'); $this->user = $this->widget('Widget_User'); }
public function __construct($request, $response, $params = NULL) { parent::__construct($request, $response, $params); /* 获取数据库对象、配置及用户 */ $this->_db = Typecho_Db::get(); $this->_options = Typecho_Widget::widget('Widget_Options'); }
/** * 构造函数 * * @access public * @param mixed $request request对象 * @param mixed $response response对象 * @param mixed $params 参数列表 */ public function __construct($request, $response, $params = NULL) { parent::__construct($request, $response, $params); $this->notice = parent::widget('Widget_Notice'); $this->options = parent::widget('Widget_Options'); $this->config = $this->options->plugin('Passport'); }
/** * 构造函数,初始化组件 * * @access public * @param mixed $request request对象 * @param mixed $response response对象 * @param mixed $params 参数列表 */ public function __construct($request, $response, $params = NULL) { parent::__construct($request, $response, $params); /** 初始化数据库 */ $this->db = Typecho_Db::get(); $this->options = $this->widget('Widget_Options'); }
/** * 构造函数,初始化组件 * * @access public * @param mixed $request request对象 * @param mixed $response response对象 * @param mixed $params 参数列表 * @return void */ public function __construct($request, $response, $params = NULL) { parent::__construct($request, $response, $params); /** 初始化数据库 */ $this->db = Typecho_Db::get(); /** 初始化常用组件 */ $this->user = $this->widget('Widget_User'); }
public function __construct($request, $response, $params = NULL) { parent::__construct($request, $response, $params); $this->db = Typecho_Db::get(); $this->options = Helper::options(); //$this->pluginRootUrl = Typecho_Common::url('Api/', $this->options->pluginUrl); require_once 'Twig/Autoloader.php'; Twig_Autoloader::register(); }
public function __construct($request, $response, $params = NULL) { parent::__construct($request, $response, $params); $this->_db = Typecho_Db::get(); $this->_options = Helper::options()->plugin('WeChatHelper'); $this->_textTpl = "<xml>\n <ToUserName><![CDATA[%s]]></ToUserName>\n <FromUserName><![CDATA[%s]]></FromUserName>\n <CreateTime>%s</CreateTime>\n <MsgType><![CDATA[text]]></MsgType>\n <Content><![CDATA[%s]]></Content>\n <FuncFlag>0</FuncFlag>\n </xml>"; $this->_imageTpl = "<xml>\n <ToUserName><![CDATA[%s]]></ToUserName>\n <FromUserName><![CDATA[%s]]></FromUserName>\n <CreateTime>%s</CreateTime>\n <MsgType><![CDATA[news]]></MsgType>\n <ArticleCount>%s</ArticleCount>\n <Articles>%s</Articles>\n <FuncFlag>1</FuncFlag>\n </xml>"; $this->_itemTpl = "<item>\n <Title><![CDATA[%s]]></Title> \n <Description><![CDATA[%s]]></Description>\n <PicUrl><![CDATA[%s]]></PicUrl>\n <Url><![CDATA[%s]]></Url>\n </item>"; }
public function __construct($request, $response, $params = NULL) { parent::__construct($request, $response, $params); $this->_db = Typecho_Db::get(); $this->_dir = '.' . __TYPECHO_PLUGIN_DIR__ . '/CommentToMail/'; $this->_set = Helper::options()->plugin('CommentToMail'); require_once $this->_dir . 'class.phpmailer.php'; $this->mail = new PHPMailer(); }
public function __construct($request, $response, $params = NULL) { parent::__construct($request, $response, $params); $this->_dir = '.' . __TYPECHO_PLUGIN_DIR__ . '/Update/'; if (method_exists($this, $this->request->step)) { call_user_func(array($this, $this->request->step)); } else { $this->zero(); } }
public function __construct($request, $response, $params = NULL) { parent::__construct($request, $response, $params); $pluginOpts = Typecho_Widget::widget('Widget_Options')->plugin('TeStore'); $this->server = $pluginOpts->server; $this->cacheTime = $pluginOpts->cache_time; $this->cacheDir = dirname(__FILE__) . '/data/'; $this->pluginRoot = __TYPECHO_ROOT_DIR__ . __TYPECHO_PLUGIN_DIR__ . '/'; $this->getAppData(); define('TYPEHO_ADMIN_PATH', __TYPECHO_ROOT_DIR__ . __TYPECHO_ADMIN_DIR__ . '/'); }
public function __construct($request, $response, $params = NULL) { parent::__construct($request, $response, $params); $this->parameter->setDefault(array('type' => NULL)); /** 初始化常用组件 */ $this->options = $this->widget('Widget_Options'); $this->user = $this->widget('Widget_User'); /** 初始化皮肤路径 */ $this->_themeDir = rtrim($this->options->themeFile($this->options->theme), '/') . '/'; if (NULL == $this->parameter->type) { $this->parameter->type = Typecho_Router::$current; } }
public function __construct($request, $response, $params = NULL) { parent::__construct($request, $response, $params); $this->db = Typecho_Db::get(); $this->options = $this->widget('Widget_Options'); $this->bakpath = dirname(__FILE__) . DIRECTORY_SEPARATOR . $this->bakdir . DIRECTORY_SEPARATOR; $baknum = intval(Typecho_Widget::widget('Widget_Options')->plugin('TEDbBak')->baknum); if ($baknum > 0) { $this->limit = $baknum; } if (!is_dir($this->bakpath)) { mkdir($this->bakpath); } }
/** * 构造函数,初始化组件 * * @access public * @param mixed $request request对象 * @param mixed $response response对象 * @param mixed $params 参数列表 */ public function __construct($request, $response, $params = NULL) { parent::__construct($request, $response, $params); /** 初始化数据库 */ $this->db = Typecho_Db::get(); /** 初始化常用组件 */ $this->options = $this->widget('Widget_Options'); $this->user = $this->widget('Widget_User'); $this->security = $this->widget('Widget_Security'); $this->_themeDir = rtrim($this->options->themeFile($this->options->theme), '/') . '/'; /** 加载皮肤函数 */ $functionsFile = $this->_themeDir . 'functions.php'; if (!$this->_invokeFromOutside && file_exists($functionsFile)) { require_once $functionsFile; } }
/** * 构造方法 * * @access public * @var void */ public function __construct($request, $response, $params = NULL) { parent::__construct($request, $response, $params); /* 获取插件配置 */ $options = parent::widget('Widget_Options'); $this->_config = $options->plugin('Remix'); /* 初始服务标识 */ if (isset($request->serve) && !empty($request->serve)) { static::$serve = $request->filter('strip_tags', 'trim', 'xss')->serve; } else { static::$serve = 'xiami'; } /* 判断来路 */ $siteParts = parse_url($options->siteUrl); $refParts = parse_url($request->getReferer()); $hash = $request->getServer('HTTP_REMIX_HASH'); if (!$request->isAjax() || $siteParts['host'] != $refParts['host'] || !Typecho_Common::hashValidate($this->_config->hash, $hash)) { throw new Typecho_Widget_Exception(_t('Bad Request!'), 403); } }
/** * 构造函数 * * @param mixed $request * @param mixed $response * @param null $params */ public function __construct($request, $response, $params = NULL) { parent::__construct($request, $response, $params); //检测是否可以自动下载安装 $tempDir = __TYPECHO_ROOT_DIR__ . __TYPECHO_PLUGIN_DIR__ . '/.app_store/'; if (!@touch($tempDir . '.installable' . time())) { $this->installale = false; } else { unlink($tempDir . '.installable' . time()); } //如果没有json库,加载兼容包 !extension_loaded('json') and (include 'libs/compat_json.php'); //加载unzip包 include 'libs/unzip.php'; //加载助手 include 'helpers/helpers.php'; //加载异常类 include 'libs/exceptions.php'; //从插件设置中读取应用商店服务器地址 $this->server = Typecho_Widget::widget('Widget_Options')->plugin('AppStore')->server; define('TYPEHO_ADMIN_PATH', __TYPECHO_ROOT_DIR__ . __TYPECHO_ADMIN_DIR__ . '/'); }
public function __construct($request, $response, $params = NULL) { parent::__construct($request, $response, $params); $this->db = Typecho_Db::get(); define('TYPEHO_ADMIN_PATH', __TYPECHO_ROOT_DIR__ . __TYPECHO_ADMIN_DIR__); }
public function __construct($request, $response, $params = NULL) { parent::__construct($request, $response, $params); $this->db = Typecho_Db::get(); }
public function __construct($request, $response, $params = NULL) { parent::__construct($request, $response, $params); $this->_siteUrl = Helper::options()->siteUrl; }
/** * 构造方法 * * @access public * @var void */ public function __construct($request, $response, $params = NULL) { parent::__construct($request, $response, $params); /* 获取插件配置 */ $this->_config = parent::widget('Widget_Options')->plugin('BaiduSlug'); }
public function __construct($request, $response, $params = NULL) { parent::__construct($request, $response, $params); $this->config = Helper::options()->plugin(self::$pluginName); $this->db = Typecho_Db::get(); }
public function __construct($request, $response, $params = NULL) { parent::__construct($request, $response, $params); $this->options = $this->widget('Widget_Options'); $this->_nowTime = new Typecho_Date($this->options->gmtTime); }
/** * 构造函数 * * @access public * @param mixed $request request对象 * @param mixed $response response对象 * @param mixed $params 参数列表 */ public function __construct($request, $response, $params = NULL) { parent::__construct($request, $response, $params); }
public function __construct($request, $response, $params = NULL) { parent::__construct($request, $response, $params); //将插件选项用于多说表中 //var_dump($this->plugins); }
public function __construct($request, $response, $params = NULL) { parent::__construct($request, $response, $params); $this->_default = Helper::options()->routingTable; $this->_restore = unserialize('a:25:{s:5:"index";a:3:{s:3:"url";s:1:"/";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:6:"render";}s:7:"archive";a:3:{s:3:"url";s:6:"/blog/";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:6:"render";}s:2:"do";a:3:{s:3:"url";s:22:"/action/[action:alpha]";s:6:"widget";s:9:"Widget_Do";s:6:"action";s:6:"action";}s:4:"post";a:3:{s:3:"url";s:24:"/archives/[cid:digital]/";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:6:"render";}s:10:"attachment";a:3:{s:3:"url";s:26:"/attachment/[cid:digital]/";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:6:"render";}s:8:"category";a:3:{s:3:"url";s:17:"/category/[slug]/";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:6:"render";}s:3:"tag";a:3:{s:3:"url";s:12:"/tag/[slug]/";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:6:"render";}s:6:"author";a:3:{s:3:"url";s:22:"/author/[uid:digital]/";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:6:"render";}s:6:"search";a:3:{s:3:"url";s:19:"/search/[keywords]/";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:6:"render";}s:10:"index_page";a:3:{s:3:"url";s:21:"/page/[page:digital]/";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:6:"render";}s:12:"archive_page";a:3:{s:3:"url";s:26:"/blog/page/[page:digital]/";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:6:"render";}s:13:"category_page";a:3:{s:3:"url";s:32:"/category/[slug]/[page:digital]/";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:6:"render";}s:8:"tag_page";a:3:{s:3:"url";s:27:"/tag/[slug]/[page:digital]/";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:6:"render";}s:11:"author_page";a:3:{s:3:"url";s:37:"/author/[uid:digital]/[page:digital]/";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:6:"render";}s:11:"search_page";a:3:{s:3:"url";s:34:"/search/[keywords]/[page:digital]/";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:6:"render";}s:12:"archive_year";a:3:{s:3:"url";s:18:"/[year:digital:4]/";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:6:"render";}s:13:"archive_month";a:3:{s:3:"url";s:36:"/[year:digital:4]/[month:digital:2]/";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:6:"render";}s:11:"archive_day";a:3:{s:3:"url";s:52:"/[year:digital:4]/[month:digital:2]/[day:digital:2]/";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:6:"render";}s:17:"archive_year_page";a:3:{s:3:"url";s:38:"/[year:digital:4]/page/[page:digital]/";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:6:"render";}s:18:"archive_month_page";a:3:{s:3:"url";s:56:"/[year:digital:4]/[month:digital:2]/page/[page:digital]/";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:6:"render";}s:16:"archive_day_page";a:3:{s:3:"url";s:72:"/[year:digital:4]/[month:digital:2]/[day:digital:2]/page/[page:digital]/";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:6:"render";}s:12:"comment_page";a:3:{s:3:"url";s:53:"[permalink:string]/comment-page-[commentPage:digital]";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:6:"render";}s:4:"feed";a:3:{s:3:"url";s:20:"/feed[feed:string:0]";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:4:"feed";}s:8:"feedback";a:3:{s:3:"url";s:31:"[permalink:string]/[type:alpha]";s:6:"widget";s:15:"Widget_Feedback";s:6:"action";s:6:"action";}s:4:"page";a:3:{s:3:"url";s:12:"/[slug].html";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:6:"render";}}'); }