1
0
Fork 0
mirror of https://github.com/sbrl/Pepperminty-Wiki.git synced 2024-11-22 04:23:01 +00:00

continuing work on the new theme. $settings->navlinks is now $settings->nav_links

This commit is contained in:
Starbeamrainbowlabs 2015-07-16 10:16:02 +01:00
parent c02243921c
commit 505eae21d0
5 changed files with 8 additions and 9 deletions

View file

@ -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>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>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> <p>This wiki is managed by <a href='mailto:{admin-details-email}'>{admin-details-name}</a>.</p>
{nav-bottom}
</footer> </footer>
{all-pages-datalist}"; {all-pages-datalist}";
public static $minimal_content_template = "{content} public static $minimal_content_template = "{content}
@ -322,7 +323,7 @@ class page_renderer
$settings->favicon, $settings->favicon,
self::get_css_as_html(), self::get_css_as_html(),
self::render_navigation_bar(), self::render_navigation_bar($settings->navlinks),
$settings->admindetails["name"], $settings->admindetails["name"],
$settings->admindetails["email"], $settings->admindetails["email"],
@ -367,7 +368,7 @@ class page_renderer
public static $nav_divider = "<span class='nav-divider inflexible'> | </span>"; 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; global $settings, $user, $isloggedin, $page;
$result = "<nav>\n"; $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; $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 // Loop over all the navigation links
foreach($settings->navlinks as $item) foreach($nav_links as $item)
{ {
if(is_string($item)) if(is_string($item))
{ {

View file

@ -947,7 +947,7 @@ register_module([
http_response_code(201); http_response_code(201);
else else
http_response_code(200); http_response_code(200);
header("location: index.php?page=$page&edit_status=success"); header("location: index.php?page=$page&edit_status=success");
exit(); exit();
} }

View file

@ -29,7 +29,7 @@
"author": "Starbeamrainbowlabs", "author": "Starbeamrainbowlabs",
"description": "Allows you to edit pages by adding the edit and save actions. You should probably include this one.", "description": "Allows you to edit pages by adding the edit and save actions. You should probably include this one.",
"id": "page-edit", "id": "page-edit",
"lastupdate": 1436889893 "lastupdate": 1437037943
}, },
{ {
"name": "Help page", "name": "Help page",

View file

@ -118,13 +118,11 @@ register_module([
file_put_contents("./pageindex.json", json_encode($pageindex, JSON_PRETTY_PRINT)); 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"])) if(isset($_GET["newpage"]))
http_response_code(201); http_response_code(201);
else else
http_response_code(200); http_response_code(200);
header("location: index.php?page=$page&edit_status=success"); header("location: index.php?page=$page&edit_status=success");
exit(); exit();
} }

View file

@ -91,7 +91,7 @@ $settings->admindetails = [
// search: Expands to a search box. // search: Expands to a search box.
// divider: Expands to a divider to separate links. // divider: Expands to a divider to separate links.
// more: Expands to the "More..." submenu. // more: Expands to the "More..." submenu.
$settings->navlinks = [ $settings->nav_links = [
[ "Home", "index.php" ], [ "Home", "index.php" ],
[ "Login", "index.php?action=login" ], [ "Login", "index.php?action=login" ],
"search", "search",