mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-11-22 04:23:01 +00:00
Reworked version system to use separate file
This commit is contained in:
parent
0687610598
commit
99e1251d5d
4 changed files with 18 additions and 9 deletions
|
@ -263,7 +263,7 @@ Actions:
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
/////////////// Do not edit below this line unless you know what you are doing! ///////////////
|
/////////////// Do not edit below this line unless you know what you are doing! ///////////////
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
$version = "0.8";
|
$version = "v0.9-dev";
|
||||||
$env = new stdClass();
|
$env = new stdClass();
|
||||||
$env->action = $settings->defaultaction;
|
$env->action = $settings->defaultaction;
|
||||||
$env->page = "";
|
$env->page = "";
|
||||||
|
@ -618,7 +618,7 @@ class page_renderer
|
||||||
|
|
||||||
<footer>
|
<footer>
|
||||||
<p>{footer-message}</p>
|
<p>{footer-message}</p>
|
||||||
<p>Powered by Pepperminty Wiki, which was built by <a href='//starbeamrainbowlabs.com/'>Starbeamrainbowlabs</a>. Send bugs to 'bugs at starbeamrainbowlabs dot com' or open an issue <a href='//github.com/sbrl/Pepperminty-Wiki'>on github</a>.</p>
|
<p>Powered by Pepperminty Wiki v0.9-dev, which was built by <a href='//starbeamrainbowlabs.com/'>Starbeamrainbowlabs</a>. Send bugs to 'bugs at starbeamrainbowlabs dot com' or open an issue <a href='//github.com/sbrl/Pepperminty-Wiki'>on github</a>.</p>
|
||||||
<p>Your local friendly administrators are {admins-name-list}.
|
<p>Your local friendly administrators are {admins-name-list}.
|
||||||
<p>This wiki is managed by <a href='mailto:{admin-details-email}'>{admin-details-name}</a>.</p>
|
<p>This wiki is managed by <a href='mailto:{admin-details-email}'>{admin-details-name}</a>.</p>
|
||||||
</footer>
|
</footer>
|
||||||
|
@ -630,7 +630,7 @@ class page_renderer
|
||||||
<p><em>From {sitename}, which is managed by {admin-details-name}.</em></p>
|
<p><em>From {sitename}, which is managed by {admin-details-name}.</em></p>
|
||||||
<p>{footer-message}</p>
|
<p>{footer-message}</p>
|
||||||
<p><em>Timed at {generation-date}</em></p>
|
<p><em>Timed at {generation-date}</em></p>
|
||||||
<p><em>Powered by Pepperminty Wiki.</em></p>
|
<p><em>Powered by Pepperminty Wiki v0.9-dev.</em></p>
|
||||||
</footer>";
|
</footer>";
|
||||||
|
|
||||||
// An array of functions that have been registered to process the
|
// An array of functions that have been registered to process the
|
||||||
|
@ -659,7 +659,7 @@ class page_renderer
|
||||||
|
|
||||||
public static function render($title, $content, $body_template = false)
|
public static function render($title, $content, $body_template = false)
|
||||||
{
|
{
|
||||||
global $settings, $start_time;
|
global $settings, $start_time, $version;
|
||||||
|
|
||||||
if($body_template === false)
|
if($body_template === false)
|
||||||
$body_template = self::$main_content_template;
|
$body_template = self::$main_content_template;
|
||||||
|
@ -685,6 +685,7 @@ class page_renderer
|
||||||
"{body}" => $body_template,
|
"{body}" => $body_template,
|
||||||
|
|
||||||
"{sitename}" => $logo_html,
|
"{sitename}" => $logo_html,
|
||||||
|
"v0.9-dev" => $version,
|
||||||
"{favicon-url}" => $settings->favicon,
|
"{favicon-url}" => $settings->favicon,
|
||||||
"{header-html}" => self::get_css_as_html(),
|
"{header-html}" => self::get_css_as_html(),
|
||||||
|
|
||||||
|
|
9
core.php
9
core.php
|
@ -6,7 +6,7 @@ $start_time = time(true);
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
/////////////// Do not edit below this line unless you know what you are doing! ///////////////
|
/////////////// Do not edit below this line unless you know what you are doing! ///////////////
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
$version = "0.8";
|
$version = "{version}";
|
||||||
$env = new stdClass();
|
$env = new stdClass();
|
||||||
$env->action = $settings->defaultaction;
|
$env->action = $settings->defaultaction;
|
||||||
$env->page = "";
|
$env->page = "";
|
||||||
|
@ -361,7 +361,7 @@ class page_renderer
|
||||||
|
|
||||||
<footer>
|
<footer>
|
||||||
<p>{footer-message}</p>
|
<p>{footer-message}</p>
|
||||||
<p>Powered by Pepperminty Wiki, which was built by <a href='//starbeamrainbowlabs.com/'>Starbeamrainbowlabs</a>. Send bugs to 'bugs at starbeamrainbowlabs dot com' or open an issue <a href='//github.com/sbrl/Pepperminty-Wiki'>on github</a>.</p>
|
<p>Powered by Pepperminty Wiki {version}, which was built by <a href='//starbeamrainbowlabs.com/'>Starbeamrainbowlabs</a>. Send bugs to 'bugs at starbeamrainbowlabs dot com' or open an issue <a href='//github.com/sbrl/Pepperminty-Wiki'>on github</a>.</p>
|
||||||
<p>Your local friendly administrators are {admins-name-list}.
|
<p>Your local friendly administrators are {admins-name-list}.
|
||||||
<p>This wiki is managed by <a href='mailto:{admin-details-email}'>{admin-details-name}</a>.</p>
|
<p>This wiki is managed by <a href='mailto:{admin-details-email}'>{admin-details-name}</a>.</p>
|
||||||
</footer>
|
</footer>
|
||||||
|
@ -373,7 +373,7 @@ class page_renderer
|
||||||
<p><em>From {sitename}, which is managed by {admin-details-name}.</em></p>
|
<p><em>From {sitename}, which is managed by {admin-details-name}.</em></p>
|
||||||
<p>{footer-message}</p>
|
<p>{footer-message}</p>
|
||||||
<p><em>Timed at {generation-date}</em></p>
|
<p><em>Timed at {generation-date}</em></p>
|
||||||
<p><em>Powered by Pepperminty Wiki.</em></p>
|
<p><em>Powered by Pepperminty Wiki {version}.</em></p>
|
||||||
</footer>";
|
</footer>";
|
||||||
|
|
||||||
// An array of functions that have been registered to process the
|
// An array of functions that have been registered to process the
|
||||||
|
@ -402,7 +402,7 @@ class page_renderer
|
||||||
|
|
||||||
public static function render($title, $content, $body_template = false)
|
public static function render($title, $content, $body_template = false)
|
||||||
{
|
{
|
||||||
global $settings, $start_time;
|
global $settings, $start_time, $version;
|
||||||
|
|
||||||
if($body_template === false)
|
if($body_template === false)
|
||||||
$body_template = self::$main_content_template;
|
$body_template = self::$main_content_template;
|
||||||
|
@ -428,6 +428,7 @@ class page_renderer
|
||||||
"{body}" => $body_template,
|
"{body}" => $body_template,
|
||||||
|
|
||||||
"{sitename}" => $logo_html,
|
"{sitename}" => $logo_html,
|
||||||
|
"{version}" => $version,
|
||||||
"{favicon-url}" => $settings->favicon,
|
"{favicon-url}" => $settings->favicon,
|
||||||
"{header-html}" => self::get_css_as_html(),
|
"{header-html}" => self::get_css_as_html(),
|
||||||
|
|
||||||
|
|
8
pack.php
8
pack.php
|
@ -32,7 +32,13 @@ if(php_sapi_name() == "cli") echo("Reading in core files...");
|
||||||
$core = file_get_contents("core.php");
|
$core = file_get_contents("core.php");
|
||||||
$settings = file_get_contents("settings.fragment.php");
|
$settings = file_get_contents("settings.fragment.php");
|
||||||
$settings = str_replace([ "<?php", "?>" ], "", $settings);
|
$settings = str_replace([ "<?php", "?>" ], "", $settings);
|
||||||
$core = str_replace("{settings}", $settings, $core);
|
$core = str_replace([
|
||||||
|
"{settings}",
|
||||||
|
"{version}"
|
||||||
|
], [
|
||||||
|
$settings,
|
||||||
|
file_get_contents("version")
|
||||||
|
], $core);
|
||||||
|
|
||||||
$result = $core;
|
$result = $core;
|
||||||
|
|
||||||
|
|
1
version
Normal file
1
version
Normal file
|
@ -0,0 +1 @@
|
||||||
|
v0.9-dev
|
Loading…
Reference in a new issue