当前位置: 首页>>代码示例>>PHP>>正文


PHP PhocaGalleryImage::isExtImage方法代码示例

本文整理汇总了PHP中PhocaGalleryImage::isExtImage方法的典型用法代码示例。如果您正苦于以下问题:PHP PhocaGalleryImage::isExtImage方法的具体用法?PHP PhocaGalleryImage::isExtImage怎么用?PHP PhocaGalleryImage::isExtImage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PhocaGalleryImage的用法示例。


在下文中一共展示了PhocaGalleryImage::isExtImage方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: display


//.........这里部分代码省略.........
         echo $close['html'];
         //Some problem with cache - Joomla! return this message if there is no reason for do it.
         //$this->tmpl['pl']		= 'index.php?option=com_users&view=login&return='.base64_encode($uri->toString());
         //$app->redirect(JRoute::_($this->tmpl['pl'], false), JText::_('COM_PHOCAGALLERY_NOT_AUTHORISED_ACTION'));
         exit;
     }
     // - - - - - - - - - - - - - - - - - - - -
     phocagalleryimport('phocagallery.image.image');
     phocagalleryimport('phocagallery.render.renderdetailbutton');
     // Javascript Slideshow buttons
     $detailButton = new PhocaGalleryRenderDetailButton();
     if ($this->tmpl['enable_multibox'] == 1) {
         $detailButton->setType('multibox');
     }
     $item->reloadbutton = $detailButton->getReload($item->catslug, $item->slug);
     $item->closebutton = $detailButton->getClose($item->catslug, $item->slug);
     $item->closetext = $detailButton->getCloseText($item->catslug, $item->slug);
     $item->nextbutton = $detailButton->getNext((int) $item->catid, (int) $item->id, (int) $item->ordering);
     $item->nextbuttonhref = $detailButton->getNext((int) $item->catid, (int) $item->id, (int) $item->ordering, 1);
     $item->prevbutton = $detailButton->getPrevious((int) $item->catid, (int) $item->id, (int) $item->ordering);
     $slideshowData = $detailButton->getJsSlideshow((int) $item->catid, (int) $item->id, (int) $var['slideshow'], $item->catslug, $item->slug);
     $item->slideshowbutton = $slideshowData['icons'];
     $item->slideshowfiles = $slideshowData['files'];
     $item->slideshow = $var['slideshow'];
     $item->download = $var['download'];
     // ALT VALUE
     $altValue = PhocaGalleryRenderFront::getAltValue($this->tmpl['altvalue'], $item->title, $item->description, $item->metadesc);
     $item->altvalue = $altValue;
     // Get file thumbnail or No Image
     $item->filenameno = $item->filename;
     $item->filename = PhocaGalleryFile::getTitleFromFile($item->filename, 1);
     $item->filesize = PhocaGalleryFile::getFileSize($item->filenameno);
     $realImageSize = '';
     $extImage = PhocaGalleryImage::isExtImage($item->extid);
     if ($extImage) {
         $item->extl = $item->extl;
         $item->exto = $item->exto;
         $realImageSize = PhocaGalleryImage::getRealImageSize($item->extl, '', 1);
         $item->imagesize = PhocaGalleryImage::getImageSize($item->exto, 1, 1);
         if ($item->extw != '') {
             $extw = explode(',', $item->extw);
             $item->extw = $extw[0];
         }
         $correctImageRes = PhocaGalleryPicasa::correctSizeWithRate($item->extw, $item->exth, $this->tmpl['picasa_correct_width_l'], $this->tmpl['picasa_correct_height_l']);
         $item->linkimage = JHtml::_('image', $item->extl, $item->altvalue, array('width' => $correctImageRes['width'], 'height' => $correctImageRes['height'], 'class' => 'pg-detail-image'));
         $item->realimagewidth = $correctImageRes['width'];
         $item->realimageheight = $correctImageRes['height'];
     } else {
         $item->linkthumbnailpath = PhocaGalleryImageFront::displayCategoryImageOrNoImage($item->filenameno, 'large');
         $item->linkimage = JHtml::_('image', $item->linkthumbnailpath, $item->altvalue, array('class' => 'pg-detail-image'));
         $realImageSize = PhocaGalleryImage::getRealImageSize($item->filenameno);
         $item->imagesize = PhocaGalleryImage::getImageSize($item->filenameno, 1);
         if (isset($realImageSize['w']) && isset($realImageSize['h'])) {
             $item->realimagewidth = $realImageSize['w'];
             $item->realimageheight = $realImageSize['h'];
         } else {
             $item->realimagewidth = $this->tmpl['largewidth'];
             $item->realimageheight = $this->tmpl['largeheight'];
         }
     }
     // Add Statistics
     $model->hit(JRequest::getVar('id', '', '', 'int'));
     // R A T I N G
     // Only registered (VOTES + COMMENTS)
     $this->tmpl['notregisteredimg'] = true;
     $this->tmpl['usernameimg'] = '';
开发者ID:optimosolution,项目名称:marhk,代码行数:67,代码来源:view.html.php

示例2: display


//.........这里部分代码省略.........
                        //$unSet  	= 0;
                        break;
                    } else {
                        $unSetPHCA = 1;
                        $unSet = 1;
                    }
                }
                if ($unSetPHCA == 1) {
                    unset($this->categories[$key]);
                    continue;
                }
            }
            // Link
            $this->categories[$key]->link = PhocaGalleryRoute::getCategoryRoute($item->id, $item->alias);
            // USER RIGHT - ACCESS - - - - -
            // First Check - check if we can display category
            $rightDisplay = 1;
            if (!empty($this->categories[$key])) {
                $rightDisplay = PhocaGalleryAccess::getUserRight('accessuserid', $this->categories[$key]->accessuserid, $this->categories[$key]->access, $user->getAuthorisedViewLevels(), $user->get('id', 0), $display_access_category);
            }
            // Second Check - if we can display hidden category, set Key icon for them
            //                if we don't have access right to see them
            // Display Key Icon (in case we want to display unaccessable categories in list view)
            $rightDisplayKey = 1;
            if ($display_access_category == 1) {
                // we simulate that we want not to display unaccessable categories
                // so if we get rightDisplayKey = 0 then the key will be displayed
                if (!empty($this->categories[$key])) {
                    $rightDisplayKey = PhocaGalleryAccess::getUserRight('accessuserid', $this->categories[$key]->accessuserid, $this->categories[$key]->access, $user->getAuthorisedViewLevels(), $user->get('id', 0), 0);
                    // 0 - simulation
                }
            }
            // Is Ext Image Album?
            $extCategory = PhocaGalleryImage::isExtImage($this->categories[$key]->extid, $this->categories[$key]->extfbcatid);
            // DISPLAY AVATAR, IMAGE(ordered), IMAGE(not ordered, not recursive) OR FOLDER ICON
            $displayAvatar = 0;
            if ($this->tmpl['categoriesdisplayavatar'] == 1 && isset($this->categories[$key]->avatar) && $this->categories[$key]->avatar != '' && $this->categories[$key]->avatarapproved == 1 && $this->categories[$key]->avatarpublished == 1) {
                $sizeString = PhocaGalleryImageFront::getSizeString($this->tmpl['image_categories_size']);
                $pathAvatarAbs = $path->avatar_abs . 'thumbs' . DS . 'phoca_thumb_' . $sizeString . '_' . $this->categories[$key]->avatar;
                $pathAvatarRel = $path->avatar_rel . 'thumbs/phoca_thumb_' . $sizeString . '_' . $this->categories[$key]->avatar;
                if (JFile::exists($pathAvatarAbs)) {
                    $this->categories[$key]->linkthumbnailpath = $pathAvatarRel;
                    $displayAvatar = 1;
                }
            }
            if ($displayAvatar == 0) {
                if ($extCategory) {
                    if ($this->tmpl['categories_mosaic_images'] == 1) {
                        if ($this->tmpl['categoriesimageordering'] == 10) {
                            // Special cannot be used in this case:
                            $categoriesImageOrdering = 1;
                            // set to default ordering
                        }
                        $this->categories[$key]->filenames = PhocaGalleryImageFront::getCategoryImages($this->categories[$key]->id, $categoriesImageOrdering);
                        $this->categories[$key]->mosaic = PhocaGalleryImageFront::renderMosaic($this->categories[$key]->filenames, $this->tmpl['image_categories_size'], 1, $this->tmpl['picasa_correct_width'], $this->tmpl['picasa_correct_height']);
                    } else {
                        if ($this->tmpl['categoriesimageordering'] != 10) {
                            $imagePic = PhocaGalleryImageFront::getRandomImageRecursive($this->categories[$key]->id, $categoriesImageOrdering, 1);
                            if ($rightDisplayKey == 0) {
                                $imagePic = new StdClass();
                                $imagePic->exts = '';
                                $imagePic->extm = '';
                                $imagePic->extw = '';
                                $imagePic->exth = '';
                            }
                            $fileThumbnail = PhocaGalleryImageFront::displayCategoriesExtImgOrFolder($imagePic->exts, $imagePic->extm, $imagePic->extw, $imagePic->exth, $this->tmpl['image_categories_size'], $rightDisplayKey);
开发者ID:01J,项目名称:bealtine,代码行数:67,代码来源:view.html.php

示例3: display

 function display($tpl = null)
 {
     $app = JFactory::getApplication();
     $user = JFactory::getUser();
     $userLevels = implode(',', $user->authorisedLevels());
     $db =& JFactory::getDBO();
     //$menu 		= &JSite::getMenu();
     $menu = JFactory::getApplication()->getMenu();
     $document =& JFactory::getDocument();
     $params = $app->getParams();
     // Specific category
     $id = JRequest::getVar('id', 0, '', 'int');
     // Params
     $categories = $params->get('feed_cat_ids', '');
     $ordering = $params->get('feed_img_ordering', 6);
     $imgCount = $params->get('feed_img_count', 5);
     $feedTitle = $params->get('feed_title', JText::_('COM_PHOCAGALLERY_GALLERY'));
     $tmpl['picasa_correct_width_m'] = (int) $params->get('medium_image_width', 100);
     $tmpl['picasa_correct_height_m'] = (int) $params->get('medium_image_height', 100);
     $document->setTitle($this->escape(html_entity_decode($feedTitle)));
     if ($id > 0) {
         $wheres[] = ' c.id =' . (int) $id;
     } else {
         if (count($categories) > 1) {
             JArrayHelper::toInteger($categories);
             $categoriesString = implode(',', $categories);
             $wheres[] = ' c.id IN ( ' . $categoriesString . ' ) ';
         } else {
             if ((int) $categories > 0) {
                 $wheres[] = ' c.id IN ( ' . $categories . ' ) ';
             }
         }
     }
     $imageOrdering = PhocaGalleryOrdering::getOrderingString($ordering, 6);
     $wheres[] = ' a.published = 1';
     $wheres[] = ' a.approved = 1';
     $wheres[] = ' c.published = 1';
     $wheres[] = ' c.approved = 1';
     $wheres[] = ' c.access IN (' . $userLevels . ')';
     $u = " (c.accessuserid LIKE '%0%' OR c.accessuserid LIKE '%-1%' OR c.accessuserid LIKE '%," . (int) $user->id . "' OR c.accessuserid LIKE '" . (int) $user->id . ",%' OR c.accessuserid LIKE '%," . (int) $user->id . ",%' OR c.accessuserid =" . (int) $user->id . ") ";
     $e = 'c.accessuserid IS NULL';
     $wheres[] = ' CASE WHEN c.accessuserid IS NOT NULL THEN ' . $u . ' ELSE ' . $e . ' END';
     $query = 'SELECT a.*, c.alias as catalias, c.title as categorytitle' . ' FROM #__phocagallery AS a' . ' LEFT JOIN #__phocagallery_categories AS c ON a.catid = c.id' . ' WHERE ' . implode(' AND ', $wheres) . $imageOrdering['output'];
     $db->setQuery($query, 0, $imgCount);
     $images = $db->loadObjectList();
     foreach ($images as $keyI => $value) {
         $item = new JFeedItem();
         $title = $this->escape($value->title);
         $title = html_entity_decode($title);
         $item->title = $title;
         $link = PhocaGalleryRoute::getCategoryRoute($value->catid, $value->catalias);
         $item->link = JRoute::_($link);
         // imgDate
         $imgDate = '';
         $imgDate = JHtml::Date($value->date, "Y-m-d h:m:s");
         if ($imgDate != '') {
             $item->date = $imgDate;
         }
         $item->description = '';
         if ($value->description != '') {
             $item->description .= '<div>' . $value->description . '</div>';
         }
         $extImage = false;
         if (isset($value->extid)) {
             $extImage = PhocaGalleryImage::isExtImage($value->extid);
         }
         // Trying to fix but in Joomla! method $this->_relToAbs - it cannot work with JRoute links :-(
         $itemL = str_replace(JURI::base(true), '', $item->link);
         if (substr($itemL, 0, 1) == '/') {
             $itemL = substr_replace($itemL, '', 0, 1);
         }
         $itemL = JURI::base() . $itemL;
         // Should really not happen
         $itemLTmp = str_replace('http://', '', $itemL);
         $pos = stripos($itemLTmp, '//');
         if ($pos !== false) {
             $itemLTmp = str_replace('//', '/', $itemLTmp);
             $itemL = 'http://' . $itemLTmp;
         }
         // - - - - - - - - - - -
         if ($extImage) {
             $correctImageRes = PhocaGalleryPicasa::correctSizeWithRate($value->extw, $value->exth, $tmpl['picasa_correct_width_m'], $tmpl['picasa_correct_height_m']);
             $imgLink = $value->extm;
             //$i = '<div><a href="'.JRoute::_($link).'"><img src="'.$imgLink .'" border="0" width="'.$correctImageRes['width'].'" height="'.$correctImageRes['height'].'" /></a></div>';
             $i = '<div><a href="' . $itemL . '"><img src="' . $imgLink . '" border="0" /></a></div>';
         } else {
             $imgLink = PhocaGalleryImageFront::displayCategoryImageOrNoImage($value->filename, 'medium');
             $i = '<div><a href="' . $itemL . '"><img src="' . $imgLink . '" border="0" /></a></div>';
         }
         $item->description .= $i;
         $item->category = $value->categorytitle;
         /*if ($value->author != '') {
         			$item->author		= $value->author;
         		}*/
         $document->addItem($item);
     }
 }
开发者ID:sansandeep143,项目名称:av,代码行数:97,代码来源:view.feed.php

示例4: foreach

    }
    echo '<div class="pg-multibox-username" style="padding-top: ' . $this->tmpl['useravatarmiddle'] . 'px;">' . $this->item->usernameno . '</div>';
    echo '<div style="clear:both"></div>';
}
// Rating
if ($this->tmpl['mb_rating']) {
    echo "\n";
    echo $this->loadTemplate('rating');
    echo "\n";
}
//Thumbnails
if ($this->tmpl['mb_thumbs']) {
    if (!empty($this->tmpl['mb_thumbs_data'])) {
        echo '<div class="pg-multibox-thumbs-box" style="width: ' . (int) $this->tmpl['multibox_thubms_box_width'] . 'px;">';
        foreach ($this->tmpl['mb_thumbs_data'] as $k => $v) {
            $extImage = PhocaGalleryImage::isExtImage($v->extid);
            //$altValue	= PhocaGalleryRenderFront::getAltValue($this->tmpl['altvalue'], $v->title, $v->description, $v->metadesc);
            $altValue = '';
            //Save resources - not necessary
            if ($extImage) {
                $img = JHtml::_('image', $v->exts, $altValue);
            } else {
                $linkthumbnailpath = PhocaGalleryImageFront::displayCategoryImageOrNoImage($v->filename, 'small');
                $img = JHtml::_('image', $linkthumbnailpath, $altValue);
            }
            if ($this->tmpl['detailwindow'] == 7) {
                $tmplCom = '';
            } else {
                $tmplCom = '&tmpl=component';
            }
            echo '<div class="pg-multibox-thumbs-item"><a href="' . JRoute::_('index.php?option=com_phocagallery&view=detail&catid=' . $v->catslug . '&id=' . $v->slug . $tmplCom . '&Itemid=' . $this->itemId) . '">';
开发者ID:01J,项目名称:skazkipronebo,代码行数:31,代码来源:default_multibox.php

示例5: getStatisticsImages

 function getStatisticsImages($catId, $order, $order2 = 'ASC', $limit = 3)
 {
     $query = 'SELECT i.*' . ' FROM #__phocagallery AS i' . ' WHERE i.catid = ' . (int) $catId . ' AND i.published = 1' . ' AND i.approved = 1' . ' ORDER BY ' . $order . ' ' . $order2;
     $this->_db->setQuery($query, 0, $limit);
     $statistics = $this->_db->loadObjectList();
     $item = array();
     $count = 0;
     $total = count($statistics);
     for ($i = 0; $i < $total; $i++) {
         $statisticsData[$count] = $statistics[$i];
         $item[$i] =& $statisticsData[$count];
         $item[$i]->slug = $item[$i]->id . ':' . $item[$i]->alias;
         $item[$i]->item_type = "image";
         $extImg = PhocaGalleryImage::isExtImage($item[$i]->extid);
         if ($extImg) {
             $item[$i]->linkthumbnailpath = $item[$i]->extm;
         } else {
             $item[$i]->linkthumbnailpath = PhocaGalleryImageFront::displayCategoryImageOrNoImage($item[$i]->filename, 'medium');
         }
         $count++;
     }
     return $item;
 }
开发者ID:optimosolution,项目名称:marhk,代码行数:23,代码来源:category.php

示例6: foreach

 echo $map->setZoomOpt($this->tmplGeo['categorieszoom']) . ',' . "\n";
 echo $map->setCenterOpt() . ',' . "\n";
 echo $map->setTypeControlOpt() . ',' . "\n";
 echo $map->setNavigationControlOpt() . ',' . "\n";
 echo $map->setScaleControlOpt(1) . ',' . "\n";
 echo $map->setScrollWheelOpt(1) . ',' . "\n";
 echo $map->setDisableDoubleClickZoomOpt(0) . ',' . "\n";
 echo $map->setMapTypeOpt() . "\n";
 echo $map->endOptions();
 echo $map->setMap();
 foreach ($this->categories as $category) {
     if (isset($category->longitude) && $category->longitude != '' && $category->longitude != 0 && (isset($category->latitude) && $category->latitude != '' && $category->latitude != 0)) {
         if ($category->geotitle == '') {
             $category->geotitle = $category->title;
         }
         $extCategory = PhocaGalleryImage::isExtImage($category->extid);
         if ($extCategory) {
             $correctImageRes = PhocaGalleryPicasa::correctSizeWithRate($category->extw, $category->exth, $this->tmpl['picasa_correct_width'], $this->tmpl['picasa_correct_height']);
             $imgLink = JHtml::_('image', $category->linkthumbnailpath, str_replace('&raquo;', '-', $category->title), array('width' => $correctImageRes['width'], 'height' => $correctImageRes['height']));
         } else {
             $imgLink = JHtml::_('image', $category->linkthumbnailpath, PhocaGalleryText::strTrimAll(addslashes($category->geotitle)));
         }
         $text = '<div style="text-align:left">' . '<table border="0" cellspacing="5" cellpadding="5">' . '<tr>' . '<td align="left" colspan="2"><b><a href="' . $category->link . '">' . PhocaGalleryText::strTrimAll(addslashes($category->geotitle)) . '</a></b></td>' . '</tr>' . '<tr>' . '<td valign="top" align="left"><a href="' . $category->link . '">' . $imgLink . '</a></td>' . '<td valign="top" align="left">' . PhocaGalleryText::strTrimAll(addslashes($category->description)) . '</td>' . '</tr></table></div>';
         // Markers
         $iconOutput = $map->setMarkerIcon(0);
         echo $iconOutput['js'];
         echo $map->setMarker($category->id, $category->geotitle, $category->description, $category->latitude, $category->longitude, $iconOutput['icon'], $text);
         echo $map->setListener();
     }
 }
 echo $map->endMapF();
开发者ID:sansandeep143,项目名称:av,代码行数:31,代码来源:default_map.php

示例7: display


//.........这里部分代码省略.........
         // Seems we are in iframe
         $this->tmpl['enable_multibox_iframe'] = 1;
     }
     // CSS
     PhocaGalleryRenderFront::renderAllCSS();
     if ($this->tmpl['gallerymetakey'] != '') {
         $document->setMetaData('keywords', $this->tmpl['gallerymetakey']);
     }
     if ($this->tmpl['gallerymetadesc'] != '') {
         $document->setMetaData('description', $this->tmpl['gallerymetadesc']);
     }
     // PARAMS - Open window parameters - modal popup box or standard popup window
     $detail_window = $this->params->get('detail_window', 0);
     // Plugin information
     if (isset($get['comment']) && $get['comment'] != '') {
         $detail_window = $get['comment'];
     }
     // Only registered (VOTES + COMMENTS)
     $this->tmpl['not_registered'] = true;
     $this->tmpl['name'] = '';
     if ($access) {
         $this->tmpl['not_registered'] = false;
         $this->tmpl['name'] = $user->name;
     }
     $document->addScript(JURI::base(true) . '/media/com_phocagallery/js/comments.js');
     $document->addCustomTag(PhocaGalleryRenderFront::renderCommentJS((int) $this->tmpl['maxcommentchar']));
     $this->tmpl['already_commented'] = PhocaGalleryCommentImage::checkUserComment((int) $this->tmpl['id'], (int) $user->id);
     $commentItem = PhocaGalleryCommentImage::displayComment((int) $this->tmpl['id']);
     // PARAMS - Display Description in Detail window - set the font color
     $this->tmpl['detailwindowbackgroundcolor'] = $this->params->get('detail_window_background_color', '#ffffff');
     $this->tmpl['detailwindow'] = $this->params->get('detail_window', 0);
     $description_lightbox_font_color = $this->params->get('description_lightbox_font_color', '#ffffff');
     $description_lightbox_bg_color = $this->params->get('description_lightbox_bg_color', '#000000');
     $description_lightbox_font_size = $this->params->get('description_lightbox_font_size', 12);
     // NO SCROLLBAR IN DETAIL WINDOW
     $document->addCustomTag("<style type=\"text/css\"> \n" . " html,body, .contentpane{background:" . $this->tmpl['detailwindowbackgroundcolor'] . ";text-align:left;} \n" . " center, table {background:" . $this->tmpl['detailwindowbackgroundcolor'] . ";} \n" . " #sbox-window {background-color:#fff;padding:5px} \n" . " </style> \n");
     $model = $this->getModel();
     $item = $model->getData();
     $this->tmpl['imgtitle'] = $item->title;
     // Back button
     $this->tmpl['backbutton'] = '';
     if ($this->tmpl['detailwindow'] == 7 || $this->tmpl['display_comment_nopup']) {
         // Display Image
         // Access check - don't display the image if you have no access to this image (if user add own url)
         // USER RIGHT - ACCESS - - - - - - - - - -
         $rightDisplay = 0;
         if (!empty($item)) {
             $rightDisplay = PhocaGalleryAccess::getUserRight('accessuserid', $item->cataccessuserid, $item->cataccess, $user->getAuthorisedViewLevels(), $user->get('id', 0), 0);
         }
         if ($rightDisplay == 0) {
             $this->tmpl['pl'] = 'index.php?option=com_users&view=login&return=' . base64_encode($uri->toString());
             $app->redirect(JRoute::_($this->tmpl['pl'], false), JText::_('COM_PHOCAGALLERY_NOT_AUTHORISED_ACTION'));
             exit;
         }
         // - - - - - - - - - - - - - - - - - - - -
         phocagalleryimport('phocagallery.image.image');
         $this->tmpl['backbutton'] = '<div><a href="' . JRoute::_('index.php?option=com_phocagallery&view=category&id=' . $this->tmpl['catid'] . '&Itemid=' . $this->itemId) . '"' . ' title="' . JText::_('COM_PHOCAGALLERY_BACK_TO_CATEGORY') . '">' . JHtml::_('image', 'media/com_phocagallery/images/icon-up-images.png', JText::_('COM_PHOCAGALLERY_BACK_TO_CATEGORY')) . '</a></div>';
         // Get file thumbnail or No Image
         $item->filenameno = $item->filename;
         $item->filename = PhocaGalleryFile::getTitleFromFile($item->filename, 1);
         $item->filesize = PhocaGalleryFile::getFileSize($item->filenameno);
         $altValue = PhocaGalleryRenderFront::getAltValue($this->tmpl['altvalue'], $item->title, $item->description, $item->metadesc);
         $item->altvalue = $altValue;
         $realImageSize = '';
         $extImage = PhocaGalleryImage::isExtImage($item->extid);
         if ($extImage) {
             $item->extl = $item->extl;
             $item->exto = $item->exto;
             $realImageSize = PhocaGalleryImage::getRealImageSize($item->extl, '', 1);
             $item->imagesize = PhocaGalleryImage::getImageSize($item->exto, 1, 1);
             if ($item->extw != '') {
                 $extw = explode(',', $item->extw);
                 $item->extw = $extw[0];
             }
             $correctImageRes = PhocaGalleryPicasa::correctSizeWithRate($item->extw, $item->exth, $this->tmpl['picasa_correct_width_l'], $this->tmpl['picasa_correct_height_l']);
             $item->linkimage = JHtml::_('image', $item->extl, $item->altvalue, array('width' => $correctImageRes['width'], 'height' => $correctImageRes['height']));
             $item->realimagewidth = $correctImageRes['width'];
             $item->realimageheight = $correctImageRes['height'];
         } else {
             $item->linkthumbnailpath = PhocaGalleryImageFront::displayCategoryImageOrNoImage($item->filenameno, 'large');
             $item->linkimage = JHtml::_('image', $item->linkthumbnailpath, $item->altvalue);
             $realImageSize = PhocaGalleryImage::getRealImageSize($item->filenameno);
             $item->imagesize = PhocaGalleryImage::getImageSize($item->filenameno, 1);
             if (isset($realImageSize['w']) && isset($realImageSize['h'])) {
                 $item->realimagewidth = $realImageSize['w'];
                 $item->realimageheight = $realImageSize['h'];
             } else {
                 $item->realimagewidth = $this->tmpl['largewidth'];
                 $item->realimageheight = $this->tmpl['largeheight'];
             }
         }
         $this->assignRef('item', $item);
     }
     // ACTION
     $this->assignRef('item', $item);
     $this->tmpl['action'] = $uri->toString();
     $this->assignRef('commentitem', $commentItem);
     $this->_prepareDocument($item);
     parent::display($tpl);
 }
开发者ID:scarsroga,项目名称:blog-soa,代码行数:101,代码来源:view.html.php

示例8: defined

<?php

defined('_JEXEC') or die('Restricted access');
$title = $this->item->filename;
$imgLink = JHtml::_('image', 'images/phocagallery/' . $this->item->filenameno, '');
$extImage = PhocaGalleryImage::isExtImage($this->item->extid);
if ($extImage) {
    $title = $this->item->title;
    $imgLink = JHtml::_('image', $this->item->exto, '');
}
if ($this->tmpl['backbutton'] != '') {
    echo $this->tmpl['backbutton'];
    echo '<div id="download-box"><div style="overflow:scroll;width:' . $this->tmpl['boxlargewidth'] . 'px;height:' . $this->tmpl['boxlargeheight'] . 'px;margin:0px;padding:0px;">' . $imgLink . '</div>';
    echo '<div id="download-msg-nopopup"><div>' . '<table width="360">' . '<tr><td align="left">' . JText::_('COM_PHOCAGALLERY_IMAGE_NAME') . ': </td><td>' . $title . '</td></tr>' . '<tr><td align="left">' . JText::_('COM_PHOCAGALLERY_IMAGE_FORMAT') . ': </td><td>' . $this->item->imagesize . '</td></tr>' . '<tr><td align="left">' . JText::_('COM_PHOCAGALLERY_IMAGE_SIZE') . ': </td><td>' . $this->item->filesize . '</td></tr>';
    echo '<tr><td align="left"><a title="' . JText::_('COM_PHOCAGALLERY_IMAGE_DOWNLOAD') . '" href="' . JRoute::_('index.php?option=com_phocagallery&view=detail&catid=' . $this->item->catslug . '&id=' . $this->item->slug . '&phocadownload=2' . '&Itemid=' . JRequest::getVar('Itemid', 0, '', 'int')) . '">' . JText::_('COM_PHOCAGALLERY_IMAGE_DOWNLOAD') . '</a></td><td>&nbsp;</td>';
    echo '</table>';
    echo '</div></div>';
} else {
    echo '<div id="download-box"><div style="overflow:scroll;width:' . $this->tmpl['boxlargewidth'] . 'px;height:' . $this->tmpl['boxlargeheight'] . 'px;margin:0px;padding:0px;">' . $imgLink . '</div>';
    echo '<div id="download-msg"><div>' . '<table width="360">' . '<tr><td align="left">' . JText::_('COM_PHOCAGALLERY_IMAGE_NAME') . ': </td><td>' . $title . '</td></tr>' . '<tr><td align="left">' . JText::_('COM_PHOCAGALLERY_IMAGE_FORMAT') . ': </td><td>' . $this->item->imagesize . '</td></tr>' . '<tr><td align="left">' . JText::_('COM_PHOCAGALLERY_IMAGE_SIZE') . ': </td><td>' . $this->item->filesize . '</td></tr>' . '<tr><td colspan="2" align="left"><small>' . JText::_('COM_PHOCAGALLERY_DOWNLOAD_IMAGE') . '</small></td></tr>';
    if ($this->tmpl['detailwindow'] == 4 || $this->tmpl['detailwindow'] == 5 || $this->tmpl['detailwindow'] == 7 || $this->tmpl['detailwindow'] == 9 || $this->tmpl['detailwindow'] == 10) {
    } else {
        echo '<tr><td>&nbsp;</td><td align="right">' . str_replace("%onclickclose%", $this->tmpl['detailwindowclose'], $this->item->closetext) . '</td></tr>';
    }
    echo '</table>';
    echo '</div></div>';
}
echo '<div id="phocaGallerySlideshowC" style="display:none"></div>';
//because of loaded slideshow js
if ($this->tmpl['detailwindow'] == 7) {
    PhocaGalleryUtils::footer();
开发者ID:sansandeep143,项目名称:av,代码行数:31,代码来源:default_download.php

示例9: display

 function display($tpl = null)
 {
     $app = JFactory::getApplication();
     // PLUGIN WINDOW - we get information from plugin
     $get = '';
     $get['info'] = $app->input->get('info', '', 'string');
     $this->itemId = $app->input->get('Itemid', 0, 'int');
     $document = JFactory::getDocument();
     $this->params = $app->getParams();
     $this->tmpl['enablecustomcss'] = $this->params->get('enable_custom_css', 0);
     $this->tmpl['customcss'] = $this->params->get('custom_css', '');
     // CSS
     PhocaGalleryRenderFront::renderAllCSS();
     // PARAMS - Open window parameters - modal popup box or standard popup window
     $this->tmpl['detailwindow'] = $this->params->get('detail_window', 0);
     // Plugin information
     if (isset($get['info']) && $get['info'] != '') {
         $this->tmpl['detailwindow'] = $get['info'];
     }
     // Close and Reload links (for different window types)
     $close = PhocaGalleryRenderFront::renderCloseReloadDetail($this->tmpl['detailwindow']);
     $detail_window_close = $close['detailwindowclose'];
     $detail_window_reload = $close['detailwindowreload'];
     // PARAMS - Display Description in Detail window - set the font color
     $this->tmpl['detailwindowbackgroundcolor'] = $this->params->get('detail_window_background_color', '#ffffff');
     $description_lightbox_font_color = $this->params->get('description_lightbox_font_color', '#ffffff');
     $description_lightbox_bg_color = $this->params->get('description_lightbox_bg_color', '#000000');
     $description_lightbox_font_size = $this->params->get('description_lightbox_font_size', 12);
     $this->tmpl['gallerymetakey'] = $this->params->get('gallery_metakey', '');
     $this->tmpl['gallerymetadesc'] = $this->params->get('gallery_metadesc', '');
     // NO SCROLLBAR IN DETAIL WINDOW
     /*		$document->addCustomTag( "<style type=\"text/css\"> \n" 
     			." html,body, .contentpane{overflow:hidden;background:".$this->tmpl['detailwindowbackgroundcolor'].";} \n" 
     			." center, table {background:".$this->tmpl['detailwindowbackgroundcolor'].";} \n" 
     			." #sbox-window {background-color:#fff;padding:5px} \n" 
     			." </style> \n");
     */
     // PARAMS - Get image height and width
     $this->tmpl['boxlargewidth'] = $this->params->get('front_modal_box_width', 680);
     $this->tmpl['boxlargeheight'] = $this->params->get('front_modal_box_height', 560);
     $front_popup_window_width = $this->tmpl['boxlargewidth'];
     //since version 2.2
     $front_popup_window_height = $this->tmpl['boxlargeheight'];
     //since version 2.2
     if ($this->tmpl['detailwindow'] == 1) {
         $this->tmpl['windowwidth'] = $front_popup_window_width;
         $this->tmpl['windowheight'] = $front_popup_window_height;
     } else {
         //modal popup window
         $this->tmpl['windowwidth'] = $this->tmpl['boxlargewidth'];
         $this->tmpl['windowheight'] = $this->tmpl['boxlargeheight'];
     }
     $this->tmpl['largemapwidth'] = (int) $this->tmpl['windowwidth'] - 20;
     $this->tmpl['largemapheight'] = (int) $this->tmpl['windowheight'] - 20;
     $this->tmpl['googlemapsapikey'] = $this->params->get('google_maps_api_key', '');
     $this->tmpl['exifinformation'] = $this->params->get('exif_information', 'FILE.FileName,FILE.FileDateTime,FILE.FileSize,FILE.MimeType,COMPUTED.Height,COMPUTED.Width,COMPUTED.IsColor,COMPUTED.ApertureFNumber,IFD0.Make,IFD0.Model,IFD0.Orientation,IFD0.XResolution,IFD0.YResolution,IFD0.ResolutionUnit,IFD0.Software,IFD0.DateTime,IFD0.Exif_IFD_Pointer,IFD0.GPS_IFD_Pointer,EXIF.ExposureTime,EXIF.FNumber,EXIF.ExposureProgram,EXIF.ISOSpeedRatings,EXIF.ExifVersion,EXIF.DateTimeOriginal,EXIF.DateTimeDigitized,EXIF.ShutterSpeedValue,EXIF.ApertureValue,EXIF.ExposureBiasValue,EXIF.MaxApertureValue,EXIF.MeteringMode,EXIF.LightSource,EXIF.Flash,EXIF.FocalLength,EXIF.SubSecTimeOriginal,EXIF.SubSecTimeDigitized,EXIF.ColorSpace,EXIF.ExifImageWidth,EXIF.ExifImageLength,EXIF.SensingMethod,EXIF.CustomRendered,EXIF.ExposureMode,EXIF.WhiteBalance,EXIF.DigitalZoomRatio,EXIF.FocalLengthIn35mmFilm,EXIF.SceneCaptureType,EXIF.GainControl,EXIF.Contrast,EXIF.Saturation,EXIF.Sharpness,EXIF.SubjectDistanceRange,GPS.GPSLatitudeRef,GPS.GPSLatitude,GPS.GPSLongitudeRef,GPS.GPSLongitude,GPS.GPSAltitudeRef,GPS.GPSAltitude,GPS.GPSTimeStamp,GPS.GPSStatus,GPS.GPSMapDatum,GPS.GPSDateStamp');
     // MODEL
     $model = $this->getModel();
     $info = $model->getData();
     // Back button
     $this->tmpl['backbutton'] = '';
     if ($this->tmpl['detailwindow'] == 7) {
         phocagalleryimport('phocagallery.image.image');
         $this->tmpl['backbutton'] = '<div><a href="' . JRoute::_('index.php?option=com_phocagallery&view=category&id=' . $info->catslug . '&Itemid=' . $app->input->get('Itemid', 0, 'int')) . '"' . ' title="' . JText::_('COM_PHOCAGALLERY_BACK_TO_CATEGORY') . '">' . JHtml::_('image', 'media/com_phocagallery/images/icon-up-images.png', JText::_('COM_PHOCAGALLERY_BACK_TO_CATEGORY')) . '</a></div>';
     }
     // EXIF DATA
     $outputExif = '';
     $originalFile = '';
     $extImage = PhocaGalleryImage::isExtImage($info->extid);
     if ($extImage && isset($info->exto) && $info->exto != '') {
         $originalFile = $info->exto;
     } else {
         if (isset($info->filename)) {
             $originalFile = PhocaGalleryFile::getFileOriginal($info->filename);
         }
     }
     if ($originalFile != '' && function_exists('exif_read_data')) {
         $exif = @exif_read_data($originalFile, 'IFD0');
         if ($exif === false) {
             $outputExif .= JText::_('COM_PHOCAGALLERY_NO_HEADER_DATA_FOUND');
         }
         $setExif = $this->tmpl['exifinformation'];
         $setExifArray = explode(",", $setExif, 200);
         $exif = @exif_read_data($originalFile, 0, true);
         /*	$infoOutput = '';
         			foreach ($exif as $key => $section) {
         				foreach ($section as $name => $val) {
         					$infoOutput .= strtoupper($key.'.'.$name).'='.$name.'<br />';
         					$infoOutput .= $key.'.'.$name.';';
         				}
         			}*/
         $infoOutput = '';
         $i = 0;
         foreach ($setExifArray as $ks => $vs) {
             if ($i % 2 == 0) {
                 $class = 'class="first"';
             } else {
                 $class = 'class="second"';
             }
             if ($vs != '') {
//.........这里部分代码省略.........
开发者ID:naka211,项目名称:malerfirmaet,代码行数:101,代码来源:view.html.php

示例10: display


//.........这里部分代码省略.........
            $subCategory = $this->get('subcategory');
            $totalSubCat = count($subCategory);
            if ((int) $this->tagId > 0) {
                $subCategory = array();
            }
            // No subcategories for tag searching
            if (!empty($subCategory)) {
                $items[$iS] =& $subCategory;
                for ($iSub = 0; $iSub < $totalSubCat; $iSub++) {
                    $items[$iS] =& $subCategory[$iSub];
                    // USER RIGHT - ACCESS - - - - - - - - - -
                    $rightDisplay = PhocaGalleryAccess::getUserRight('accessuserid', $items[$iS]->accessuserid, $items[$iS]->access, $this->tmpl['user']->authorisedLevels(), $this->tmpl['user']->get('id', 0), $display_access_category);
                    // Display Key Icon (in case we want to display unaccessable categories in list view)
                    $rightDisplayKey = 1;
                    if ($display_access_category == 1) {
                        // we simulate that we want not to display unaccessable categories
                        // so we get rightDisplayKey = 0 then the key will be displayed
                        if (!empty($items[$iS])) {
                            $rightDisplayKey = PhocaGalleryAccess::getUserRight('accessuserid', $items[$iS]->accessuserid, $items[$iS]->access, $this->tmpl['user']->authorisedLevels(), $this->tmpl['user']->get('id', 0), 0);
                        }
                    }
                    // - - - - - - - - - - - - - - - - - - - -
                    if ($rightDisplay > 0) {
                        $items[$iS]->cls = 'pg-box-subfolder';
                        $items[$iS]->slug = $items[$iS]->id . ':' . $items[$iS]->alias;
                        $items[$iS]->item_type = "subfolder";
                        $numlinks = $model->getCountItem($items[$iS]->id);
                        //Should be get from main subcategories query
                        if (isset($numlinks[0]) && $numlinks[0] > 0) {
                            $items[$iS]->numlinks = (int) $numlinks[0];
                        } else {
                            $items[$iS]->numlinks = 0;
                        }
                        $extImage = PhocaGalleryImage::isExtImage($items[$iS]->extid);
                        if ($extImage) {
                            if ($this->tmpl['categoryimageordering'] != 10) {
                                $imagePic = PhocaGalleryImageFront::getRandomImageRecursive($items[$iS]->id, $categoryImageOrdering, 1);
                                $fileThumbnail = PhocaGalleryImageFront::displayCategoryExtImgOrFolder($imagePic->exts, $imagePic->extm, 'medium', $rightDisplayKey, 'display_category_icon_image');
                            } else {
                                $fileThumbnail = PhocaGalleryImageFront::displayCategoryExtImgOrFolder($items[$iS]->exts, $items[$iS]->extm, 'medium', $rightDisplayKey, 'display_category_icon_image');
                                $imagePic = new stdClass();
                                $imagePic->extw = $items[$iS]->extw;
                                $imagePic->exth = $items[$iS]->exth;
                            }
                            // in case category is locked or no extm exists
                            $items[$iS]->linkthumbnailpath = $fileThumbnail->linkthumbnailpath;
                            $items[$iS]->extm = $fileThumbnail->extm;
                            $items[$iS]->exts = $fileThumbnail->exts;
                            $items[$iS]->exthswitch = $items[$iS]->extwswitch = 0;
                            if ($imagePic->extw != '') {
                                $extw = explode(',', $imagePic->extw);
                                $items[$iS]->extw = $extw[1];
                                $items[$iS]->extwswitch = $extw[0];
                            }
                            if ($imagePic->exth != '') {
                                $exth = explode(',', $imagePic->exth);
                                $items[$iS]->exth = $exth[1];
                                $items[$iS]->exthswitch = $exth[0];
                            }
                            $items[$iS]->extpic = $fileThumbnail->extpic;
                        } else {
                            if ($this->tmpl['categoryimageordering'] != 10) {
                                $randomImage = PhocaGalleryImageFront::getRandomImageRecursive($items[$iS]->id, $categoryImageOrdering);
                                $fileThumbnail = PhocaGalleryImageFront::displayCategoryImageOrFolder($randomImage, 'medium', $rightDisplayKey, 'display_category_icon_image');
                            } else {
                                $fileThumbnail = PhocaGalleryImageFront::displayCategoryImageOrFolder($items[$iS]->filename, 'medium', $rightDisplayKey, 'display_category_icon_image');
开发者ID:sansandeep143,项目名称:av,代码行数:67,代码来源:view.html.php


注:本文中的PhocaGalleryImage::isExtImage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。