24 include_once(
"Services/Table/classes/class.ilTable2GUI.php");
45 $this->downloadable = $mediacast->getDownloadable();
48 $this->
addColumn($lng->txt(
"mcst_entry"),
"",
"33%");
67 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
70 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
73 $ilCtrl->setParameterByClass(
"ilobjmediacastgui",
"item_id", $a_set[
"id"]);
74 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"]))
76 $this->tpl->setCurrentBlock(
"edit");
77 $this->tpl->setVariable(
"TXT_EDIT", $lng->txt(
"edit"));
78 $this->tpl->setVariable(
"CMD_EDIT",
79 $ilCtrl->getLinkTargetByClass(
"ilobjmediacastgui",
"editCastItem"));
80 $this->tpl->setVariable(
"TXT_DET_PLAYTIME", $lng->txt(
"mcst_det_playtime"));
81 $this->tpl->setVariable(
"CMD_DET_PLAYTIME",
82 $ilCtrl->getLinkTargetByClass(
"ilobjmediacastgui",
"determinePlaytime"));
83 $this->tpl->parseCurrentBlock();
84 $this->tpl->setCurrentBlock(
"edit_checkbox");
85 $this->tpl->setVariable(
"VAL_ID", $a_set[
"id"]);
86 $this->tpl->parseCurrentBlock();
91 if ($enable_internal_rss)
93 $this->tpl->setCurrentBlock(
"access");
94 $this->tpl->setVariable(
"TXT_ACCESS", $lng->txt(
"news_news_item_visibility"));
97 $this->tpl->setVariable(
"VAL_ACCESS", $lng->txt(
"news_visibility_public"));
101 $this->tpl->setVariable(
"VAL_ACCESS", $lng->txt(
"news_visibility_users"));
103 $this->tpl->parseCurrentBlock();
106 $ilCtrl->setParameterByClass(
"ilobjmediacastgui",
"item_id",
"");
110 if ($a_set[
"update_date"] !=
"")
112 $this->tpl->setCurrentBlock(
"last_update");
113 $this->tpl->setVariable(
"TXT_LAST_UPDATE",
114 $lng->txt(
"last_update"));
115 $this->tpl->setVariable(
"VAL_LAST_UPDATE",
117 $this->tpl->parseCurrentBlock();
121 $med = $mob->getMediaItem(
"Standard");
123 $this->tpl->setVariable(
"VAL_TITLE",
125 $this->tpl->setVariable(
"VAL_DESCRIPTION",
127 $this->tpl->setVariable(
"TXT_FILENAME",
128 $lng->txt(
"filename"));
129 $this->tpl->setVariable(
"VAL_FILENAME",
131 $this->tpl->setVariable(
"TXT_CREATED",
132 $lng->txt(
"created"));
133 $this->tpl->setVariable(
"VAL_CREATED",
135 $this->tpl->setVariable(
"TXT_DURATION",
136 $lng->txt(
"mcst_play_time"));
137 $this->tpl->setVariable(
"VAL_DURATION",
139 if ($this->downloadable) {
140 $ilCtrl->setParameterByClass(
"ilobjmediacastgui",
"item_id", $a_set[
"id"]);
145 $a_mob = $mob->getMediaItem($purpose);
146 if (!is_object($a_mob))
148 $ilCtrl->setParameterByClass(
"ilobjmediacastgui",
"purpose", $a_mob->getPurpose());
153 $size =
", ".sprintf(
"%.1f MB",
$size/1024/1024);
155 $format = ($a_mob->getFormat()!=
"")?$a_mob->getFormat():
"audio/mpeg";
156 $this->tpl->setCurrentBlock(
"downloadable");
157 $this->tpl->setVariable(
"TXT_DOWNLOAD", $lng->txt(
"mcst_download_" . strtolower($a_mob->getPurpose())));
158 $this->tpl->setVariable(
"CMD_DOWNLOAD", $ilCtrl->getLinkTargetByClass(
"ilobjmediacastgui",
"downloadItem"));
159 $this->tpl->setVariable(
"TITLE_DOWNLOAD",
"(".$format.$size.
")");
160 $this->tpl->parseCurrentBlock();
164 include_once(
"./Services/MediaObjects/classes/class.ilMediaPlayerGUI.php");
168 if (strcasecmp(
"Reference", $med->getLocationType()) == 0)
169 $mpl->setFile($med->getLocation());
172 $mpl->setMimeType ($med->getFormat());
173 $mpl->setDisplayHeight($med->getHeight());
176 $this->tpl->setVariable(
"PLAYER", $mpl->getMp3PlayerHtml());