Commit 4a535542 authored by Dan Untenzu's avatar Dan Untenzu Committed by Jérôme Jutteau

[!!][FEATURE] Let admin overwrite the ToS page

Let the admin overwrite the content of the
"Terms of Service" page by copying the original ToS
template and creating a local file (same procedure as
for the configuration). This file is not versionized.

Note: This is a breaking change, since the existing
tos textfile is moved. This should be mentioned
in the update comments.
  * ToS text file changed → move file from "/tos_text.php"
    to "/lib/tos.local.txt" and remove all HTML und PHP Tags,
    leaving a regular text file.

Refs #95
parent 381f2d6e
This diff is collapsed.
......@@ -17,28 +17,23 @@
define ('JIRAFEAU_ROOT', dirname (__FILE__) . '/');
require (JIRAFEAU_ROOT . 'lib/settings.php');
require (JIRAFEAU_ROOT . 'lib/functions.php');
require (JIRAFEAU_ROOT . 'lib/lang.php');
require (JIRAFEAU_ROOT . 'lib/template/header.php');
$url = $cfg['web_root'] . 'tos.php';
$org = "[THIS WEBSITE]";
$contact = "
By email:
contact@[THIS WEBSITE]
// Read ToS template
if (is_readable(JIRAFEAU_ROOT . 'lib/tos.local.txt')) {
$content = file_get_contents(JIRAFEAU_ROOT . 'lib/tos.local.txt');
} else {
$content = file_get_contents(JIRAFEAU_ROOT . 'lib/tos.original.txt');
include (JIRAFEAU_ROOT . 'tos_text.php');
// Replace markers and print ToS
require (JIRAFEAU_ROOT . 'lib/template/header.php');
echo '<h2>Terms of Service</h2>';
echo '<div>';
echo '<textarea readonly="readonly" rows="210" cols="80">';
echo $tos;
echo '</textarea>';
echo '<p>This license text is under <a href="">Creative Commons - Attribution 3.0 Unported</a>.</p><p>It has been based on this work: <a href=""></a></p>';
echo '</div>';
echo '<div>' . jirafeau_replace_markers($content, true) . '</div>';
require (JIRAFEAU_ROOT . 'lib/template/footer.php');
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment