aboutsummaryrefslogtreecommitdiffstats
path: root/mod/admin.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/admin.php')
-rw-r--r--mod/admin.php20
1 files changed, 15 insertions, 5 deletions
diff --git a/mod/admin.php b/mod/admin.php
index e40c50396..6386e6ebc 100644
--- a/mod/admin.php
+++ b/mod/admin.php
@@ -340,7 +340,7 @@ function admin_page_plugins(&$a){
return; // NOTREACHED
}
// display plugin details
-
+ require_once('library/markdown.php');
if (in_array($plugin, $a->plugins)){
$status="on"; $action= t("Disable");
@@ -348,6 +348,14 @@ function admin_page_plugins(&$a){
$status="off"; $action= t("Enable");
}
+ $readme=Null;
+ if (is_file("addon/$plugin/README.md")){
+ $readme = file_get_contents("addon/$plugin/README.md");
+ $readme = Markdown($readme);
+ } else if (is_file("addon/$plugin/README")){
+ $readme = "<pre>". file_get_contents("addon/$plugin/README") ."</pre>";
+ }
+
$t = get_markup_template("admin_plugins_details.tpl");
return replace_macros($t, array(
'$title' => t('Administration'),
@@ -357,7 +365,10 @@ function admin_page_plugins(&$a){
'$plugin' => $plugin,
'$status' => $status,
- '$action' => $action
+ '$action' => $action,
+ '$info' => get_plugin_info($plugin),
+
+ '$readme' => $readme
));
}
@@ -373,9 +384,8 @@ function admin_page_plugins(&$a){
foreach($files as $file) {
if (is_dir($file)){
list($tmp, $id)=array_map("trim", explode("/",$file));
- // TODO: plugins info
- $name=$author=$description=$homepage="";
- $plugins[] = array( $id, (in_array($id, $a->plugins)?"on":"off") , $name, $author, $description, $homepage);
+ $info = get_plugin_info($id);
+ $plugins[] = array( $id, (in_array($id, $a->plugins)?"on":"off") , $info);
}
}
}