本文整理汇总了PHP中Updater::getLanguageService方法的典型用法代码示例。如果您正苦于以下问题:PHP Updater::getLanguageService方法的具体用法?PHP Updater::getLanguageService怎么用?PHP Updater::getLanguageService使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Updater
的用法示例。
在下文中一共展示了Updater::getLanguageService方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: catch
<?php
/**
* Copyright (c) 2014, Skalfa LLC
* All rights reserved.
*
* ATTENTION: This commercial software is intended for exclusive use with SkaDate Dating Software (http://www.skadate.com) and is licensed under SkaDate Exclusive License by Skalfa LLC.
*
* Full text of this license can be found at http://www.skadate.com/sel.pdf
*/
if (OW::getPluginManager()->isPluginActive('skadateios') || OW::getPluginManager()->isPluginActive('skandroid')) {
$widgetService = Updater::getWidgetService();
$widget = $widgetService->addWidget('SKADATE_CMP_MobileExperience', false);
try {
$placeWidget = $widgetService->addWidgetToPlace($widget, BOL_ComponentAdminService::PLACE_INDEX);
$widgetService->addWidgetToPosition($placeWidget, BOL_ComponentService::SECTION_RIGHT);
} catch (Exception $e) {
Updater::getLogger()->addEntry(json_encode($e));
}
try {
$placeWidget = $widgetService->addWidgetToPlace($widget, BOL_ComponentAdminService::PLACE_DASHBOARD);
$widgetService->addWidgetToPosition($placeWidget, BOL_ComponentService::SECTION_RIGHT);
} catch (Exception $e) {
Updater::getLogger()->addEntry(json_encode($e));
}
}
Updater::getLanguageService()->importPrefixFromZip(__DIR__ . DS . 'langs.zip', 'skadate');
示例2: ENUM
$sql = "ALTER TABLE `" . OW_DB_PREFIX . "googlelocation_data` ADD `entityType` ENUM( 'user', 'event' ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL AFTER `entityId` ";
Updater::getDbo()->query($sql);
} catch (Exception $e) {
}
try {
$sql = "UPDATE `" . OW_DB_PREFIX . "googlelocation_data` SET `entityType` = 'user' ";
Updater::getDbo()->query($sql);
} catch (Exception $e) {
}
try {
$sql = "ALTER TABLE `" . OW_DB_PREFIX . "googlelocation_data` DROP INDEX `entityId` ";
Updater::getDbo()->query($sql);
} catch (Exception $e) {
}
try {
$sql = "ALTER IGNORE TABLE `" . OW_DB_PREFIX . "googlelocation_data` ADD INDEX `entityId` ( `entityId` , `entityType` ) ";
Updater::getDbo()->query($sql);
} catch (Exception $e) {
}
try {
$sql = " DELETE FROM g `" . OW_DB_PREFIX . "googlelocation_data` g\n LEFT JOIN `" . OW_DB_PREFIX . "base_user` u ON u.id = g.entityId\n WHERE g.entityType = 'user' AND u.id IS NULL ";
Updater::getDbo()->query($sql);
} catch (Exception $e) {
}
try {
$sql = " ALTER TABLE `" . OW_DB_PREFIX . "googlelocation_data` CHANGE `json` `json` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ";
Updater::getDbo()->query($sql);
} catch (Exception $e) {
}
Updater::getLanguageService()->importPrefixFromZip(dirname(__FILE__) . DS . 'langs.zip', 'googlelocation');
示例3: dirname
<?php
/**
* This software is intended for use with Oxwall Free Community Software http://www.oxwall.org/ and is
* licensed under The BSD license.
* ---
* Copyright (c) 2011, Oxwall Foundation
* All rights reserved.
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
* following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice, this list of conditions and
* the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
* the following disclaimer in the documentation and/or other materials provided with the distribution.
*
* - Neither the name of the Oxwall Foundation nor the names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
$updateDir = dirname(__FILE__) . DS;
Updater::getLanguageService()->importPrefixFromZip($updateDir . 'langs.zip', 'groups');
OW::getAuthorization()->addAction('groups', 'view', true);
示例4: array
/**
* EXHIBIT A. Common Public Attribution License Version 1.0
* The contents of this file are subject to the Common Public Attribution License Version 1.0 (the “License”);
* you may not use this file except in compliance with the License. You may obtain a copy of the License at
* http://www.oxwall.org/license. The License is based on the Mozilla Public License Version 1.1
* but Sections 14 and 15 have been added to cover use of software over a computer network and provide for
* limited attribution for the Original Developer. In addition, Exhibit A has been modified to be consistent
* with Exhibit B. Software distributed under the License is distributed on an “AS IS” basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language
* governing rights and limitations under the License. The Original Code is Oxwall software.
* The Initial Developer of the Original Code is Oxwall Foundation (http://www.oxwall.org/foundation).
* All portions of the code written by Oxwall Foundation are Copyright (c) 2011. All Rights Reserved.
* EXHIBIT B. Attribution Information
* Attribution Copyright Notice: Copyright 2011 Oxwall Foundation. All rights reserved.
* Attribution Phrase (not exceeding 10 words): Powered by Oxwall community software
* Attribution URL: http://www.oxwall.org/
* Graphic Image as provided in the Covered Code.
* Display of Attribution Information is required in Larger Works which are defined in the CPAL as a work
* which combines Covered Code or portions thereof with code not governed by the terms of the CPAL.
*/
$queryList = array("ALTER TABLE `" . OW_DB_PREFIX . "base_plugin` ADD `licenseCheckTimestamp` INT UNSIGNED NULL DEFAULT NULL AFTER `licenseKey`, ADD INDEX `licenseCheckTimestamp` (`licenseCheckTimestamp`)", "ALTER TABLE `" . OW_DB_PREFIX . "base_theme` ADD `licenseCheckTimestamp` INT UNSIGNED NULL DEFAULT NULL AFTER `sidebarPosition`, ADD INDEX `licenseCheckTimestamp` (`licenseCheckTimestamp`)", "ALTER TABLE `" . OW_DB_PREFIX . "base_theme` CHANGE `name` `key` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL", "ALTER TABLE `" . OW_DB_PREFIX . "base_theme` DROP `isActive`");
foreach ($queryList as $query) {
try {
Updater::getDbo()->query($query);
} catch (Exception $e) {
Updater::getLogger()->addEntry(json_encode($e));
}
}
Updater::getLanguageService()->importPrefixFromZip(dirname(__FILE__) . DS . "langs.zip", "admin");
示例5: dirname
<?php
/**
* This software is intended for use with Oxwall Free Community Software http://www.oxwall.org/ and is
* licensed under The BSD license.
* ---
* Copyright (c) 2011, Oxwall Foundation
* All rights reserved.
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
* following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice, this list of conditions and
* the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
* the following disclaimer in the documentation and/or other materials provided with the distribution.
*
* - Neither the name of the Oxwall Foundation nor the names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
$updateDir = dirname(__FILE__) . DS;
Updater::getLanguageService()->importPrefixFromZip($updateDir . 'langs.zip', 'virtualgifts');
示例6:
<?php
Updater::getLanguageService()->importPrefixFromZip(dirname(__FILE__) . DS . 'langs.zip', 'billingpayeer');
示例7: int
<?php
// update languges
Updater::getLanguageService()->importPrefixFromZip(dirname(__FILE__) . DS . 'langs.zip', 'yncontactimporter');
//Update database
$dbPrefix = OW_DB_PREFIX;
$sql = <<<EOT
CREATE TABLE IF NOT EXISTS `{$dbPrefix}yncontactimporter_invitation` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`userId` int(11) NOT NULL,
`type` enum('email','social') NOT NULL,
`provider` varchar(64) NOT NULL,
`friendId` varchar(64) NOT NULL,
`email` varchar(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT 'email or name',
`message` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`isUsed` tinyint(1) NOT NULL DEFAULT '0',
`sentTime` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
CREATE TABLE IF NOT EXISTS `{$dbPrefix}yncontactimporter_joined` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`userId` int(11) NOT NULL,
`inviterId` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
CREATE TABLE IF NOT EXISTS `{$dbPrefix}yncontactimporter_statistic` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`userId` int(11) NOT NULL,
`totalSent` int(11) NOT NULL DEFAULT '0',
示例8: array
<?php
$db = Updater::getDbo();
$logger = Updater::getLogger();
$tblPrefix = OW_DB_PREFIX;
$queryList = array("ALTER TABLE `{$tblPrefix}base_billing_gateway` ADD `hidden` TINYINT(1) NOT NULL DEFAULT '0' AFTER `dynamic`;", "ALTER TABLE `{$tblPrefix}base_attachment` CHANGE `bundle` `bundle` VARCHAR( 128 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ", "ALTER TABLE `{$tblPrefix}base_attachment` CHANGE `bundle` `bundle` VARCHAR( 128 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ", "ALTER TABLE `{$tblPrefix}base_attachment` CHANGE `origFileName` `origFileName` VARCHAR( 100 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ", "ALTER TABLE `{$tblPrefix}base_attachment` CHANGE `pluginKey` `pluginKey` VARCHAR( 100 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ", "ALTER TABLE `{$tblPrefix}base_question_to_account_type` CHANGE `accountType` `accountType` VARCHAR( 32 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ", "ALTER TABLE `{$tblPrefix}base_question_to_account_type` CHANGE `questionName` `questionName` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ", "ALTER TABLE `{$tblPrefix}base_billing_sale` ADD INDEX (`entityKey`) ", "ALTER TABLE `{$tblPrefix}base_billing_sale` ADD INDEX (`entityId`) ", "ALTER TABLE `{$tblPrefix}base_billing_sale` ADD INDEX (`userId`) ", "ALTER TABLE `{$tblPrefix}base_billing_sale` ADD INDEX (`status`) ");
foreach ($queryList as $query) {
try {
$db->query($query);
} catch (Exception $e) {
$logger->addEntry(json_encode($e));
}
}
try {
Updater::getLanguageService()->deleteLangKey('admin', 'pages_page_field_content_desc');
} catch (Exception $e) {
$logger->addEntry(json_encode($e));
}
UPDATE_LanguageService::getInstance()->importPrefixFromZip(dirname(__FILE__) . DS . 'langs.zip', 'base');
示例9: dirname
<?php
/**
* Copyright (c) 2009, Skalfa LLC
* All rights reserved.
* ATTENTION: This commercial software is intended for use with Oxwall Free Community Software http://www.oxwall.org/
* and is licensed under Oxwall Store Commercial License.
* Full text of this license can be found at http://www.oxwall.org/store/oscl
*/
$updateDir = dirname(__FILE__) . DS;
Updater::getLanguageService()->importPrefixFromZip($updateDir . 'langs.zip', 'usercredits');
示例10: int
<?php
// update languges
Updater::getLanguageService()->importPrefixFromZip(dirname(__FILE__) . DS . 'langs.zip', 'ynsocialconnect');
//Update config
Updater::getConfigService()->addConfig('ynsocialconnect', 'signup_mode', '0');
//Update database
$dbPrefix = OW_DB_PREFIX;
$sql = <<<EOT
DELETE FROM `{$dbPrefix}ynsocialconnect_services` WHERE `{$dbPrefix}ynsocialconnect_services`.`name` = 'myspace';
EOT;
Updater::getDbo()->query($sql);
$sql = <<<EOT
CREATE TABLE IF NOT EXISTS `{$dbPrefix}ynsocialconnect_options` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`service` varchar(128) NOT NULL,
`name` varchar(128) NOT NULL,
`label` varchar(128) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `service_name` (`service`,`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT IGNORE INTO `{$dbPrefix}ynsocialconnect_options` (`id`, `service`, `name`, `label`) VALUES
(1, 'yahoo', 'email', 'Email'),
(2, 'yahoo', 'full_name', 'Full Name'),
(3, 'yahoo', 'FirstName', 'First Name'),
(4, 'yahoo', 'LastName', 'Last Name'),
(5, 'yahoo', 'gender', 'Gender'),
(6, 'google', 'full_name', 'Full Name'),
(7, 'google', 'email', 'Email'),
示例11: dirname
<?php
/**
* Copyright (c) 2011, Oxwall CandyStore
* All rights reserved.
* This software is intended for use with Oxwall Free Community Software http://www.oxwall.org/ and is
* licensed under The BSD license.
*/
/**
* /init.php
*
* @author Oxwall CandyStore <plugins@oxcandystore.com>
* @package ow.ow_plugins.ocs_topusers
* @since 1.2.6
*/
$updateDir = dirname(__FILE__) . DS;
Updater::getLanguageService()->importPrefixFromZip($updateDir . 'langs.zip', 'ocstopusers');
示例12:
<?php
/**
* This software is intended for use with Oxwall Free Community Software http://www.oxwall.org/ and is
* licensed under The BSD license.
* ---
* Copyright (c) 2011, Oxwall Foundation
* All rights reserved.
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
* following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice, this list of conditions and
* the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
* the following disclaimer in the documentation and/or other materials provided with the distribution.
*
* - Neither the name of the Oxwall Foundation nor the names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
Updater::getLanguageService()->importPrefixFromZip(dirname(__FILE__) . DS . 'langs.zip', 'virtualgifts');
示例13:
<?php
/**
* Copyright (c) 2014, Skalfa LLC
* All rights reserved.
*
* ATTENTION: This commercial software is intended for exclusive use with SkaDate Dating Software (http://www.skadate.com) and is licensed under SkaDate Exclusive License by Skalfa LLC.
*
* Full text of this license can be found at http://www.skadate.com/sel.pdf
*/
Updater::getLanguageService()->importPrefixFromZip(dirname(dirname(dirname(__FILE__))) . DS . 'langs.zip', 'hotlist');
示例14: varchar
<?php
/**
* This software is intended for use with Oxwall Free Community Software http://www.oxwall.org/ and is a proprietary licensed product.
* For more information see License.txt in the plugin folder.
* ---
* Copyright (c) 2012, Purusothaman Ramanujam
* All rights reserved.
* Redistribution and use in source and binary forms, with or without modification, are not permitted provided.
* This plugin should be bought from the developer by paying money to PayPal account (purushoth.r@gmail.com).
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
Updater::getLanguageService()->importPrefixFromZip(OW::getPluginManager()->getPlugin('ivideo')->getRootDir() . 'langs.zip', 'ivideo');
$ivideo = OW::getPluginManager()->getPlugin('ivideo');
$staticDir = OW_DIR_STATIC_PLUGIN . $ivideo->getModuleName() . DS;
UTIL_File::removeDir($staticDir);
UTIL_File::copyDir($ivideo->getStaticDir(), $staticDir);
if (!OW::getConfig()->configExists('ivideo', 'ffmpegPath')) {
OW::getConfig()->addConfig('ivideo', 'ffmpegPath', '', '');
}
//Updater::getConfigService()->saveConfig('ivideo', 'allowedExtensions', 'mp4,flv,avi,wmv,swf,mov,mpg,3g2,ram');
OW::getDbo()->query("alter table " . OW_DB_PREFIX . "ivideo_videos add column privacy varchar(50) NOT NULL default 'everybody'");
示例15: VARCHAR
* use this file except in compliance with the License. You may obtain a copy
* of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/
try {
$sql = "SHOW COLUMNS FROM `" . OW_DB_PREFIX . "video_clip` LIKE 'plugin';";
$cols = Updater::getDbo()->queryForList($sql);
if (!count($cols)) {
$sql = "ALTER TABLE `" . OW_DB_PREFIX . "video_clip` ADD `plugin` VARCHAR(255) NULL DEFAULT 'video' ; ";
Updater::getDbo()->queryForList($sql);
}
} catch (Exception $e) {
}
@Updater::getLanguageService()->importPrefixFromZip(dirname(dirname(dirname(__FILE__))) . DS . 'langs.zip', 'spvideolite');
// refresh static cache
$plugin = OW::getPluginManager()->getPlugin('spvideolite');
$staticDir = OW_DIR_STATIC_PLUGIN . $plugin->getModuleName() . DS;
$pluginStaticDir = OW_DIR_PLUGIN . $plugin->getModuleName() . DS . 'static' . DS;
if (file_exists($staticDir)) {
UTIL_File::removeDir($staticDir);
}
mkdir($staticDir);
chmod($staticDir, 0777);
UTIL_File::copyDir($pluginStaticDir, $staticDir);