mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-12-22 13:45:02 +00:00
continuing work on the new theme. $settings->navlinks is now $settings->nav_links
This commit is contained in:
parent
c02243921c
commit
505eae21d0
5 changed files with 8 additions and 9 deletions
7
core.php
7
core.php
|
@ -288,6 +288,7 @@ class page_renderer
|
|||
<p>Powered by Pepperminty Wiki, which was built by <a href='//starbeamrainbowlabs.com/'>Starbeamrainbowlabs</a>. Send bugs to 'bugs at starbeamrainbowlabs dot com' or open an issue <a href='//github.com/sbrl/Pepperminty-Wiki'>on github</a>.</p>
|
||||
<p>Your local friendly administrators are {admins-name-list}.
|
||||
<p>This wiki is managed by <a href='mailto:{admin-details-email}'>{admin-details-name}</a>.</p>
|
||||
{nav-bottom}
|
||||
</footer>
|
||||
{all-pages-datalist}";
|
||||
public static $minimal_content_template = "{content}
|
||||
|
@ -322,7 +323,7 @@ class page_renderer
|
|||
$settings->favicon,
|
||||
self::get_css_as_html(),
|
||||
|
||||
self::render_navigation_bar(),
|
||||
self::render_navigation_bar($settings->navlinks),
|
||||
|
||||
$settings->admindetails["name"],
|
||||
$settings->admindetails["email"],
|
||||
|
@ -367,7 +368,7 @@ class page_renderer
|
|||
|
||||
public static $nav_divider = "<span class='nav-divider inflexible'> | </span>";
|
||||
|
||||
public static function render_navigation_bar()
|
||||
public static function render_navigation_bar($nav_links)
|
||||
{
|
||||
global $settings, $user, $isloggedin, $page;
|
||||
$result = "<nav>\n";
|
||||
|
@ -382,7 +383,7 @@ class page_renderer
|
|||
$result .= "<span class='inflexible'>Browsing as Anonymous.</span>" . /*page_renderer::$nav_divider . */"<span><a href='index.php?action=login'>Login</a></span>" . page_renderer::$nav_divider;
|
||||
|
||||
// Loop over all the navigation links
|
||||
foreach($settings->navlinks as $item)
|
||||
foreach($nav_links as $item)
|
||||
{
|
||||
if(is_string($item))
|
||||
{
|
||||
|
|
|
@ -947,7 +947,7 @@ register_module([
|
|||
http_response_code(201);
|
||||
else
|
||||
http_response_code(200);
|
||||
|
||||
|
||||
header("location: index.php?page=$page&edit_status=success");
|
||||
exit();
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
"author": "Starbeamrainbowlabs",
|
||||
"description": "Allows you to edit pages by adding the edit and save actions. You should probably include this one.",
|
||||
"id": "page-edit",
|
||||
"lastupdate": 1436889893
|
||||
"lastupdate": 1437037943
|
||||
},
|
||||
{
|
||||
"name": "Help page",
|
||||
|
|
|
@ -118,13 +118,11 @@ register_module([
|
|||
|
||||
file_put_contents("./pageindex.json", json_encode($pageindex, JSON_PRETTY_PRINT));
|
||||
|
||||
// Todo Update the parent page entries in the page index if they exist
|
||||
|
||||
if(isset($_GET["newpage"]))
|
||||
http_response_code(201);
|
||||
else
|
||||
http_response_code(200);
|
||||
|
||||
|
||||
header("location: index.php?page=$page&edit_status=success");
|
||||
exit();
|
||||
}
|
||||
|
|
|
@ -91,7 +91,7 @@ $settings->admindetails = [
|
|||
// search: Expands to a search box.
|
||||
// divider: Expands to a divider to separate links.
|
||||
// more: Expands to the "More..." submenu.
|
||||
$settings->navlinks = [
|
||||
$settings->nav_links = [
|
||||
[ "Home", "index.php" ],
|
||||
[ "Login", "index.php?action=login" ],
|
||||
"search",
|
||||
|
|
Loading…
Reference in a new issue