IsFile()) return ''; switch ($mediaObj->FileType()) { case 'flash': return AutoGal_RenderFileObj_flash($mediaObj); case 'flv': return AutoGal_RenderFileObj_flv ($mediaObj); case 'wmv': return AutoGal_RenderFileObj_wmv ($mediaObj); case 'wma': if(AUTOGAL_PLAYMP3SINFLVPLAYER) { return AutoGal_RenderFileObj_mp3 ($mediaObj); } else { return AutoGal_RenderFileObj_wma ($mediaObj); } case 'qt': return AutoGal_RenderFileObj_qt ($mediaObj); case 'rm': return AutoGal_RenderFileObj_rm ($mediaObj); case 'image': return AutoGal_RenderFileObj_image($mediaObj, $showFullImage, $showLimitMsg, $fullImgNewWin); } } function AutoGal_RenderFileObj_mp3($mediaObj) { if (AUTOGAL_SHOWEMBEDLINK && !$mediaObj->isRemotePath()) { $embed = ''; $inputEmbed =''; $inputLink ='Url().'\' readonly="true" onfocus=\'this.select();this.focus();\' onClick=\'this.select();this.focus();\'>'; $embedHtmlCode = '
'.AUTOGAL_LANG_EMBED_L1.''.$inputEmbed.'
'.AUTOGAL_LANG_EMBED_L2.''.$inputLink.'
'; } else { $embedHtmlCode = ''; } $text = '
'. AUTOGAL_LANG_L37.$mediaObj->SizeFormatted().$embedHtmlCode.'
'; return $text; } function AutoGal_RenderFileObj_flash($mediaObj) { $pvWidth = ($mediaObj->ViewWidth() ? $mediaObj->ViewWidth() : AUTOGAL_FLASHWIDTH); $pvHeight = ($mediaObj->ViewHeight() ? $mediaObj->ViewHeight() : AUTOGAL_FLASHHEIGHT); $text = '
'. AUTOGAL_LANG_L37.$mediaObj->SizeFormatted().'
'; return $text; } function AutoGal_RenderFileObj_flv($mediaObj) { $url = urlencode($mediaObj->Url()); # FF $target = AUTOGAL_FLVPLAYER.'?file='.$url.'&autoStart=false'; $pvWidth = ($mediaObj->ViewWidth() ? $mediaObj->ViewWidth() : AUTOGAL_FLASHWIDTH); $pvHeight = ($mediaObj->ViewHeight() ? $mediaObj->ViewHeight() : AUTOGAL_FLASHHEIGHT); if (AUTOGAL_SHOWEMBEDLINK && !$mediaObj->isRemotePath()) { $embed = ''; $inputEmbed =''; $inputLink =''; $embedHtmlCode = '
'.AUTOGAL_LANG_EMBED_L1.''.$inputEmbed.'
'.AUTOGAL_LANG_EMBED_L2.''.$inputLink.'
'; } else { $embedHtmlCode = ''; } $text = '
'. AUTOGAL_LANG_L37.$mediaObj->SizeFormatted().$embedHtmlCode.'
'; return $text; } function AutoGal_RenderFileObj_qt($mediaObj) { $pvWidth = ($mediaObj->ViewWidth() ? $mediaObj->ViewWidth() : AUTOGAL_MOVIEWIDTH); $pvHeight = ($mediaObj->ViewHeight() ? $mediaObj->ViewHeight() : AUTOGAL_MOVIEHEIGHT); $text = '
'. AUTOGAL_LANG_L37.$mediaObj->SizeFormatted().'
'; return $text; } function AutoGal_RenderFileObj_wmv($mediaObj) { $pvWidth = ($mediaObj->ViewWidth() ? $mediaObj->ViewWidth() : AUTOGAL_MOVIEWIDTH); $pvHeight = ($mediaObj->ViewHeight() ? $mediaObj->ViewHeight() : AUTOGAL_MOVIEHEIGHT); $text = '
'.AUTOGAL_LANG_L37.$mediaObj->SizeFormatted().'
'.AUTOGAL_LANG_L26.'
'; return $text; } function AutoGal_RenderFileObj_wma($mediaObj) { $pvWidth = 300; $pvHeight = 46; $text = '
'.AUTOGAL_LANG_L37.$mediaObj->SizeFormatted().'
'.AUTOGAL_LANG_L26.'
'; return $text; } function AutoGal_RenderFileObj_rm($mediaObj) { $pvWidth = ($mediaObj->ViewWidth() ? $mediaObj->ViewWidth() : AUTOGAL_MOVIEWIDTH); $pvHeight = ($mediaObj->ViewHeight() ? $mediaObj->ViewHeight() : AUTOGAL_MOVIEHEIGHT); $text = '
'.AUTOGAL_LANG_L37.$mediaObj->SizeFormattedl().'
'.AUTOGAL_LANG_L26.'

'; return $text; } function AutoGal_RenderFileObj_image($mediaObj, $showFullImage, $showLimitMsg, $fullImgNewWin) { $imgUrl = $mediaObj->Url(); $pvWidth = 0; $pvHeight = 0; $isLimited = 0; $title = $mediaObj->Title(); if (!$showFullImage) { $imageStats= getimagesize($mediaObj->AbsPath()); $imageWidth = $imageStats[0]; $imageHeight = $imageStats[1]; $whRatio = ($imageWidth / $imageHeight); $hwRatio = ($imageHeight / $imageWidth); # CHECK IMAGE DIMENSIONS TO SEE IF IT LARGER THAN MAX DISPLAY SIZE if (($imageWidth > AUTOGAL_MAXIMAGEWIDTH)||($imageHeight > AUTOGAL_MAXIMAGEHEIGHT)) { $isLimited = 1; $targetWidth = AUTOGAL_MAXIMAGEWIDTH; $targetHeight = AUTOGAL_MAXIMAGEHEIGHT; if ($imageWidth > $imageHeight) { $ratio = ($imageWidth / $imageHeight); $targetHeight = round($targetWidth / $ratio); } elseif ($imageHeight > $imageWidth) { $ratio = ($imageHeight / $imageWidth); $targetWidth = round($targetHeight / $ratio); } # IF WE HAVE PREVIEW IMAGE RESIZING ON if (AUTOGAL_RESIZEPREVIEWIMGS) { $makePvImg = 0; # IF THE PREVIEW IMAGE EXISTS if ($mediaObj->PreviewImageExists()) { # CHECK TO SEE IF THE PREVIE IMAGE IS THE RIGHT SIZE $pvImageSize = AutoGal_GetImageDimensions($mediaObj->PreviewImagePath(), true); if (($pvImageSize['w'] != $targetWidth)||($pvImageSize['h'] != $targetHeight)) { # NOT THE RIGHT SIZE? RESIZE IT. $makePvImg = 1; } } else { # PREVIEW IMAGE DOESN'T EXIT? MAKE ONE. $makePvImg = 1; } if ($makePvImg) { # RESIZE IMAGE TO THE PREVIEW IMAGE require_once(AUTOGAL_IMGMANIPHANDLER); $gdim = new GDIM($mode, $imPath, $imQuality); $opts['keepaspect'] = 1; $opts['1stframe'] = 1; $opts['iflarger'] = 0; $opts['perms'] = AUTOGAL_PERMSGALTHUMBS; # RESIZE THE IMAGE if (!$gdim->resize($mediaObj->AbsPath(), $mediaObj->PreviewImagePath(), AUTOGAL_MAXIMAGEWIDTH, AUTOGAL_MAXIMAGEHEIGHT, $opts)) { # SOMETHING FUCKED UP... global $ns; $ns->tablerender('', $gdim->lastError()); } else { $imgUrl = $mediaObj->PreviewImageUrl(); } } else { $imgUrl = $mediaObj->PreviewImageUrl(); } } else { # NO PREVIEW IMAGE RESIZING? JUST RESIZE IT WITH HTML $pvWidth = $targetWidth; $pvHeight = $targetHeight; } } } # Create links for viewing full image $showFullAHref = ""; $showFullAHrefEnd = ""; $showFullLink = ""; if ($showLimitMsg) { if ($isLimited) { if ($fullImgNewWin) { $showFullAHref = "Url()."\">"; } else { $showFullAHref = "Element())."&full=1$shNewWin\">"; } $showFullLink = "$showFullAHref".str_replace("[SIZE]", $imageWidth."x".$imageHeight, AUTOGAL_LANG_L14).""; $showFullAHrefEnd = ""; } else if ($showFullImage) { if (!$fullImgNewWin) { $showFullAHref = "Element())."\">"; $showFullLink = "$showFullAHref".AUTOGAL_LANG_L58.""; $showFullAHrefEnd = ""; } } } # Get the preview size from XML setting if it exists $pvWidth = ($mediaObj->ViewWidth() ? $mediaObj->ViewWidth() : $pvWidth); $pvHeight = ($mediaObj->ViewHeight() ? $mediaObj->ViewHeight() : $pvHeight); # Generate HTML style dimensions for image $imgDims = ";"; if ($pvWidth) $imgDims .= "width:${pvWidth}px;"; if ($pvHeight) $imgDims .= "height:${pvHeight}px;"; $imgDims = substr($imgDims , 0, -1); # Generate embed link/code HTML if (AUTOGAL_SHOWEMBEDLINK && !$mediaObj->isRemotePath()) { $imageLink = "Url())."\" alt=\"".htmlspecialchars($title)."\" style=\"border:0$imgDims\" />"; $inputEmbed = ""; $inputLink = ""; $embedHtmlCode = '
'.AUTOGAL_LANG_EMBED_L1.' '.$inputEmbed.' 
'.AUTOGAL_LANG_EMBED_L2.''.$inputLink.'
'; } else { $embedHtmlCode = ''; } # Generate preview HTML for image if (AUTOGAL_LIGHTBOXFULLIMG) { $text .= "Url()."\" title=\"".$mediaObj->Title()."\">"; $text .= "\"".htmlspecialchars($title)."\""; $text .= "
"; } else { $text .= $showFullAHref; $text .= "\"".htmlspecialchars($title)."\""; $text .= "$showFullAHrefEnd
"; } $text .= ($showFullLink ? "$showFullLink
" : ''); $text .= $embedHtmlCode; return $text; } function AutoGal_ChangeToEmbed($text) { $text_len = strlen($text); $fixed_text = ""; for($i=0;$i<$text_len;$i++) { if(substr($text,$i,1) == " ") { $fixed_text = $fixed_text . "%20"; } else if(substr($text,$i,1) == "'") { $fixed_text = $fixed_text . "%27"; } else { $fixed_text = $fixed_text . substr($text,$i,1); } } return $fixed_text; } ?> Galéria / Távoli Média Import - cheho.hu

Galéria - Távoli Média Import

Távoli URL
The remote url where you want to extract media items from. This can be a direct link to a picture or an flv movie or a link to a page containing media items. Please respect copyrighted material and don't abuse this functionality.
Keresés a:
Keresett média fileok típusa