function _embedMusic($sMusicId, $sTitle, $sDesc, $sTags, $sImage, $iDuration) { $sAuthorCheck = $this->checkAuthorBeforeAdd(); if (empty($sAuthorCheck)) { $sEmbedThumbUrl = getEmbedThumbnail($this->_getAuthorId(), $sImage); if ($sEmbedThumbUrl) { $aDefault = array('music' => $sMusicId, 'title' => $sTitle, 'description' => $sDesc, 'tags' => $sTags, 'duration' => $iDuration, 'image' => $sEmbedThumbUrl, 'type' => "embed"); return $this->GenSendFileInfoForm(1, $aDefault); } else { return $this->getMusicAddError(); } } else { return $sAuthorCheck; } }
function _embedVideo($sVideoId, $sTitle, $sDesc, $sTags, $sImage, $iDuration) { $sAuthorCheck = $this->checkAuthorBeforeAdd(); if (empty($sAuthorCheck)) { $sEmbedThumbUrl = getEmbedThumbnail($this->_getAuthorId(), $sImage, $this->oModule->_oConfig->aFilesConfig); if ($sEmbedThumbUrl) { $this->oModule->isAllowedAdd(true); $aDefault = array('video' => $sVideoId, 'title' => $sTitle, 'description' => $sDesc, 'tags' => $sTags, 'duration' => $iDuration, 'image' => $sEmbedThumbUrl, 'type' => "embed"); return $this->GenSendFileInfoForm(1, $aDefault); } else { return $this->getFileAddError(); } } else { return $sAuthorCheck; } }