當前位置: 首頁>>代碼示例>>PHP>>正文


PHP ilObjMediaObject::hasFullscreenItem方法代碼示例

本文整理匯總了PHP中ilObjMediaObject::hasFullscreenItem方法的典型用法代碼示例。如果您正苦於以下問題:PHP ilObjMediaObject::hasFullscreenItem方法的具體用法?PHP ilObjMediaObject::hasFullscreenItem怎麽用?PHP ilObjMediaObject::hasFullscreenItem使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在ilObjMediaObject的用法示例。


在下文中一共展示了ilObjMediaObject::hasFullscreenItem方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: exportHTMLMOB

 /**
  * Export media object to html
  */
 function exportHTMLMOB($a_mob_id, &$a_linked_mobs)
 {
     global $tpl;
     $source_dir = ilUtil::getWebspaceDir() . "/mobs/mm_" . $a_mob_id;
     if (@is_dir($source_dir)) {
         ilUtil::makeDir($this->mobs_dir . "/mm_" . $a_mob_id);
         ilUtil::rCopy($source_dir, $this->mobs_dir . "/mm_" . $a_mob_id);
     }
     // fullscreen
     include_once "./Services/MediaObjects/classes/class.ilObjMediaObject.php";
     $mob_obj = new ilObjMediaObject($a_mob_id);
     if ($mob_obj->hasFullscreenItem()) {
         $tpl = new ilTemplate("tpl.main.html", true, true);
         $tpl->addBlockFile("CONTENT", "content", "tpl.adm_content.html");
         $file = $this->exp_dir . "/fullscreen_" . $a_mob_id . ".html";
         // open file
         if (!($fp = @fopen($file, "w+"))) {
             die("<b>Error</b>: Could not open \"" . $file . "\" for writing" . " in <b>" . __FILE__ . "</b> on line <b>" . __LINE__ . "</b><br />");
         }
         chmod($file, 0770);
         fwrite($fp, $content);
         fclose($fp);
     }
     $linked_mobs = $mob_obj->getLinkedMediaObjects();
     $a_linked_mobs = array_merge($a_linked_mobs, $linked_mobs);
 }
開發者ID:khanhnnvn,項目名稱:ilias_E-learning,代碼行數:29,代碼來源:class.ilCOPageHTMLExport.php

示例2: exportHTMLMOB

 /**
  * export media object to html
  */
 function exportHTMLMOB($a_target_dir, &$a_glo_gui, $a_mob_id)
 {
     global $tpl;
     $mob_dir = $a_target_dir . "/mobs";
     $source_dir = ilUtil::getWebspaceDir() . "/mobs/mm_" . $a_mob_id;
     if (@is_dir($source_dir)) {
         ilUtil::makeDir($mob_dir . "/mm_" . $a_mob_id);
         ilUtil::rCopy($source_dir, $mob_dir . "/mm_" . $a_mob_id);
     }
     $tpl = new ilTemplate("tpl.main.html", true, true);
     $tpl->addBlockFile("CONTENT", "content", "tpl.adm_content.html");
     $_GET["obj_type"] = "MediaObject";
     $_GET["mob_id"] = $a_mob_id;
     $_GET["cmd"] = "";
     $content =& $a_glo_gui->media();
     $file = $a_target_dir . "/media_" . $a_mob_id . ".html";
     // open file
     if (!($fp = @fopen($file, "w+"))) {
         die("<b>Error</b>: Could not open \"" . $file . "\" for writing" . " in <b>" . __FILE__ . "</b> on line <b>" . __LINE__ . "</b><br />");
     }
     chmod($file, 0770);
     fwrite($fp, $content);
     fclose($fp);
     // fullscreen
     include_once "./Services/MediaObjects/classes/class.ilObjMediaObject.php";
     $mob_obj = new ilObjMediaObject($a_mob_id);
     if ($mob_obj->hasFullscreenItem()) {
         $tpl = new ilTemplate("tpl.main.html", true, true);
         $tpl->addBlockFile("CONTENT", "content", "tpl.adm_content.html");
         $_GET["mob_id"] = $a_mob_id;
         $_GET["cmd"] = "fullscreen";
         $content = $a_glo_gui->fullscreen();
         $file = $a_target_dir . "/fullscreen_" . $a_mob_id . ".html";
         // open file
         if (!($fp = @fopen($file, "w+"))) {
             die("<b>Error</b>: Could not open \"" . $file . "\" for writing" . " in <b>" . __FILE__ . "</b> on line <b>" . __LINE__ . "</b><br />");
         }
         chmod($file, 0770);
         fwrite($fp, $content);
         fclose($fp);
     }
 }
開發者ID:arlendotcn,項目名稱:ilias,代碼行數:45,代碼來源:class.ilObjGlossary.php

示例3: fixFullscreeenLink

 private function fixFullscreeenLink($matches)
 {
     $media_obj = new ilObjMediaObject($matches[1]);
     if ($media_obj->hasFullscreenItem()) {
         return "href=\"./objects/il_" . IL_INST_ID . "_mob_" . $matches[1] . "/fullscreen.html\"";
         //return "href=\"./objects/il_".IL_INST_ID."_mob_".$matches[1]."/".$media_obj->getMediaItem("Fullscreen")->getLocation()."\"";
     }
 }
開發者ID:bheyser,項目名稱:qplskl,代碼行數:8,代碼來源:class.ilSCORM2004Asset.php

示例4: exportHTMLMOB

 /**
  * Export media object to html
  */
 function exportHTMLMOB($a_mob_id, &$a_linked_mobs)
 {
     global $tpl;
     $source_dir = ilUtil::getWebspaceDir() . "/mobs/mm_" . $a_mob_id;
     if (@is_dir($source_dir)) {
         ilUtil::makeDir($this->mobs_dir . "/mm_" . $a_mob_id);
         ilUtil::rCopy($source_dir, $this->mobs_dir . "/mm_" . $a_mob_id);
     }
     // #12930 - fullscreen
     include_once "./Services/MediaObjects/classes/class.ilObjMediaObject.php";
     $mob_obj = new ilObjMediaObject($a_mob_id);
     if ($mob_obj->hasFullscreenItem()) {
         // render media object html
         $xh = xslt_create();
         $output = xslt_process($xh, "arg:/_xml", "arg:/_xsl", NULL, array("/_xml" => "<dummy>" . $mob_obj->getXML(IL_MODE_ALIAS) . $mob_obj->getXML(IL_MODE_OUTPUT) . "</dummy>", "/_xsl" => file_get_contents("./Services/COPage/xsl/page.xsl")), array("mode" => "fullscreen"));
         xslt_free($xh);
         unset($xh);
         // render fullscreen html
         $tpl = new ilTemplate("tpl.fullscreen.html", true, true, "Services/COPage");
         $tpl = $this->getPreparedMainTemplate($tpl);
         // adds js/css
         $tpl->setCurrentBlock("ilMedia");
         $tpl->setVariable("MEDIA_CONTENT", $output);
         $output = $tpl->get();
         unset($tpl);
         // write file
         $file = $this->exp_dir . "/fullscreen_" . $a_mob_id . ".html";
         if (!($fp = @fopen($file, "w+"))) {
             die("<b>Error</b>: Could not open \"" . $file . "\" for writing" . " in <b>" . __FILE__ . "</b> on line <b>" . __LINE__ . "</b><br />");
         }
         chmod($file, 0770);
         fwrite($fp, $output);
         fclose($fp);
         unset($fp);
         unset($output);
     }
     $linked_mobs = $mob_obj->getLinkedMediaObjects();
     $a_linked_mobs = array_merge($a_linked_mobs, $linked_mobs);
 }
開發者ID:arlendotcn,項目名稱:ilias,代碼行數:42,代碼來源:class.ilCOPageHTMLExport.php


注:本文中的ilObjMediaObject::hasFullscreenItem方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。