Beispiel #1
0
 function getEmbedCode($iFileId)
 {
     $sOverride = false;
     $oAlert = new BxDolAlerts($this->_oConfig->getMainPrefix(), 'embed_code', $iFileId, getLoggedId(), array('override' => &$sOverride));
     $oAlert->alert();
     if ($sOverride) {
         return $sOverride;
     }
     $iFileId = (int) $iFileId;
     return getEmbedCode('mp3', 'player', array('id' => $iFileId));
 }
function post($sTable, $sId, $sAuthor, $sParent, $sMood, $sFileId)
{
    global $sIncPath;
    global $sModule;
    global $sHomeUrl;
    require $sIncPath . "content.inc.php";
    $sText = getEmbedCode($sModule, "player", array('id' => $sFileId, 'file' => TRUE_VAL));
    $sText = str_replace($sHomeUrl, "[ray_url]", $sText);
    $sSql = "INSERT INTO `" . $sTable . "`(`cmt_parent_id`, `cmt_object_id`, `cmt_author_id`, `cmt_text`, `cmt_mood`, `cmt_time`) VALUES('" . $sParent . "', '" . $sId . "', '" . $sAuthor . "', '" . $sText . "', '" . $sMood . "', NOW())";
    getResult($sSql);
    return getLastInsertId();
}
function post($sTable, $sId, $sAuthor, $sParent, $sMood, $sFileId)
{
    global $sIncPath;
    global $sModule;
    global $sHomeUrl;
    $sText = getEmbedCode($sModule, "player", array('id' => $sFileId));
    $sText = str_replace($sHomeUrl, "[ray_url]", $sText);
    $sSql = "INSERT INTO `" . $sTable . "`(`cmt_parent_id`, `cmt_object_id`, `cmt_author_id`, `cmt_text`, `cmt_mood`, `cmt_time`) VALUES('" . $sParent . "', '" . $sId . "', '" . $sAuthor . "', '" . $sText . "', '" . $sMood . "', NOW())";
    getResult($sSql);
    $iCommentId = getLastInsertId();
    getResult("UPDATE `" . MODULE_DB_PREFIX . "Files` SET `Description`='" . $iCommentId . "' WHERE `ID`='" . $sFileId . "'");
    return $iCommentId;
}
 function getEmbedCode($iFileId, $aExtra = array())
 {
     $iFileId = (int) $iFileId;
     switch ($aExtra["source"]) {
         case "":
             $sEmbedCode = getEmbedCode('video', 'player', array('id' => $iFileId));
             break;
         case "youtube":
             $sEmbedCode = str_replace("#video#", $sVideo, YOUTUBE_VIDEO_EMBED);
             $sEmbedCode = str_replace("#wmode#", getWMode(), $sEmbedCode);
             $sEmbedCode = str_replace("#autoplay#", getSettingValue("video", "autoPlay") == TRUE_VAL ? "1" : "0", $sEmbedCode);
             break;
         default:
             $sEmbedCode = video_getCustomEmbedCode($aExtra["source"], $aExtra["video"]);
             break;
     }
     return $sEmbedCode;
 }
 function getEmbedCode($iFileId, $aExtra = array())
 {
     $sOverride = false;
     $oAlert = new BxDolAlerts($this->_oConfig->getMainPrefix(), 'embed_code', $iFileId, getLoggedId(), array('override' => &$sOverride));
     $oAlert->alert();
     if ($sOverride) {
         return $sOverride;
     }
     $iFileId = (int) $iFileId;
     switch ($aExtra["source"]) {
         case "":
             $sEmbedCode = getEmbedCode('video', 'player', array('id' => $iFileId));
             break;
         case "youtube":
             $sEmbedCode = str_replace("#video#", $aExtra["video"], YOUTUBE_VIDEO_EMBED);
             $sEmbedCode = str_replace("#wmode#", getWMode(), $sEmbedCode);
             $sEmbedCode = str_replace("#autoplay#", getSettingValue("video", "autoPlay") == TRUE_VAL ? "&autoplay=1" : "", $sEmbedCode);
             break;
         default:
             $sEmbedCode = video_getCustomEmbedCode($aExtra["source"], $aExtra["video"]);
             break;
     }
     return $sEmbedCode;
 }
    function showFileInfo($aFile)
    {
        $sTitle = strlen($aFile['medTitle']) > 0 ? $aFile['medTitle'] : _t("_Untitled");
        $iTime = defineTimeInterval($aFile['medDate']);
        $sNumberAlt = _t("_Views");
        switch ($this->sType) {
            case 'photo':
                $sView = _t("_Photos");
                $sEmbedCode = $this->sFilesUrl . $aFile['medID'] . '.' . $aFile['medExt'];
                break;
            case 'music':
                $sView = _t("_Music files");
                $sNumberAlt = _t("_Playbacks");
                $sEmbedCode = getEmbedCode('music', 'player', array('id' => $aFile['medID'], 'song' => 'true'));
                break;
            case 'video':
                $sView = _t("_Videos");
                $sEmbedCode = getEmbedCode('movie', 'player', array('file' => $aFile['medID']));
                break;
        }
        if ($aFile['medCount'] - 1 > 0) {
            $sLinkMore = '<a href="' . $this->getMoreFilesUrl($aFile['medProfId'], $aFile['NickName']) . '">' . $aFile['medCount'] . '</a>';
        } else {
            $sLinkMore = $aFile['medCount'];
        }
        ob_start();
        ?>
		<div id="videoInfo">
			<div id="fileTop">
				<div class="fileTitle"><?php 
        echo $sTitle;
        ?>
</div>
				<div class="userPic">
					<?php 
        echo get_member_icon($aFile['medProfId'], 'left');
        ?>
				</div>
				<div class="fileUserInfo">
					<a href="<?php 
        echo getProfileLink($aFile['medProfId']);
        ?>
"><?php 
        echo $aFile['NickName'];
        ?>
</a>
				</div>
				<div>
					<?php 
        echo $sView;
        ?>
: <b><?php 
        echo $sLinkMore;
        ?>
</b>
				</div>
			</div>
			<div class="clear_both"></div>
			<div id="serviceInfo">
				<div>
					<?php 
        echo _t("_Added");
        ?>
: <b><?php 
        echo defineTimeInterval($aFile['medDate']);
        ?>
</b>
				</div>
				<div>
					<?php 
        echo $sNumberAlt;
        ?>
: <?php 
        echo $aFile['medViews'];
        ?>
				</div>
				<div>
					<?php 
        echo _t("_URL");
        ?>
: 
					<input type="text" onClick="this.focus(); this.select();" readonly="true" value="<?php 
        echo $this->getFileUrl($aFile['medID'], $aFile['medUri']);
        ?>
"/>
				</div>
				<div>
					<?php 
        echo _t("_Embed");
        ?>
: 
					<input type="text" onClick="this.focus(); this.select();" readonly="true" value="<?php 
        echo htmlspecialchars($sEmbedCode);
        ?>
"/>
				</div>
				<div>
					<?php 
        echo _t("_Tags");
        ?>
: 
					<?php 
        echo $this->getTagLinks($aFile['medTags']);
        ?>
				</div>
				<div>
					<?php 
        echo _t("_DescriptionMedia");
        ?>
: 
					<?php 
        echo $aFile['medDesc'];
        ?>
				</div>
			</div>
		</div>
		<?php 
        $sCode = ob_get_clean();
        return $sCode;
    }
Beispiel #7
0
    public function render($resize_code='full', $force_thumbnail=false) {
        if (preg_match('/(r|c|t|f)(\d+)x(\d+)/i', $resize_code, $matches)) {

            $r = $matches[1];
            $w = $matches[2];
            $h = $matches[3];

            if ($this->type == 'embed') {
                if ($w < 250 || $h < 250 || $force_thumbnail) {
                    $url = str_replace('http://', '', getEmbedCode($this->src, true));
                    return sprintf('<img src="%s" alt="%s" width="%s" height="%s" class="embed %s" />',
                            makeUrl('image/' . $resize_code . '/ext/' . $url), $this->title,
                            $w, $h, $resize_code);
                } else {
                    return getEmbedCode($this->src);
                }
            } elseif ($this->type == 'image') {
                return sprintf('<img src="%s" alt="%s" width="" height="" class="image %s" />',
                        makeUrl('image/' . $resize_code . '/' . $this->slug . '/' . $this->src), $this->title,
                        $w, $h, $resize_code);
            }
        } elseif ($resize_code == 'full') {
            if ($this->type == 'embed') {
                return getEmbedCode($this->src);
            } elseif ($this->type == 'image') {
                return sprintf('<img src="%s" alt="%s" class="image full" />',
                        makeUrl('image/' . $resize_code . '/' . $this->slug . '/' . $this->src), $this->title);
            }
        }
    }
Beispiel #8
0
<?php

$sModule = "video_comments";
require_once "../../../inc/header.inc.php";
require_once $sIncPath . "customFunctions.inc.php";
$iFileId = (int) $_GET["id"];
$s = getEmbedCode('video_comments', "player", array('id' => $iFileId));
$oAlert = new BxDolAlerts('bx_video_comments', 'embed', $iFileId, getLoggedId(), array('data' => &$s));
$oAlert->alert();
header('Content-type: text/html; charset=utf-8');
?>
<!DOCTYPE html>
<html>
<head>
    <style type="text/css">
        html, body { height:100%; background-color: transparent; }
        body { margin:0; padding:0; overflow:hidden; }
        object, object > embed, video { width:100%; height:100%; }
    </style>
</head>
<body class="bx-def-font" style="background: transparent;">
    <?php 
echo $s;
?>
</body>
</html>
 function getEmbedCode($iFileId)
 {
     $iFileId = (int) $iFileId;
     return getEmbedCode('mp3', 'player', array('id' => $iFileId));
 }
function PageCompFileInfo()
{
    global $site;
    global $aFile;
    if ($aFile['medCount'] - 1 > 0) {
        $sLinkMore = '<a href="browseVideo.php?userID=' . $aFile['medProfId'] . '">' . $aFile['medCount'] . '</a>';
    } else {
        $sLinkMore = $aFile['medCount'];
    }
    $sTitle = strlen($aFile['medTitle']) > 0 ? $aFile['medTitle'] : _t("_Untitled");
    $sCode .= '<div id="videoInfo">';
    $sCode .= '<div id="fileTop">';
    $sCode .= '<div class="fileTitle">' . $sTitle . '</div>';
    $sCode .= '<div class="userPic">' . get_member_icon($aFile['medProfId'], 'left') . '</div>';
    $sCode .= '<div class="fileUserInfo"><a href="' . getProfileLink($aFile['medProfId']) . '">' . $aFile['NickName'] . '</a></div>';
    $sCode .= '<div>' . _t("_Videos") . ': <b>' . $sLinkMore . '</b></div>';
    $sCode .= '</div>';
    $sCode .= '<div class="clear_both"></div>';
    $sCode .= '<div id="serviceInfo">';
    $sCode .= '<div>' . _t("_Added") . ': <b>' . defineTimeInterval($aFile['medDate']) . '</b></div>';
    $sCode .= '<div>' . _t("_Views") . ': ' . $aFile['medViews'] . '</div>';
    $sCode .= '<div>' . _t("_URL") . ': <input type="text" onClick="this.focus(); this.select();" readonly="true" value="' . $site['url'] . 'viewVideo.php?fileID=' . $aFile['medID'] . '"/></div>';
    $sCode .= '<div>' . _t("_Embed") . ' : <input type="text" onClick="this.focus(); this.select();" readonly="true" value="' . htmlspecialchars(getEmbedCode('movie', 'player', array('file' => $aFile['medID']))) . '"></div>';
    $sCode .= '<div>' . _t("_Tags") . ': ' . getTagLinks($aFile['medTags'], 'Video') . '</div>';
    $sCode .= '<div>' . _t("_DescriptionMedia") . ': ' . $aFile['medDesc'] . '</div>';
    $sCode .= '</div>';
    $sCode .= '</div>';
    return $sCode;
}