function display($tpl = null) { $document = JFactory::getDocument(); $document->addScript(JURI::root() . "/media/jquery/jquery-1.7.min.js"); $document->addScript(JURI::root() . 'components/com_profile/assets/javascript/script.js'); $user = JXFactory::getUser(); $this->assignRef('user', $user); parent::display($tpl); }
function display($tpl = null) { $document = JFactory::getDocument(); $document->addScript(JURI::root() . "/media/jquery/jquery-1.7.min.js"); $document->addScript(JURI::root() . 'components/com_profile/assets/javascript/script.js'); $notification = new Notifications(); $this->assignRef('notification', $notification); $document->setTitle(JText::_('COM_PROFILE_LABEL_NOTIFICATION')); parent::display($tpl); }
function display($tpl = null) { $document = JFactory::getDocument(); $document->setTitle(JText::_('COM_PROFILE_LABEL_APPLICATIONS')); $apps = new Applications(); // contains the user object $rows = $apps->getUserDeviceList(); foreach ($rows as $row) { $row->isAuthorized = $apps->isAuthorized($row->authorized); } $this->assignRef('userDevices', $rows); parent::display($tpl); }
function display($tpl = null) { $user = JXFactory::getUser(); $this->assignRef('user', $user); JForm::addFieldPath(JPATH_COMPONENT . DS . 'models' . DS . 'fields'); $form = JForm::getInstance('form', JPATH_ROOT . DS . 'components' . DS . 'com_profile' . DS . 'models' . DS . 'forms' . DS . 'details.xml'); $detailModel = ProfileFactory::getModel('detail'); $form->bind(array('params' => $detailModel->getDetails($user->id))); $this->assignRef('form', $form); $document = JFactory::getDocument(); $document->addScript(JURI::root() . 'media/jquery/jquery-1.7.min.js'); $document->setTitle(JText::_('COM_PROFILE_LABEL_EDIT_DETAILS')); parent::display($tpl); }
function display($tpl = null) { $user = JXFactory::getUser(); $this->assignRef('user', $user); // use JForm to create standardize $form = JForm::getInstance('profileForm', JPATH_ROOT . DS . 'components' . DS . 'com_profile' . DS . 'models' . DS . 'forms' . DS . 'edit.xml'); $this->assignRef('profileForm', $form); $this->assign('userEmail', $user->get('email')); $this->assign('userTimezone', $user->getParam('timezone')); $this->assign('userLanguage', $user->getParam('language')); $this->assign('userAboutMe', $user->getParam('about_me')); $this->assign('isIntegration', JXIntegration::isActiveDirectory($user->getParam('integration'))); /* $this->assignRef('timezoneList', $this->getTimezoneList()); */ /* /\* defaulted to +8 *\/ */ /* $jLang = JFactory::getLanguage(); */ /* $this->assignRef('languageList', $jLang->getKnownLanguages()); */ $document = JFactory::getDocument(); $document->addScript(JURI::root() . 'media/jquery/jquery-1.7.min.js'); $document->setTitle(JText::_('COM_PROFILE_LABEL_EDIT_PROFILE')); parent::display($tpl); }
function display($tpl = null) { include_once JPATH_LIBRARIES . DS . 'joomla' . DS . 'html' . DS . 'html' . DS . 'string.php'; $name = JRequest::getString('user'); $userId = JUserHelper::getUserId($name); $user = JXFactory::getUser($userId); $my = JXFactory::getUser(); $lastStatus = $user->getStatus(); $task = JRequest::getVar('task', 'activities'); $this->addPathway(JText::_('NAVIGATOR_LABEL_PEOPLE'), JRoute::_('index.php?option=com_people&view=members')); $this->addPathway($user->name); $doc = JFactory::getDocument(); // Add attachment script $doc->addScript(JURI::root() . 'media/uploader/fileuploader.js'); $doc->addStyleSheet(JURI::root() . 'media/uploader/fileuploader.css'); $groupsView = StreamFactory::getView('groups'); // $html = $groupsView->getUserGroupsHTML($userId); // JXModule::addBuffer('right', $html ); // this section is to get the group_type to set the twitter button's toggle $validGroupType = JAnalytics::getGroupType(); $analyticsGroupBy = JRequest::getVar('group_type', 'day'); $analyticIndex = array_search($analyticsGroupBy, $validGroupType); $analyticIndex = $analyticIndex === false ? 1 : $analyticIndex; $this->assignRef('user', $user); $this->assignRef('my', $my); $this->assignRef('analyticIndex', $analyticIndex); $this->assignRef('analyticType', $validGroupType); $this->assign('lastStatus', $lastStatus[0]->message); $this->assign('analyticHtml', $this->generateAnalytics($user)); switch ($task) { case 'activities': $companyView = StreamFactory::getView('company'); $filter = array(); $filter['user_id'] = $user->id; // Show only the user's stream $options = array(); $options['filter'] = 'stream.filter.profile'; $activities = $companyView->getStreamDataHTML($filter, $options); $this->assignRef('activities', $activities); break; case 'bio': // Bio JForm::addFieldPath(JPATH_COMPONENT . DS . 'models' . DS . 'fields'); $form = JForm::getInstance('form', JPATH_ROOT . DS . 'components' . DS . 'com_profile' . DS . 'models' . DS . 'forms' . DS . 'details.xml'); $detailModel = ProfileFactory::getModel('detail'); $form->bind(array('params' => $detailModel->getDetails($user->id))); $this->assignRef('form', $form); $this->assignRef('user', $user); break; case 'content': $this->assignRef('user', $user); $streamModel = StreamFactory::getModel('stream'); $blogs = $streamModel->getStream(array('type' => 'page', 'user_id' => $user->id), 10); $this->assign('blogs', $blogs); $this->assign('blogCount', $streamModel->countStream(array('type' => 'page', 'user_id' => $user->id))); $links = $user->getParam('links', ''); $linkModel = StreamFactory::getModel('links'); $links = $linkModel->getLinks(array('id' => $links, '!link' => ''), 10); $this->assignRef('links', $links); $this->assign('linkCount', JXUtility::csvCount($user->getParam('links'))); $fileModel = StreamFactory::getModel('files'); $files = $fileModel->getFiles(array('user_id' => $user->id), 10); $fileView = StreamFactory::getView('files'); $this->assignRef('fileView', $fileView); $this->assignRef('files', $files); $this->assign('fileCount', $fileModel->countFiles(array('user_id' => $user->id))); break; } //$document = JFactory::getDocument(); // $document->setTitle(JText::_('COM_PROFILE_LABEL_PROFILE_PAGE').': '.$user->name); $groupView = StreamFactory::getView('groups'); JXModule::addBuffer('right', $groupView->getUserActiveGroupsHTML($user->id)); // development $fileView = StreamFactory::getView('files'); JXModule::addBuffer('right', $fileView->modUserFilesHTML($user)); parent::display($tpl); }