diff --git a/build/index.php b/build/index.php index 3d1578b..811b86f 100644 --- a/build/index.php +++ b/build/index.php @@ -784,7 +784,12 @@ class page_renderer "{all-pages-datalist}" => self::generate_all_pages_datalist(), - "{footer-message}" => $settings->footer_message + "{footer-message}" => $settings->footer_message, + + /// Secondary Parts /// + + "{content}" => $content, + "{title}" => $title, ]; // Pass the parts through the part processors @@ -798,11 +803,8 @@ class page_renderer $result = str_replace(array_keys($parts), array_values($parts), $result); $result = str_replace([ - "{title}", - "{content}" + ], [ - $title, - $content ], $result); $result = str_replace("{generation-time-taken}", microtime(true) - $start_time, $result); @@ -1431,19 +1433,11 @@ register_module([ http_response_code(501); exit("Unrecognised file type."); } - - // todo render a preview here - - /* - * size (image outputs only, possibly width / height) - * 1-2048 (configurable) - * filetype - * either a mime type or 'native' - */ }); page_renderer::register_part_preprocessor(function(&$parts) { - // Todo add the preview to the top o fthe page here, but onyl if the current action is view and we are on a page prefixed with file: + // Todo add the preview to the top of the page here, but onyl if the current action is view and we are on a page prefixed with file: + }); } ]); diff --git a/core.php b/core.php index bc1947a..ab89334 100644 --- a/core.php +++ b/core.php @@ -490,7 +490,12 @@ class page_renderer "{all-pages-datalist}" => self::generate_all_pages_datalist(), - "{footer-message}" => $settings->footer_message + "{footer-message}" => $settings->footer_message, + + /// Secondary Parts /// + + "{content}" => $content, + "{title}" => $title, ]; // Pass the parts through the part processors @@ -504,11 +509,8 @@ class page_renderer $result = str_replace(array_keys($parts), array_values($parts), $result); $result = str_replace([ - "{title}", - "{content}" + ], [ - $title, - $content ], $result); $result = str_replace("{generation-time-taken}", microtime(true) - $start_time, $result); diff --git a/module_index.json b/module_index.json index af1a8e8..c4e4fed 100644 --- a/module_index.json +++ b/module_index.json @@ -50,7 +50,7 @@ "author": "Starbeamrainbowlabs", "description": "Adds the ability to upload files to Pepperminty Wiki. Uploaded files act as pages and have the special 'File:' prefix.", "id": "feature-upload", - "lastupdate": 1445677429, + "lastupdate": 1445677720, "optional": false }, {