public function __construct() { $this->componentAdminService = BOL_ComponentAdminService::getInstance(); $this->componentEntityService = BOL_ComponentEntityService::getInstance(); $controllersTemplate = OW::getPluginManager()->getPlugin('BASE')->getCtrlViewDir() . 'component_panel.html'; $this->setTemplate($controllersTemplate); }
public function __construct($placeName, array $componentList, $template = 'drag_and_drop_panel') { parent::__construct($placeName, $componentList, $template); $customizeAllowed = BOL_ComponentAdminService::getInstance()->findPlace($placeName)->editableByUser; $this->assign('customizeAllowed', $customizeAllowed); $this->assign('placeName', $placeName); }
public function dashboard($paramList) { $this->setPageHeading(OW::getLanguage()->text('admin', 'admin_dashboard')); $this->setPageHeadingIconClass('ow_ic_dashboard'); $place = BOL_ComponentAdminService::PLASE_ADMIN_DASHBOARD; $customize = !empty($paramList['mode']) && $paramList['mode'] == 'customize'; $service = BOL_ComponentAdminService::getInstance(); $schemeList = $service->findSchemeList(); $state = $service->findCache($place); if (empty($state)) { $state = array(); $state['defaultComponents'] = $service->findPlaceComponentList($place); $state['defaultPositions'] = $service->findAllPositionList($place); $state['defaultSettings'] = $service->findAllSettingList(); $state['defaultScheme'] = (array) $service->findSchemeByPlace($place); $service->saveCache($place, $state); } if (empty($state['defaultScheme']) && !empty($schemeList)) { $state['defaultScheme'] = reset($schemeList); } $componentPanel = new ADMIN_CMP_DashboardWidgetPage($place, $state['defaultComponents'], $customize); $componentPanel->allowCustomize(true); $customizeUrls = array('customize' => OW::getRouter()->urlForRoute('admin_dashboard_customize', array('mode' => 'customize')), 'normal' => OW::getRouter()->urlForRoute('admin_dashboard')); $componentPanel->customizeControlCunfigure($customizeUrls['customize'], $customizeUrls['normal']); $componentPanel->setSchemeList($schemeList); $componentPanel->setPositionList($state['defaultPositions']); $componentPanel->setSettingList($state['defaultSettings']); $componentPanel->setScheme($state['defaultScheme']); $this->addComponent('componentPanel', $componentPanel); }
public function panel() { $componentService = BOL_ComponentAdminService::getInstance(); $this->setPageHeading(OW::getLanguage()->text('groups', 'widgets_panel_heading')); $this->setPageHeadingIconClass('ow_ic_dashboard'); $place = GROUPS_BOL_Service::WIDGET_PANEL_NAME; $dbSettings = $componentService->findAllSettingList(); $dbPositions = $componentService->findAllPositionList($place); $dbComponents = $componentService->findPlaceComponentList($place); $activeScheme = $componentService->findSchemeByPlace($place); $schemeList = $componentService->findSchemeList(); if (empty($activeScheme) && !empty($schemeList)) { $activeScheme = reset($schemeList); } $componentPanel = new ADMIN_CMP_DragAndDropAdminPanel($place, $dbComponents); $componentPanel->setPositionList($dbPositions); $componentPanel->setSettingList($dbSettings); $componentPanel->setSchemeList($schemeList); if (!empty($activeScheme)) { $componentPanel->setScheme($activeScheme); } $menu = $this->getMenu(); $this->addComponent('menu', $menu); $this->assign('componentPanel', $componentPanel->render()); }
public function __construct() { parent::__construct(); $this->service = BOL_ComponentAdminService::getInstance(); $this->fetchFromCache(); OW_ViewRenderer::getInstance()->registerFunction('sb_component', array($this, 'tplComponent')); }
public function __construct($placeName, array $componentList, $template) { parent::__construct($placeName, $componentList, $template); $jsDragAndDropUrl = OW::getPluginManager()->getPlugin('ADMIN')->getStaticJsUrl() . 'drag_and_drop.js'; OW::getDocument()->addScript($jsDragAndDropUrl); $customizeAllowed = BOL_ComponentAdminService::getInstance()->findPlace($placeName); $this->assign('customizeAllowed', $customizeAllowed); }
private function getBoxParmList($groupId) { $settings = GROUPS_CMP_BriefInfoWidget::getStandardSettingValueList(); $defaultSettings = BOL_ComponentAdminService::getInstance()->findSettingList('group-GROUPS_CMP_BriefInfoWidget'); $customSettings = BOL_ComponentEntityService::getInstance()->findSettingList('group-GROUPS_CMP_BriefInfoWidget', $groupId); $out = array_merge($settings, $defaultSettings, $customSettings); $out['type'] = $out['wrap_in_box'] ? '' : 'empty'; return $out; }
/** * @see OW_ActionController::init() * */ public function init() { parent::init(); $this->registerAction('allowCustomize', array($this, 'allowCustomize')); if (!OW::getUser()->isAdmin()) { throw new Redirect404Exception(); } $this->componentService = BOL_ComponentAdminService::getInstance(); }
function grouprss_add_widget(OW_Event $event) { $params = $event->getParams(); if (!isset($params['place']) || !isset($params['section'])) { return; } try { $widgetService = BOL_ComponentAdminService::getInstance(); $widget = $widgetService->addWidget('GROUPRSS_CMP_ManageFeedsWidget', false); $placeWidget = $widgetService->addWidgetToPlace($widget, $params['place']); $widgetService->addWidgetToPosition($placeWidget, $params['section'], 0); } catch (Exception $e) { } }
function pcgallery_before_plugin_deactivate(OW_Event $e) { $params = $e->getParams(); $pluginKey = $params['pluginKey']; if ($pluginKey != 'photo') { return; } $widgetService = BOL_ComponentAdminService::getInstance(); $widget = $widgetService->addWidget('BASE_CMP_UserAvatarWidget', false); $widgetPlace = $widgetService->addWidgetToPlace($widget, BOL_ComponentService::PLACE_PROFILE); try { $widgetService->addWidgetToPosition($widgetPlace, BOL_ComponentService::SECTION_LEFT, 0); } catch (Exception $e) { } }
public function uninstall() { if (isset($_POST['action']) && $_POST['action'] == 'delete_content') { $service = SLIDESHOW_BOL_Service::getInstance(); $list = $service->getAllSlideList(); if ($list) { foreach ($list as $slide) { $service->addSlideToDeleteQueue($slide->id); } } OW::getConfig()->saveConfig('slideshow', 'uninstall_inprogress', 1); BOL_ComponentAdminService::getInstance()->deleteWidget('SLIDESHOW_CMP_SlideshowWidget'); OW::getFeedback()->info(OW::getLanguage()->text('slideshow', 'plugin_set_for_uninstall')); $this->redirect(); } $this->setPageHeading(OW::getLanguage()->text('slideshow', 'page_title_uninstall')); $this->setPageHeadingIconClass('ow_ic_delete'); $this->assign('inprogress', (bool) OW::getConfig()->getValue('slideshow', 'uninstall_inprogress')); $js = new UTIL_JsGenerator(); $js->jQueryEvent('#btn-delete-content', 'click', 'if ( !confirm("' . OW::getLanguage()->text('slideshow', 'confirm_delete_plugin') . '") ) return false;'); OW::getDocument()->addOnloadScript($js); }
<?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. */ OW::getNavigation()->deleteMenuItem('forum', 'forum'); $widget = BOL_ComponentAdminService::getInstance()->deleteWidget('FORUM_CMP_ForumTopicsWidget'); $widget = BOL_ComponentAdminService::getInstance()->deleteWidget('FORUM_CMP_LatestTopicsWidget');
<?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. */ OW::getNavigation()->deleteMenuItem('eventx', 'main_menu_item'); BOL_ComponentAdminService::getInstance()->deleteWidget('EVENTX_CMP_UpcomingEvents'); BOL_ComponentAdminService::getInstance()->deleteWidget('EVENTX_CMP_ProfilePageWidget');
* 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. */ /** * @author Aybat Duyshokov <*****@*****.**> * @package ow_plugins.birthdays * @since 1.0 */ //remove 'birthdays' widget when plugin deactivated BOL_ComponentAdminService::getInstance()->deleteWidget('BIRTHDAYS_CMP_BirthdaysWidget'); //remove 'friends birthdays' widget when plugin deactivated BOL_ComponentAdminService::getInstance()->deleteWidget('BIRTHDAYS_CMP_FriendBirthdaysWidget'); //remove 'My birthday' widget when plugin deactivated BOL_ComponentAdminService::getInstance()->deleteWidget('BIRTHDAYS_CMP_MyBirthdayWidget');
<?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 */ BOL_ComponentAdminService::getInstance()->deleteWidget('SKADATE_CMP_MobileExperience');
protected function reloadComponent($data) { $componentUniqName = $data['componentId']; $renderView = !empty($data['render']); $entity = $data['entity']; $componentPlace = $this->componentService->findComponentPlace($componentUniqName, $entity); $component = $this->componentService->findComponent($componentPlace->componentId); $defaultSettingList = BOL_ComponentAdminService::getInstance()->findSettingList($componentUniqName); $entitySettingList = $this->componentService->findSettingList($componentUniqName, $entity); $viewInstance = new BASE_CMP_DragAndDropItem($componentUniqName, (bool) $componentPlace->clone, 'drag_and_drop_item_customize'); $viewInstance->setSettingList($defaultSettingList, $entitySettingList); $viewInstance->componentParamObject->additionalParamList = $data['additionalSettings']; $viewInstance->componentParamObject->customizeMode = true; $viewInstance->setContentComponentClass($component->className); return $this->getComponentMarkup($viewInstance, $renderView); }
public function view($params) { $groupId = (int) $params['groupId']; if (empty($groupId)) { throw new Redirect404Exception(); } $groupDto = $this->service->findGroupById($groupId); if ($groupDto === null) { throw new Redirect404Exception(); } OW::getDocument()->addMetaInfo('og:title', htmlspecialchars($groupDto->title), 'property'); OW::getDocument()->addMetaInfo('og:description', htmlspecialchars($groupDto->description), 'property'); OW::getDocument()->addMetaInfo('og:url', OW_URL_HOME . OW::getRequest()->getRequestUri(), 'property'); OW::getDocument()->addMetaInfo('og:site_name', OW::getConfig()->getValue('base', 'site_name'), 'property'); $language = OW::getLanguage(); if (!$this->service->isCurrentUserCanView($groupDto->userId)) { $this->assign('permissionMessage', $language->text('groups', 'view_no_permission')); return; } $invite = $this->service->findInvite($groupDto->id, OW::getUser()->getId()); if ($invite !== null) { OW::getRegistry()->set('groups.hide_console_invite_item', true); $this->service->markInviteAsViewed($groupDto->id, OW::getUser()->getId()); } if ($groupDto->whoCanView == GROUPS_BOL_Service::WCV_INVITE && !OW::getUser()->isAuthorized('groups')) { if (!OW::getUser()->isAuthenticated()) { $this->redirect(OW::getRouter()->urlForRoute('groups-private-group', array('groupId' => $groupDto->id))); } $user = $this->service->findUser($groupDto->id, OW::getUser()->getId()); if ($groupDto->whoCanView == GROUPS_BOL_Service::WCV_INVITE && $invite === null && $user === null) { $this->redirect(OW::getRouter()->urlForRoute('groups-private-group', array('groupId' => $groupDto->id))); } } OW::getDocument()->setTitle($language->text('groups', 'view_page_title', array('group_name' => strip_tags($groupDto->title)))); OW::getDocument()->setDescription($language->text('groups', 'view_page_description', array('description' => UTIL_String::truncate(strip_tags($groupDto->description), 200)))); $place = 'group'; $customizeUrls = array('customize' => OW::getRouter()->urlForRoute('groups-customize', array('mode' => 'customize', 'groupId' => $groupId)), 'normal' => OW::getRouter()->urlForRoute('groups-view', array('groupId' => $groupId))); $componentAdminService = BOL_ComponentAdminService::getInstance(); $componentEntityService = BOL_ComponentEntityService::getInstance(); $userCustomizeAllowed = $componentAdminService->findPlace($place)->editableByUser; $ownerMode = $groupDto->userId == OW::getUser()->getId(); $customize = !empty($params['mode']) && $params['mode'] == 'customize'; if (!($userCustomizeAllowed && $ownerMode) && $customize) { $this->redirect($customizeUrls['normal']); } $template = $customize ? 'drag_and_drop_entity_panel_customize' : 'drag_and_drop_entity_panel'; $schemeList = $componentAdminService->findSchemeList(); $defaultScheme = $componentAdminService->findSchemeByPlace($place); if (empty($defaultScheme) && !empty($schemeList)) { $defaultScheme = reset($schemeList); } if (!$componentAdminService->isCacheExists($place)) { $state = array(); $state['defaultComponents'] = $componentAdminService->findPlaceComponentList($place); $state['defaultPositions'] = $componentAdminService->findAllPositionList($place); $state['defaultSettings'] = $componentAdminService->findAllSettingList(); $state['defaultScheme'] = $defaultScheme; $componentAdminService->saveCache($place, $state); } $state = $componentAdminService->findCache($place); $defaultComponents = $state['defaultComponents']; $defaultPositions = $state['defaultPositions']; $defaultSettings = $state['defaultSettings']; $defaultScheme = $state['defaultScheme']; if ($userCustomizeAllowed) { if (!$componentEntityService->isEntityCacheExists($place, $groupId)) { $entityCache = array(); $entityCache['entityComponents'] = $componentEntityService->findPlaceComponentList($place, $groupId); $entityCache['entitySettings'] = $componentEntityService->findAllSettingList($groupId); $entityCache['entityPositions'] = $componentEntityService->findAllPositionList($place, $groupId); $componentEntityService->saveEntityCache($place, $groupId, $entityCache); } $entityCache = $componentEntityService->findEntityCache($place, $groupId); $entityComponents = $entityCache['entityComponents']; $entitySettings = $entityCache['entitySettings']; $entityPositions = $entityCache['entityPositions']; } else { $entityComponents = array(); $entitySettings = array(); $entityPositions = array(); } $componentPanel = new BASE_CMP_DragAndDropEntityPanel($place, $groupId, $defaultComponents, $customize, $template); $componentPanel->setAdditionalSettingList(array('entityId' => $groupId, 'entity' => 'groups')); if ($ownerMode) { $componentPanel->allowCustomize($userCustomizeAllowed); $componentPanel->customizeControlCunfigure($customizeUrls['customize'], $customizeUrls['normal']); } $componentPanel->setSchemeList($schemeList); $componentPanel->setPositionList($defaultPositions); $componentPanel->setSettingList($defaultSettings); $componentPanel->setScheme($defaultScheme); /* * This feature was disabled for users * if ( !empty($userScheme) ) { $componentPanel->setUserScheme($userScheme); } */ if (!empty($entityComponents)) { $componentPanel->setEntityComponentList($entityComponents); } if (!empty($entityPositions)) { $componentPanel->setEntityPositionList($entityPositions); } if (!empty($entitySettings)) { $componentPanel->setEntitySettingList($entitySettings); } $this->assign('componentPanel', $componentPanel->render()); }
<?php /** * Copyright (c) 2013, Oxwall CandyStore * 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 */ /** * /deactivate.php * * @author Oxwall CandyStore <*****@*****.**> * @package ow.ow_plugins.ocs_favorites * @since 1.5.3 */ BOL_ComponentAdminService::getInstance()->deleteWidget('OCSFAVORITES_CMP_MyFavoritesWidget'); BOL_ComponentAdminService::getInstance()->deleteWidget('OCSFAVORITES_CMP_IndexWidget'); OW::getNavigation()->deleteMenuItem('ocsfavorites', 'favorites');
public function onEntityDelete($place, $entityId) { $placeId = $this->findPlaceId($place); $adminCmps = BOL_ComponentAdminService::getInstance()->findPlaceComponentList($place); $entityCmps = $this->findPlaceComponentList($place, $entityId); $placeComponents = array_merge($adminCmps, $entityCmps); $uniqNames = array(); foreach ($placeComponents as $uniqName => $item) { $uniqNames[] = $uniqName; } $this->componentPositionDao->deleteByUniqNameList($entityId, $uniqNames); $this->componentSettingDao->deleteByUniqNameList($entityId, $uniqNames); $this->componentPlaceDao->deleteList($placeId, $entityId); $this->componentPlaceCacheDao->deleteCache($placeId, $entityId); }
/** * 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. */ OW::getNavigation()->deleteMenuItem('photo', 'photo'); OW::getNavigation()->deleteMenuItem('photo', 'mobile_photo'); BOL_ComponentAdminService::getInstance()->deleteWidget('PHOTO_CMP_PhotoListWidget'); BOL_ComponentAdminService::getInstance()->deleteWidget('PHOTO_CMP_UserPhotoAlbumsWidget');
<?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. */ OW::getNavigation()->deleteMenuItem('video', 'video'); BOL_ComponentAdminService::getInstance()->deleteWidget('VIDEO_CMP_VideoListWidget'); BOL_ComponentAdminService::getInstance()->deleteWidget('VIDEO_CMP_UserVideoListWidget');
* 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. */ $widget = array(); //-- $widget['user'] = BOL_ComponentAdminService::getInstance()->addWidget('BLOGS_CMP_UserBlogWidget', false); $placeWidget = BOL_ComponentAdminService::getInstance()->addWidgetToPlace($widget['user'], BOL_ComponentAdminService::PLACE_PROFILE); BOL_ComponentAdminService::getInstance()->addWidgetToPosition($placeWidget, BOL_ComponentAdminService::SECTION_LEFT); //-- $widget['site'] = BOL_ComponentAdminService::getInstance()->addWidget('BLOGS_CMP_BlogWidget', false); $placeWidget = BOL_ComponentAdminService::getInstance()->addWidgetToPlace($widget['site'], BOL_ComponentAdminService::PLACE_INDEX); BOL_ComponentAdminService::getInstance()->addWidgetToPosition($placeWidget, BOL_ComponentAdminService::SECTION_LEFT); OW::getNavigation()->addMenuItem(OW_Navigation::MAIN, 'blogs', 'blogs', 'main_menu_item', OW_Navigation::VISIBLE_FOR_ALL); require_once dirname(__FILE__) . DS . 'classes' . DS . 'credits.php'; $credits = new BLOGS_CLASS_Credits(); $credits->triggerCreditActionsAdd();
public function shortDeactivate() { $widgetService = BOL_ComponentAdminService::getInstance(); $widgetService->deleteWidget('GHEADER_CMP_HeaderWidget'); }
public function deleteWidget(OW_Event $event) { BOL_ComponentAdminService::getInstance()->deleteWidget('FORUM_CMP_LatestTopicsWidget'); }
<?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. */ BOL_ComponentAdminService::getInstance()->deleteWidget('GROUPRSS_CMP_ManageFeedsWidget');
<?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 */ BOL_ComponentAdminService::getInstance()->deleteWidget('MATCHMAKING_CMP_CompatibilityWidget'); BOL_ComponentAdminService::getInstance()->deleteWidget('MATCHMAKING_CMP_MatchesWidget'); OW::getNavigation()->deleteMenuItem('matchmaking', 'matches_index'); $dbPrefix = OW_DB_PREFIX; $sql = "UPDATE `{$dbPrefix}base_question_section` SET `isHidden`=1 WHERE `name`='about_my_match'"; OW::getDbo()->query($sql); BOL_LanguageService::getInstance()->deletePrefix(363);
public static function getStandardSettingValueList() { $settings = BOL_ComponentAdminService::getInstance()->findSettingList(self::UNIQ_NAME); $list = empty($settings['list']) ? 'latest' : $settings['list']; $title = OW::getLanguage()->text('ucarousel', 'widget_list_type_' . $list); return array(self::SETTING_TITLE => $title, self::SETTING_ICON => self::ICON_USER, self::SETTING_SHOW_TITLE => false); }
public function installWidget(OW_Event $e) { $params = $e->getParams(); $widgetService = BOL_ComponentAdminService::getInstance(); try { $widget = $widgetService->addWidget('NEWSFEED_CMP_EntityFeedWidget', false); $widgetPlace = $widgetService->addWidgetToPlace($widget, $params['place']); $widgetService->addWidgetToPosition($widgetPlace, $params['section'], $params['order']); } catch (Exception $event) { $e->setData(false); } $e->setData($widgetPlace->uniqName); }
<?php /** * Copyright (c) 2012, Sergey Kambalin * 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 */ require_once dirname(__FILE__) . DS . 'classes' . DS . 'groups_bridge.php'; $widgetService = BOL_ComponentAdminService::getInstance(); $widget = $widgetService->addWidget('UCAROUSEL_CMP_UsersWidget', false); $widgetPlace = $widgetService->addWidgetToPlace($widget, BOL_ComponentService::PLACE_INDEX); $widgetService->addWidgetToPosition($widgetPlace, BOL_ComponentService::SECTION_TOP, 0); $widgetService->addWidgetToPlace($widget, BOL_ComponentService::PLACE_DASHBOARD); UCAROUSEL_CLASS_GroupsBridge::getInstance()->addWidget('UCAROUSEL_CMP_GroupUsersWidget');
* 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. */ $widgetService = BOL_ComponentAdminService::getInstance(); try { $widgets = $widgetService->findPlaceComponentList(GROUPS_BOL_Service::WIDGET_PANEL_NAME); foreach ($widgets as $widget) { $widgetService->deleteWidgetPlace($widget['uniqName']); } } catch (Exception $e) { } BOL_ComponentAdminService::getInstance()->deleteWidget('GROUPS_CMP_JoinButtonWidget'); BOL_ComponentAdminService::getInstance()->deleteWidget('GROUPS_CMP_BriefInfoWidget'); BOL_ComponentAdminService::getInstance()->deleteWidget('GROUPS_CMP_UserListWidget'); BOL_ComponentAdminService::getInstance()->deleteWidget('GROUPS_CMP_WallWidget'); BOL_ComponentAdminService::getInstance()->deleteWidget('GROUPS_CMP_LeaveButtonWidget'); if (OW::getConfig()->getValue('groups', 'is_forum_connected')) { $event = new OW_Event('forum.delete_section', array('entity' => 'groups')); OW::getEventManager()->trigger($event); $event = new OW_Event('forum.delete_widget'); OW::getEventManager()->trigger($event); } $dbPrefix = OW_DB_PREFIX; $sql = <<<EOT DELETE FROM `{$dbPrefix}base_place` WHERE `name`='group'; EOT; OW::getDbo()->query($sql);