本文整理汇总了PHP中Updater::getWidgetService方法的典型用法代码示例。如果您正苦于以下问题:PHP Updater::getWidgetService方法的具体用法?PHP Updater::getWidgetService怎么用?PHP Updater::getWidgetService使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Updater
的用法示例。
在下文中一共展示了Updater::getWidgetService方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: catch
<?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
*/
$widgetService = Updater::getWidgetService();
try {
$widget = $widgetService->addWidget('MEMBERSHIP_CMP_PromoWidget', false);
$placeWidget = $widgetService->addWidgetToPlace($widget, BOL_ComponentService::PLACE_INDEX);
$widgetService->addWidgetToPosition($placeWidget, BOL_ComponentService::SECTION_SIDEBAR);
} catch (Exception $e) {
}
try {
$sql = "ALTER TABLE `" . OW_DB_PREFIX . "membership_type` ADD `accountTypeId` INT NULL DEFAULT NULL,\n ADD INDEX ( `accountTypeId` )";
Updater::getDbo()->query($sql);
} catch (Exception $e) {
}
try {
$sql = "CREATE TABLE IF NOT EXISTS `" . OW_DB_PREFIX . "membership_user_trial` (\n `id` int(11) NOT NULL AUTO_INCREMENT,\n `planId` int(11) NOT NULL,\n `userId` int(11) NOT NULL,\n `startStamp` int(11) NOT NULL,\n `expirationStamp` int(11) DEFAULT NULL,\n PRIMARY KEY (`id`),\n KEY `userId` (`userId`)\n ) ENGINE=MyISAM DEFAULT CHARSET=utf8;";
Updater::getDbo()->query($sql);
} catch (Exception $e) {
}
try {
$sql = "ALTER TABLE `" . OW_DB_PREFIX . "membership_user` ADD `trial` TINYINT( 1 ) NULL DEFAULT '0'";
Updater::getDbo()->query($sql);
} catch (Exception $e) {
}
示例2: catch
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
try {
$sql = " ALTER TABLE `" . OW_DB_PREFIX . "mailbox_conversation` ADD `viewed` TINYINT NOT NULL DEFAULT '0' ";
Updater::getDbo()->query($sql);
} catch (Exception $ex) {
//printVar($ex);
}
try {
$sql = " ALTER TABLE `" . OW_DB_PREFIX . "mailbox_conversation` ADD `notificationSent` TINYINT NOT NULL DEFAULT '0' ";
Updater::getDbo()->query($sql);
} catch (Exception $ex) {
//printVar($ex);
}
try {
$sql = " UPDATE `" . OW_DB_PREFIX . "mailbox_conversation` SET `viewed` = 3 WHERE 1 ";
Updater::getDbo()->query($sql);
} catch (Exception $ex) {
//printVar($ex);
}
try {
$sql = " UPDATE `" . OW_DB_PREFIX . "mailbox_conversation` SET `notificationSent` = 1 WHERE 1 ";
Updater::getDbo()->query($sql);
} catch (Exception $ex) {
//printVar($ex);
}
Updater::getWidgetService()->deleteWidget('MAILBOX_CMP_NewMessageNoteWidget');
@unlink(OW_DIR_STATIC_PLUGIN . $moduleName . DS . 'js' . DS . 'mailbox.js');
@copy(OW_DIR_PLUGIN . $moduleName . DS . 'static' . DS . 'js' . DS . 'mailbox.js', OW_DIR_STATIC_PLUGIN . $moduleName . DS . 'js' . DS . 'mailbox.js');
@copy(OW_DIR_PLUGIN . $moduleName . DS . 'static' . DS . 'js' . DS . 'mailbox_console.js', OW_DIR_STATIC_PLUGIN . $moduleName . DS . 'js' . DS . 'mailbox_console.js');
Updater::getLanguageService()->importPrefixFromZip(dirname(__FILE__) . DS . 'langs.zip', 'mailbox');
示例3: catch
* 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.
*/
try {
Updater::getWidgetService()->deleteWidgetPlace('dashboard-BLOGS_CMP_MyBlogWidget');
} catch (Exception $e) {
}
$exArr = array();
try {
$dbPrefix = OW_DB_PREFIX;
$sql = "UPDATE `" . $dbPrefix . "base_flag` SET `langKey` = 'blogs+flags' WHERE `type`='blog_post' ";
Updater::getDbo()->query($sql);
} catch (Exception $e) {
$exArr[] = $e;
}
Updater::getLanguageService()->importPrefixFromZip(dirname(__FILE__) . DS . 'langs.zip', 'blogs');
示例4:
<?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) 2009, Skalfa LLC
* 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', 'friends');
Updater::getWidgetService()->deleteWidget('FRIENDS_CMP_Widget');
示例5:
<?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::getWidgetService()->deleteWidget('EVENT_CMP_MyEvents');
Updater::getLanguageService()->importPrefixFromZip(dirname(__FILE__) . DS . 'langs.zip', 'event');