mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-11-22 16:33:00 +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([
|
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);
|
||||||
|
|
|
@ -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",
|
||||||
|
|
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue