4 define (
"IL_MODE_ALIAS", 1);
5 define (
"IL_MODE_OUTPUT", 2);
6 define (
"IL_MODE_FULL", 3);
8 require_once(
"./Services/MediaObjects/classes/class.ilMediaItem.php");
9 include_once
"./Services/Object/classes/class.ilObject.php";
40 $this->is_alias =
false;
41 $this->media_items = array();
42 $this->contains_int_link =
false;
49 $this->ilias->raiseError(
"Operation ilObjMedia::setRefId() not allowed.",$this->ilias->error_obj->FATAL);
59 $this->ilias->raiseError(
"Operation ilObjMedia::putInTree() not allowed.",$this->ilias->error_obj->FATAL);
64 $this->ilias->raiseError(
"Operation ilObjMedia::createReference() not allowed.",$this->ilias->error_obj->FATAL);
88 include_once(
"./Services/Link/classes/class.ilInternalLink.php");
89 if (is_int(strpos($a_id,
"_")))
102 if (!($this->
getId() > 0))
109 if (count($usages) == 0)
163 include_once
'Services/MetaData/classes/class.ilMD.php';
171 $md_gen = $md->getGeneral();
173 if (is_object($md_gen))
176 $this->
setTitle($md_gen->getTitle());
178 foreach($md_gen->getDescriptionIds() as
$id)
180 $md_des = $md_gen->getDescription(
$id);
199 include_once
'Services/MetaData/classes/class.ilMDCreator.php';
204 $md_creator->setTitle($this->
getTitle());
205 $md_creator->setTitleLanguage($ilUser->getPref(
'language'));
207 $md_creator->setDescriptionLanguage($ilUser->getPref(
'language'));
208 $md_creator->setKeywordLanguage($ilUser->getPref(
'language'));
209 $md_creator->setLanguage($ilUser->getPref(
'language'));
210 $md_creator->create();
220 include_once(
"Services/MetaData/classes/class.ilMD.php");
221 include_once(
"Services/MetaData/classes/class.ilMDGeneral.php");
222 include_once(
"Services/MetaData/classes/class.ilMDDescription.php");
225 $md_gen =& $md->getGeneral();
226 $md_gen->setTitle($this->
getTitle());
229 $md_des_ids =& $md_gen->getDescriptionIds();
230 if (count($md_des_ids) > 0)
232 $md_des =& $md_gen->getDescription($md_des_ids[0]);
246 include_once(
'Services/MetaData/classes/class.ilMD.php');
259 $this->media_items[] = $a_item;
281 foreach ($this->media_items as $media_item)
283 if($media_item->getPurpose() == $a_purpose)
297 foreach ($this->media_items as $key => $media_item)
299 if($media_item->getPurpose() == $a_purpose)
301 unset($this->media_items[$key]);
307 foreach ($this->media_items as $media_item)
310 $media_item->setMobId($this->
getId());
311 $media_item->setNr($i);
322 $this->media_items = array();
328 for($i=0; $i<count($this->media_items); $i++)
330 if($this->media_items[$i]->getPurpose() == $a_purpose)
394 $this->is_alias = $a_is_alias;
404 return $this->origin_id = $a_id;
429 $this->import_id = $a_id;
435 function create($a_create_meta_data =
false, $a_save_media_items =
true)
439 if (!$a_create_meta_data)
444 if ($a_save_media_items)
450 $item->setMobId($this->
getId());
458 global $ilAppEventHandler;
459 $ilAppEventHandler->raise(
'Services/MediaObjects',
461 array(
'object' => $this,
463 'obj_id' => $this->
getId())
488 if (is_object($item))
490 $item->setMobId($this->
getId());
492 if ($item->getLocationType() ==
"Reference")
494 $item->extractUrlParameters();
503 global $ilAppEventHandler;
504 $ilAppEventHandler->raise(
'Services/MediaObjects',
506 array(
'object' => $this,
508 'obj_id' => $this->
getId())
522 if ($ilSetting->get(
"disable_personal_workspace") && !$ilSetting->get(
'user_portfolios'))
527 $parent_obj_ids = array();
532 !in_array($parent_obj_id, $parent_obj_ids))
534 $parent_obj_ids[]= $parent_obj_id;
543 include_once
"Services/DiskQuota/classes/class.ilDiskQuotaHandler.php";
597 $a_web =
true, $a_purpose =
"")
599 if ($a_purpose ==
"")
601 $a_purpose =
"Standard";
614 return $path.
"/data/".CLIENT_ID.
"/mobs/mm_".$a_mob_id.
"/".
$location;
642 $a_subdir = str_replace(
"..",
"", $a_subdir);
646 $dir.=
"/".$a_subdir;
653 foreach ($entries as $e)
655 if (is_file($dir.
"/".$e[
"entry"]) && $e[
"entry"] !=
"." && $e[
"entry"] !=
"..")
657 $files[] = $e[
"entry"];
679 $xml =
"<MediaObject>";
680 $xml .=
"<MediaAlias OriginId=\"il__mob_".$this->getId().
"\"/>";
685 $xml .=
"<MediaAliasItem Purpose=\"".$item->getPurpose().
"\">";
688 $width = ($item->getWidth() !=
"")
689 ?
"Width=\"".$item->getWidth().
"\""
691 $height = ($item->getHeight() !=
"")
692 ?
"Height=\"".$item->getHeight().
"\""
694 $halign = ($item->getHAlign() !=
"")
695 ?
"HorizontalAlign=\"".$item->getHAlign().
"\""
697 $xml .=
"<Layout $width $height $halign />";
700 if ($item->getCaption() !=
"")
702 $xml .=
"<Caption Align=\"bottom\">".
703 str_replace(
"&",
"&", $item->getCaption()).
"</Caption>";
707 if ($item->getTextRepresentation() !=
"")
709 $xml .=
"<TextRepresentation>".
710 str_replace(
"&",
"&", $item->getTextRepresentation()).
"</TextRepresentation>";
714 $parameters = $item->getParameters();
715 foreach ($parameters as $name => $value)
717 $xml .=
"<Parameter Name=\"$name\" Value=\"$value\"/>";
719 $xml .= $item->getMapAreasXML();
720 $xml .=
"</MediaAliasItem>";
729 $xml =
"<MediaObject Id=\"il__mob_".$this->getId().
"\">";
736 $xml .=
"<MediaItem Purpose=\"".$item->getPurpose().
"\">";
739 $xml.=
"<Location Type=\"".$item->getLocationType().
"\">".
740 $this->
handleAmps($item->getLocation()).
"</Location>";
743 $xml.=
"<Format>".$item->getFormat().
"</Format>";
746 $width = ($item->getWidth() !=
"")
747 ?
"Width=\"".$item->getWidth().
"\""
749 $height = ($item->getHeight() !=
"")
750 ?
"Height=\"".$item->getHeight().
"\""
752 $halign = ($item->getHAlign() !=
"")
753 ?
"HorizontalAlign=\"".$item->getHAlign().
"\""
755 $xml .=
"<Layout $width $height $halign />";
758 if ($item->getCaption() !=
"")
760 $xml .=
"<Caption Align=\"bottom\">".
761 str_replace(
"&",
"&", $item->getCaption()).
"</Caption>";
765 if ($item->getTextRepresentation() !=
"")
767 $xml .=
"<TextRepresentation>".
768 str_replace(
"&",
"&", $item->getTextRepresentation()).
"</TextRepresentation>";
772 $parameters = $item->getParameters();
773 foreach ($parameters as $name => $value)
775 $xml .=
"<Parameter Name=\"$name\" Value=\"$value\"/>";
777 $xml .= $item->getMapAreasXML();
780 if ($item->getPurpose() ==
"Standard")
783 foreach ($srts as $srt)
787 if ($ilUser->getLanguage() != $meta_lang &&
788 $ilUser->getLanguage() == $srt[
"language"])
790 $def =
' Default="true" ';
792 $xml .=
"<Subtitle File=\"".$srt[
"full_path"].
793 "\" Language=\"".$srt[
"language"].
"\" ".$def.
"/>";
796 $xml .=
"</MediaItem>";
804 $xml =
"<MediaObject>";
807 include_once(
"Services/MetaData/classes/class.ilMD2XML.php");
809 $md2xml->setExportMode(
true);
810 $md2xml->startExport();
811 $xml.= $md2xml->getXML();
819 $xml .=
"<MediaItem Purpose=\"".$item->getPurpose().
"\">";
822 $xml.=
"<Location Type=\"".$item->getLocationType().
"\">".
823 $this->
handleAmps($item->getLocation()).
"</Location>";
826 $xml.=
"<Format>".$item->getFormat().
"</Format>";
829 $width = ($item->getWidth() !=
"")
830 ?
"Width=\"".$item->getWidth().
"\""
832 $height = ($item->getHeight() !=
"")
833 ?
"Height=\"".$item->getHeight().
"\""
835 $halign = ($item->getHAlign() !=
"")
836 ?
"HorizontalAlign=\"".$item->getHAlign().
"\""
838 $xml .=
"<Layout $width $height $halign />";
841 if ($item->getCaption() !=
"")
843 $xml .=
"<Caption Align=\"bottom\">".
844 str_replace(
"&",
"&", $item->getCaption()).
"</Caption>";
848 if ($item->getTextRepresentation() !=
"")
850 $xml .=
"<TextRepresentation>".
851 str_replace(
"&",
"&", $item->getTextRepresentation()).
"</TextRepresentation>";
855 $parameters = $item->getParameters();
856 foreach ($parameters as $name => $value)
858 $xml .=
"<Parameter Name=\"$name\" Value=\"$value\"/>";
860 $xml .= $item->getMapAreasXML(
true, $a_inst);
861 $xml .=
"</MediaItem>";
865 $xml .=
"</MediaObject>";
874 $a_str = str_replace(
"&",
"&", $a_str);
875 $a_str = str_replace(
"&",
"&", $a_str);
897 $subdir =
"il_".IL_INST_ID.
"_mob_".$this->
getId();
907 $subdir =
"il_".IL_INST_ID.
"_mob_".$this->
getId();
908 $a_target_dir = $a_target_dir.
"/objects/".$subdir;
910 $tpl =
new ilTemplate(
"tpl.fullscreen.html",
true,
true,
"Modules/LearningModule");
911 $tpl->setCurrentBlock(
"ilMedia");
919 require_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
921 require_once(
"./Services/COPage/classes/class.ilPageObject.php");
926 $xml.= $pg_obj->getMediaAliasElement($this->
getId());
933 $xsl = file_get_contents(
"./Services/COPage/xsl/page.xsl");
934 $args = array(
'/_xml' => $xml,
'/_xsl' => $xsl );
941 $params = array (
'mode' =>
"fullscreen",
'enlarge_path' => $enlarge_path,
942 'link_params' =>
"ref_id=".
$_GET[
"ref_id"],
'fullscreen_link' =>
"",
943 'ref_id' =>
$_GET[
"ref_id"],
'webspace_path' => $wb_path);
944 $output = xslt_process($xh,
"arg:/_xml",
"arg:/_xsl",NULL,$args, $params);
949 include_once(
"./Services/MediaObjects/classes/class.ilPlayerUtil.php");
950 $tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
"../../css/style.css");
951 $tpl->setVariable(
"LOCATION_STYLESHEET",
"../../css/system.css");
952 $tpl->setVariable(
"MEDIA_CONTENT", $output);
953 $output =
$tpl->get();
955 $output = preg_replace(
"/mobs\/mm_(\d+)\/([^\"]+)/i",
"$2",$output);
956 $output = preg_replace(
"/\.\/Services\/MediaObjects\/flash_mp3_player/i",
"../../players",$output);
958 $output = preg_replace(
"/file=..\/..\/..\//i",
"file=../objects/".$subdir.
"/",$output);
960 fwrite(fopen($a_target_dir.
'/fullscreen.html',
'w'), $output );
965 if ($a_tag ==
"Identifier" && $a_param ==
"Entry")
986 $this->contains_int_link = $a_contains_link;
1006 if ($a_usage_hist_nr !==
false)
1008 $and_hist =
" AND usage_hist_nr = ".$ilDB->quote($a_usage_hist_nr,
"integer");
1012 $set = $ilDB->query(
"SELECT id FROM mob_usage".
1013 " WHERE usage_type = ".$ilDB->quote($a_type,
"text").
1014 " AND usage_id = ".$ilDB->quote($a_id,
"integer").
1015 " AND usage_lang = ".$ilDB->quote($a_lang,
"text").
1017 while(
$row = $ilDB->fetchAssoc($set))
1019 $mob_ids[] =
$row[
"id"];
1022 $q =
"DELETE FROM mob_usage WHERE usage_type = ".
1023 $ilDB->quote($a_type,
"text").
1024 " AND usage_id= ".$ilDB->quote($a_id,
"integer").
1025 " AND usage_lang = ".$ilDB->quote($a_lang,
"text").
1027 $ilDB->manipulate($q);
1029 foreach($mob_ids as $mob_id)
1045 $lstr =
" AND usage_lang = ".$ilDB->quote($a_lang,
"text");
1048 if ($a_usage_hist_nr !==
false)
1050 $hist_str =
" AND usage_hist_nr = ".$ilDB->quote($a_usage_hist_nr,
"integer");
1053 $q =
"SELECT * FROM mob_usage WHERE ".
1054 "usage_type = ".$ilDB->quote($a_type,
"text").
" AND ".
1055 "usage_id = ".$ilDB->quote($a_id,
"integer").
1058 $mob_set = $ilDB->query($q);
1059 while($mob_rec = $ilDB->fetchAssoc($mob_set))
1063 $mobs[$mob_rec[
"id"]] = $mob_rec[
"id"];
1073 function _saveUsage($a_mob_id, $a_type, $a_id, $a_usage_hist_nr = 0, $a_lang =
"-")
1077 $ilDB->replace(
"mob_usage",
1079 "id" => array(
"integer", (
int) $a_mob_id),
1080 "usage_type" => array(
"text", $a_type),
1081 "usage_id" => array(
"integer", $a_id),
1082 "usage_lang" => array(
"text", $a_lang),
1083 "usage_hist_nr" => array(
"integer", (
int) $a_usage_hist_nr)
1094 function _removeUsage($a_mob_id, $a_type, $a_id, $a_usage_hist_nr = 0, $a_lang =
"-")
1098 $q =
"DELETE FROM mob_usage WHERE ".
1099 " id = ".$ilDB->quote((
int) $a_mob_id,
"integer").
" AND ".
1100 " usage_type = ".$ilDB->quote($a_type,
"text").
" AND ".
1101 " usage_id = ".$ilDB->quote((
int) $a_id,
"integer").
" AND ".
1102 " usage_lang = ".$ilDB->quote($a_lang,
"text").
" AND ".
1103 " usage_hist_nr = ".$ilDB->quote((
int) $a_usage_hist_nr,
"integer");
1104 $ilDB->manipulate($q);
1127 if ($a_include_history)
1129 $hist_str =
", usage_hist_nr";
1133 $q =
"SELECT DISTINCT usage_type, usage_id, usage_lang".$hist_str.
" FROM mob_usage WHERE id = ".
1134 $ilDB->quote($a_id,
"integer");
1136 if (!$a_include_history)
1138 $q.=
" AND usage_hist_nr = ".$ilDB->quote(0,
"integer");
1141 $us_set = $ilDB->query($q);
1143 while($us_rec = $ilDB->fetchAssoc($us_set))
1146 if(is_int(strpos($us_rec[
"usage_type"],
":")))
1148 $us_arr = explode(
":", $us_rec[
"usage_type"]);
1157 include_once(
"./Services/COPage/classes/class.ilPageObject.php");
1166 $ret[] = array(
"type" => $us_rec[
"usage_type"],
1167 "id" => $us_rec[
"usage_id"],
1168 "lang" => $us_rec[
"usage_lang"],
1169 "hist_nr" => $us_rec[
"usage_hist_nr"]);
1174 $q =
"SELECT DISTINCT mep_id FROM mep_tree JOIN mep_item ON (child = obj_id) WHERE mep_item.foreign_id = ".
1175 $ilDB->quote($a_id,
"integer").
" AND mep_item.type = ".$ilDB->quote(
"mob",
"text");
1176 $us_set = $ilDB->query($q);
1177 while($us_rec = $ilDB->fetchAssoc($us_set))
1179 $ret[] = array(
"type" =>
"mep",
1180 "id" => $us_rec[
"mep_id"]);
1184 include_once(
"./Services/News/classes/class.ilNewsItem.php");
1186 foreach($news_usages as $nu)
1193 $q =
"SELECT DISTINCT mob_id FROM media_item it, map_area area ".
1194 " WHERE area.item_id = it.id ".
1195 " AND area.link_type = ".$ilDB->quote(
"int",
"text").
" ".
1196 " AND area.target = ".$ilDB->quote(
"il__mob_".$a_id,
"text");
1197 $us_set = $ilDB->query($q);
1198 while($us_rec = $ilDB->fetchAssoc($us_set))
1200 $ret[] = array(
"type" =>
"map",
1201 "id" => $us_rec[
"mob_id"]);
1206 foreach ($users as $user)
1208 $ret[] = array(
"type" =>
"clip",
1222 if(is_int(strpos($a_usage[
"type"],
":")))
1224 $us_arr = explode(
":", $a_usage[
"type"]);
1226 $cont_type = $us_arr[0];
1230 $type = $a_usage[
"type"];
1233 $id = $a_usage[
"id"];
1245 include_once(
"./Modules/TestQuestionPool/classes/class.assQuestion.php");
1247 if ($qinfo[
"original_id"] > 0)
1249 include_once(
"./Modules/Test/classes/class.ilObjTest.php");
1254 $obj_id = $qinfo[
"obj_fi"];
1260 include_once(
"./Modules/SurveyQuestionPool/classes/class.SurveyQuestion.php");
1264 $parent_id = $quest->getObjId();
1267 if ($quest->getOriginalId() &&
1275 $obj_id = $parent_id;
1284 $returned_pk = $a_usage[
'id'];
1286 include_once
'Modules/Exercise/classes/class.ilObjExercise.php';
1292 $post_pk = $a_usage[
'id'];
1293 include_once
'Modules/Forum/classes/class.ilForumPost.php';
1294 include_once
'Modules/Forum/classes/class.ilForum.php';
1296 $frm_pk = $oPost->getForumId();
1303 $obj_id = $a_usage[
'id'];
1325 include_once(
'./Services/COPage/classes/class.ilPageObject.php');
1331 include_once(
"./Modules/TestQuestionPool/classes/class.assQuestion.php");
1333 if ($qinfo[
"original_id"] > 0)
1335 include_once(
"./Modules/Test/classes/class.ilObjTest.php");
1340 $obj_id = $qinfo[
"obj_fi"];
1344 include_once(
"./Services/COPage/classes/class.ilPCQuestion.php");
1346 if ($pinfo && $pinfo[
"parent_type"] ==
"lm")
1348 include_once(
"./Modules/LearningModule/classes/class.ilLMObject.php");
1352 if ($pinfo && $pinfo[
"parent_type"] ==
"sahs")
1354 include_once(
"./Modules/SCORM2004/classes/class.ilSCORM2004Node.php");
1363 include_once(
"./Modules/LearningModule/classes/class.ilLMObject.php");
1369 include_once(
"./Modules/Glossary/classes/class.ilGlossaryDefinition.php");
1370 include_once(
"./Modules/Glossary/classes/class.ilGlossaryTerm.php");
1377 include_once
'Modules/Wiki/classes/class.ilWikiPage.php';
1384 include_once(
'./Services/COPage/classes/class.ilPageObject.php');
1390 include_once
"Modules/Portfolio/classes/class.ilPortfolioPage.php";
1396 include_once
"Modules/Portfolio/classes/class.ilPortfolioTemplatePage.php";
1402 include_once(
'./Services/COPage/classes/class.ilPageObject.php');
1430 include_once(
"./Services/News/classes/class.ilNewsItem.php");
1445 function _resizeImage($a_file, $a_width, $a_height, $a_constrain_prop =
false)
1447 $file_path = pathinfo($a_file);
1448 $location = substr($file_path[
"basename"],0,strlen($file_path[
"basename"]) -
1449 strlen($file_path[
"extension"]) - 1).
"_".
1451 $a_height.
".".$file_path[
"extension"];
1452 $target_file = $file_path[
"dirname"].
"/".
1455 (
int) $a_width, (
int) $a_height, $a_constrain_prop);
1469 include_once(
"./Services/Utilities/classes/class.ilMimeTypeUtil.php");
1478 $a_file, $a_reference, $a_constrain_proportions, $a_use_original,
1479 $a_user_width, $a_user_height)
1484 $width = $a_def_width;
1485 $height = $a_def_height;
1488 if ($a_format ==
"audio/mpeg")
1496 if ($a_type ==
"File")
1498 $size = @getimagesize($a_file);
1502 $size = @getimagesize($a_reference);
1506 if ($a_use_original)
1515 $info = $lng->txt(
"cont_could_not_determine_resource_size");
1520 $w = (int) $a_user_width;
1521 $h = (int) $a_user_height;
1531 $wr =
$size[0] / $w;
1535 $hr =
$size[1] / $h;
1542 $width = (int) (
$size[0]/$r);
1543 $height = (int) (
$size[1]/$r);
1550 return array(
"width" => $width,
"height" => $height,
"info" => $info);
1559 return array(
"image/x-ms-bmp",
"image/gif",
"image/jpeg",
"image/x-portable-bitmap",
1560 "image/png",
"image/psd",
"image/tiff",
"application/pdf");
1576 $lpath = pathinfo($a_loc);
1577 if ($lpath[
"extension"] ==
"mp3" && $a_format ==
"audio/mpeg")
1581 if ($lpath[
"extension"] ==
"flv")
1585 if (in_array($a_format, array(
"video/mp4",
"video/webm")))
1599 $media_object->setTitle($name);
1600 $media_object->setDescription(
"");
1601 $media_object->create();
1604 $media_object->createDirectory();
1608 $media_object->addMediaItem($media_item);
1609 $media_item->setPurpose(
"Standard");
1611 $file = $mob_dir.
"/".$name;
1618 copy($tmp_name,
$file);
1624 $media_item->setFormat($format);
1626 $media_item->setLocationType(
"LocalFile");
1627 $media_object->setTitle($name);
1628 $media_object->setDescription($format);
1633 $media_item->setWidth(
$size[0]);
1634 $media_item->setHeight(
$size[1]);
1636 $media_item->setHAlign(
"Left");
1639 $media_object->update();
1641 return $media_object;
1649 $a_subdir = str_replace(
"..",
"", $a_subdir);
1651 if ($a_subdir !=
"")
1653 $dir.=
"/".$a_subdir;
1668 if (is_file($a_tmp_name) && $a_language !=
"")
1683 if (!is_dir($srt_dir))
1690 $srt_files = array();
1691 foreach ($items as $i)
1693 if (!in_array($i[
"entry"], array(
".",
"..")) && $i[
"type"] ==
"file")
1695 $name = explode(
".", $i[
"entry"]);
1696 if ($name[1] ==
"srt" && substr($name[0], 0, 9) ==
"subtitle_")
1698 $srt_files[] = array(
"file" => $i[
"entry"],
1699 "full_path" =>
"srt/".$i[
"entry"],
"language" => substr($name[0], 9, 2));
1717 $t_dir.
"/".$a_thumbname, $a_format, $a_size);
1729 return $t_dir.
"/".$a_thumbname;
1738 $file = str_replace(
"..",
"", $a_file);
1754 if (!is_array($a_ignore))
1756 $a_ignore = array();
1762 foreach($med_items as $med_item)
1765 foreach ($int_links as $k => $int_link)
1767 if ($int_link[
"Type"] ==
"MediaObject")
1769 include_once(
"./Services/Link/classes/class.ilInternalLink.php");
1773 if (!in_array($l_id, $linked) &&
1774 !in_array($l_id, $a_ignore))
1792 $str = $mset->get(
"restricted_file_types");
1793 $types = explode(
",", $str);
1794 $suffixes = array();
1795 if (count($types) > 0)
1797 foreach ($types as $k =>
$t)
1799 if (($s = strtolower(trim(
$t))) !=
"")
1814 $new_obj->setTitle($this->
getTitle());
1820 $new_obj->addMediaItem($val);
1823 $new_obj->create(
false,
true);
1826 $new_obj->createDirectory();
1834 include_once(
"Services/MetaData/classes/class.ilMD.php");
1835 $md =
new ilMD(0, $this->
getId(),
"mob");
1836 $new_md = $md->cloneMD(0, $new_obj->getId(),
"mob");
1849 $pi = pathinfo($a_prevpic[
"name"]);
1850 $ext = $pi[
"extension"];
1851 if (in_array($ext, array(
"jpg",
"jpeg",
"png")))
1867 if ($item->getLocationType() ==
"LocalFile" &&
1868 is_int(strpos($item->getFormat(),
"image/")))
1872 $item->getLocation();
1896 $ppics = array(
"mob_vpreview.jpg",
1897 "mob_vpreview.jpeg",
1898 "mob_vpreview.png");
1899 foreach ($ppics as $p)
1901 if (is_file($dir.
"/".$p))
1903 if ($a_filename_only)
1926 $rchars = array(
"`",
"=",
"$",
"{",
"}",
"'",
";",
" ",
"(",
")");
1927 $a_name = str_replace($rchars,
"_", $a_name);
1928 $a_name = str_replace(
"__",
"_", $a_name);