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


PHP UniteFunctionsWPRev::getImagePathFromURL方法代码示例

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


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

示例1: drawImageInput

    /**
     * 
     * draw imaeg input:
     * @param $setting
     */
    protected function drawImageInput($setting)
    {
        $class = UniteFunctionsRev::getVal($setting, "class");
        if (!empty($class)) {
            $class = "class='{$class}'";
        }
        $settingsID = $setting["id"];
        $buttonID = $settingsID . "_button";
        $spanPreviewID = $buttonID . "_preview";
        $img = "";
        $value = UniteFunctionsRev::getVal($setting, "value");
        if (!empty($value)) {
            $urlImage = $value;
            $imagePath = UniteFunctionsWPRev::getImageRealPathFromUrl($urlImage);
            if (file_exists($realPath)) {
                $filepath = UniteFunctionsWPRev::getImagePathFromURL($urlImage);
                $urlImage = UniteBaseClassRev::getImageUrl($filepath, 100, 70, true);
            }
            $img = "<img width='100' height='70' src='{$urlImage}'></img>";
        }
        ?>

				<span id='<?php 
        echo $spanPreviewID;
        ?>
' class='setting-image-preview'><?php 
        echo $img;
        ?>
</span>
				
				<input type="hidden" id="<?php 
        echo $setting["id"];
        ?>
" name="<?php 
        echo $setting["name"];
        ?>
" value="<?php 
        echo $setting["value"];
        ?>
" />
				
				<input type="button" id="<?php 
        echo $buttonID;
        ?>
" class='button-image-select <?php 
        echo $class;
        ?>
' value="Choose Image"></input>
			<?php 
    }
开发者ID:venkimithu,项目名称:npmgroups,代码行数:55,代码来源:settings_product.class.php

示例2: getParamsForExport

 /**
  * 
  * get params for export
  */
 public function getParamsForExport()
 {
     $arrParams = $this->getParams();
     $urlImage = UniteFunctionsRev::getVal($arrParams, "image");
     if (!empty($urlImage)) {
         $arrParams["image"] = UniteFunctionsWPRev::getImagePathFromURL($urlImage);
     }
     return $arrParams;
 }
开发者ID:ranrolls,项目名称:ras-full-portal,代码行数:13,代码来源:revslider_slide.class.php

示例3: setImageByImageID

 /**
  *
  * set slide image by image id
  */
 private function setImageByImageID($imageID)
 {
     $this->imageID = $imageID;
     $this->imageUrl = UniteFunctionsWPRev::getUrlAttachmentImage($imageID);
     $this->imageThumb = UniteFunctionsWPRev::getUrlAttachmentImage($imageID, UniteFunctionsWPRev::THUMB_MEDIUM);
     if (empty($this->imageUrl)) {
         return false;
     }
     $this->params["background_type"] = "image";
     if (Mage::helper('nwdrevslider')->isSsl()) {
         $this->imageUrl = str_replace("http://", "https://", $this->imageUrl);
     }
     $this->imageFilepath = UniteFunctionsWPRev::getImagePathFromURL($this->imageUrl);
     $realPath = UniteFunctionsWPRev::getPathContent() . $this->imageFilepath;
     if (file_exists($realPath) == false || is_file($realPath) == false) {
         $this->imageFilepath = "";
     }
     $this->imageFilename = basename($this->imageUrl);
 }
开发者ID:perseusl,项目名称:kingdavid,代码行数:23,代码来源:revslider_slide.class.php


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