本文整理汇总了PHP中e107::lan方法的典型用法代码示例。如果您正苦于以下问题:PHP e107::lan方法的具体用法?PHP e107::lan怎么用?PHP e107::lan使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类e107
的用法示例。
在下文中一共展示了e107::lan方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
function __construct()
{
//include_lan(e_PLUGIN.'forum/languages/'.e_LANGUAGE.'/lan_forum_stats.php');
//e107::lan('forum','front');
e107::lan('forum', "front", true);
e107::css('forum', 'forum.css');
}
示例2: e_linkwords
function e_linkwords()
{
global $pref, $admin_log;
/* constructor */
// Do an auto-update on the variable used to hook parsers - so we should only be called once
e107::lan('linkwords', e_LANGUAGE);
// e_PLUGIN."linkwords/languages/".e_LANGUAGE.".php"
$hooks = explode(",", $pref['tohtml_hook']);
if (($key = array_search('linkwords', $hooks)) !== FALSE) {
unset($hooks[$key]);
}
if (count($hooks) == 0) {
unset($pref['tohtml_hook']);
} else {
$pref['tohtml_hook'] = implode(',', $hooks);
}
if (!isset($pref['e_tohtml_list'])) {
$pref['e_tohtml_list'] = array();
}
if (!in_array('linkwords', $pref['e_tohtml_list'])) {
$pref['e_tohtml_list'][] = 'linkwords';
}
save_prefs();
e107::getLog()->add('LINKWD_05', LWLAN_58 . '[!br!]' . $pref['tohtml_hook'], '');
// Log that the update was done
return;
}
示例3:
<?php
/**
* @file
* This file is loaded every time the core of e107 is included. ie. Wherever
* you see require_once("class2.php") in a script. It allows a developer to
* modify or define constants, parameters etc. which should be loaded prior to
* the header or anything that is sent to the browser as output. It may also be
* included in Ajax calls.
*/
e107::lan('nodejs_comment', false, true);
// Register events.
$event = e107::getEvent();
$event->register('postcomment', 'nodejs_comment_event_postcomment_callback');
$event->register('login', 'nodejs_comment_event_login_callback');
// TODO: send notifications after comment has been approved.
/**
* Event callback after triggering "postcomment".
*
* @param array $comment
* Comment item.
*
* $comment contains:
* - comment_pid
* - comment_item_id
* - comment_subject
* - comment_author_id
* - comment_author_name
* - comment_author_email
* - comment_datestamp
* - comment_comment
示例4: intval
*
* Copyright (C) 2009-2014 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
*/
if (!defined('e107_INIT')) {
require_once "../../class2.php";
}
if (!e107::isInstalled('banner')) {
e107::redirect();
exit;
}
e107::includeLan(e_PLUGIN . "banner/languages/" . e_LANGUAGE . "_banner.php");
// TODO
e107::lan('banner');
$mes = e107::getMessage();
$frm = e107::getForm();
// When a banner is clicked
if (e_QUERY) {
$query_string = intval(e_QUERY);
$row = $sql->retrieve("banner", "*", "banner_id = '{$query_string}'");
// select the banner
$ip = e107::getIPHandler()->getIP(FALSE);
$newip = strpos($row['banner_ip'], "{$ip}^") !== FALSE ? $row['banner_ip'] : "{$row['banner_ip']}{$ip}^";
// what does this do?
$sql->update("banner", "banner_clicks = banner_clicks + 1, `banner_ip` = '{$newip}' WHERE `banner_id` = '{$query_string}'");
header("Location: {$row['banner_clickurl']}");
exit;
}
if (!$BANNER_LOGIN_TABLE) {
示例5: list
* $Revision$
* $Date$
* $Author$
*/
/**
* e107 Linkword plugin
*
* @package e107_plugins
* @subpackage linkwords
* @version $Id$;
*
*/
if (!defined('e107_INIT')) {
exit;
}
e107::lan('linkwords', e_LANGUAGE . "_admin_linkwords.php");
if (e_QUERY) {
list($action, $junk) = explode('.', e_QUERY . '.');
} else {
$action = 'words';
}
switch ($action) {
case 'options':
$text = LAN_LW_HELP_01;
break;
case 'words':
case 'edit':
default:
$text = LAN_LW_HELP_02;
}
$ns->tablerender(LAN_LW_HELP_00, $text);
示例6: define
*
* $Source: /cvs_backup/e107_0.8/e107_plugins/download/admin_download.php,v $
* $Revision$
* $Date$
* $Author$
*/
$eplug_admin = true;
define('DOWNLOAD_DEBUG', FALSE);
require_once "../../class2.php";
if (!getperms("P") || !e107::isInstalled('download')) {
header("location:" . e_BASE . "index.php");
exit;
}
e107::lan('download', 'download');
// e_PLUGIN.'download/languages/'.e_LANGUAGE.'/download.php'
e107::lan('download', 'admin_download');
// e_PLUGIN.'download/languages/'.e_LANGUAGE.'/admin_download.php'
// require_once(e_PLUGIN.'download/handlers/adminDownload_class.php');
require_once e_PLUGIN . 'download/handlers/download_class.php';
require_once e_HANDLER . 'upload_handler.php';
require_once e_HANDLER . 'xml_class.php';
require_once e_HANDLER . "form_handler.php";
require_once e_HANDLER . "ren_help.php";
//require_once(e_HANDLER."calendar/calendar_class.ph_");
//$cal = new DHTML_Calendar(true);
//$gen = new convert();
$e_sub_cat = 'download';
require_once e_HANDLER . "form_handler.php";
require_once e_HANDLER . "userclass_class.php";
require_once e_HANDLER . "file_class.php";
$fl = new e_file();
示例7: header
<?php
/**
* @file
* Class installations to handle configuration forms on Admin UI.
*/
require_once '../../class2.php';
if (!getperms('P')) {
header('location:' . e_BASE . 'index.php');
exit;
}
// [PLUGINS]/nodejs_comment/languages/[LANGUAGE]/[LANGUAGE]_admin.php
e107::lan('nodejs_comment', true, true);
/**
* Class nodejs_comment_admin.
*/
class nodejs_comment_admin extends e_admin_dispatcher
{
protected $modes = array('main' => array('controller' => 'nodejs_comment_admin_ui', 'path' => null));
protected $adminMenu = array('main/prefs' => array('caption' => LAN_PLUGIN_NODEJS_COMMENT_ADMIN_01, 'perm' => 'P'));
protected $menuTitle = LAN_PLUGIN_NODEJS_COMMENT_NAME;
}
/**
* Class nodejs_comment_admin_ui.
*/
class nodejs_comment_admin_ui extends e_admin_ui
{
protected $pluginTitle = LAN_PLUGIN_NODEJS_COMMENT_NAME;
protected $pluginName = "nodejs_comment";
protected $preftabs = array(LAN_PLUGIN_NODEJS_COMMENT_ADMIN_01);
protected $prefs = array('disable_alerts' => array('title' => LAN_PLUGIN_NODEJS_COMMENT_ADMIN_02, 'type' => 'boolean', 'writeParms' => 'label=yesno', 'data' => 'int', 'tab' => 0), 'disable_sounds' => array('title' => LAN_PLUGIN_NODEJS_COMMENT_ADMIN_03, 'type' => 'boolean', 'writeParms' => 'label=yesno', 'data' => 'int', 'tab' => 0), 'comment_display' => array('title' => LAN_PLUGIN_NODEJS_COMMENT_ADMIN_04, 'type' => 'number', 'data' => 'int', 'tab' => 0));
示例8: header
<?php
/*
* e107 website system
*
* Copyright (C) 2008-2013 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
*/
require_once "../class2.php";
if (!getperms("M")) {
header("location:" . e_BASE . "index.php");
exit;
}
e107::lan('core', 'wmessage', true);
class wmessage_admin extends e_admin_dispatcher
{
protected $modes = array('main' => array('controller' => 'generic_ui', 'path' => null, 'ui' => 'generic_form_ui', 'uipath' => null));
protected $adminMenu = array('main/list' => array('caption' => LAN_MANAGE, 'perm' => 'P'), 'main/create' => array('caption' => LAN_CREATE, 'perm' => 'P'), 'main/prefs' => array('caption' => LAN_PREFS, 'perm' => 'P'));
protected $adminMenuAliases = array('main/edit' => 'main/list');
protected $menuTitle = WMLAN_00;
}
class generic_ui extends e_admin_ui
{
protected $pluginTitle = WMLAN_00;
protected $pluginName = 'core';
protected $eventName = 'wmessage';
protected $table = 'generic';
protected $pid = 'gen_id';
protected $perPage = 10;
示例9: linkclass
$lc = new linkclass();
global $tp;
$linkspage_pref = e107::pref('links_page');
$deltest = array_flip($_POST);
$from = "0";
if (e_QUERY) {
$qs = explode(".", e_QUERY);
// needed to have less regex
$qs = array_filter($qs, 'strlen');
if (is_numeric($qs[0])) {
$from = array_shift($qs);
} else {
$from = "0";
}
}
e107::lan('links_page');
$lc->setPageTitle();
//submit comment
if (isset($_POST['commentsubmit'])) {
if (!$db->select("links_page", "link_id", "link_id = '" . intval($qs[1]) . "' ")) {
header("location:" . e_BASE . "index.php");
exit;
} else {
$row = $db->fetch();
if ($row[0] && (ANON === TRUE || USER === TRUE)) {
$cobj->enter_comment($_POST['author_name'], $_POST['comment'], "links_page", $qs[1], $pid, $_POST['subject']);
$e107cache->clear("comment.links_page.{$qs[1]}");
}
}
}
//update refer
示例10: define
<?php
if (!defined('e107_INIT')) {
exit;
}
/*
* This is a 100% Pure Bootstrap Theme for e107 v2
*/
define("BOOTSTRAP", true);
define("FONTAWESOME", 4);
define("VIEWPORT", "width=device-width, initial-scale=1.0");
define("BODYTAG", '<body data-spy="scroll" data-target=".bs-docs-sidebar" >');
e107::lan('theme');
e107::js('bootstrap', 'bootstrap.min.js');
define("CSSORDER", "theme,core,other,plugin,inline");
// TODO try to avoid needing this. - corrects font-awesome overlap issue.
if (THEME_STYLE != 'style.css') {
switch (THEME_STYLE) {
case 'css/superhero.css':
e107::css('inline', '@media (min-width: 1000px){ body { padding-top: 100px; } } ');
break;
case 'amelia.css':
e107::css('inline', '@media (min-width: 1000px){ body { padding-top: 70px; } } ');
break;
default:
e107::css('inline', '@media (min-width: 1000px){ body { padding-top: 65px; } } ');
break;
}
} else {
e107::css('bootstrap', 'bootstrap.min.css');
e107::css('inline', '@media (min-width: 1000px){ body { padding-top: 75px; }
示例11: __construct
function __construct()
{
e107::lan('banner', 'admin', 'true');
}
示例12: define
*
*/
if (!defined('e107_INIT')) {
require_once '../../class2.php';
}
define('NAVIGATION_ACTIVE', 'forum');
// ??
$e107 = e107::getInstance();
$tp = e107::getParser();
$ns = e107::getRender();
$mes = e107::getMessage();
if (!$e107->isInstalled('forum')) {
header('Location: ' . SITEURL . 'index.php');
exit;
}
e107::lan('forum', 'English_front');
e107::css('forum', 'forum.css');
class forum_post_handler
{
private $forumObj;
private $action;
private $id;
private $data;
function __construct()
{
$this->checkForumJump();
require_once e_PLUGIN . 'forum/forum_class.php';
// includes LAN file.
$forum = new e107forum();
$this->forumObj = $forum;
$this->action = trim($_GET['f']);
示例13: header
/*
* e107 website system
*
* Copyright (C) 2008-2013 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
* File Upload facility - administration
*
*/
require_once '../class2.php';
if (!getperms('V')) {
header('location:' . e_BASE . 'index.php');
exit;
}
e107::lan('core', 'upload', 'admin');
$e_sub_cat = 'upload';
// Generated e107 Plugin Admin Area
class upload_admin extends e_admin_dispatcher
{
protected $modes = array('main' => array('controller' => 'upload_ui', 'path' => null, 'ui' => 'upload_form_ui', 'uipath' => null));
protected $adminMenu = array('main/list' => array('caption' => LAN_MANAGE, 'perm' => 'V'));
protected $adminMenuAliases = array('main/edit' => 'main/list');
protected $menuTitle = 'Upload';
}
class upload_ui extends e_admin_ui
{
protected $pluginTitle = 'Upload';
protected $pluginName = 'core';
protected $table = 'upload';
protected $pid = 'upload_id';
示例14: License
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
| $URL$
| $Revision$
| $Id$
| $Author$
+----------------------------------------------------------------------------+
*/
ini_set('zlib.output_compression', 0);
header('Content-Encoding: none');
// turn off gzip.
ob_implicit_flush(true);
ob_end_flush();
require_once '../class2.php';
e107::lan('core', 'fileinspector', true);
if (!getperms('Y')) {
header('location:' . e_BASE . 'index.php');
exit;
}
$error_handler->debug = FALSE;
require_once e_HANDLER . 'form_handler.php';
$DOCS_DIRECTORY = $HELP_DIRECTORY;
// Give a sensible, albeit probably invalid, value
if (substr($HELP_DIRECTORY, -5, 5) == 'help/') {
$DOCS_DIRECTORY = substr($HELP_DIRECTORY, 0, -5);
// Whatever $HELP_DIRECTORY is set to, assume docs are in a subdirectory called 'help' off it
}
$maindirs = array('admin' => $ADMIN_DIRECTORY, 'files' => $FILES_DIRECTORY, 'images' => $IMAGES_DIRECTORY, 'themes' => $THEMES_DIRECTORY, 'plugins' => $PLUGINS_DIRECTORY, 'handlers' => $HANDLERS_DIRECTORY, 'languages' => $LANGUAGES_DIRECTORY, 'downloads' => $DOWNLOADS_DIRECTORY, 'docs' => $DOCS_DIRECTORY);
foreach ($maindirs as $maindirs_key => $maindirs_value) {
$coredir[$maindirs_key] = substr($maindirs_value, 0, -1);
示例15: array
<?php
/*
* e107 website system
*
* Copyright (C) 2008-2009 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
* Administration Area - Update Admin
*
*
*/
require_once '../class2.php';
// include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_'.e_PAGE);
e107::lan('core', 'updateadmin', true);
$e_sub_cat = 'admin_pass';
require_once e_ADMIN . 'auth.php';
// require_once(e_HANDLER.'user_handler.php'); //use e107::getUserSession() instead.
require_once e_HANDLER . 'validator_class.php';
$userMethods = e107::getUserSession();
$mes = e107::getMessage();
$frm = e107::getForm();
if (isset($_POST['update_settings'])) {
if ($_POST['ac'] == md5(ADMINPWCHANGE)) {
$userData = array();
$userData['data'] = array();
if ($_POST['a_password'] != '' && $_POST['a_password2'] != '' && $_POST['a_password'] == $_POST['a_password2']) {
$userData['data']['user_password'] = $sql->escape($userMethods->HashPassword($_POST['a_password'], $currentUser['user_loginname']), FALSE);
unset($_POST['a_password']);
unset($_POST['a_password2']);