Example #1
0
 public function uploader()
 {
     $document = JFactory::getDocument();
     $handler = $this->_getHandler();
     $albumId = JRequest::getInt('albumid', -1);
     $my = CFactory::getUser();
     $mainframe = JFactory::getApplication();
     $jinput = $mainframe->input;
     /**
      * Opengraph
      */
     CHeadHelper::setType('website', JText::_('COM_COMMUNITY_PHOTOS_UPLOAD_MULTIPLE_PHOTOS_TITLE'));
     $this->addPathway(JText::_('COM_COMMUNITY_PHOTOS'), CRoute::_('index.php?option=com_community&view=photos'));
     if ($albumId != -1) {
         $album = JTable::getInstance('Album', 'CTable');
         $album->load($albumId);
         $this->addPathway($album->name, $handler->getAlbumURI($album->id));
     }
     $this->addPathway(JText::_('COM_COMMUNITY_PHOTOS_UPLOAD_MULTIPLE_PHOTOS_TITLE'));
     // $css = JURI::root(true) . '/components/com_community/assets/uploader/style.css';
     // $document->addStyleSheet($css);
     // Display submenu on the page.
     //$this->showSubmenu();
     // Add create album link
     $groupId = $jinput->request->get('groupid', '', 'INT');
     //JRequest::getVar( 'groupid' , '' , 'REQUEST' );
     $type = PHOTOS_USER_TYPE;
     // Get the configuration for uploader tool
     $config = CFactory::getConfig();
     if ($handler->isExceedUploadLimit() && !CownerHelper::isCommunityAdmin()) {
         return;
     }
     echo $this->_htmluploader();
 }
Example #2
0
 public function uploader()
 {
     $document = JFactory::getDocument();
     $handler = $this->_getHandler();
     $albumId = JRequest::getInt('albumid', -1);
     $my = CFactory::getUser();
     $document->setTitle(JText::_('COM_COMMUNITY_PHOTOS_UPLOAD_MULTIPLE_PHOTOS_TITLE'));
     $this->addPathway(JText::_('COM_COMMUNITY_PHOTOS'), CRoute::_('index.php?option=com_community&view=photos'));
     if ($albumId != -1) {
         $album =& JTable::getInstance('Album', 'CTable');
         $album->load($albumId);
         $this->addPathway($album->name, $handler->getAlbumURI($album->id));
     }
     $this->addPathway(JText::_('COM_COMMUNITY_PHOTOS_UPLOAD_MULTIPLE_PHOTOS_TITLE'));
     $css = rtrim(JURI::root(), '/') . '/components/com_community/assets/uploader/style.css';
     $document->addStyleSheet($css);
     // Display submenu on the page.
     $this->showSubmenu();
     // Add create album link
     $groupId = JRequest::getVar('groupid', '', 'REQUEST');
     $type = PHOTOS_USER_TYPE;
     // Get the configuration for uploader tool
     $config = CFactory::getConfig();
     $groupId = JRequest::getVar('groupid', '', 'REQUEST');
     CFactory::load('helpers', 'limits');
     CFactory::load('helpers', 'owner');
     if ($handler->isExceedUploadLimit() && !CownerHelper::isCommunityAdmin()) {
         return;
     }
     /*$useFlash	= $config->get( 'flashuploader' );
     
     		if( $useFlash )
     		{
     			echo $this->_flashuploader();
     		}
     		else
     		{*/
     echo $this->_htmluploader();
     //}
 }