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

extra-sidebar: Don't show the sidebar on printable pages. Fixes #16.

This commit is contained in:
Starbeamrainbowlabs 2015-08-05 12:51:38 +01:00
parent 9cc042e081
commit eb58c7921e
3 changed files with 6 additions and 6 deletions

View file

@ -829,7 +829,7 @@ register_module([
register_module([ register_module([
"name" => "Sidebar", "name" => "Sidebar",
"version" => "0.1", "version" => "0.2",
"author" => "Starbeamrainbowlabs", "author" => "Starbeamrainbowlabs",
"description" => "Adds a sidebar to the left hand side of every page. Add '\$settings->sidebar_show = true;' to your configuration, or append '&sidebar=yes' to the url to enable. Adding to the url sets a cookie to remember your setting.", "description" => "Adds a sidebar to the left hand side of every page. Add '\$settings->sidebar_show = true;' to your configuration, or append '&sidebar=yes' to the url to enable. Adding to the url sets a cookie to remember your setting.",
"id" => "extra-sidebar", "id" => "extra-sidebar",
@ -865,7 +865,7 @@ register_module([
page_renderer::register_part_preprocessor(function(&$parts) use ($show_sidebar) { page_renderer::register_part_preprocessor(function(&$parts) use ($show_sidebar) {
global $settings, $pageindex; global $settings, $pageindex;
if($show_sidebar) if($show_sidebar && !isset($_GET["printable"]))
{ {
// Show the sidebar // Show the sidebar
$exec_start = microtime(true); $exec_start = microtime(true);

View file

@ -9,11 +9,11 @@
}, },
{ {
"name": "Sidebar", "name": "Sidebar",
"version": "0.1", "version": "0.2",
"author": "Starbeamrainbowlabs", "author": "Starbeamrainbowlabs",
"description": "Adds a sidebar to the left hand side of every page. Add '$settings->sidebar_show = true;' to your configuration, or append '&sidebar=yes' to the url to enable. Adding to the url sets a cookie to remember your setting.", "description": "Adds a sidebar to the left hand side of every page. Add '$settings->sidebar_show = true;' to your configuration, or append '&sidebar=yes' to the url to enable. Adding to the url sets a cookie to remember your setting.",
"id": "extra-sidebar", "id": "extra-sidebar",
"lastupdate": 1438715409 "lastupdate": 1438775454
}, },
{ {
"name": "Credits", "name": "Credits",

View file

@ -1,7 +1,7 @@
<?php <?php
register_module([ register_module([
"name" => "Sidebar", "name" => "Sidebar",
"version" => "0.1", "version" => "0.2",
"author" => "Starbeamrainbowlabs", "author" => "Starbeamrainbowlabs",
"description" => "Adds a sidebar to the left hand side of every page. Add '\$settings->sidebar_show = true;' to your configuration, or append '&sidebar=yes' to the url to enable. Adding to the url sets a cookie to remember your setting.", "description" => "Adds a sidebar to the left hand side of every page. Add '\$settings->sidebar_show = true;' to your configuration, or append '&sidebar=yes' to the url to enable. Adding to the url sets a cookie to remember your setting.",
"id" => "extra-sidebar", "id" => "extra-sidebar",
@ -37,7 +37,7 @@ register_module([
page_renderer::register_part_preprocessor(function(&$parts) use ($show_sidebar) { page_renderer::register_part_preprocessor(function(&$parts) use ($show_sidebar) {
global $settings, $pageindex; global $settings, $pageindex;
if($show_sidebar) if($show_sidebar && !isset($_GET["printable"]))
{ {
// Show the sidebar // Show the sidebar
$exec_start = microtime(true); $exec_start = microtime(true);