mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-11-25 17:23:00 +00:00
Added last modified time to bottom of page. Fixes #67.
This commit is contained in:
parent
344bd76e1b
commit
9e9ad02bd6
4 changed files with 6 additions and 3 deletions
|
@ -1,6 +1,7 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
## v0.12-dev
|
## v0.12-dev
|
||||||
- Implemented delayed indexing (#66)
|
- Implemented delayed indexing (#66)
|
||||||
|
- Added the time a page was last modified to the footer (#67)
|
||||||
|
|
||||||
## v0.11
|
## v0.11
|
||||||
|
|
||||||
|
|
|
@ -4266,13 +4266,14 @@ register_module([
|
||||||
time() - $pageindex->{$env->page}->lastmodified < $settings->delayed_indexing_time)
|
time() - $pageindex->{$env->page}->lastmodified < $settings->delayed_indexing_time)
|
||||||
header("x-robots-tag: noindex");
|
header("x-robots-tag: noindex");
|
||||||
|
|
||||||
// Content only mode: Sends only the raw rendered page
|
// Content only mode: Send only the raw rendered page
|
||||||
if(isset($_GET["contentonly"]) and $_GET["contentonly"] === "yes")
|
if(isset($_GET["contentonly"]) and $_GET["contentonly"] === "yes")
|
||||||
exit(parse_page_source($content));
|
exit(parse_page_source($content));
|
||||||
// Printable: Sends a printable version of the page
|
// Printable: Sends a printable version of the page
|
||||||
if(isset($_GET["printable"]) and $_GET["printable"] === "yes")
|
if(isset($_GET["printable"]) and $_GET["printable"] === "yes")
|
||||||
exit(page_renderer::render_minimal($title, $content));
|
exit(page_renderer::render_minimal($title, $content));
|
||||||
// Normal page
|
// Normal page
|
||||||
|
$settings->footer_message = "Last edited at " . date('h:ia T \o\n j F Y') . ".</p>\n<p>"; // Add the last edited time to the footer
|
||||||
exit(page_renderer::render_main($title, $content));
|
exit(page_renderer::render_main($title, $content));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -176,7 +176,7 @@
|
||||||
"author": "Starbeamrainbowlabs",
|
"author": "Starbeamrainbowlabs",
|
||||||
"description": "Allows you to view pages. You really should include this one.",
|
"description": "Allows you to view pages. You really should include this one.",
|
||||||
"id": "page-view",
|
"id": "page-view",
|
||||||
"lastupdate": 1462013968,
|
"lastupdate": 1462015175,
|
||||||
"optional": false
|
"optional": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -108,13 +108,14 @@ register_module([
|
||||||
time() - $pageindex->{$env->page}->lastmodified < $settings->delayed_indexing_time)
|
time() - $pageindex->{$env->page}->lastmodified < $settings->delayed_indexing_time)
|
||||||
header("x-robots-tag: noindex");
|
header("x-robots-tag: noindex");
|
||||||
|
|
||||||
// Content only mode: Sends only the raw rendered page
|
// Content only mode: Send only the raw rendered page
|
||||||
if(isset($_GET["contentonly"]) and $_GET["contentonly"] === "yes")
|
if(isset($_GET["contentonly"]) and $_GET["contentonly"] === "yes")
|
||||||
exit(parse_page_source($content));
|
exit(parse_page_source($content));
|
||||||
// Printable: Sends a printable version of the page
|
// Printable: Sends a printable version of the page
|
||||||
if(isset($_GET["printable"]) and $_GET["printable"] === "yes")
|
if(isset($_GET["printable"]) and $_GET["printable"] === "yes")
|
||||||
exit(page_renderer::render_minimal($title, $content));
|
exit(page_renderer::render_minimal($title, $content));
|
||||||
// Normal page
|
// Normal page
|
||||||
|
$settings->footer_message = "Last edited at " . date('h:ia T \o\n j F Y') . ".</p>\n<p>"; // Add the last edited time to the footer
|
||||||
exit(page_renderer::render_main($title, $content));
|
exit(page_renderer::render_main($title, $content));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue