mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-12-22 13:45:02 +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
|
||||
## v0.12-dev
|
||||
- Implemented delayed indexing (#66)
|
||||
- Added the time a page was last modified to the footer (#67)
|
||||
|
||||
## v0.11
|
||||
|
||||
|
|
|
@ -4266,13 +4266,14 @@ register_module([
|
|||
time() - $pageindex->{$env->page}->lastmodified < $settings->delayed_indexing_time)
|
||||
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")
|
||||
exit(parse_page_source($content));
|
||||
// Printable: Sends a printable version of the page
|
||||
if(isset($_GET["printable"]) and $_GET["printable"] === "yes")
|
||||
exit(page_renderer::render_minimal($title, $content));
|
||||
// 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));
|
||||
});
|
||||
}
|
||||
|
|
|
@ -176,7 +176,7 @@
|
|||
"author": "Starbeamrainbowlabs",
|
||||
"description": "Allows you to view pages. You really should include this one.",
|
||||
"id": "page-view",
|
||||
"lastupdate": 1462013968,
|
||||
"lastupdate": 1462015175,
|
||||
"optional": false
|
||||
},
|
||||
{
|
||||
|
|
|
@ -108,13 +108,14 @@ register_module([
|
|||
time() - $pageindex->{$env->page}->lastmodified < $settings->delayed_indexing_time)
|
||||
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")
|
||||
exit(parse_page_source($content));
|
||||
// Printable: Sends a printable version of the page
|
||||
if(isset($_GET["printable"]) and $_GET["printable"] === "yes")
|
||||
exit(page_renderer::render_minimal($title, $content));
|
||||
// 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));
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue