コード例 #1
0
 /**
  * Constructor
  */
 function __construct($a_content_obj, $a_page)
 {
     $this->content_obj = $a_content_obj;
     $this->page = $a_page;
     parent::__construct($a_content_obj->getMediaObject());
     $this->std_alias_item = new ilMediaAliasItem($this->content_obj->dom, $this->content_obj->hier_id, "Standard", $this->content_obj->getPcId(), $this->getParentNodeName());
 }
コード例 #2
0
 /**
  * Render internal link item
  */
 function renderLink($tpl, $a_title, $a_obj_id, $a_type, $a_type_short, $a_bb_type, $a_anchors = array())
 {
     $chapterRowBlock = "chapter_row";
     $anchor_row_block = "anchor_link";
     if ($this->isEnabledJavaScript()) {
         $chapterRowBlock .= "_js";
         $anchor_row_block .= "_js";
     }
     $target_str = $this->link_target == "" ? "" : " target=\"" . $this->link_target . "\"";
     if (count($a_anchors) > 0) {
         foreach ($a_anchors as $anchor) {
             $tpl->setCurrentBlock($anchor_row_block);
             $tpl->setVariable("ALINK_BEGIN", $this->prepareJavascriptOutput("[iln " . $a_bb_type . "=\"" . $a_obj_id . "\"" . $target_str . " anchor=\"{$anchor}\"]"));
             $tpl->setVariable("ALINK_END", "[/iln]");
             $tpl->setVariable("TXT_LINK", "#" . $anchor);
             $tpl->parseCurrentBlock();
         }
     }
     $this->css_row = $this->css_row == "tblrow1" ? "tblrow2" : "tblrow1";
     if ($this->getSetLinkTargetScript() != "") {
         require_once "./Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php";
         require_once "./Services/MediaObjects/classes/class.ilImageMapEditorGUI.php";
         ilImageMapEditorGUI::_recoverParameters();
         if ($a_type == "MediaObject") {
             $this->outputThumbnail($tpl, $a_obj_id);
         }
         $tpl->setCurrentBlock("link_row");
         $tpl->setVariable("ROWCLASS", $this->css_row);
         $tpl->setVariable("TXT_CHAPTER", $a_title);
         //$tpl->setVariable("LINK_TARGET", "content");
         $tpl->setVariable("LINK", ilUtil::appendUrlParameterString($this->getSetLinkTargetScript(), "linktype=" . $a_type . "&linktarget=il__" . $a_type_short . "_" . $a_obj_id . "&linktargetframe=" . $this->link_target));
         $tpl->parseCurrentBlock();
     } else {
         $tpl->setCurrentBlock($chapterRowBlock);
         if ($a_type == "MediaObject") {
             $this->outputThumbnail($tpl, $a_obj_id);
         }
         $tpl->setVariable("ROWCLASS", $this->css_row);
         $tpl->setVariable("TXT_CHAPTER", $a_title);
         if ($this->isEnabledJavaScript()) {
             //				$tpl->setVariable("TXT_CHAPTER_JS", htmlspecialchars(str_replace("'", "\'", $a_title)));
         }
         if ($a_type == "MediaObject" && empty($target_str)) {
             $tpl->setVariable("LINK_BEGIN", $this->prepareJavascriptOutput("[iln " . $a_bb_type . "=\"" . $a_obj_id . "\"/]"));
             $tpl->setVariable("LINK_END", "");
         } else {
             $tpl->setVariable("LINK_BEGIN", $this->prepareJavascriptOutput("[iln " . $a_bb_type . "=\"" . $a_obj_id . "\"" . $target_str . "]"));
             $tpl->setVariable("LINK_END", "[/iln]");
         }
         $tpl->parseCurrentBlock();
     }
     $tpl->setCurrentBlock("row");
     $tpl->parseCurrentBlock();
 }
コード例 #3
0
 /**
  * Get image map coordinates.
  */
 function editImagemapForward()
 {
     ilImageMapEditorGUI::_recoverParameters();
     if ($_SESSION["il_map_edit_coords"] != "") {
         $_SESSION["il_map_edit_coords"] .= ",";
     }
     $_SESSION["il_map_edit_coords"] .= $_POST["editImagemapForward_x"] . "," . $_POST["editImagemapForward_y"];
     // call editing script
     ilUtil::redirect($_SESSION["il_map_edit_target_script"]);
 }