44 $a_string = trim($a_string);
45 #$pattern = '/^(PT)?(\d{1,2}H)?(\d{1,2}M)?(\d{1,2}S)?$/i'; 46 $pattern =
'/^P(\d{1,2}M)?(\d{1,2}D)?(T(\d{1,2}H)?(\d{1,2}M)?(\d{1,2}S)?)?$/i';
48 if (!preg_match($pattern, $a_string, $matches)) {
52 if (preg_match(
'/^P(\d+)M/i', $a_string, $matches)) {
53 $months = $matches[1];
56 if (preg_match(
'/(\d+)+D/i', $a_string, $matches)) {
57 #var_dump("<pre>",$matches,"<pre>"); 61 if (preg_match(
'/(\d+)+H/i', $a_string, $matches)) {
62 #var_dump("<pre>",$matches,"<pre>"); 65 if (preg_match(
'/T(\d{1,2}H)?(\d+)M/i', $a_string, $matches)) {
66 #var_dump("<pre>",$matches,"<pre>"); 69 if (preg_match(
'/(\d+)S/i', $a_string, $matches)) {
70 #var_dump("<pre>",$matches,"<pre>"); 75 if (!$months and !$days and !$hours and !$min and !$sec) {
79 return array($months,$days,$hours,$min,$sec);
94 global
$tpl,$ilObjDataCache;
96 include_once(
'Services/MetaData/classes/class.ilMDKeyword.php');
98 $tpl->setCurrentBlock(
'mh_meta_item');
99 $tpl->setVariable(
'MH_META_NAME',
'keywords');
100 $tpl->setVariable(
'MH_META_LANG', $lng_code);
101 $tpl->setVariable(
'MH_META_CONTENT', $key_string);
102 $tpl->parseCurrentBlock();
104 include_once(
'Services/MetaData/classes/class.ilMDContribute.php');
106 $tpl->setCurrentBlock(
'mh_meta_item');
107 $tpl->setVariable(
'MH_META_NAME',
'author');
108 $tpl->setVariable(
'MH_META_CONTENT', $author);
109 $tpl->parseCurrentBlock();
124 include_once(
'Services/MetaData/classes/class.ilMDSettings.php');
126 if (!$settings->isCopyrightSelectionActive()) {
129 include_once(
'Services/MetaData/classes/class.ilMDCopyrightSelectionEntry.php');
static _parseCopyright($a_copyright)
Parse copyright.
static _lookupAuthors($a_rbac_id, $a_obj_id, $a_obj_type)
Lookup authors.
static _LOMDurationToArray($a_string)
LOM datatype duration is a string like P2M4DT7H18M2S (2 months 4 days 7 hours 18 minutes 2 seconds) T...
static _getInstance()
get instance
static _lookupCopyright($a_cp_string)
lookup copyright by entry id
Create styles array
The data for the language used.
static _fillHTMLMetaTags($a_rbac_id, $a_obj_id, $a_type)
Fill html meta tags.
static _getKeywordsByLanguageAsString($a_rbac_id, $a_obj_id, $a_type)
Get keywords by language as string.