Changeset 543
- Timestamp:
- 11/03/08 14:50:39 (15 years ago)
- google:author:
- dsls@morefnu.org
- Location:
- plugins/mymeta
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/mymeta/_define.php
r459 r543 27 27 /* Description*/ "User-defined metadata management in posts", 28 28 /* Author */ "Bruno Hondelatte", 29 /* Version */ '0.3 ',29 /* Version */ '0.3.1', 30 30 /* Permissions */ 'usage,contentadmin', 31 31 /* Priority */ 1001 -
plugins/mymeta/_public.php
r459 r543 26 26 $core->tpl->addValue('MyMetaTypePrompt',array('tplMyMeta','MyMetaTypePrompt')); 27 27 $core->tpl->addValue('MyMetaValue',array('tplMyMeta','MyMetaValue')); 28 $core->tpl->addValue('MyMetaListItemValue',array('tplMyMeta','MyMetaListItemValue')); 28 29 $core->tpl->addValue('MyMetaURL',array('tplMyMeta','MyMetaURL')); 29 30 $core->tpl->addBlock('MyMetaIf',array('tplMyMeta','MyMetaIf')); … … 115 116 "echo \$objMeta->getMetaStr(\$_ctx->posts->post_meta,'".$type."'); ". 116 117 '?>'; 118 return $res; 119 } 120 public static function MyMetaListItemValue($attr) { 121 if (isset($attr['type'])) 122 $type = addslashes($attr['type']); 123 else 124 return ""; 125 $res = 126 "<?php\n". 127 '$objMeta = new dcMeta($core); '. 128 '$objMyMeta = new myMeta($core); '. 129 '$theMeta = $objMyMeta->get(\''.$type.'\');'. 130 'if ($theMeta->enabled && $theMeta->type == "list") {'. 131 ' $value = $objMeta->getMetaStr($_ctx->posts->post_meta,\''.$type.'\'); '. 132 ' echo array_search($value,$theMeta->values);'. 133 '}?>'; 117 134 return $res; 118 135 }
Note: See TracChangeset
for help on using the changeset viewer.