function displayCustomMedia($media_id, $table = 'product', $absUrl = FALSE)
 {
     JLoader::register('TableMedias', JPATH_VM_ADMINISTRATOR . '/tables/medias.php');
     //$data = $this->getTable('medias');
     $db = JFactory::getDBO();
     $data = new TableMedias($db);
     $data->load((int) $media_id);
     JLoader::register('VmMediaHandler', JPATH_VM_ADMINISTRATOR . '/helpers/mediahandler.php');
     $media = VmMediaHandler::createMedia($data, $table);
     return $media->displayMediaThumb('', FALSE, '', TRUE, TRUE, $absUrl);
 }
예제 #2
0
 function displayCustomMedia($media_id, $table = 'product', $width = false, $height = false, $absUrl = false)
 {
     if (!class_exists('TableMedias')) {
         require VMPATH_ADMIN . DS . 'tables' . DS . 'medias.php';
     }
     $db = JFactory::getDBO();
     $data = new TableMedias($db);
     $data->load((int) $media_id);
     if (!empty($data->file_type)) {
         $table = $data->file_type;
     }
     if (!class_exists('VmMediaHandler')) {
         require VMPATH_ADMIN . DS . 'helpers' . DS . 'mediahandler.php';
     }
     $media = VmMediaHandler::createMedia($data, $table);
     if (!$width) {
         $width = VmConfig::get('img_width', 90);
     }
     if (!$height) {
         $height = VmConfig::get('img_height', 90);
     }
     return $media->displayMediaThumb('', FALSE, '', TRUE, TRUE, $absUrl, $width, $height);
 }
 function displayCustomMedia($media_id, $table = 'product', $absUrl = FALSE)
 {
     if (!class_exists('TableMedias')) {
         require JPATH_VM_ADMINISTRATOR . DS . 'tables' . DS . 'medias.php';
     }
     //$data = $this->getTable('medias');
     $db = JFactory::getDBO();
     $data = new TableMedias($db);
     $data->load((int) $media_id);
     if (!class_exists('VmMediaHandler')) {
         require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'mediahandler.php';
     }
     $media = VmMediaHandler::createMedia($data, $table);
     //if($media_id==0){
     //	return $media->getIcon('', FALSE, TRUE, TRUE,$absUrl);
     //}
     return $media->displayMediaThumb('', FALSE, '', TRUE, TRUE, $absUrl);
 }
예제 #4
0
	function displayCustomMedia ($media_id, $table = 'product', $absUrl = FALSE) {

		if (!class_exists ('TableMedias'))
			require(VMPATH_ADMIN . DS . 'tables' . DS . 'medias.php');

		$db = JFactory::getDBO ();
		$data = new TableMedias($db);
		$data->load ((int)$media_id);
		if(!empty($data->file_type)){
			$table = $data->file_type;
		}

		if (!class_exists ('VmMediaHandler'))
			require(VMPATH_ADMIN . DS . 'helpers' . DS . 'mediahandler.php');
		$media = VmMediaHandler::createMedia ($data, $table);

		return $media->displayMediaThumb ('', FALSE, '', TRUE, TRUE, $absUrl);
	}