/**
  * return thumb url from image url, return full url of the thumb
  * if some error occured, return empty string
  */
 public function getThumbURLFromImageUrl($urlImage, $imageID)
 {
     try {
         $imageID = trim($imageID);
         if (!empty($imageID)) {
             $urlThumb = UniteProviderFunctionsUG::getThumbUrlFromImageID($imageID);
         } else {
             $urlThumb = $this->createThumbs($urlImage);
         }
         $urlThumb = HelperUG::URLtoFull($urlThumb);
         return $urlThumb;
     } catch (Exception $e) {
         return "";
     }
     return "";
 }
 /**
  * 
  * get thumb url
  */
 public function getUrlThumb($thumbSize = "")
 {
     $thumbSize = trim($thumbSize);
     if (empty($thumbSize)) {
         return $this->urlThumb;
     }
     //get thumb url by image url
     if (empty($this->imageID)) {
         if ($thumbSize == "full") {
             return $this->urlImage;
         }
         if (method_exists("UniteProviderFunctionsUG", "getThumbWidth") == false) {
             return $this->urlThumb;
         }
         $thumbWidth = UniteProviderFunctionsUG::getThumbWidth($thumbSize);
         $operations = new UGOperations();
         try {
             $urlThumb = $operations->createThumbs($this->urlImage, $thumbWidth);
             $urlThumb = HelperUG::URLtoFull($urlThumb);
         } catch (Exception $error) {
             if (!empty($this->urlThumb)) {
                 return $this->urlThumb;
             }
             throw new Error($error);
         }
         return $urlThumb;
     } else {
         //with image id
         if (method_exists("UniteProviderFunctionsUG", "getThumbUrlFromImageID")) {
             $urlThumb = UniteProviderFunctionsUG::getThumbUrlFromImageID($this->imageID, $thumbSize);
             if (!empty($urlThumb)) {
                 $urlThumb = HelperUG::URLtoFull($urlThumb);
                 return $urlThumb;
             }
         }
     }
     return $this->urlThumb;
 }