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([
"name" => "Sidebar",
"version" => "0.1",
"version" => "0.2",
"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.",
"id" => "extra-sidebar",
@ -865,7 +865,7 @@ register_module([
page_renderer::register_part_preprocessor(function(&$parts) use ($show_sidebar) {
global $settings, $pageindex;
if($show_sidebar)
if($show_sidebar && !isset($_GET["printable"]))
{
// Show the sidebar
$exec_start = microtime(true);

View File

@ -9,11 +9,11 @@
},
{
"name": "Sidebar",
"version": "0.1",
"version": "0.2",
"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.",
"id": "extra-sidebar",
"lastupdate": 1438715409
"lastupdate": 1438775454
},
{
"name": "Credits",

View File

@ -1,7 +1,7 @@
<?php
register_module([
"name" => "Sidebar",
"version" => "0.1",
"version" => "0.2",
"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.",
"id" => "extra-sidebar",
@ -37,7 +37,7 @@ register_module([
page_renderer::register_part_preprocessor(function(&$parts) use ($show_sidebar) {
global $settings, $pageindex;
if($show_sidebar)
if($show_sidebar && !isset($_GET["printable"]))
{
// Show the sidebar
$exec_start = microtime(true);