function display($tpl = null) { $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $path = PhocaGalleryPath::getPath(); $this->tmpl['avatarpathabs'] = $path->avatar_abs . DS . 'thumbs' . DS . 'phoca_thumb_s_'; $this->tmpl['avatarpathrel'] = $path->avatar_rel . 'thumbs/phoca_thumb_s_'; $this->tmpl['avtrpathrel'] = $path->avatar_rel; JHTML::stylesheet('administrator/components/com_phocagallery/assets/phocagallery.css'); $document =& JFactory::getDocument(); $document->addCustomTag(PhocaGalleryRenderAdmin::renderIeCssLink(1)); // Button JHTML::_('behavior.modal', 'a.modal_phocagalleryusers'); $this->button = new JObject(); $this->button->set('modal', true); $this->button->set('methodname', 'modal-button'); //$this->button->set('link', $link); $this->button->set('text', JText::_('COM_PHOCAGALLERY_DISPLAY_IMAGE_DETAIL')); //$this->button->set('name', 'image'); $this->button->set('modalname', 'modal_phocagalleryusers'); $this->button->set('options', "{handler: 'image', size: {x: 200, y: 150}}"); // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode("\n", $errors)); return false; } $this->addToolbar(); parent::display($tpl); }
function display($tpl = null) { $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->processImages(); JHTML::stylesheet('administrator/components/com_phocagallery/assets/phocagallery.css'); $document =& JFactory::getDocument(); $document->addCustomTag(PhocaGalleryRenderAdmin::renderIeCssLink(1)); $params = JComponentHelper::getParams('com_phocagallery'); $this->tmpl['enablethumbcreation'] = $params->get('enable_thumb_creation', 1); $this->tmpl['enablethumbcreationstatus'] = PhocaGalleryRenderAdmin::renderThumbnailCreationStatus((int) $this->tmpl['enablethumbcreation']); /*$app = JFactory::getApplication(); $uri = JFactory::getURI(); $db = JFactory::getDBO();*/ $this->tmpl['notapproved'] =& $this->get('NotApprovedImage'); // Button JHTML::_('behavior.modal', 'a.modal_phocagalleryimgs'); $this->button = new JObject(); $this->button->set('modal', true); $this->button->set('methodname', 'modal-button'); //$this->button->set('link', $link); $this->button->set('text', JText::_('COM_PHOCAGALLERY_DISPLAY_IMAGE_DETAIL')); //$this->button->set('name', 'image'); $this->button->set('modalname', 'modal_phocagalleryimgs'); $this->button->set('options', "{handler: 'image', size: {x: 200, y: 150}}"); $this->addToolbar(); parent::display($tpl); }
function display($tpl = null) { $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); /* * We need to load all items because of creating tree * After creating tree we get info from pagination * and will set displaying of categories for current pagination * E.g. pagination is limitstart 5, limit 5 - so only categories from 5 to 10 will be displayed */ if (!empty($this->items)) { $text = ''; // text is tree name e.g. Category >> Subcategory $tree = array(); $this->items = $this->processTree($this->items, $tree, 0, $text, -1); } //$mainframe = JFactory::getApplication(); //$document = JFactory::getDocument(); //$uri = JFactory::getURI(); $this->tmpl['notapproved'] = $this->get('NotApprovedCategory'); JHTML::stylesheet('administrator/components/com_phocagallery/assets/phocagallery.css'); $document =& JFactory::getDocument(); $document->addCustomTag(PhocaGalleryRenderAdmin::renderIeCssLink(1)); $params = JComponentHelper::getParams('com_phocagallery'); $this->tmpl['enablethumbcreation'] = $params->get('enable_thumb_creation', 1); $this->tmpl['enablethumbcreationstatus'] = PhocaGalleryRenderAdmin::renderThumbnailCreationStatus((int) $this->tmpl['enablethumbcreation']); $this->addToolbar(); parent::display($tpl); }
public function display($tpl = null) { $params =& JComponentHelper::getParams('com_phocagallery'); JResponse::allowCache(false); JHTML::stylesheet('administrator/components/com_phocagallery/assets/phocagallery.css'); $document =& JFactory::getDocument(); $document->addCustomTag(PhocaGalleryRenderAdmin::renderIeCssLink(1)); $path = PhocaGalleryPath::getPath(); $this->field = JRequest::getVar('field'); $this->fce = 'phocaSelectFolder_' . $this->field; $this->assignRef('session', JFactory::getSession()); $this->assign('path_orig_rel', $path->image_rel); $this->assignRef('folders', $this->get('folders')); $this->assignRef('state', $this->get('state')); parent::display($tpl); }
public function display($tpl = null) { $params =& JComponentHelper::getParams('com_phocagallery'); $app = JFactory::getApplication(); JResponse::allowCache(false); JHTML::stylesheet('administrator/components/com_phocagallery/assets/phocagallery.css'); $document =& JFactory::getDocument(); $document->addCustomTag(PhocaGalleryRenderAdmin::renderIeCssLink(1)); $this->tmpl['catid'] = JRequest::getVar('catid', 0, '', 'int'); $this->tmpl['field'] = JRequest::getVar('field', '', '', 'string', JREQUEST_NOTRIM); $this->tmpl['import'] = JRequest::getVar('import', 0, '', 'int'); $this->tmpl['ytblink'] = ''; $this->tmpl['ytbtitle'] = ''; $this->tmpl['ytbdesc'] = ''; $this->tmpl['ytbfilename'] = ''; if ($this->tmpl['import'] == '1') { $this->tmpl['ytblink'] = $app->getUserStateFromRequest($this->context . '.ytb_link', 'ytb_link', $this->tmpl['ytblink'], 'string'); $this->tmpl['ytbtitle'] = $app->getUserStateFromRequest($this->context . '.ytb_title', 'ytb_titel', $this->tmpl['ytbtitle'], 'string'); $this->tmpl['ytbdesc'] = $app->getUserStateFromRequest($this->context . '.ytb_desc', 'ytb_desc', $this->tmpl['ytbdesc'], 'string'); $this->tmpl['ytbfilename'] = $app->getUserStateFromRequest($this->context . '.ytb_filename', 'ytb_filename', $this->tmpl['ytbfilename'], 'string'); } parent::display($tpl); }
public function display($tpl = null) { $this->field = JRequest::getVar('field'); $this->fce = 'phocaSelectFileName_' . $this->field; JHTML::stylesheet('administrator/components/com_phocagallery/assets/phocagallery.css'); $document =& JFactory::getDocument(); $document->addCustomTag(PhocaGalleryRenderAdmin::renderIeCssLink(1)); $this->folderstate = $this->get('FolderState'); $this->images = $this->get('Images'); $this->folders = $this->get('Folders'); $this->session = JFactory::getSession(); $params = JComponentHelper::getParams('com_phocagallery'); $this->tmpl['enablethumbcreation'] = $params->get('enable_thumb_creation', 1); $this->tmpl['enablethumbcreationstatus'] = PhocaGalleryRenderAdmin::renderThumbnailCreationStatus((int) $this->tmpl['enablethumbcreation']); $this->tmpl['multipleuploadchunk'] = $params->get('multiple_upload_chunk', 0); $this->tmpl['large_image_width'] = $params->get('large_image_width', 640); $this->tmpl['large_image_height'] = $params->get('large_image_height', 480); $this->tmpl['javaboxwidth'] = $params->get('java_box_width', 480); $this->tmpl['javaboxheight'] = $params->get('java_box_height', 480); $this->tmpl['uploadmaxsize'] = $params->get('upload_maxsize', 3145728); $this->tmpl['uploadmaxsizeread'] = PhocaGalleryFile::getFileSizeReadable($this->tmpl['uploadmaxsize']); $this->tmpl['uploadmaxreswidth'] = $params->get('upload_maxres_width', 3072); $this->tmpl['uploadmaxresheight'] = $params->get('upload_maxres_height', 2304); $this->tmpl['enablejava'] = $params->get('enable_java', 0); $this->tmpl['enablemultiple'] = $params->get('enable_multiple', 0); $this->tmpl['multipleuploadmethod'] = $params->get('multiple_upload_method', 1); $this->tmpl['multipleresizewidth'] = $params->get('multiple_resize_width', -1); $this->tmpl['multipleresizeheight'] = $params->get('multiple_resize_height', -1); $this->currentFolder = ''; if (isset($this->folderstate->folder) && $this->folderstate->folder != '') { $this->currentFolder = $this->folderstate->folder; } // - - - - - - - - - - //TABS // - - - - - - - - - - $this->tmpl['tab'] = JRequest::getVar('tab', 0, '', 'int'); $this->tmpl['displaytabs'] = 0; // UPLOAD $this->tmpl['currenttab']['upload'] = $this->tmpl['displaytabs']; $this->tmpl['displaytabs']++; // MULTIPLE UPLOAD if ((int) $this->tmpl['enablemultiple'] >= 0) { $this->tmpl['currenttab']['multipleupload'] = $this->tmpl['displaytabs']; $this->tmpl['displaytabs']++; } // MULTIPLE UPLOAD if ($this->tmpl['enablejava'] >= 0) { $this->tmpl['currenttab']['javaupload'] = $this->tmpl['displaytabs']; $this->tmpl['displaytabs']++; } // - - - - - - - - - - - // Upload // - - - - - - - - - - - $sU = new PhocaGalleryFileUploadSingle(); $sU->returnUrl = 'index.php?option=com_phocagallery&view=phocagalleryi&tab=' . $this->tmpl['currenttab']['upload'] . '&tmpl=component&field=' . $this->field . '&folder=' . $this->currentFolder; $sU->tab = $this->tmpl['currenttab']['upload']; $this->tmpl['su_output'] = $sU->getSingleUploadHTML(); $this->tmpl['su_url'] = JURI::base() . 'index.php?option=com_phocagallery&task=phocagalleryu.upload&' . $this->session->getName() . '=' . $this->session->getId() . '&' . JUtility::getToken() . '=1&viewback=phocagalleryi&field=' . $this->field . '&' . 'folder=' . $this->currentFolder . '&tab=' . $this->tmpl['currenttab']['upload']; // - - - - - - - - - - - // Multiple Upload // - - - - - - - - - - - // Get infos from multiple upload $muFailed = JRequest::getVar('mufailed', '0', '', 'int'); $muUploaded = JRequest::getVar('muuploaded', '0', '', 'int'); $this->tmpl['mu_response_msg'] = $muUploadedMsg = ''; if ($muUploaded > 0) { $muUploadedMsg = JText::_('COM_PHOCAGALLERY_COUNT_UPLOADED_IMG') . ': ' . $muUploaded; } if ($muFailed > 0) { $muFailedMsg = JText::_('COM_PHOCAGALLERY_COUNT_NOT_UPLOADED_IMG') . ': ' . $muFailed; } if ($muFailed > 0 && $muUploaded > 0) { $this->tmpl['mu_response_msg'] = '<div class="pgunsetmsg">' . JText::_('COM_PHOCAGALLERY_COUNT_UPLOADED_IMG') . ': ' . $muUploaded . '<br />' . JText::_('COM_PHOCAGALLERY_COUNT_NOT_UPLOADED_IMG') . ': ' . $muFailed . '</div>'; } else { if ($muFailed > 0 && $muUploaded == 0) { $this->tmpl['mu_response_msg'] = '<div class="pgerrormsg">' . JText::_('COM_PHOCAGALLERY_COUNT_NOT_UPLOADED_IMG') . ': ' . $muFailed . '</div>'; } else { if ($muFailed == 0 && $muUploaded > 0) { $this->tmpl['mu_response_msg'] = '<div class="pgsuccessmsg">' . JText::_('COM_PHOCAGALLERY_COUNT_UPLOADED_IMG') . ': ' . $muUploaded . '</div>'; } else { $this->tmpl['mu_response_msg'] = ''; } } } if ((int) $this->tmpl['enablemultiple'] >= 0) { PhocaGalleryFileUploadMultiple::renderMultipleUploadLibraries(); $mU = new PhocaGalleryFileUploadMultiple(); $mU->frontEnd = 0; $mU->method = $this->tmpl['multipleuploadmethod']; $mU->url = JURI::base() . 'index.php?option=com_phocagallery&task=phocagalleryu.multipleupload&' . $this->session->getName() . '=' . $this->session->getId() . '&' . JUtility::getToken() . '=1&tab=' . $this->tmpl['currenttab']['multipleupload'] . '&field=' . $this->field . '&folder=' . $this->currentFolder; $mU->reload = JURI::base() . 'index.php?option=com_phocagallery&view=phocagalleryi&tmpl=component&' . $this->session->getName() . '=' . $this->session->getId() . '&' . JUtility::getToken() . '=1&tab=' . $this->tmpl['currenttab']['multipleupload'] . '&' . 'field=' . $this->field . '&folder=' . $this->currentFolder; $mU->maxFileSize = PhocaGalleryFileUploadMultiple::getMultipleUploadSizeFormat($this->tmpl['uploadmaxsize']); $mU->chunkSize = '1mb'; $mU->imageHeight = $this->tmpl['multipleresizeheight']; $mU->imageWidth = $this->tmpl['multipleresizewidth']; $mU->imageQuality = 100; $mU->renderMultipleUploadJS(0, $this->tmpl['multipleuploadchunk']); $this->tmpl['mu_output'] = $mU->getMultipleUploadHTML(); } // - - - - - - - - - - - // Java Upload // - - - - - - - - - - - if ((int) $this->tmpl['enablejava'] >= 0) { $jU = new PhocaGalleryFileUploadJava(); $jU->width = $this->tmpl['javaboxwidth']; $jU->height = $this->tmpl['javaboxheight']; $jU->resizewidth = $this->tmpl['multipleresizewidth']; $jU->resizeheight = $this->tmpl['multipleresizeheight']; $jU->uploadmaxsize = $this->tmpl['uploadmaxsize']; $jU->returnUrl = JURI::base() . 'index.php?option=com_phocagallery&view=phocagalleryi&tmpl=component&tab=' . $this->tmpl['currenttab']['javaupload'] . '&' . 'field=' . $this->field . '&folder=' . $this->currentFolder; $jU->url = JURI::base() . 'index.php?option=com_phocagallery&task=phocagalleryu.javaupload&' . $this->session->getName() . '=' . $this->session->getId() . '&' . JUtility::getToken() . '=1&viewback=phocagalleryi&tab=' . $this->tmpl['currenttab']['javaupload'] . '&field=' . $this->field . '&folder=' . $this->currentFolder; $jU->source = JURI::root(true) . '/components/com_phocagallery/assets/java/jupload/wjhk.jupload.jar'; $this->tmpl['ju_output'] = $jU->getJavaUploadHTML(); } $this->tmpl['ftp'] = !JClientHelper::hasCredentials('ftp'); parent::display($tpl); echo JHTML::_('behavior.keepalive'); }