コード例 #1
0
ファイル: admin.php プロジェクト: vazahat/dudex
 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;
 }
コード例 #2
0
ファイル: admin.php プロジェクト: vazahat/dudex
 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);
 }
コード例 #3
0
ファイル: admin.php プロジェクト: mohamedveto/spvideolite
 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;
 }
コード例 #4
0
ファイル: admin.php プロジェクト: vazahat/dudex
 /**
  * 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']);
 }
コード例 #5
0
 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;
 }
コード例 #6
0
ファイル: settings.php プロジェクト: ZyXelP/oxwall
 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);
 }
コード例 #7
0
ファイル: admin.php プロジェクト: vazahat/dudex
 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;
 }
コード例 #8
0
ファイル: core.php プロジェクト: vazahat/dudex
 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;
 }
コード例 #9
0
ファイル: admin.php プロジェクト: vazahat/dudex
 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');
 }
コード例 #10
0
ファイル: admin.php プロジェクト: hardikamutech/hammu
 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);
 }
コード例 #11
0
ファイル: search.php プロジェクト: hardikamutech/hammu
 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);
 }
コード例 #12
0
ファイル: admin.php プロジェクト: hardikamutech/loov
 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));
 }
コード例 #13
0
ファイル: photo.php プロジェクト: vazahat/dudex
 /**
  * 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;
 }
コード例 #14
0
ファイル: admin.php プロジェクト: vazahat/dudex
 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');
 }
コード例 #15
0
ファイル: admin.php プロジェクト: hardikamutech/loov
 /**
  * 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');
 }
コード例 #16
0
ファイル: mailbox.php プロジェクト: vazahat/dudex
 /**
  * @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;
     }
 }
コード例 #17
0
ファイル: media_panel.php プロジェクト: vazahat/dudex
 private function initMenu($params)
 {
     $language = OW::getLanguage();
     $router = OW::getRouter();
     $this->menu = new BASE_CMP_ContentMenu();
     $item = new BASE_MenuItem();
     $item->setLabel($language->text('base', 'upload'));
     $item->setOrder(0);
     $item->setKey('upload');
     $item->setUrl($router->urlFor('BASE_CTRL_MediaPanel', 'index', $params));
     $this->menu->addElement($item);
     $item = new BASE_MenuItem();
     $item->setLabel($language->text('base', 'tf_img_from_url'));
     $item->setOrder(1);
     $item->setKey('url');
     $item->setUrl($router->urlFor('BASE_CTRL_MediaPanel', 'fromUrl', $params));
     $this->menu->addElement($item);
     $count = BOL_MediaPanelService::getInstance()->countGalleryImages($params['pluginKey'], OW::getUser()->getId());
     $item = new BASE_MenuItem();
     $item->setLabel($language->text('base', 'tf_img_gal') . ($count == 0 ? '' : " ({$count})"));
     $item->setOrder(1);
     $item->setKey('gallery');
     $item->setUrl($router->urlFor('BASE_CTRL_MediaPanel', 'gallery', $params));
     $this->menu->addElement($item);
 }
コード例 #18
0
ファイル: languages.php プロジェクト: hardikamutech/hammu
 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);
 }
コード例 #19
0
ファイル: admin.php プロジェクト: vazahat/dudex
 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);
     }
 }
コード例 #20
0
ファイル: admin.php プロジェクト: vazahat/dudex
 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');
 }
コード例 #21
0
ファイル: provider.php プロジェクト: vazahat/dudex
 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);
 }
コード例 #22
0
 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);
 }
コード例 #23
0
ファイル: init.php プロジェクト: vazahat/dudex
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);
}
コード例 #24
0
ファイル: init.php プロジェクト: vazahat/dudex
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);
}
コード例 #25
0
ファイル: service.php プロジェクト: vazahat/dudex
 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;
 }
コード例 #26
0
ファイル: admin.php プロジェクト: hardikamutech/loov
 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;
 }
コード例 #27
0
ファイル: admin.php プロジェクト: vazahat/dudex
 /**
  * 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);
     }
 }
コード例 #28
0
ファイル: send_gift.php プロジェクト: hardikamutech/loov
 public function __construct($recipientId)
 {
     parent::__construct();
     $userId = OW::getUser()->getId();
     $giftService = VIRTUALGIFTS_BOL_VirtualGiftsService::getInstance();
     $authService = BOL_AuthorizationService::getInstance();
     if (!OW::getUser()->isAuthorized('virtualgifts', 'send_gift')) {
         $status = $authService->getActionStatus('virtualgifts', 'send_gift');
         $this->assign('authMessage', $status['msg']);
         return;
     }
     $form = new SendGiftForm($recipientId);
     $this->addForm($form);
     $categoriesSetup = $giftService->categoriesSetup();
     if ($categoriesSetup) {
         $templates = $giftService->getTemplateListByCategories();
         if (!$templates) {
             $templates = $giftService->getTemplateList();
             $categoriesSetup = false;
         }
     } else {
         $templates = $giftService->getTemplateList();
     }
     $this->assign('catSetup', $categoriesSetup);
     if ($categoriesSetup) {
         $menuItems = array();
         $order = 1;
         foreach ($templates as $id => $tpl) {
             $item = new BASE_MenuItem();
             $item->setLabel($tpl['title']);
             $item->setUrl("js-call:{$id}");
             $item->setKey($id);
             $item->setIconClass('ow_ic_heart');
             $item->setOrder($order);
             $item->setActive($order == 1);
             array_push($menuItems, $item);
             $order++;
         }
         $menu = new BASE_CMP_ContentMenu($menuItems);
         $this->addComponent('menu', $menu);
     }
     $this->assign('tpls', $templates);
     $showPrice = OW::getPluginManager()->isPluginActive('usercredits') && !$authService->isActionAuthorizedForUser($userId, 'virtualgifts', 'send_gift');
     $this->assign('showPrice', $showPrice);
     $this->assign('balance', OW::getEventManager()->call('usercredits.get_balance'));
     $url = OW::getPluginManager()->getPlugin('virtualgifts')->getStaticCssUrl() . 'style.css';
     OW::getDocument()->addStyleSheet($url);
 }
コード例 #29
0
ファイル: plugin.php プロジェクト: vazahat/dudex
 public function collectMailboxMenu(BASE_CLASS_EventCollector $event)
 {
     if (!OW::getUser()->isAuthorized('mailbox', 'send_message')) {
         return;
     }
     $language = OW::getLanguage();
     $item = new BASE_MenuItem();
     $item->setLabel($language->text('mcompose', 'compose_btn'));
     $item->setIconClass('ow_ic_new');
     $item->setPrefix('mcompose');
     $item->setUrl(OW::getRouter()->urlForRoute("mcompose-index"));
     $item->setKey('compose');
     $item->setOrder(3);
     $event->add($item);
     $staticUrl = OW::getPluginManager()->getPlugin('mcompose')->getStaticUrl();
     OW::getDocument()->addStyleSheet($staticUrl . 'style.css');
 }
コード例 #30
0
ファイル: action.php プロジェクト: vazahat/dudex
 public function __construct()
 {
     parent::__construct();
     $this->ajaxResponder = OW::getRouter()->urlFor('IVIDEO_CTRL_Action', 'ajaxResponder');
     $language = OW::getLanguage();
     $menu = new BASE_MCMP_ContentMenu();
     $menuItem = new BASE_MenuItem();
     $menuItem->setKey('latest');
     $menuItem->setLabel($language->text('ivideo', 'view_latest_videos'));
     $menuItem->setUrl(OW::getRouter()->urlForRoute('ivideo_view_list', array('type' => 'latest')));
     $menuItem->setIconClass('ow_ic_gear_wheel');
     $menuItem->setOrder(1);
     $menu->addElement($menuItem);
     $menuItem = new BASE_MenuItem();
     $menuItem->setKey('featured');
     $menuItem->setLabel($language->text('ivideo', 'view_featured_videos'));
     $menuItem->setUrl(OW::getRouter()->urlForRoute('ivideo_view_list', array('type' => 'featured')));
     $menuItem->setIconClass('ow_ic_gear_wheel');
     $menuItem->setOrder(2);
     $menu->addElement($menuItem);
     $menuItem = new BASE_MenuItem();
     $menuItem->setKey('popular');
     $menuItem->setLabel($language->text('ivideo', 'view_toprated_videos'));
     $menuItem->setUrl(OW::getRouter()->urlForRoute('ivideo_view_list', array('type' => 'toprated')));
     $menuItem->setIconClass('ow_ic_gear_wheel');
     $menuItem->setOrder(3);
     $menu->addElement($menuItem);
     $menuItem = new BASE_MenuItem();
     $menuItem->setKey('top-rated');
     $menuItem->setLabel($language->text('ivideo', 'view_category_videos'));
     $menuItem->setUrl(OW::getRouter()->urlForRoute('ivideo_list_category'));
     $menuItem->setIconClass('ow_ic_gear_wheel');
     $menuItem->setOrder(4);
     $menu->addElement($menuItem);
     $menuItem = new BASE_MenuItem();
     $menuItem->setKey('genres');
     $menuItem->setLabel($language->text('ivideo', 'user_tag_list'));
     $menuItem->setUrl(OW::getRouter()->urlForRoute('ivideo_tag_list'));
     $menuItem->setIconClass('ow_ic_gear_wheel');
     $menuItem->setOrder(5);
     $menu->addElement($menuItem);
     $this->addComponent('menu', $menu);
     $this->menu = $menu;
     $this->assign('videosPerRow', OW::getConfig()->getValue('ivideo', 'videosPerRow'));
     $this->assign('addItemAuthorized', OW::getUser()->isAuthenticated() && OW::getUser()->isAuthorized('ivideo', 'add'));
 }