當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。