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


PHP PhocaGalleryImage::setBoxSize方法代码示例

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


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

示例1: display

    public function display($tpl = null)
    {
        $app = JFactory::getApplication();
        $user = JFactory::getUser();
        $uri = JFactory::getURI();
        $path = PhocaGalleryPath::getPath();
        $this->params = $app->getParams();
        $this->tmplGeo = array();
        $this->tmpl = array();
        $this->itemId = $app->input->get('Itemid', 0, 'int');
        $document = JFactory::getDocument();
        $library = PhocaGalleryLibrary::getLibrary();
        $this->tmpl['action'] = $uri->toString();
        // CSS
        PhocaGalleryRenderFront::renderAllCSS();
        // Params
        $this->tmpl['display_name'] = 1;
        //$this->params->get( 'display_name', 1);
        $this->tmpl['image_categories_size'] = $this->params->get('image_categories_size', 1);
        $display_categories_geotagging = $this->params->get('display_categories_geotagging', 0);
        $display_access_category = $this->params->get('display_access_category', 1);
        $display_empty_categories = $this->params->get('display_empty_categories', 0);
        $hideCatArray = explode(',', trim($this->params->get('hide_categories', '')));
        $showCatArray = explode(',', trim($this->params->get('show_categories', '')));
        $showParentCatArray = explode(',', trim($this->params->get('show_parent_categories', '')));
        $this->tmpl['categoriesimageordering'] = $this->params->get('categories_image_ordering', 10);
        $this->tmpl['categoriesdisplayavatar'] = $this->params->get('categories_display_avatar');
        $this->tmpl['categories_description'] = $this->params->get('categories_description', '');
        $this->tmpl['phocagallery_width'] = $this->params->get('phocagallery_width', '');
        $this->tmpl['phocagallery_center'] = $this->params->get('phocagallery_center', '');
        $this->tmpl['display_rating'] = $this->params->get('display_rating', 0);
        $this->tmpl['categories_box_space'] = $this->params->get('categories_box_space', '');
        $this->tmpl['display_cat_desc_box'] = $this->params->get('display_cat_desc_box', 0);
        $this->tmpl['char_cat_length_name'] = $this->params->get('char_cat_length_name', 9);
        $this->tmpl['categories_mosaic_images'] = $this->params->get('categories_mosaic_images', 0);
        $this->tmpl['diff_thumb_height'] = $this->params->get('diff_thumb_height', 0);
        // L E G A C Y ===
        $this->tmpl['equalpercentagewidth'] = $this->params->get('equal_percentage_width', 1);
        $this->tmpl['categoriesboxwidth'] = $this->params->get('categories_box_width', '33%');
        $this->tmpl['categoriescolumns'] = $this->params->get('categories_columns', 1);
        $this->tmpl['displayrating'] = $this->params->get('display_rating', 0);
        $this->tmpl['display_image_categories'] = $this->params->get('display_image_categories', 1);
        if ($this->tmpl['display_image_categories'] == 1) {
        } else {
            // If legacy no different height, no mosaic
            $this->tmpl['diff_thumb_height'] = 0;
            $this->tmpl['categories_mosaic_images'] = 0;
        }
        // END L E G A C Y ===
        switch ($this->tmpl['image_categories_size']) {
            // medium
            case 1:
                $this->tmpl['picasa_correct_width'] = (int) $this->params->get('medium_image_width', 100);
                $this->tmpl['picasa_correct_height'] = (int) $this->params->get('medium_image_height', 100);
                $this->tmpl['imagewidth'] = (int) $this->params->get('medium_image_width', 100);
                $this->tmpl['imageheight'] = (int) $this->params->get('medium_image_height', 100);
                $this->tmpl['class_suffix'] = 'medium';
                if ($this->tmpl['categories_mosaic_images'] == 1) {
                    $this->tmpl['imagewidth'] = (int) $this->params->get('medium_image_width', 100) * 3;
                    $this->tmpl['imageheight'] = (int) $this->params->get('medium_image_height', 100) * 2;
                }
                break;
                // small
            // small
            case 0:
            default:
                $this->tmpl['picasa_correct_width'] = (int) $this->params->get('small_image_width', 50);
                $this->tmpl['picasa_correct_height'] = (int) $this->params->get('small_image_height', 50);
                $this->tmpl['imagewidth'] = (int) $this->params->get('small_image_width', 50);
                $this->tmpl['imageheight'] = (int) $this->params->get('small_image_height', 50);
                $this->tmpl['class_suffix'] = 'small';
                if ($this->tmpl['categories_mosaic_images'] == 1) {
                    $this->tmpl['imagewidth'] = (int) $this->params->get('small_image_width', 50) * 3;
                    $this->tmpl['imageheight'] = (int) $this->params->get('small_image_height', 50) * 2;
                }
                break;
        }
        $this->tmpl['boxsize'] = PhocaGalleryImage::setBoxSize($this->tmpl, 1);
        if ($this->tmpl['diff_thumb_height'] == 2) {
            $document->addScript(JURI::base(true) . '/components/com_phocagallery/assets/masonry/masonry.min.js');
            $document->addCustomTag('<script type="text/javascript">
			window.onload = function() {
			  var wall = new Masonry( document.getElementById(\'pg-msnr-container\'), {
				isFitWidth: true
			  });
			};
			</script>');
        }
        $s = '#phocagallery {' . "\n";
        if ($this->tmpl['phocagallery_center'] != '') {
            $s .= '   margin: 0 auto; text-align: center;' . "\n";
        }
        if ($this->tmpl['phocagallery_width'] != '') {
            $s .= '   width: ' . $this->tmpl['phocagallery_width'] . 'px;' . "\n";
        }
        $s .= '}' . "\n";
        if ($this->tmpl['phocagallery_center'] != '') {
            $s = "\n" . '#pg-msnr-container {' . "\n";
            $s .= '   margin: 0 auto;' . "\n";
            $s .= '}' . "\n";
//.........这里部分代码省略.........
开发者ID:01J,项目名称:bealtine,代码行数:101,代码来源:view.html.php

示例2: display


//.........这里部分代码省略.........
                }
            }
            if ((int) $this->tmpl['enablemultiple'] == 1 && (int) $this->tmpl['displayupload'] == 1) {
                PhocaGalleryFileUploadMultiple::renderMultipleUploadLibraries();
                $mU = new PhocaGalleryFileUploadMultiple();
                $mU->frontEnd = 1;
                $mU->method = $this->tmpl['multipleuploadmethod'];
                $mU->url = htmlspecialchars($this->tmpl['action'] . $amp . 'controller=category&task=multipleupload&' . $this->session->getName() . '=' . $this->session->getId() . '&' . JSession::getFormToken() . '=1&tab=' . $this->tmpl['currenttab']['multipleupload']);
                $mU->reload = htmlspecialchars($this->tmpl['action'] . $amp . $this->session->getName() . '=' . $this->session->getId() . '&' . JSession::getFormToken() . '=1&tab=' . $this->tmpl['currenttab']['multipleupload']);
                $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'] == 1 && (int) $this->tmpl['displayupload'] == 1) {
                $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 = $this->tmpl['action'] . $amp . $this->session->getName() . '=' . $this->session->getId() . '&' . JSession::getFormToken() . '=1&tab=' . $this->tmpl['currenttab']['javaupload'];
                $jU->url = $this->tmpl['action'] . $amp . 'controller=category&task=javaupload&amp;' . $this->session->getName() . '=' . $this->session->getId() . '&' . JSession::getFormToken() . '=1&amp;tab=' . $this->tmpl['currenttab']['javaupload'];
                $jU->source = JURI::root(true) . '/components/com_phocagallery/assets/jupload/wjhk.jupload.jar';
                $this->tmpl['ju_output'] = $jU->getJavaUploadHTML();
            }
        }
        $this->tmpl['dem'] = '<div style="text-align:right;color:#ccc;display:block">Powered by <a href="http://www.phoca.cz/phocagallery">Phoca Gallery</a></div>';
        // ADD STATISTICS
        if ((int) $id > 0) {
            $model->hit($id);
        }
        // ADD JAK DATA CSS style
        if ($this->tmpl['detail_window'] == 6) {
            $document->addCustomTag('<script type="text/javascript">' . 'var dataJakJs = [' . implode($this->tmpl['jakdatajs'], ',') . ']' . '</script>');
        }
        // Detail Window - will be popup or not
        if ($this->tmpl['detail_window'] == 7) {
            $this->tmpl['tmplcom'] = '';
            $this->tmpl['tmplcomcomments'] = '';
        } else {
            $this->tmpl['tmplcom'] = '&tmpl=component';
            $this->tmpl['tmplcomcomments'] = '&tmpl=component';
        }
        if ($this->tmpl['display_comment_nopup'] == 1) {
            $this->tmpl['tmplcomcomments'] = '';
        }
        $this->tmpl['boxsize'] = PhocaGalleryImage::setBoxSize($this->tmpl, 2);
        $this->tmpl['boxsizestat'] = PhocaGalleryImage::setBoxSize($this->tmpl, 3);
        $masBoxWidth = $this->tmpl['boxsize']['width'] + 20;
        // Masonry effect
        if ($this->tmpl['diff_thumb_height'] == 2) {
            $document->addScript(JURI::base(true) . '/components/com_phocagallery/assets/masonry/masonry.min.js');
            $document->addCustomTag('<script type="text/javascript">
			window.onload = function() {
			  var wall = new Masonry( document.getElementById(\'pg-msnr-container\'), {
				isFitWidth: true
			  });
			};
			</script>');
        }
        // CSS Specific
        $s = "\n" . '#phocagallery {' . "\n";
        if ($this->tmpl['phocagallery_center'] != '') {
            $s .= '   margin: 0 auto; text-align: center;' . "\n";
        }
        if ($this->tmpl['phocagallery_width'] != '') {
            $s .= '   width: ' . $this->tmpl['phocagallery_width'] . 'px;' . "\n";
        }
        $s .= '}' . "\n";
        if ($this->tmpl['phocagallery_center'] != '') {
            $s = "\n" . '#pg-msnr-container {' . "\n";
            $s .= '   margin: 0 auto;' . "\n";
            $s .= '}' . "\n";
        }
        $s .= '.pg-cv-box {' . "\n";
        if ($this->tmpl['diff_thumb_height'] > 0) {
        } else {
            $s .= '   height: ' . $this->tmpl['boxsize']['height'] . 'px;' . "\n";
        }
        $s .= '   width: ' . $this->tmpl['boxsize']['width'] . 'px;"' . "\n";
        $s .= '}' . "\n";
        $s .= '.pg-cv-box-stat {' . "\n";
        $s .= '   height: ' . $this->tmpl['boxsizestat']['height'] . 'px;' . "\n";
        $s .= '   width: ' . $this->tmpl['boxsizestat']['width'] . 'px;"' . "\n";
        $s .= '}' . "\n";
        $s .= '.pg-cv-box-img {' . "\n";
        $s .= '   height: ' . $this->tmpl['imageheight'] . 'px;' . "\n";
        $s .= '   width: ' . $this->tmpl['imagewidth'] . 'px;"' . "\n";
        $s .= '}' . "\n";
        $document->addCustomTag('<style type="text/css">' . $s . '</style>');
        $this->_prepareDocument();
        parent::display($tpl);
    }
开发者ID:scarsroga,项目名称:blog-soa,代码行数:101,代码来源:view.html.php

示例3: display


//.........这里部分代码省略.........
                $this->tmpl['syu_output'] = $sYU->getSingleUploadHTML(1);
                $this->tmpl['syu_url'] = $this->tmpl['action'] . $amp . 'task=ytbupload&amp;' . $this->session->getName() . '=' . $this->session->getId() . '&amp;' . JUtility::getToken() . '=1&amp;viewback=category&tab=' . $this->tmpl['currenttab']['ytbupload'];
            }
            // - - - - - - - - - - -
            // 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'] == 1 && (int) $this->tmpl['displayupload'] == 1) {
                PhocaGalleryFileUploadMultiple::renderMultipleUploadLibraries();
                $mU = new PhocaGalleryFileUploadMultiple();
                $mU->frontEnd = 1;
                $mU->method = $this->tmpl['multipleuploadmethod'];
                $mU->url = $this->tmpl['action'] . $amp . 'controller=category&task=multipleupload&amp;' . $this->session->getName() . '=' . $this->session->getId() . '&' . JUtility::getToken() . '=1&tab=' . $this->tmpl['currenttab']['multipleupload'];
                $mU->reload = $this->tmpl['action'] . $amp . $this->session->getName() . '=' . $this->session->getId() . '&' . JUtility::getToken() . '=1&tab=' . $this->tmpl['currenttab']['multipleupload'];
                $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'] == 1 && (int) $this->tmpl['displayupload'] == 1) {
                $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 = $this->tmpl['action'] . $amp . $this->session->getName() . '=' . $this->session->getId() . '&' . JUtility::getToken() . '=1&tab=' . $this->tmpl['currenttab']['javaupload'];
                $jU->url = $this->tmpl['action'] . $amp . 'controller=category&task=javaupload&amp;' . $this->session->getName() . '=' . $this->session->getId() . '&' . JUtility::getToken() . '=1&amp;tab=' . $this->tmpl['currenttab']['javaupload'];
                $jU->source = JURI::root(true) . '/components/com_phocagallery/assets/java/jupload/wjhk.jupload.jar';
                $this->tmpl['ju_output'] = $jU->getJavaUploadHTML();
            }
        }
        // ADD STATISTICS
        if ((int) $id > 0) {
            $model->hit($id);
        }
        // ADD JAK DATA CSS style
        if ($this->tmpl['detailwindow'] == 6) {
            $document->addCustomTag('<script type="text/javascript">' . 'var dataJakJs = [' . implode($this->tmpl['jakdatajs'], ',') . ']' . '</script>');
        }
        // Detail Window - will be popup or not
        if ($this->tmpl['detailwindow'] == 7) {
            $this->tmpl['tmplcom'] = '';
            $this->tmpl['tmplcomcomments'] = '';
        } else {
            $this->tmpl['tmplcom'] = '&tmpl=component';
            $this->tmpl['tmplcomcomments'] = '&tmpl=component';
        }
        if ($this->tmpl['display_comment_nopup'] == 1) {
            $this->tmpl['tmplcomcomments'] = '';
        }
        // Height of all boxes
        $this->tmpl['imageheight'] = PhocaGalleryImage::correctSize($this->tmpl['imageheight'], 100, 100, 0);
        $this->tmpl['imagewidth'] = PhocaGalleryImage::correctSize($this->tmpl['imagewidth'], 100, 120, 20);
        $this->tmpl['imageheight']['boxsize'] = PhocaGalleryImage::setBoxSize($this->tmpl['imageheight'], $this->tmpl['imagewidth'], $this->tmpl['displayname'], $this->tmpl['displayicondetail'], $this->tmpl['displayicondownload'], $this->tmpl['displayiconvmbox'], $this->tmpl['startpiclens'], $this->tmpl['trash'], $this->tmpl['publishunpublish'], $this->tmpl['displayicongeobox'], $this->tmpl['displaycamerainfo'], $this->tmpl['displayiconextlink1box'], $this->tmpl['displayiconextlink2box'], $this->tmpl['categoryboxspace'], $this->tmpl['displayimageshadow'], $this->tmpl['displayratingimg'], $this->tmpl['displayiconfolder'], $this->tmpl['imgdescboxheight'], $this->tmpl['approvednotapproved'], $this->tmpl['displayiconcommentimgbox'], $this->tmpl['displaying_tags_true']);
        if ($this->tmpl['displayimageshadow'] != 'none') {
            $this->tmpl['imageheight']['size'] = $this->tmpl['imageheight']['size'] + 18;
            $this->tmpl['imagewidth']['size'] = $this->tmpl['imagewidth']['size'] + 18;
        }
        //$this->assignRef( 'params' ,			$this->params);
        $this->assignRef('map', $map);
        $this->assignRef('items', $items);
        // Category View
        $this->assignRef('itemscv', $itemsCV);
        // Categories View in Category View
        $this->assignRef('category', $category);
        $this->assignRef('button', $button);
        $this->assignRef('button2', $button2);
        $this->assignRef('buttonother', $buttonOther);
        $this->_prepareDocument($category);
        parent::display($tpl);
    }
开发者ID:sansandeep143,项目名称:av,代码行数:101,代码来源:view.html.php

示例4: onPrepareContent


//.........这里部分代码省略.........
                                if ($detail_window == 5) {
                                    $image->link = $imgLink;
                                    $image->link2 = $siteLink;
                                    $image->linkother = $siteLink;
                                    $image->linkorig = $imgLinkOrig;
                                } else {
                                    $image->link = $siteLink;
                                    $image->link2 = $siteLink;
                                    $image->linkother = $siteLink;
                                    $image->linkorig = $imgLinkOrig;
                                }
                            }
                        }
                        // Float
                        $float_code = '';
                        if ($float != '') {
                            $float_code = 'position:relative;float:' . $float . ';';
                        }
                        // Maximum size of module image is 100 x 100
                        jimport('joomla.filesystem.file');
                        $imageWidth['size'] = 100;
                        $imageHeight['size'] = 100;
                        $imageHeight['boxsize'] = 100;
                        $imageWidth['boxsize'] = 120;
                        $imageOrigHeight = 100;
                        $imageOrigWidth = 100;
                        if (JFile::exists($image->linkthumbnailpathabs)) {
                            list($width, $height) = GetImageSize($image->linkthumbnailpathabs);
                            $imageHeight = PhocaGalleryImage::correctSize($height, 100, 100, 0);
                            $imageWidth = PhocaGalleryImage::correctSize($width, 100, 120, 20);
                            $imageOrigHeight = $height;
                            $imageOrigWidth = $width;
                        }
                        $imageHeight['boxsize'] = PhocaGalleryImage::setBoxSize($imageHeight, $imageWidth, $display_name, $display_icon_detail, $display_icon_download, 0, 0, 0, 0, 0, 0, 0, 0, $category_box_space, $image_background_shadow, 0);
                        if ($image_background_shadow != 'none') {
                            $imageHeight['size'] = $imageHeight['size'] + 18;
                            $imageWidth['size'] = $imageWidth['size'] + 18;
                            $image_background_color = 'url(\'' . JURI::base(true) . '/components/com_phocagallery/assets/images/' . $image_background_shadow . '.' . $tmpl['formaticon'] . '\') 0 0 no-repeat;';
                        }
                        $output .= '<div class="phocagallery-box-file pgplugin' . $iCss . '" style="height:' . $imageHeight['boxsize'] . 'px; width:' . $imageWidth['boxsize'] . 'px;' . $float_code . '">' . "\n" . '<center>' . "\n" . '<div class="phocagallery-box-file-first" style="background: ' . $image_background_color . ';height:' . $imageHeight['size'] . 'px;width:' . $imageWidth['size'] . 'px;">' . "\n" . '<div class="phocagallery-box-file-second">' . "\n" . '<div class="phocagallery-box-file-third">' . "\n" . '<center>' . "\n" . '<a class="' . $button->methodname . '" title="' . $image->title . '" href="' . JRoute::_($image->link) . '"';
                        // DETAIL WINDOW
                        if ($detail_window == 1) {
                            $output .= ' onclick="' . $button->options . '"';
                        } else {
                            if ($detail_window == 4 || $detail_window == 5) {
                                $highSlideOnClick = str_replace('[phocahsfullimg]', $image->linkorig, $tmpl['highslideonclick']);
                                $output .= ' onclick="' . $highSlideOnClick . '"';
                            } else {
                                $output .= ' rel="' . $button->options . '"';
                            }
                        }
                        // Enable the switch image
                        if ($enable_switch == 1) {
                            $output .= ' onmouseover="PhocaGallerySwitchImage(\'PhocaGalleryobjectPicture\', \'' . str_replace('phoca_thumb_m_', 'phoca_thumb_l_', JURI::root() . $image->linkthumbnailpath) . '\');" onmouseout="PhocaGallerySwitchImage(\'PhocaGalleryobjectPicture\', \'' . str_replace('phoca_thumb_m_', 'phoca_thumb_l_', JURI::root() . $image->linkthumbnailpath) . '\');"';
                        } else {
                            // Overlib
                            if (!empty($image->description)) {
                                $divPadding = 'padding:5px;';
                            } else {
                                $divPadding = 'padding:0px;margin:0px;';
                            }
                            $document->addScript(JURI::base(true) . '/includes/js/overlib_mini.js');
                            $opacityPer = $opacityPer = (double) $tmpl['overliboverlayopacity'] * 100;
                            if ($libraries['pg-overlib-group']->value == 0) {
                                $document->addCustomTag("<style type=\"text/css\">\n" . ".bgPhocaClass{\r\n\t\t\t\t\t\t\t\tbackground:" . $tmpl['olbgcolor'] . ";\r\n\t\t\t\t\t\t\t\tfilter:alpha(opacity=" . $opacityPer . ");\r\n\t\t\t\t\t\t\t\topacity: " . $tmpl['overliboverlayopacity'] . ";\r\n\t\t\t\t\t\t\t\t-moz-opacity:" . $tmpl['overliboverlayopacity'] . ";\r\n\t\t\t\t\t\t\t\tz-index:1000;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t.fgPhocaClass{\r\n\t\t\t\t\t\t\t\tbackground:" . $tmpl['olfgcolor'] . ";\r\n\t\t\t\t\t\t\t\tfilter:alpha(opacity=100);\r\n\t\t\t\t\t\t\t\topacity: 1;\r\n\t\t\t\t\t\t\t\t-moz-opacity:1;\r\n\t\t\t\t\t\t\t\tz-index:1000;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t.fontPhocaClass{\r\n\t\t\t\t\t\t\t\tcolor:" . $tmpl['oltfcolor'] . ";\r\n\t\t\t\t\t\t\t\tz-index:1001;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t.capfontPhocaClass, .capfontclosePhocaClass{\r\n\t\t\t\t\t\t\t\tcolor:" . $tmpl['olcfcolor'] . ";\r\n\t\t\t\t\t\t\t\tfont-weight:bold;\r\n\t\t\t\t\t\t\t\tz-index:1001;\r\n\t\t\t\t\t\t\t\t}" . " </style>\n");
                                $library->setLibrary('pg-overlib-group', 1);
开发者ID:planetangel,项目名称:Planet-Angel-Website,代码行数:67,代码来源:phocagallery.php

示例5: onContentPrepare


//.........这里部分代码省略.........
                             // Float
                             $float_code = '';
                             if ($float != '') {
                                 $float_code = 'position:relative;float:' . $float . ';';
                             }
                             // Maximum size of module image is 100 x 100
                             jimport('joomla.filesystem.file');
                             $imageWidth['size'] = (int) $medium_image_width;
                             //100;
                             $imageHeight['size'] = (int) $medium_image_height;
                             $imageHeight['boxsize'] = (int) $medium_image_height;
                             $imageWidth['boxsize'] = (int) $medium_image_width + 20;
                             //120;
                             $imageOrigHeight = (int) $medium_image_height;
                             $imageOrigWidth = (int) $medium_image_width;
                             //100;
                             if (isset($image->extid) && $image->extid != '') {
                                 list($width, $height) = @getimagesize($image->extm);
                                 $correctImageRes = PhocaGalleryPicasa::correctSizeWithRate($image->extw, $image->exth, $medium_image_width, $medium_image_height);
                                 $imageOrigWidth = $correctImageRes['width'];
                                 $imageOrigHeight = $correctImageRes['height'];
                             } else {
                                 if (JFile::exists($image->linkthumbnailpathabs)) {
                                     list($width, $height) = GetImageSize($image->linkthumbnailpathabs);
                                     $imageHeight = PhocaGalleryImage::correctSize($height, $imageHeight['size'], $imageHeight['boxsize'], 0);
                                     $imageWidth = PhocaGalleryImage::correctSize($width, $imageWidth['size'], $imageWidth['boxsize'], 20);
                                     $imageOrigHeight = $height;
                                     $imageOrigWidth = $width;
                                 }
                             }
                             if ((int) $minimum_box_width > 0) {
                                 $imageWidth['boxsize'] = $minimum_box_width;
                             }
                             $tmpl['boxsize'] = PhocaGalleryImage::setBoxSize($tmpl, 2);
                             // PARAMS - Background shadow
                             /*if ( $image_background_shadow != 'none' ) {	
                             			// IE hack
                             			$shadowPath = $path->image_abs_front . $image_background_shadow.'.'.$tmpl['formaticon'];
                             			
                             			$shadowSize	= @getimagesize($shadowPath);
                             			if (isset($shadowSize[0]) && isset($shadowSize[0])) {
                             			
                             				$w = (int)$medium_image_width + 18 - (int)$shadowSize[0];
                             				$h = (int)$medium_image_height + 18 - (int)$shadowSize[1];
                             				
                             				if ($w != 0) {$w = $w/2;} // plus or minus should be divided, not null
                             				if ($h != 0) {$h = $h/2;}
                             			} else {
                             				$w = $h = 0;
                             			}
                             			$imageBgCSS = '';//'background: url(\''.JURI::base(true).'/media/com_phocagallery/images/'.$image_background_shadow.'.png\') 50% 50% no-repeat;';
                             			
                             			$imageBgCSSIE = '';//'background: url(\''.JURI::base(true).'/media/com_phocagallery/images/'.$image_background_shadow.'.png\') '.$w.'px '.$h.'px no-repeat;';
                             			$imageHeight['size'] 	= $tmpl['boxsize']['height'] + 18;
                             		$imageWidth['size'] 	= $imageWidth['size'] + 18;
                             		
                             		} else {
                             			$imageBgCSS = '';//'background: '.$image_background_color .';';
                             			$imageBgCSSIE = '';//'background: '.$image_background_color .';';
                             			
                             		}*/
                             $tmpl['boxsize']['height'] = $tmpl['boxsize']['height'] + 18;
                             $tmpl['boxsize']['width'] = $tmpl['boxsize']['width'] + 18;
                             // TODO
                             // After IE will be standard browser (no IE7 will be used)
                             // change $imageBgCSSIE to $imageBgCSS
开发者ID:01J,项目名称:skazkipronebo,代码行数:67,代码来源:phocagallery.php


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