39 $a_string = trim($a_string);
40 #$pattern = '/^(PT)?(\d{1,2}H)?(\d{1,2}M)?(\d{1,2}S)?$/i'; 41 $pattern =
'/^P(\d{1,2}M)?(\d{1,2}D)?(T(\d{1,2}H)?(\d{1,2}M)?(\d{1,2}S)?)?$/i';
43 if (!preg_match($pattern, $a_string, $matches)) {
47 if (preg_match(
'/^P(\d+)M/i', $a_string, $matches)) {
48 $months = $matches[1];
51 if (preg_match(
'/(\d+)+D/i', $a_string, $matches)) {
52 #var_dump("<pre>",$matches,"<pre>"); 56 if (preg_match(
'/(\d+)+H/i', $a_string, $matches)) {
57 #var_dump("<pre>",$matches,"<pre>"); 60 if (preg_match(
'/T(\d{1,2}H)?(\d+)M/i', $a_string, $matches)) {
61 #var_dump("<pre>",$matches,"<pre>"); 64 if (preg_match(
'/(\d+)S/i', $a_string, $matches)) {
65 #var_dump("<pre>",$matches,"<pre>"); 70 if (!$months and !$days and !$hours and !$min and !$sec) {
74 return array($months,$days,$hours,$min,$sec);
95 $ilObjDataCache = $DIC[
'ilObjDataCache'];
97 include_once(
'Services/MetaData/classes/class.ilMDKeyword.php');
99 $tpl->setCurrentBlock(
'mh_meta_item');
100 $tpl->setVariable(
'MH_META_NAME',
'keywords');
101 $tpl->setVariable(
'MH_META_LANG', $lng_code);
102 $tpl->setVariable(
'MH_META_CONTENT', $key_string);
103 $tpl->parseCurrentBlock();
105 include_once(
'Services/MetaData/classes/class.ilMDContribute.php');
107 $tpl->setCurrentBlock(
'mh_meta_item');
108 $tpl->setVariable(
'MH_META_NAME',
'author');
109 $tpl->setVariable(
'MH_META_CONTENT', $author);
110 $tpl->parseCurrentBlock();
125 include_once(
'Services/MetaData/classes/class.ilMDSettings.php');
127 if (!$settings->isCopyrightSelectionActive()) {
130 include_once(
'Services/MetaData/classes/class.ilMDCopyrightSelectionEntry.php');
137 return self::_parseCopyright(
static _parseCopyright($a_copyright)
Parse copyright.
static _getDefaultCopyright()
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 isEntry($a_cp_string)
static getDefault()
Get default.
static _lookupCopyright($a_cp_string)
lookup copyright by entry id
static createIdentifier($a_entry_id)
Create identifier for entry id.
static _fillHTMLMetaTags($a_rbac_id, $a_obj_id, $a_type)
Fill html meta tags.
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl
static _getKeywordsByLanguageAsString($a_rbac_id, $a_obj_id, $a_type)
Get keywords by language as string.