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


PHP Updater::getWidgetService方法代码示例

本文整理汇总了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) {
}
开发者ID:hardikamutech,项目名称:loov,代码行数:31,代码来源:update.php

示例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');
开发者ID:vazahat,项目名称:dudex,代码行数:31,代码来源:update.php

示例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');
开发者ID:vazahat,项目名称:dudex,代码行数:31,代码来源:update.php

示例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');
开发者ID:vazahat,项目名称:dudex,代码行数:29,代码来源:update.php

示例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');
开发者ID:vazahat,项目名称:dudex,代码行数:29,代码来源:update.php


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