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


PHP UniteFunctionsWPRev::getPathContent方法代码示例

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


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

示例1: initByData

 /**
  * 
  * init slide by db record
  */
 public function initByData($record)
 {
     $this->id = $record["id"];
     $this->sliderID = $record["slider_id"];
     $this->slideOrder = $record["slide_order"];
     $params = $record["params"];
     $params = (array) json_decode($params);
     $layers = $record["layers"];
     $layers = (array) json_decode($layers);
     $layers = UniteFunctionsRev::convertStdClassToArray($layers);
     $imageID = UniteFunctionsRev::getVal($params, "image_id");
     //get image url and thumb url
     if (!empty($imageID)) {
         $this->imageID = $imageID;
         $imageUrl = UniteFunctionsWPRev::getUrlAttachmentImage($imageID);
         if (empty($imageUrl)) {
             $imageUrl = UniteFunctionsRev::getVal($params, "image");
         }
         $this->imageThumb = UniteFunctionsWPRev::getUrlAttachmentImage($imageID, UniteFunctionsWPRev::THUMB_MEDIUM);
     } else {
         $imageUrl = UniteFunctionsRev::getVal($params, "image");
     }
     //set image path, file and url
     $this->imageUrl = $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);
     $this->params = $params;
     $this->arrLayers = $layers;
 }
开发者ID:jgabrielfreitas,项目名称:MultipagosTestesAPP,代码行数:37,代码来源:revslider_slide.class.php

示例2: initByData

 public function initByData($record)
 {
     if (isset($record["id"])) {
         $this->id = $record["id"];
     }
     if (isset($record["slider_id"])) {
         $this->sliderID = $record["slider_id"];
     }
     if (isset($record["slide_order"])) {
         $this->slideOrder = $record["slide_order"];
     }
     $params = $record["params"];
     if (get_magic_quotes_gpc()) {
         //changes made 1st Apr 2014
         $params = stripslashes($params);
     }
     $params = (array) json_decode($params);
     $layers = $record["layers"];
     if (get_magic_quotes_gpc()) {
         //changes made 1st Apr 2014
         $layers = stripslashes($layers);
     }
     $layers = (array) json_decode($layers);
     $layers = UniteFunctionsRev::convertStdClassToArray($layers);
     $imageID = UniteFunctionsRev::getVal($params, "image_id");
     //get image url and thumb url
     if (!empty($imageID)) {
         $this->imageID = $imageID;
         $imageUrl = UniteFunctionsWPRev::getUrlAttachmentImage($imageID);
         if (empty($imageUrl)) {
             $imageUrl = UniteFunctionsRev::getVal($params, "image");
         }
         $this->imageThumb = UniteFunctionsWPRev::getUrlAttachmentImage($imageID, UniteFunctionsWPRev::THUMB_MEDIUM);
     } else {
         $imageUrl = UniteFunctionsRev::getVal($params, "image");
     }
     if (is_ssl()) {
         $imageUrl = str_replace("http://", "https://", $imageUrl);
     }
     //dmp($imageUrl);exit();
     //set image path, file and url
     $this->imageUrl = $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);
     $this->params = $params;
     $ijk = 0;
     foreach ($layers as $layer) {
         if (isset($layer['image_url']) && !empty($layer['image_url'])) {
             $layers[$ijk]['image_url'] = modify_image_url($layers[$ijk]['image_url']);
         }
         $ijk++;
     }
     $this->arrLayers = $layers;
 }
开发者ID:evgrishin,项目名称:se1614,代码行数:58,代码来源:revslider_slide.class.php

示例3: initByData

 /**
  * 
  * init slide by db record
  */
 public function initByData($record)
 {
     $this->id = $record["id"];
     $this->sliderID = $record["slider_id"];
     $this->slideOrder = $record["slide_order"];
     $params = $record["params"];
     $params = (array) json_decode($params);
     $layers = $record["layers"];
     $layers = (array) json_decode($layers);
     $layers = UniteFunctionsRev::convertStdClassToArray($layers);
     //set image path, file and url
     $this->imageUrl = UniteFunctionsRev::getVal($params, "image");
     $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);
     $this->params = $params;
     $this->arrLayers = $layers;
 }
开发者ID:Jwiens92,项目名称:CumberLandSpice,代码行数:25,代码来源:revslider_slide.class.php

示例4: 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 (is_ssl()) {
         $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:ranrolls,项目名称:ras-full-portal,代码行数:23,代码来源:revslider_slide.class.php

示例5: onShowImage

 /**
  * 
  * on show image ajax event. outputs image with parameters 
  */
 public static function onShowImage()
 {
     $pathImages = UniteFunctionsWPRev::getPathContent();
     $urlImages = UniteFunctionsWPRev::getUrlContent();
     try {
         $imageView = new UniteImageViewRev(self::$path_cache, $pathImages, $urlImages);
         $imageView->showImageFromGet();
     } catch (Exception $e) {
         header("status: 500");
         echo $e->getMessage();
         exit;
     }
 }
开发者ID:brianmontecillo,项目名称:wordpress,代码行数:17,代码来源:base.class.php

示例6: getImageRealPathFromUrl

 /**
  * get image real path phisical on disk from url
  */
 public static function getImageRealPathFromUrl($urlImage)
 {
     $filepath = self::getImagePathFromURL($urlImage);
     $realPath = UniteFunctionsWPRev::getPathContent() . $filepath;
     return $realPath;
 }
开发者ID:ashanrupasinghe,项目名称:govforuminstalledlocal,代码行数:9,代码来源:functions_wordpress.class.php

示例7: onShowImage

 /**
  * 
  * on show image ajax event. outputs image with parameters 
  */
 public static function onShowImage()
 {
     $img = Tools::getValue('img');
     if (empty($img)) {
         die('Image doesn\'t exists!');
     }
     $pathImages = UniteFunctionsWPRev::getPathContent();
     $urlImages = UniteFunctionsWPRev::getUrlContent();
     try {
         $imageView = new UniteImageViewRev(self::$path_cache, $pathImages, $urlImages);
         $imageView->showImageFromGet();
     } catch (Exception $e) {
         header("status: 500");
         echo $e->getMessage();
         exit;
     }
 }
开发者ID:rinodung,项目名称:opencart-15x-flat-admin,代码行数:21,代码来源:base.class.php


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