24 include_once(
"Services/Table/classes/class.ilTable2GUI.php");
45 $this->downloadable = $mediacast->getDownloadable();
48 $this->
addColumn($lng->txt(
"mcst_entry"),
"",
"33%");
66 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
69 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
72 $ilCtrl->setParameterByClass(
"ilobjmediacastgui",
"item_id", $a_set[
"id"]);
73 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"]))
75 $this->tpl->setCurrentBlock(
"edit");
76 $this->tpl->setVariable(
"TXT_EDIT", $lng->txt(
"edit"));
77 $this->tpl->setVariable(
"CMD_EDIT",
78 $ilCtrl->getLinkTargetByClass(
"ilobjmediacastgui",
"editCastItem"));
79 $this->tpl->setVariable(
"TXT_DET_PLAYTIME", $lng->txt(
"mcst_det_playtime"));
80 $this->tpl->setVariable(
"CMD_DET_PLAYTIME",
81 $ilCtrl->getLinkTargetByClass(
"ilobjmediacastgui",
"determinePlaytime"));
82 $this->tpl->parseCurrentBlock();
83 $this->tpl->setCurrentBlock(
"edit_checkbox");
84 $this->tpl->setVariable(
"VAL_ID", $a_set[
"id"]);
85 $this->tpl->parseCurrentBlock();
90 if ($enable_internal_rss)
92 $this->tpl->setCurrentBlock(
"access");
93 $this->tpl->setVariable(
"TXT_ACCESS", $lng->txt(
"news_news_item_visibility"));
96 $this->tpl->setVariable(
"VAL_ACCESS", $lng->txt(
"news_visibility_public"));
100 $this->tpl->setVariable(
"VAL_ACCESS", $lng->txt(
"news_visibility_users"));
102 $this->tpl->parseCurrentBlock();
105 $ilCtrl->setParameterByClass(
"ilobjmediacastgui",
"item_id",
"");
109 if ($a_set[
"update_date"] !=
"")
111 $this->tpl->setCurrentBlock(
"last_update");
112 $this->tpl->setVariable(
"TXT_LAST_UPDATE",
113 $lng->txt(
"last_update"));
114 $this->tpl->setVariable(
"VAL_LAST_UPDATE",
116 $this->tpl->parseCurrentBlock();
120 $med = $mob->getMediaItem(
"Standard");
122 $this->tpl->setVariable(
"VAL_TITLE",
124 $this->tpl->setVariable(
"VAL_DESCRIPTION",
126 $this->tpl->setVariable(
"TXT_FILENAME",
127 $lng->txt(
"filename"));
128 $this->tpl->setVariable(
"VAL_FILENAME",
130 $this->tpl->setVariable(
"TXT_CREATED",
131 $lng->txt(
"created"));
132 $this->tpl->setVariable(
"VAL_CREATED",
134 $this->tpl->setVariable(
"TXT_DURATION",
135 $lng->txt(
"mcst_play_time"));
136 $this->tpl->setVariable(
"VAL_DURATION",
138 if ($this->downloadable) {
139 $ilCtrl->setParameterByClass(
"ilobjmediacastgui",
"item_id", $a_set[
"id"]);
144 $a_mob = $mob->getMediaItem($purpose);
145 if (!is_object($a_mob))
147 $ilCtrl->setParameterByClass(
"ilobjmediacastgui",
"purpose", $a_mob->getPurpose());
152 $size =
", ".sprintf(
"%.1f MB",
$size/1024/1024);
154 $format = ($a_mob->getFormat()!=
"")?$a_mob->getFormat():
"audio/mpeg";
155 $this->tpl->setCurrentBlock(
"downloadable");
156 $this->tpl->setVariable(
"TXT_DOWNLOAD", $lng->txt(
"mcst_download_" . strtolower($a_mob->getPurpose())));
157 $this->tpl->setVariable(
"CMD_DOWNLOAD", $ilCtrl->getLinkTargetByClass(
"ilobjmediacastgui",
"downloadItem"));
158 $this->tpl->setVariable(
"TITLE_DOWNLOAD",
"(".$format.$size.
")");
159 $this->tpl->parseCurrentBlock();
163 include_once(
"./Services/MediaObjects/classes/class.ilMediaPlayerGUI.php");
167 if (strcasecmp(
"Reference", $med->getLocationType()) == 0)
168 $mpl->setFile($med->getLocation());
171 $mpl->setMimeType ($med->getFormat());
172 $mpl->setDisplayHeight($med->getHeight());
175 $this->tpl->setVariable(
"PLAYER", $mpl->getMp3PlayerHtml());