public function getMenu() { $items = array(); $item = new BASE_MenuItem(); $item->setLabel(OW::getLanguage()->text('admin', 'edit_language')); $item->setIconClass('ow_ic_edit'); $item->setKey('edit_lang'); if ($this->isDevMode()) { $item->setUrl(OW::getRouter()->urlForRoute('admin_developer_tools_language')); } else { $item->setUrl(OW::getRouter()->urlForRoute('admin_languages_index')); } $item->setOrder(1); $items[] = $item; $item = new BASE_MenuItem(); $item->setLabel(OW::getLanguage()->text('admin', 'available_languages')); $item->setIconClass('ow_ic_files'); $item->setKey('avail_lang'); if ($this->isDevMode()) { $item->setUrl(OW::getRouter()->urlForRoute('admin_developer_tools_language_mod')); } else { $item->setUrl(OW::getRouter()->urlFor('ADMIN_CTRL_Languages', 'mod')); } $item->setOrder(2); $items[] = $item; return new BASE_CMP_ContentMenu($items); }
private function getMenu() { $language = OW::getLanguage(); $menuItems = array(); $item = new BASE_MenuItem(); $item->setLabel($language->text('admin', 'menu_item_basics')); $item->setUrl(OW::getRouter()->urlForRoute('admin_settings_main')); $item->setKey('basics'); $item->setIconClass('ow_ic_gear_wheel'); $item->setOrder(0); $menuItems[] = $item; $item = new BASE_MenuItem(); $item->setLabel($language->text('admin', 'menu_item_page_settings')); $item->setUrl(OW::getRouter()->urlForRoute('admin_settings_page')); $item->setKey('page'); $item->setIconClass('ow_ic_file'); $item->setOrder(1); $menuItems[] = $item; if (!defined('OW_PLUGIN_XP')) { $item = new BASE_MenuItem(); $item->setLabel($language->text('admin', 'menu_item_mail_settings')); $item->setUrl(OW::getRouter()->urlForRoute('admin_settings_mail')); $item->setKey('mail'); $item->setIconClass('ow_ic_mail'); $item->setOrder(2); $menuItems[] = $item; } return new BASE_CMP_ContentMenu($menuItems); }
public function __construct() { parent::__construct(); if (OW::getRequest()->isAjax()) { return; } $language = OW::getLanguage(); $menu = new BASE_CMP_ContentMenu(); $menuItem = new BASE_MenuItem(); $menuItem->setKey('admin-index'); $menuItem->setLabel($language->text('advancedphoto', 'admin_tab_general_title')); $menuItem->setUrl(OW::getRouter()->urlForRoute('advancedphoto_admin_config')); $menuItem->setIconClass('ow_ic_files'); $menuItem->setOrder(1); $menu->addElement($menuItem); $menuItem = new BASE_MenuItem(); $menuItem->setKey('categories'); $menuItem->setLabel($language->text('advancedphoto', 'admin_category_tab_title')); $menuItem->setUrl(OW::getRouter()->urlForRoute('advancedphoto_categories')); $menuItem->setIconClass('ow_ic_gear_wheel'); $menuItem->setOrder(2); $menu->addElement($menuItem); $this->addComponent('menu', $menu); $this->menu = $menu; $this->setPageHeading(OW::getLanguage()->text('advancedphoto', 'admin_settings_title')); $this->setPageTitle(OW::getLanguage()->text('advancedphoto', 'admin_settings_title')); $this->setPageHeadingIconClass('ow_ic_gear_wheel'); }
/** * Returns menu component * * @return BASE_CMP_ContentMenu */ private function getMenu() { $language = OW::getLanguage(); $validLists = array('photo', 'album', 'tagged'); $classes = array('', '', 'ow_ic_tag'); $urls = array(OW::getRouter()->urlForRoute('photo_list_index'), OW::getRouter()->urlForRoute('photo_list_albums'), ''); $titles = array($language->text('advancedphoto', 'photos'), $language->text('advancedphoto', 'albums'), $language->text('photo', 'menu_tagged')); if ($user = OW::getUser()->getUserObject()) { $validLists[3] = "myalbum"; $classes[3] = ""; $urls[3] = OW::getRouter()->urlForRoute('photo_user_albums', array('user' => $user->username)); $titles[3] = $language->text('advancedphoto', 'my_albums'); } $checkPrivacy = PHOTO_BOL_PhotoService::getInstance()->countPhotos('featured'); if (!PHOTO_BOL_PhotoService::getInstance()->countPhotos('featured', $checkPrivacy)) { array_shift($validLists); array_shift($classes); } $menuItems = array(); $order = 0; foreach ($validLists as $type) { $item = new BASE_MenuItem(); $item->setLabel($titles[$order]); $item->setUrl($urls[$order] != '' ? $urls[$order] : OW::getRouter()->urlForRoute('view_photo_list', array('listType' => $type))); $item->setKey($type); $item->setIconClass($classes[$order]); $item->setOrder($order); array_push($menuItems, $item); $order++; } $menu = new BASE_CMP_ContentMenu($menuItems); return $menu; }
/** * Constructor. */ public function __construct() { parent::__construct(); $language = OW::getLanguage(); $menu = new BASE_CMP_ContentMenu(); $menuItem = new BASE_MenuItem(); $menuItem->setKey('index'); $menuItem->setLabel($language->text('ads', 'advertisement_menu_banner_list')); $menuItem->setUrl(OW::getRouter()->urlForRoute('ads.admin_index')); $menuItem->setIconClass('ow_ic_files'); $menuItem->setOrder(1); $menu->addElement($menuItem); $menuItem = new BASE_MenuItem(); $menuItem->setKey('manage'); $menuItem->setLabel($language->text('ads', 'advertisement_menu_manage_banners')); $menuItem->setUrl(OW::getRouter()->urlForRoute('ads.admin_manage')); $menuItem->setIconClass('ow_ic_gear_wheel'); $menuItem->setOrder(2); $menu->addElement($menuItem); $this->addComponent('menu', $menu); $this->menu = $menu; $this->adsService = ADS_BOL_Service::getInstance(); $this->setPageTitle($language->text('ads', 'page_title_ads')); $this->setPageHeading($language->text('ads', 'page_heading_ads')); $this->setPageHeadingIconClass('ow_ic_star'); OW::getNavigation()->activateMenuItem('admin_plugins', 'admin', 'sidebar_menu_plugins_installed'); }
public function __construct() { parent::__construct(); if (OW::getRequest()->isAjax()) { return; } $language = OW::getLanguage(); $menu = new BASE_CMP_ContentMenu(); $menuItem = new BASE_MenuItem(); $menuItem->setKey('admin-index'); $menuItem->setLabel($language->text('sponsors', 'admin_tab_general_title')); $menuItem->setUrl(OW::getRouter()->urlForRoute('sponsors_admin')); $menuItem->setIconClass('ow_ic_gear_wheel'); $menuItem->setOrder(1); $menu->addElement($menuItem); $menuItem = new BASE_MenuItem(); $menuItem->setKey('admin-list'); $menuItem->setLabel($language->text('sponsors', 'admin_sponsors_list')); $menuItem->setUrl(OW::getRouter()->urlForRoute('sponsors_admin_list')); $menuItem->setIconClass('ow_ic_gear_wheel'); $menuItem->setOrder(2); $menu->addElement($menuItem); $menuItem = new BASE_MenuItem(); $menuItem->setKey('admin-add'); $menuItem->setLabel($language->text('sponsors', 'admin_add_sponsor')); $menuItem->setUrl(OW::getRouter()->urlForRoute('sponsors_admin_add')); $menuItem->setIconClass('ow_ic_gear_wheel'); $menuItem->setOrder(3); $menu->addElement($menuItem); $this->addComponent('menu', $menu); $this->menu = $menu; }
private function getMenu() { $language = OW::getLanguage(); $menuItems = array(); $item = new BASE_MenuItem(); $item->setLabel($language->text('membership', 'admin_menu_memberships')); $item->setUrl(OW::getRouter()->urlForRoute('membership_admin')); $item->setKey('memberships'); $item->setIconClass('ow_ic_update'); $item->setOrder(0); $menuItems[] = $item; $item = new BASE_MenuItem(); $item->setLabel($language->text('membership', 'admin_menu_subscribe')); $item->setUrl(OW::getRouter()->urlForRoute('membership_admin_subscribe')); $item->setKey('subscribe'); $item->setIconClass('ow_ic_script'); $item->setOrder(1); $menuItems[] = $item; $item = new BASE_MenuItem(); $item->setLabel($language->text('membership', 'admin_menu_browse_users')); $item->setUrl(OW::getRouter()->urlForRoute('membership_admin_browse_users_st')); $item->setKey('users'); $item->setIconClass('ow_ic_user'); $item->setOrder(2); $menuItems[] = $item; return new BASE_CMP_ContentMenu($menuItems); }
/** * Default action */ public function index() { $language = OW::getLanguage(); $item = new BASE_MenuItem(); $item->setLabel($language->text('gphotoviewer', 'admin_menu_general')); $item->setUrl(OW::getRouter()->urlForRoute('gphotoviewer.admin_config')); $item->setKey('general'); $item->setIconClass('ow_ic_gear_wheel'); $item->setOrder(0); $menu = new BASE_CMP_ContentMenu(array($item)); $this->addComponent('menu', $menu); $configs = OW::getConfig()->getValues('gphotoviewer'); $configSaveForm = new ConfigSaveForm(); $this->addForm($configSaveForm); if (OW::getRequest()->isPost() && $configSaveForm->isValid($_POST)) { $res = $configSaveForm->process(); OW::getFeedback()->info($language->text('gphotoviewer', 'settings_updated')); $this->redirect(OW::getRouter()->urlForRoute('gphotoviewer.admin_config')); } if (!OW::getRequest()->isAjax()) { $this->setPageHeading(OW::getLanguage()->text('gphotoviewer', 'admin_config')); $this->setPageHeadingIconClass('ow_ic_picture'); $elem = $menu->getElement('general'); if ($elem) { $elem->setActive(true); } } $configSaveForm->getElement('enablePhotoviewer')->setValue($configs['enable_photo_viewer']); $configSaveForm->getElement('downloadable')->setValue($configs['can_users_to_download_photos']); $configSaveForm->getElement('slideshowTime')->setValue($configs['slideshow_time_per_a_photo']); }
/** * @see OW_ActionController::init() * */ public function init() { parent::init(); $language = OW::getLanguage(); $item = new BASE_MenuItem(); $item->setLabel($language->text('mailbox', 'inbox_label')); $item->setIconClass('ow_ic_down_arrow'); $item->setUrl(OW::getRouter()->urlForRoute("mailbox_default")); $item->setKey('inbox'); $item->setOrder(1); $menuItems[] = $item; $item = new BASE_MenuItem(); $item->setLabel($language->text('mailbox', 'sent_label')); $item->setIconClass('ow_ic_up_arrow'); $item->setUrl(OW::getRouter()->urlForRoute("mailbox_sent")); $item->setKey('sent'); $item->setOrder(2); $menuItems[] = $item; $event = new BASE_CLASS_EventCollector('mailbox.collect_menu_items'); OW::getEventManager()->trigger($event); foreach ($event->getData() as $menuItem) { $menuItems[] = $menuItem; } $this->contentMenu = new BASE_CMP_ContentMenu($menuItems); $this->addComponent("mailbox_menu", $this->contentMenu); $this->setPageHeading($language->text('mailbox', 'mailbox')); $this->setPageHeadingIconClass('ow_ic_mail'); $this->recordsToPage = (int) OW::getConfig()->getValue('mailbox', 'results_per_page'); if ($this->recordsToPage === 0) { $this->recordsToPage = self::MAILBOX_RECORDS_TO_PAGE; } }
public function index() { $language = OW::getLanguage(); $this->setPageHeading($language->text('ynsocialpublisher', 'admin_config')); $this->setPageHeadingIconClass('ow_ic_picture'); $item = new BASE_MenuItem(); $item->setLabel($language->text('ynsocialpublisher', 'admin_menu_general')); $item->setUrl(OW::getRouter()->urlForRoute('ynsocialpublisher.admin')); $item->setKey('general'); $item->setIconClass('ow_ic_gear_wheel'); $item->setOrder(0); $item->setActive(true); $menu = new BASE_CMP_ContentMenu(array($item)); $this->addComponent('menu', $menu); $service = YNSOCIALPUBLISHER_BOL_Service::getInstance(); $plugins = $service->getEnabledPlugins(); $this->assign('plugins', $plugins); $form_url = OW::getRouter()->urlForRoute('ynsocialpublisher.admin'); $this->assign('form_url', $form_url); if (OW::getRequest()->isPost()) { // get plugins data from post $params = $_POST['params']; foreach ($params as $key => $settings) { if (!isset($settings['providers'])) { $settings['providers'] = array(); } OW::getConfig()->saveConfig('ynsocialpublisher', $key, json_encode($settings)); } OW::getFeedback()->info($language->text('ynsocialpublisher', 'settings_updated')); $this->redirect($form_url); } }
private function getMenu() { $lang = OW::getLanguage(); $router = OW::getRouter(); $items = array(); $item = new BASE_MenuItem(); $item->setLabel($lang->text('usearch', 'user_list')); $item->setOrder(0); $item->setKey('photo_gallery'); $item->setIconClass('ow_ic_picture'); $item->setUrl($router->urlForRoute('users-search-result')); array_push($items, $item); // $item = new BASE_MenuItem(); // $item->setLabel($lang->text('usearch', 'profile_details')); // $item->setOrder(1); // $item->setKey('profile_details'); // $item->setIconClass('ow_ic_comment'); // $item->setUrl($router->urlForRoute('usearch.details')); // array_push($items, $item); if (OW::getPluginManager()->isPluginActive('googlelocation')) { $item = new BASE_MenuItem(); $item->setLabel($lang->text('usearch', 'map')); $item->setOrder(2); $item->setKey('map'); $item->setIconClass('ow_ic_places'); $item->setUrl($router->urlForRoute('usearch.map')); array_push($items, $item); } return new BASE_CMP_ContentMenu($items); }
public function __construct() { parent::__construct(); $menuItems = array(); $item = new BASE_MenuItem(); $item->setLabel(OW::getLanguage()->text('profileprogressbar', 'themes_menu_item')); $item->setUrl(OW::getRouter()->urlForRoute('profileprogressbar.admin')); $item->setIconClass('ow_ic_picture'); $item->setOrder(0); array_push($menuItems, $item); $item = new BASE_MenuItem(); $item->setLabel(OW::getLanguage()->text('profileprogressbar', 'features_menu_item')); $item->setUrl(OW::getRouter()->urlForRoute('profileprogressbar.admin_features')); $item->setIconClass('ow_ic_flag'); $item->setOrder(1); array_push($menuItems, $item); $item = new BASE_MenuItem(); $item->setLabel(OW::getLanguage()->text('profileprogressbar', 'hint_menu_item')); $item->setUrl(OW::getRouter()->urlForRoute('profileprogressbar.admin_hint')); $item->setIconClass('ow_ic_comment'); $item->setOrder(2); array_push($menuItems, $item); $this->addComponent('menu', new BASE_CMP_ContentMenu($menuItems)); $this->document = OW::getDocument(); $this->plugin = OW::getPluginManager()->getPlugin('profileprogressbar'); $this->theme = OW::getConfig()->getValue('profileprogressbar', 'theme'); }
public function getMenu() { $language = OW::getLanguage(); $menu = new BASE_CMP_ContentMenu(); $menuItem = new BASE_MenuItem(); $menuItem->setKey('all'); $menuItem->setPrefix('questions'); $menuItem->setLabel($language->text('questions', 'list_all_tab')); $menuItem->setOrder(1); $menuItem->setUrl(OW::getRouter()->urlForRoute('questions-all')); $menuItem->setIconClass('ow_ic_lens'); $menu->addElement($menuItem); if (OW::getUser()->isAuthenticated()) { if (OW::getPluginManager()->isPluginActive('friends')) { $menuItem = new BASE_MenuItem(); $menuItem->setKey('friends'); $menuItem->setPrefix('questions'); $menuItem->setLabel($language->text('questions', 'list_friends_tab')); $menuItem->setOrder(2); $menuItem->setUrl(OW::getRouter()->urlForRoute('questions-friends')); $menuItem->setIconClass('ow_ic_user'); $menu->addElement($menuItem); } $menuItem = new BASE_MenuItem(); $menuItem->setKey('my'); $menuItem->setPrefix('questions'); $menuItem->setLabel($language->text('questions', 'list_my_tab')); $menuItem->setOrder(3); $menuItem->setUrl(OW::getRouter()->urlForRoute('questions-my')); $menuItem->setIconClass('ow_ic_user'); $menu->addElement($menuItem); } return $menu; }
function getMenu() { $language = OW::getLanguage(); $menu = new BASE_CMP_ContentMenu(); $menuItems = array(); $item = new BASE_MenuItem(); $item->setLabel($language->text('spvideolite', 'adm_menu_tweaks')); $item->setUrl(OW::getRouter()->urlForRoute('spvideolite.admin')); $item->setKey('tweaks'); $item->setIconClass('ow_ic_star'); $item->setOrder(0); $menuItems[] = $item; $item = new BASE_MenuItem(); $item->setLabel($language->text('spvideolite', 'adm_menu_upload')); $item->setUrl(OW::getRouter()->urlForRoute('spvideolite.admin_upload')); $item->setKey('help'); $item->setIconClass('ow_ic_attach'); $item->setOrder(1); $menuItems[] = $item; $item = new BASE_MenuItem(); $item->setLabel($language->text('spvideolite', 'adm_menu_help')); $item->setUrl(OW::getRouter()->urlForRoute('spvideolite.admin_help')); $item->setKey('help'); $item->setIconClass('ow_ic_help'); $item->setOrder(2); $menuItems[] = $item; $menu->setMenuItems($menuItems); $menu->deactivateElements(); return $menu; }
public function __construct() { parent::__construct(); if (OW::getRequest()->isAjax()) { return; } $language = OW::getLanguage(); $menu = new BASE_CMP_ContentMenu(); $menuItem = new BASE_MenuItem(); $menuItem->setKey('steps'); $menuItem->setLabel($language->text('sitetour', 'admin_steps')); $menuItem->setUrl(OW::getRouter()->urlForRoute('sitetour_admin')); $menuItem->setIconClass('ow_ic_gear_wheel'); $menuItem->setOrder(1); $menu->addElement($menuItem); $menuItem = new BASE_MenuItem(); $menuItem->setKey('settings'); $menuItem->setLabel($language->text('sitetour', 'admin_settings')); $menuItem->setUrl(OW::getRouter()->urlForRoute('sitetour_settings')); $menuItem->setIconClass('ow_ic_gear_wheel'); $menuItem->setOrder(2); $menu->addElement($menuItem); $menuItem = new BASE_MenuItem(); $menuItem->setKey('console'); $menuItem->setLabel($language->text('sitetour', 'admin_console')); $menuItem->setUrl(OW::getRouter()->urlForRoute('sitetour_console')); $menuItem->setIconClass('ow_ic_gear_wheel'); $menuItem->setOrder(3); $menu->addElement($menuItem); $this->addComponent('menu', $menu); $this->menu = $menu; }
public function initMenu() { $menuItems = array(); $listNames = array('connects' => array('iconClass' => 'ow_yn_socialbridge_connects')); $listNames = array('connects' => array('iconClass' => 'ow_yn_socialbridge_connects')); if (OW::getPluginManager()->isPluginActive('ynsocialstream')) { $listNames['stream-settings'] = array('iconClass' => 'ow_yn_socialstream'); } if (OW::getPluginManager()->isPluginActive('ynsocialpublisher')) { $listNames['publisher-settings'] = array('iconClass' => 'ow_yn_socialpublisher'); } $count = 0; foreach ($listNames as $actionKey => $actionArr) { $menuItem = new BASE_MenuItem(); $menuItem->setKey($actionKey); $menuItem->setUrl(OW::getRouter()->urlForRoute('ynsocialbridge-' . $actionKey)); $menuItem->setOrder($count); $menuItem->setLabel(OW::getLanguage()->text('ynsocialbridge', 'menu_item_' . $actionKey)); $menuItem->setIconClass($actionArr['iconClass']); $menuItems[] = $menuItem; $count++; } $contentMenu = new BASE_CMP_ContentMenu($menuItems); return $contentMenu; }
private function getMenu() { $language = OW::getLanguage(); $menuItems = array(); $item = new BASE_MenuItem(); $item->setLabel($language->text('fbconnect', 'menu_item_configuration_settings')); $item->setUrl(OW::getRouter()->urlForRoute('fbconnect_configuration_settings')); $item->setKey('fbconnect_settings'); $item->setIconClass('ow_ic_gear_wheel'); $item->setOrder(0); $menuItems[] = $item; /* * * Disbale field configuration * $item = new BASE_MenuItem(); $item->setLabel($language->text('fbconnect', 'menu_item_configuration_fields')); $item->setUrl(OW::getRouter()->urlForRoute('fbconnect_configuration_fields')); $item->setKey('fbconnect_fields'); $item->setIconClass('ow_ic_files'); $item->setOrder(1); $menuItems[] = $item; */ return new BASE_CMP_ContentMenu($menuItems); }
private function getMenu($active = 'actions') { $language = OW::getLanguage(); $item = new BASE_MenuItem(); $item->setLabel($language->text('usercredits', 'tab_actions')); $item->setUrl(OW::getRouter()->urlForRoute('usercredits.admin')); $item->setKey('actions'); $item->setOrder(1); $item->setActive($active == 'actions'); $item->setIconClass('ow_ic_info'); $item2 = new BASE_MenuItem(); $item2->setLabel($language->text('usercredits', 'packs')); $item2->setUrl(OW::getRouter()->urlForRoute('usercredits.admin_packs')); $item2->setKey('packs'); $item2->setOrder(2); $item2->setActive($active == 'packs'); $item2->setIconClass('ow_ic_folder'); $item3 = new BASE_MenuItem(); $item3->setLabel($language->text('usercredits', 'settings')); $item3->setUrl(OW::getRouter()->urlForRoute('usercredits.admin_settings')); $item3->setKey('settings'); $item3->setOrder(3); $item3->setActive($active == 'settings'); $item3->setIconClass('ow_ic_gear_wheel'); return new BASE_CMP_ContentMenu(array($item, $item2, $item3)); }
/** * Default action */ public function index() { $language = OW::getLanguage(); $item = new BASE_MenuItem(); $item->setLabel($language->text('video', 'admin_menu_general')); $item->setUrl(OW::getRouter()->urlForRoute('video_admin_config')); $item->setKey('general'); $item->setIconClass('ow_ic_gear_wheel'); $menu = new BASE_CMP_ContentMenu(array($item)); $this->addComponent('menu', $menu); $configs = OW::getConfig()->getValues('video'); $configSaveForm = new ConfigSaveForm(); $this->addForm($configSaveForm); if (OW::getRequest()->isPost() && $configSaveForm->isValid($_POST)) { $configSaveForm->process(); OW::getFeedback()->info($language->text('video', 'settings_updated')); $this->redirect(OW::getRouter()->urlForRoute('video_admin_config')); } if (!OW::getRequest()->isAjax()) { $this->setPageHeading(OW::getLanguage()->text('video', 'admin_config')); $this->setPageHeadingIconClass('ow_ic_video'); $menu->getElement('general')->setActive(true); } $configSaveForm->getElement('playerWidth')->setValue($configs['player_width']); $configSaveForm->getElement('playerHeight')->setValue($configs['player_height']); $configSaveForm->getElement('perPage')->setValue($configs['videos_per_page']); $configSaveForm->getElement('quota')->setValue($configs['user_quota']); }
/** * Default action */ public function index() { $language = OW::getLanguage(); $item = new BASE_MenuItem(); $item->setLabel($language->text('vwls', 'admin_menu_general')); $item->setUrl(OW::getRouter()->urlForRoute('vwls_admin_config')); $item->setKey('general'); $item->setIconClass('ow_ic_gear_wheel'); $menu = new BASE_CMP_ContentMenu(array($item)); $this->addComponent('menu', $menu); $configs = OW::getConfig()->getValues('vwls'); $configSaveForm = new ConfigSaveForm(); $this->addForm($configSaveForm); if (OW::getRequest()->isPost() && $configSaveForm->isValid($_POST)) { $res = $configSaveForm->process(); OW::getFeedback()->info($language->text('vwls', 'settings_updated')); $this->redirect(OW::getRouter()->urlForRoute('vwls_admin_config')); } if (!OW::getRequest()->isAjax()) { $this->setPageHeading(OW::getLanguage()->text('vwls', 'admin_config')); $this->setPageHeadingIconClass('ow_ic_vwls'); $menu->getElement('general')->setActive(true); } $configSaveForm->getElement('server')->setValue($configs['server']); $configSaveForm->getElement('serverAMF')->setValue($configs['serverAMF']); $configSaveForm->getElement('serverRTMFP')->setValue($configs['serverRTMFP']); $configSaveForm->getElement('enableRTMP')->setValue($configs['enableRTMP']); $configSaveForm->getElement('enableP2P')->setValue($configs['enableP2P']); $configSaveForm->getElement('supportRTMP')->setValue($configs['supportRTMP']); $configSaveForm->getElement('supportP2P')->setValue($configs['supportP2P']); $configSaveForm->getElement('alwaysRTMP')->setValue($configs['alwaysRTMP']); $configSaveForm->getElement('alwaysP2P')->setValue($configs['alwaysP2P']); $configSaveForm->getElement('videoCodec')->setValue($configs['videoCodec']); $configSaveForm->getElement('codecProfile')->setValue($configs['codecProfile']); $configSaveForm->getElement('codecLevel')->setValue($configs['codecLevel']); $configSaveForm->getElement('soundCodec')->setValue($configs['soundCodec']); $configSaveForm->getElement('p2pGroup')->setValue($configs['p2pGroup']); $configSaveForm->getElement('tokenKey')->setValue($configs['tokenKey']); $configSaveForm->getElement('snapshotsTime')->setValue($configs['snapshotsTime']); $configSaveForm->getElement('camMaxBandwidth')->setValue($configs['camMaxBandwidth']); $configSaveForm->getElement('bufferLive')->setValue($configs['bufferLive']); $configSaveForm->getElement('bufferFull')->setValue($configs['bufferFull']); $configSaveForm->getElement('bufferLive2')->setValue($configs['bufferLive2']); $configSaveForm->getElement('bufferFull2')->setValue($configs['bufferFull2']); $configSaveForm->getElement('disableBandwidthDetection')->setValue($configs['disableBandwidthDetection']); $configSaveForm->getElement('limitByBandwidth')->setValue($configs['limitByBandwidth']); $configSaveForm->getElement('generateSnapshots')->setValue($configs['generateSnapshots']); $configSaveForm->getElement('externalInterval')->setValue($configs['externalInterval']); $configSaveForm->getElement('externalInterval2')->setValue($configs['externalInterval2']); $configSaveForm->getElement('ws_ads')->setValue($configs['ws_ads']); $configSaveForm->getElement('adsTimeout')->setValue($configs['adsTimeout']); $configSaveForm->getElement('adsInterval')->setValue($configs['adsInterval']); $configSaveForm->getElement('statusInterval')->setValue($configs['statusInterval']); $configSaveForm->getElement('availability')->setValue($configs['availability']); $configSaveForm->getElement('status')->setValue($configs['status']); $configSaveForm->getElement('member')->setValue($configs['member']); $configSaveForm->getElement('member_list')->setValue($configs['member_list']); $configSaveForm->getElement('baseSwf_url')->setValue($configs['baseSwf_url']); }
public function __construct() { parent::__construct(); $item = new BASE_MenuItem(); $item->setLabel(OW::getLanguage()->text('bookmarks', 'general_menu_item_label')); $item->setUrl(OW::getRouter()->urlForRoute('bookmarks.admin')); $item->setIconClass('ow_ic_gear_wheel'); $this->addComponent('menu', new BASE_CMP_ContentMenu(array($item))); }
public function __construct() { parent::__construct(); if (OW::getRequest()->isAjax()) { return; } $language = OW::getLanguage(); $config = OW::getConfig(); $menu = new BASE_CMP_ContentMenu(); $menuItem = new BASE_MenuItem(); $menuItem->setKey('admin-index'); $menuItem->setLabel($language->text('eventx', 'admin_tab_general_title')); $menuItem->setUrl(OW::getRouter()->urlForRoute('eventx_admin_index')); $menuItem->setIconClass('ow_ic_files'); $menuItem->setOrder(1); $menu->addElement($menuItem); if ($config->getValue('eventx', 'enableCategoryList') == '1') { $menuItem = new BASE_MenuItem(); $menuItem->setKey('categories'); $menuItem->setLabel($language->text('eventx', 'admin_category_tab_title')); $menuItem->setUrl(OW::getRouter()->urlForRoute('eventx_admin_categories')); $menuItem->setIconClass('ow_ic_gear_wheel'); $menuItem->setOrder(2); $menu->addElement($menuItem); } $menuItem = new BASE_MenuItem(); $menuItem->setKey('approval'); $menuItem->setLabel($language->text('eventx', 'admin_pending_approval')); $menuItem->setUrl(OW::getRouter()->urlForRoute('eventx_admin_approval')); $menuItem->setIconClass('ow_ic_gear_wheel'); $menuItem->setOrder(3); $menu->addElement($menuItem); if ($config->getValue('eventx', 'enableCalendar') == '1') { $menuItem = new BASE_MenuItem(); $menuItem->setKey('calendar'); $menuItem->setLabel($language->text('eventx', 'admin_calendar_tab')); $menuItem->setUrl(OW::getRouter()->urlForRoute('eventx_admin_calendar')); $menuItem->setIconClass('ow_ic_calendar'); $menuItem->setOrder(4); $menu->addElement($menuItem); } if (is_dir(OW_DIR_PLUGIN . 'event')) { $menuItem = new BASE_MenuItem(); $menuItem->setKey('import'); $menuItem->setLabel($language->text('eventx', 'admin_import_tab')); $menuItem->setUrl(OW::getRouter()->urlForRoute('eventx_admin_import')); $menuItem->setIconClass('ow_ic_gear_wheel'); $menuItem->setOrder(5); $menu->addElement($menuItem); } $this->addComponent('menu', $menu); $this->menu = $menu; $this->setPageHeading(OW::getLanguage()->text('eventx', 'admin_settings_title')); $this->setPageTitle(OW::getLanguage()->text('eventx', 'admin_settings_title')); $this->setPageHeadingIconClass('ow_ic_gear_wheel'); }
public function addPrivacyPreferenceMenuItem(BASE_CLASS_EventCollector $event) { $router = OW_Router::getInstance(); $language = OW::getLanguage(); $menuItem = new BASE_MenuItem(); $menuItem->setKey('privacy'); $menuItem->setLabel($language->text('privacy', 'privacy_index')); $menuItem->setIconClass('ow_ic_lock'); $menuItem->setUrl($router->urlForRoute('privacy_index')); $menuItem->setOrder(5); $event->add($menuItem); }
/** * Default action */ public function index() { $language = OW::getLanguage(); $item = new BASE_MenuItem(); $item->setLabel($language->text('vwvr', 'admin_menu_general')); $item->setUrl(OW::getRouter()->urlForRoute('vwvr_admin_config')); $item->setKey('general'); $item->setIconClass('ow_ic_gear_wheel'); $menu = new BASE_CMP_ContentMenu(array($item)); $this->addComponent('menu', $menu); $configs = OW::getConfig()->getValues('vwvr'); $configSaveForm = new ConfigSaveForm(); $this->addForm($configSaveForm); if (OW::getRequest()->isPost() && $configSaveForm->isValid($_POST)) { $res = $configSaveForm->process(); OW::getFeedback()->info($language->text('vwvr', 'settings_updated')); $this->redirect(OW::getRouter()->urlForRoute('vwvr_admin_config')); } if (!OW::getRequest()->isAjax()) { $this->setPageHeading(OW::getLanguage()->text('vwvr', 'admin_config')); $this->setPageHeadingIconClass('ow_ic_vwvr'); $menu->getElement('general')->setActive(true); } $configSaveForm->getElement('server')->setValue($configs['server']); $configSaveForm->getElement('serverAMF')->setValue($configs['serverAMF']); $configSaveForm->getElement('videoCodec')->setValue($configs['videoCodec']); $configSaveForm->getElement('codecProfile')->setValue($configs['codecProfile']); $configSaveForm->getElement('codecLevel')->setValue($configs['codecLevel']); $configSaveForm->getElement('soundCodec')->setValue($configs['soundCodec']); $configSaveForm->getElement('soundQuality')->setValue($configs['soundQuality']); // $configSaveForm->getElement('microphone_rate')->setValue($configs['micRate']); $configSaveForm->getElement('bufferLive')->setValue($configs['bufferLive']); $configSaveForm->getElement('camMaxBandwidth')->setValue($configs['camMaxBandwidth']); $configSaveForm->getElement('bufferLive')->setValue($configs['bufferLive']); $configSaveForm->getElement('bufferFull')->setValue($configs['bufferFull']); $configSaveForm->getElement('bufferLivePlayback')->setValue($configs['bufferLivePlayback']); $configSaveForm->getElement('bufferFullPlayback')->setValue($configs['bufferFullPlayback']); $configSaveForm->getElement('availability')->setValue($configs['availability']); $configSaveForm->getElement('status')->setValue($configs['status']); $configSaveForm->getElement('member')->setValue($configs['member']); $configSaveForm->getElement('member_list')->setValue($configs['member_list']); $configSaveForm->getElement('baseSwf_url')->setValue($configs['baseSwf_url']); $configSaveForm->getElement('record_path')->setValue($configs['recordPath']); $configSaveForm->getElement('record_limit')->setValue($configs['recordLimit']); $configSaveForm->getElement('resolution')->setValue($configs['camWidth'] . "x" . $configs['camHeight']); $configSaveForm->getElement('camera_fps')->setValue($configs['camFPS']); $configSaveForm->getElement('microphone_rate')->setValue($configs['micRate']); $configSaveForm->getElement('bandwidth')->setValue($configs['camBandwidth']); $configSaveForm->getElement('layout_code')->setValue($configs['layoutCode']); $configSaveForm->getElement('show_camera_settings')->setValue($configs['showCamSettings']); $configSaveForm->getElement('advanced_camera_settings')->setValue($configs['advancedCamSettings']); $configSaveForm->getElement('fill_window')->setValue($configs['fillWindow']); }
private function getMenu() { $menuItems = array(); $configs = OW::getConfig()->getValues('ynmediaimporter'); if ($configs['enable_facebook']) { $item = new BASE_MenuItem(); $item->setLabel(OW::getLanguage()->text('ynmediaimporter', 'facebook')); $item->setUrl(OW::getRouter()->urlForRoute('ynmediaimporter.facebook')); $item->setKey('facebook'); //$item->setIconClass( 'ow_ic_gear_wheel' ); $item->setOrder(0); array_push($menuItems, $item); } if ($configs['enable_picasa']) { $item = new BASE_MenuItem(); $item->setLabel(OW::getLanguage()->text('ynmediaimporter', 'picasa')); $item->setUrl(OW::getRouter()->urlForRoute('ynmediaimporter.picasa')); $item->setKey('picasa'); //$item->setIconClass( 'ow_ic_gear_wheel' ); $item->setOrder(1); array_push($menuItems, $item); } if ($configs['enable_flickr']) { $item = new BASE_MenuItem(); $item->setLabel(OW::getLanguage()->text('ynmediaimporter', 'flickr')); $item->setUrl(OW::getRouter()->urlForRoute('ynmediaimporter.flickr')); $item->setKey('flickr'); //$item->setIconClass( 'ow_ic_gear_wheel' ); $item->setOrder(2); array_push($menuItems, $item); } if ($configs['enable_instagram']) { $item = new BASE_MenuItem(); $item->setLabel(OW::getLanguage()->text('ynmediaimporter', 'instagram')); $item->setUrl(OW::getRouter()->urlForRoute('ynmediaimporter.instagram')); $item->setKey('instagram'); //$item->setIconClass( 'ow_ic_gear_wheel' ); $item->setOrder(3); array_push($menuItems, $item); } /* if ($configs['enable_yfrog']){ $item = new BASE_MenuItem(); $item->setLabel( OW::getLanguage()->text('ynmediaimporter', 'yfrog') ); $item->setUrl( OW::getRouter()->urlForRoute('ynmediaimporter.yfrog') ); $item->setKey( 'yfrog' ); //$item->setIconClass( 'ow_ic_gear_wheel' ); $item->setOrder( 4 ); array_push( $menuItems, $item ); } */ return new BASE_CMP_ContentMenu($menuItems); }
function notifications_preference_menu_item(BASE_EventCollector $event) { $router = OW_Router::getInstance(); $language = OW::getLanguage(); $menuItems = array(); $menuItem = new BASE_MenuItem(); $menuItem->setKey('email_notifications'); $menuItem->setLabel($language->text('notifications', 'dashboard_menu_item')); $menuItem->setIconClass('ow_ic_mail'); $menuItem->setUrl($router->urlForRoute('notifications-settings')); $menuItem->setOrder(3); $event->add($menuItem); }
function socialbridge_preference_menu_item(BASE_EventCollector $event) { $router = OW_Router::getInstance(); $language = OW::getLanguage(); $menuItems = array(); $menuItem = new BASE_MenuItem(); $menuItem->setKey('socialbridge'); $menuItem->setLabel($language->text('ynsocialbridge', 'manage_socialbridge_label')); $menuItem->setIconClass('ow_ic_moderator'); $menuItem->setUrl($router->urlForRoute('ynsocialbridge-connects')); $menuItem->setOrder(99); $event->add($menuItem); }
public function getPageMenu($isMobile = 0) { $language = OW::getLanguage(); $menuItems = array(); if (OW::getPluginManager()->isPluginActive('videoplus') && $isMobile == 0) { $menuItems = VIDEOPLUS_BOL_Service::getInstance()->getMenu(); $item = new BASE_MenuItem(); $item->setLabel($language->text('ivideo', 'video_uploads')); $item->setUrl(OW::getRouter()->urlForRoute('ivideo_view_list', array('type' => 'latest'))); $item->setKey('uploads'); $item->setIconClass("ow_ic_video"); if (OW::getConfig()->getValue('ivideo', 'makeUploaderMain') == '1') { array_unshift($menuItems, $item); } else { $item->setOrder(count($menuItems) + 1); array_push($menuItems, $item); } $menu = new BASE_CMP_ContentMenu($menuItems); return $menu; } if (!OW::getPluginManager()->isPluginActive('video')) { return FALSE; } $validLists = array('featured', 'latest', 'toprated', 'tagged'); $classes = array('ow_ic_push_pin', 'ow_ic_clock', 'ow_ic_star', 'ow_ic_tag'); if (!VIDEO_BOL_ClipService::getInstance()->findClipsCount('featured')) { array_shift($validLists); array_shift($classes); } $order = 0; foreach ($validLists as $type) { $item = new BASE_MenuItem(); $item->setLabel($language->text('video', 'menu_' . $type)); $item->setUrl(OW::getRouter()->urlForRoute('video_view_list', array('listType' => $type))); $item->setKey($type); $item->setIconClass($classes[$order]); $item->setOrder($order); array_push($menuItems, $item); $order++; } $item = new BASE_MenuItem(); $item->setLabel($language->text('ivideo', 'video_uploads')); $item->setUrl(OW::getRouter()->urlForRoute('ivideo_view_list', array('type' => 'latest'))); $item->setKey('uploads'); $item->setIconClass("ow_ic_video"); $item->setOrder($order); array_push($menuItems, $item); $menu = new BASE_CMP_ContentMenu($menuItems); return $menu; }
private function getMenu() { $language = OW::getLanguage(); $menuItems = array(); $item = new BASE_MenuItem(); $item->setLabel($language->text('ocsguests', 'general_settings')); $item->setUrl(OW::getRouter()->urlForRoute('ocsguests.admin')); $item->setKey('settings'); $item->setIconClass('ow_ic_gear_wheel'); $item->setOrder(0); array_push($menuItems, $item); $menu = new BASE_CMP_ContentMenu($menuItems); return $menu; }
/** * Constructor. */ public function __construct() { parent::__construct(); $this->service = OASEO_BOL_Service::getInstance(); if (!OW::getRequest()->isAjax()) { $language = OW::getLanguage(); $this->setPageHeading(OW::getLanguage()->text('oaseo', 'admin_index_heading')); $this->setPageHeadingIconClass('ow_ic_gear_wheel'); OW::getNavigation()->activateMenuItem('admin_plugins', 'admin', 'sidebar_menu_plugins_installed'); $menuItem = new BASE_MenuItem(); $menuItem->setKey('index'); $menuItem->setLabel($language->text('oaseo', 'admin_tab_index_label')); $menuItem->setUrl(OW::getRouter()->urlForRoute('oaseo.admin_index')); $menuItem->setIconClass('ow_ic_files'); $menuItem->setOrder(1); $menuItem1 = new BASE_MenuItem(); $menuItem1->setKey('advanced'); $menuItem1->setLabel($language->text('oaseo', 'admin_tab_advanced_label')); $menuItem1->setUrl(OW::getRouter()->urlForRoute('oaseo.admin_advanced')); $menuItem1->setOrder(2); $menuItem2 = new BASE_MenuItem(); $menuItem2->setKey('slugs'); $menuItem2->setLabel($language->text('oaseo', 'admin_tab_slugs_label')); $menuItem2->setUrl(OW::getRouter()->urlForRoute('oaseo.admin_slugs')); $menuItem2->setIconClass('ow_ic_script'); $menuItem2->setOrder(3); $menuItem3 = new BASE_MenuItem(); $menuItem3->setKey('robots'); $menuItem3->setLabel($language->text('oaseo', 'admin_tab_robots_label')); $menuItem3->setUrl(OW::getRouter()->urlForRoute('oaseo.admin_robots')); $menuItem3->setIconClass('ow_ic_lens'); $menuItem3->setOrder(4); $menuItem4 = new BASE_MenuItem(); $menuItem4->setKey('sitemap'); $menuItem4->setLabel($language->text('oaseo', 'admin_tab_sitemap_label')); $menuItem4->setUrl(OW::getRouter()->urlForRoute('oaseo.admin_sitemap')); $menuItem4->setIconClass('ow_ic_plugin'); $menuItem4->setOrder(5); $menuItem5 = new BASE_MenuItem(); $menuItem5->setKey('sitemap_info'); $menuItem5->setLabel($language->text('oaseo', 'admin_tab_sitemap_info_label')); $menuItem5->setUrl(OW::getRouter()->urlForRoute('oaseo.admin_sitemap_info')); $menuItem5->setIconClass('ow_ic_info'); $menuItem5->setOrder(6); $this->menu = new BASE_CMP_ContentMenu(array($menuItem, $menuItem1, $menuItem2, $menuItem3, $menuItem4, $menuItem5)); $this->assign('oaseoImageUrl', 'http://oxart.net/' . str_replace('.', '', OW::getConfig()->getValue('base', 'soft_version')) . '/oaseo/' . OW::getPluginManager()->getPlugin('oaseo')->getDto()->getBuild() . '/oa-post-it-note.jpg'); $this->addComponent('contentMenu', $this->menu); } }