public function indexshowfriends($params) { $content = ""; $id_user = OW::getUser()->getId(); //citent login user (uwner) $menu = BASE_CTRL_UserList::getMenu('map'); // $this->addComponent('menu', $menu); $content .= $menu->render(); $language = OW::getLanguage(); // $this->setPageHeading($language->text('map', 'map_page_heading')); // $this->setPageHeadingIconClass('ow_ic_bookmark'); $content .= "<div class=\"clearfix\" style=\"margin-bottom:20px;\">" . MAP_BOL_Service::getInstance()->get_profile_map('profile', $id_user) . "</div>"; $this->assign('content', $content); }
public function map() { $menu = BASE_CTRL_UserList::getMenu('map'); $this->addComponent('menu', $menu); $language = OW::getLanguage(); $this->setPageHeading($language->text('googlelocation', 'map_page_heading')); $this->setPageHeadingIconClass('ow_ic_bookmark'); $event = new OW_Event('googlelocation.get_map_component', array('userIdList' => 'all', 'backUri' => OW::getRouter()->getUri())); OW::getEventManager()->trigger($event); /* @var $map GOOGLELOCATION_CMP_Map */ $map = $event->getData(); $map->displaySearchInput(true); OW::getEventManager()->trigger(new OW_Event('googlelocation.add_js_lib')); $this->addComponent("map", $map); }
public function result() { if (!OW::getUser()->isAuthorized('base', 'search_users')) { throw new Redirect404Exception(); } OW::getDocument()->setDescription(OW::getLanguage()->text('base', 'users_list_user_search_meta_description')); $this->addComponent('menu', BASE_CTRL_UserList::getMenu('search')); $language = OW::getLanguage(); $page = !empty($_GET['page']) && intval($_GET['page']) > 0 ? $_GET['page'] : 1; $rpp = OW::getConfig()->getValue('base', 'users_count_on_page'); $first = ($page - 1) * $rpp; $count = $rpp; $listId = OW::getSession()->get(BOL_SearchService::SEARCH_RESULT_ID_VARIABLE); $list = BOL_UserService::getInstance()->findSearchResultList($listId, $first, $count); $itemCount = BOL_SearchService::getInstance()->countSearchResultItem($listId); $cmp = new BASE_CLASS_SearchResultList($list, $itemCount, $rpp, true); $this->addComponent('cmp', $cmp); $this->assign('listType', 'search'); $searchUrl = OW::getRouter()->urlForRoute('users-search'); $this->assign('searchUrl', $searchUrl); }
public function index($params) { if (!OW::getPluginManager()->isPluginActive("skadate")) { $menu = BASE_CTRL_UserList::getMenu('map'); $this->addComponent('menu', $menu); } $lat = null; $lon = null; $hash = null; if (!empty($params['lat'])) { $lat = (double) $params['lat']; } if (!empty($params['lat'])) { $lat = (double) $params['lat']; } if (!empty($params['lng'])) { $lon = (double) $params['lng']; } if (!empty($params['hash'])) { $hash = $params['hash']; } $page = !empty($_GET['page']) && intval($_GET['page']) > 0 ? intval($_GET['page']) : 1; $first = $page - 1; $usersPerPage = (int) OW::getConfig()->getValue('base', 'users_count_on_page'); $userIdList = GOOGLELOCATION_BOL_LocationService::getInstance()->getEntityListFromSession($hash); //BOL_UserService::getInstance()->findUserListByIdList($userIdList); $userList = GOOGLELOCATION_BOL_LocationService::getInstance()->findUserListByCoordinates($lat, $lon, $first, $usersPerPage, $userIdList); $usersCount = GOOGLELOCATION_BOL_LocationService::getInstance()->findUserCountByCoordinates($lat, $lon, $userIdList); $listCmp = new GOOGLELOCATION_CMP_UserList($userList, $usersCount, $usersPerPage); $this->addComponent('cmp', $listCmp); $locationName = GOOGLELOCATION_BOL_LocationService::getInstance()->getLocationName($lat, $lon); $this->assign('locationName', $locationName); $language = OW::getLanguage(); $this->setPageHeading(OW::getLanguage()->text('base', 'browse_users_page_heading')); $this->setPageTitle(OW::getLanguage()->text('base', 'browse_users_page_heading')); $this->setPageHeadingIconClass('ow_ic_bookmark'); $this->assign('backUrl', empty($_GET['backUri']) ? null : OW_URL_HOME . $_GET['backUri']); $this->setTemplate(OW::getPluginManager()->getPlugin('googlelocation')->getCtrlViewDir() . 'entity_list_index.html'); }
public function map() { $menu = BASE_CTRL_UserList::getMenu('map'); $this->addComponent('menu', $menu); $language = OW::getLanguage(); $this->setPageHeading($language->text('googlelocation', 'map_page_heading')); $this->setPageHeadingIconClass('ow_ic_bookmark'); $event = new OW_Event('googlelocation.get_map_component', array('userIdList' => 'all', 'backUri' => OW::getRouter()->getUri())); OW::getEventManager()->trigger($event); $map = $event->getData(); OW::getEventManager()->trigger(new OW_Event('googlelocation.add_js_lib')); //$locationList = GOOGLELOCATION_BOL_LocationService::getInstance()->getAllLocationsForUserMap(); /* $map = new GOOGLELOCATION_CMP_Map(); $map->setHeight('600px'); $map->setZoom(2); $map->setCenter(30,10); $map->setMapOption('scrollwheel', 'false'); $locationList = GOOGLELOCATION_BOL_LocationService::getInstance()->getAllLocationsForUserMap(); $userIdList = array(); $userLocationList = array(); foreach( $locationList as $location ) { $userIdList[$location['entityId']] = $location['entityId']; } $avatarList = BOL_AvatarService::getInstance()->getDataForUserAvatars($userIdList, true, true, true, false ); $userUrlList = BOL_UserService::getInstance()->getUserUrlsForList($userIdList); $displayNameList = BOL_UserService::getInstance()->getDisplayNamesForList($userIdList); $displayedFields = $this->getUserFields($userIdList); $pointList = GOOGLELOCATION_BOL_LocationService::getInstance()->getPointList($locationList); foreach( $pointList as $point ) { if( !empty( $point['entityIdList'] ) ) { $content = ""; if ( $point['count'] > 1 ) { $listCmp = new GOOGLELOCATION_CMP_MapUserList($point['entityIdList'], $point['lat'], $point['lng']); $content .= $listCmp->render(); unset($listCmp); } else { $userId = current($point['entityIdList']); $cmp = new GOOGLELOCATION_CMP_MapItem(); $cmp->setAvatar($avatarList[$userId]); $content = "<a href='{$userUrlList[$userId]}'>".$displayNameList[$userId]."</a> <div>$displayedFields[$userId]</div> <div>{$location['address']}</div>"; $cmp->setContent($content); $content = $cmp->render(); } if ( !empty($content) ) { $map->addPoint($point['lat'], $point['lng'], '', $content); } } }*/ $this->addComponent("map", $map); }