*\r
* like\r
* \code\r
- *...* Name: addon\r
- * * Description: An addon which plugs in\r
- * . * Version: 1.2.3\r
- * * Author: John <profile url>\r
- * * Author: Jane <email>\r
- * *\r
- * *\endcode\r
- * @param string $addon the name of the addon\r
- * @return array with the addon information\r
- */\r
-\r
+ * * Name: addon\r
+ * * Description: An addon which plugs in\r
+ * . * Version: 1.2.3\r
+ * * Author: John <profile url>\r
+ * * Author: Jane <email>\r
+ * * Maintainer: Jess <email>\r
+ * *\r
+ * *\endcode\r
+ * @param string $addon the name of the addon\r
+ * @return array with the addon information\r
+ */\r
public static function getInfo($addon)\r
{\r
$a = get_app();\r
\r
- $info=[\r
+ $info = [\r
'name' => $addon,\r
'description' => "",\r
'author' => [],\r
+ 'maintainer' => [],\r
'version' => "",\r
'status' => ""\r
];\r
foreach ($ll as $l) {\r
$l = trim($l, "\t\n\r */");\r
if ($l != "") {\r
- list($k,$v) = array_map("trim", explode(":", $l, 2));\r
- $k= strtolower($k);\r
- if ($k == "author") {\r
- $r=preg_match("|([^<]+)<([^>]+)>|", $v, $m);\r
+ list($type, $v) = array_map("trim", explode(":", $l, 2));\r
+ $type = strtolower($type);\r
+ if ($type == "author" || $type == "maintainer") {\r
+ $r = preg_match("|([^<]+)<([^>]+)>|", $v, $m);\r
if ($r) {\r
- $info['author'][] = ['name'=>$m[1], 'link'=>$m[2]];\r
+ $info[$type][] = ['name' => $m[1], 'link' => $m[2]];\r
} else {\r
- $info['author'][] = ['name'=>$v];\r
+ $info[$type][] = ['name' => $v];\r
}\r
} else {\r
- if (array_key_exists($k, $info)) {\r
- $info[$k]=$v;\r
+ if (array_key_exists($type, $info)) {\r
+ $info[$type] = $v;\r
}\r
}\r
}\r
<div id='adminpage'>
<h1>{{$title}} - {{$page}}</h1>
-
+
<p><span class='toggleplugin icon {{$status}}'></span> {{$info.name}} - {{$info.version}} : <a href="{{$baseurl}}/admin/{{$function}}/{{$addon}}/?a=t&t={{$form_security_token}}">{{$action}}</a></p>
<p>{{$info.description}}</p>
-
+
<p class="author">{{$str_author}}
- {{foreach $info.author as $a}}
- {{if $a.link}}<a href="{{$a.link}}">{{$a.name}}</a>{{else}}{{$a.name}}{{/if}},
+ {{foreach $info.author as $a name=authors}}
+ {{if $a.link}}<a href="{{$a.link}}">{{$a.name}}</a>{{else}}{{$a.name}}{{/if}}{{if $smarty.foreach.authors.last}}{{else}}, {{/if}}
{{/foreach}}
</p>
<p class="maintainer">{{$str_maintainer}}
- {{foreach $info.maintainer as $a}}
- {{if $a.link}}<a href="{{$a.link}}">{{$a.name}}</a>{{else}}{{$a.name}}{{/if}},
+ {{foreach $info.maintainer as $a name=maintainers}}
+ {{if $a.link}}<a href="{{$a.link}}">{{$a.name}}</a>{{else}}{{$a.name}}{{/if}}{{if $smarty.foreach.maintainers.last}}{{else}}, {{/if}}
{{/foreach}}
</p>
-
+
{{if $screenshot}}
<a href="{{$screenshot.0}}" class='screenshot'><img src="{{$screenshot.0}}" alt="{{$screenshot.1}}" /></a>
{{/if}}