mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-11-25 17:23:00 +00:00
Upgrade credits page to display installed modules
This commit is contained in:
parent
67dc28cae1
commit
0687610598
3 changed files with 53 additions and 3 deletions
|
@ -1176,6 +1176,8 @@ register_module([
|
||||||
"thing_url" => ""
|
"thing_url" => ""
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
|
|
||||||
|
//// Credits html renderer ////
|
||||||
$credits_html = "<ul>\n";
|
$credits_html = "<ul>\n";
|
||||||
foreach($credits as $thing => $author_details)
|
foreach($credits as $thing => $author_details)
|
||||||
{
|
{
|
||||||
|
@ -1185,6 +1187,27 @@ register_module([
|
||||||
$credits_html .= "</li>\n";
|
$credits_html .= "</li>\n";
|
||||||
}
|
}
|
||||||
$credits_html .= "</ul>";
|
$credits_html .= "</ul>";
|
||||||
|
///////////////////////////////
|
||||||
|
|
||||||
|
//// Module html renderer ////
|
||||||
|
$modules_html = "<table>
|
||||||
|
<tr>
|
||||||
|
<th>Name</th>
|
||||||
|
<th>Version</th>
|
||||||
|
<th>Author</th>
|
||||||
|
<th>Description</th>
|
||||||
|
</tr>";
|
||||||
|
foreach($modules as $module)
|
||||||
|
{
|
||||||
|
$modules_html .= " <tr>
|
||||||
|
<td title='" . $module["id"] . "'>" . $module["name"] . "</td>
|
||||||
|
<td>" . $module["version"] . "</td>
|
||||||
|
<td>" . $module["author"] . "</td>
|
||||||
|
<td>" . $module["description"] . "</td>
|
||||||
|
</tr>\n";
|
||||||
|
}
|
||||||
|
$modules_html .= "</table>";
|
||||||
|
//////////////////////////////
|
||||||
|
|
||||||
$title = "Credits - $settings->sitename";
|
$title = "Credits - $settings->sitename";
|
||||||
$content = "<h1>$settings->sitename credits</h1>
|
$content = "<h1>$settings->sitename credits</h1>
|
||||||
|
@ -1197,7 +1220,9 @@ register_module([
|
||||||
<tr><th>Pepperminty Wiki version:</th><td>$version</td></tr>
|
<tr><th>Pepperminty Wiki version:</th><td>$version</td></tr>
|
||||||
<tr><th>Number of pages:</th><td>" . count(get_object_vars($pageindex)) . "</td></tr>
|
<tr><th>Number of pages:</th><td>" . count(get_object_vars($pageindex)) . "</td></tr>
|
||||||
<tr><th>Number of modules:</th><td>" . count($modules) . "</td></tr>
|
<tr><th>Number of modules:</th><td>" . count($modules) . "</td></tr>
|
||||||
</table>";
|
</table>
|
||||||
|
<h2>Installed Modules</h2>
|
||||||
|
$modules_html";
|
||||||
exit(page_renderer::render_main($title, $content));
|
exit(page_renderer::render_main($title, $content));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
"author": "Starbeamrainbowlabs",
|
"author": "Starbeamrainbowlabs",
|
||||||
"description": "Adds the credits page. You *must* have this module :D",
|
"description": "Adds the credits page. You *must* have this module :D",
|
||||||
"id": "page-credits",
|
"id": "page-credits",
|
||||||
"lastupdate": 1437213743,
|
"lastupdate": 1444323484,
|
||||||
"optional": false
|
"optional": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -31,6 +31,8 @@ register_module([
|
||||||
"thing_url" => ""
|
"thing_url" => ""
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
|
|
||||||
|
//// Credits html renderer ////
|
||||||
$credits_html = "<ul>\n";
|
$credits_html = "<ul>\n";
|
||||||
foreach($credits as $thing => $author_details)
|
foreach($credits as $thing => $author_details)
|
||||||
{
|
{
|
||||||
|
@ -40,6 +42,27 @@ register_module([
|
||||||
$credits_html .= "</li>\n";
|
$credits_html .= "</li>\n";
|
||||||
}
|
}
|
||||||
$credits_html .= "</ul>";
|
$credits_html .= "</ul>";
|
||||||
|
///////////////////////////////
|
||||||
|
|
||||||
|
//// Module html renderer ////
|
||||||
|
$modules_html = "<table>
|
||||||
|
<tr>
|
||||||
|
<th>Name</th>
|
||||||
|
<th>Version</th>
|
||||||
|
<th>Author</th>
|
||||||
|
<th>Description</th>
|
||||||
|
</tr>";
|
||||||
|
foreach($modules as $module)
|
||||||
|
{
|
||||||
|
$modules_html .= " <tr>
|
||||||
|
<td title='" . $module["id"] . "'>" . $module["name"] . "</td>
|
||||||
|
<td>" . $module["version"] . "</td>
|
||||||
|
<td>" . $module["author"] . "</td>
|
||||||
|
<td>" . $module["description"] . "</td>
|
||||||
|
</tr>\n";
|
||||||
|
}
|
||||||
|
$modules_html .= "</table>";
|
||||||
|
//////////////////////////////
|
||||||
|
|
||||||
$title = "Credits - $settings->sitename";
|
$title = "Credits - $settings->sitename";
|
||||||
$content = "<h1>$settings->sitename credits</h1>
|
$content = "<h1>$settings->sitename credits</h1>
|
||||||
|
@ -52,7 +75,9 @@ register_module([
|
||||||
<tr><th>Pepperminty Wiki version:</th><td>$version</td></tr>
|
<tr><th>Pepperminty Wiki version:</th><td>$version</td></tr>
|
||||||
<tr><th>Number of pages:</th><td>" . count(get_object_vars($pageindex)) . "</td></tr>
|
<tr><th>Number of pages:</th><td>" . count(get_object_vars($pageindex)) . "</td></tr>
|
||||||
<tr><th>Number of modules:</th><td>" . count($modules) . "</td></tr>
|
<tr><th>Number of modules:</th><td>" . count($modules) . "</td></tr>
|
||||||
</table>";
|
</table>
|
||||||
|
<h2>Installed Modules</h2>
|
||||||
|
$modules_html";
|
||||||
exit(page_renderer::render_main($title, $content));
|
exit(page_renderer::render_main($title, $content));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue