mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-12-22 13:45:02 +00:00
extra-sidebar: Don't show the sidebar on printable pages. Fixes #16.
This commit is contained in:
parent
9cc042e081
commit
eb58c7921e
3 changed files with 6 additions and 6 deletions
|
@ -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);
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue