コード例 #1
0
 function getMultiUploadFormFile()
 {
     if ($this->sMultiUploaderParams['accept_file'] == '') {
         return 'You should override "accept_file" param';
     }
     $bAjxMod = $_GET['amode'] == 'ajax' ? 'true' : 'false';
     $sAlbum = $this->_aExtras['album'];
     $sAlbumParam = $sAlbum ? ', "extra_param_album": "' . $sAlbum . '"' : '';
     $aTmplKeys = array('plugins_url' => BX_DOL_URL_PLUGINS, 'accept_file' => $this->sMultiUploaderParams['accept_file'], 'possible_album' => $sAlbumParam, 'owner_id' => $this->_iOwnerId, 'accept_format' => $this->sMultiUploaderParams['accept_format'], 'accept_format_desc' => $this->sMultiUploaderParams['accept_format_desc'], 'file_size_limit' => $this->sMultiUploaderParams['file_size_limit'], 'file_upload_limit' => $this->sMultiUploaderParams['file_upload_limit'], 'file_queue_limit' => $this->sMultiUploaderParams['file_queue_limit'], 'button_image_url' => $this->sMultiUploaderParams['button_image_url'], 'Upload_lbl' => _t('_Select file'), 'ajx_mode' => $bAjxMod, 'button_wmode' => getWMode());
     $sCustomElement = $this->parseHtmlByName('swf_upload_integration.html', $aTmplKeys);
     $aForm = array('form_attrs' => array('action' => '', 'method' => 'post'), 'params' => array('remove_form' => true), 'inputs' => array('header1' => array('type' => 'block_header', 'caption' => $this->sMultiUploaderParams['form_caption']), 'Browse' => array('type' => 'custom', 'name' => 'Browse', 'content' => $sCustomElement, 'colspan' => true), 'hidden_action' => array('type' => 'hidden', 'name' => 'action', 'value' => 'accept_multi_upload')));
     $oForm = new BxTemplFormView($aForm);
     return $this->getLoadingCode() . $oForm->getCode();
 }
コード例 #2
0
 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;
 }
コード例 #3
0
 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;
 }
コード例 #4
0
ファイル: content.inc.php プロジェクト: noormcs/studoro
function getFlashConfig($sModule, $sApp, $aParamValues)
{
    global $sModulesPath;
    global $sModulesUrl;
    global $sRayXmlUrl;
    if (isset($aModules)) {
        unset($aModules);
    }
    if ($sModule != GLOBAL_MODULE) {
        require $sModulesPath . $sModule . "/inc/header.inc.php";
    }
    require $sModulesPath . $sModule . "/inc/constants.inc.php";
    $sHolder = $aInfo['mode'] == "as3" ? "holder_as3.swf" : "holder.swf";
    if (isset($aModules[$sApp]['holder'])) {
        $sHolder = $aModules[$sApp]['holder'] . ".swf";
    }
    $sHolder = $sModulesUrl . GLOBAL_MODULE . "/app/" . $sHolder;
    $iWidth = getSettingValue($sModule, $sApp . "_width");
    if (empty($iWidth)) {
        $iWidth = $aModules[$sApp]['layout']['width'];
    }
    $iHeight = getSettingValue($sModule, $sApp . "_height");
    if (empty($iHeight)) {
        $iHeight = $aModules[$sApp]['layout']['height'];
    }
    $aFlashVars = array('url' => $sRayXmlUrl, 'module' => $sModule, 'app' => $sApp);
    foreach ($aModules[$sApp]['parameters'] as $sParameter) {
        $aFlashVars[$sParameter] = isset($aParamValues[$sParameter]) ? $aParamValues[$sParameter] : process_db_input($_REQUEST[$sParameter]);
    }
    $aParams = array('allowScriptAccess' => "always", 'allowFullScreen' => "true", 'base' => $sModulesUrl . $sModule . "/", 'bgcolor' => "#" . getSettingValue(GLOBAL_MODULE, "backColor"), 'wmode' => getWMode());
    return array('holder' => $sHolder, 'width' => $iWidth, 'height' => $iHeight, 'flashVars' => $aFlashVars, 'params' => $aParams, 'modules' => $aModules);
}