mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-19 01:15:15 +00:00
start the doco rewrite
This commit is contained in:
parent
877f494e7e
commit
34207e0547
8 changed files with 53 additions and 108 deletions
|
@ -79,20 +79,8 @@ class Help extends Controller {
|
|||
killme();
|
||||
}
|
||||
|
||||
$headings = [
|
||||
'about' => t('About'),
|
||||
'member' => t('Members'),
|
||||
'admin' => t('Administrators'),
|
||||
'developer' => t('Developers'),
|
||||
'tutorials' => t('Tutorials')
|
||||
];
|
||||
|
||||
if(array_key_exists(argv(1), $headings))
|
||||
$heading = $headings[argv(1)];
|
||||
|
||||
$content = get_help_content();
|
||||
|
||||
$language = determine_help_language()['language'];
|
||||
|
||||
return replace_macros(get_markup_template('help.tpl'), array(
|
||||
'$title' => t('$Projectname Documentation'),
|
||||
|
|
|
@ -50,7 +50,7 @@ class Well_known extends Controller {
|
|||
break;
|
||||
|
||||
case 'dnt-policy.txt':
|
||||
echo file_get_contents('doc/dnt-policy.txt');
|
||||
echo file_get_contents('doc/global/dnt-policy.txt');
|
||||
killme();
|
||||
|
||||
default:
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
Privacy Policy
|
||||
==============
|
||||
|
||||
#include doc/gdpr1.md;
|
||||
|
||||
|
||||
Terms of Service
|
||||
================
|
||||
|
||||
#include doc/SiteTOS.md;
|
||||
|
|
@ -1,12 +1,18 @@
|
|||
Privacy Policy
|
||||
==============
|
||||
|
||||
Privacy Notice May 2018
|
||||
|
||||
The following applies mainly to account registrants on this site. You may use this website
|
||||
without registering for an account.
|
||||
|
||||
|
||||
How your information will be used
|
||||
=================================
|
||||
|
||||
Information you provide to this website may be stored and used to provide services to you.
|
||||
|
||||
We require an email address to idenitfy the account holder. This will not be shared with
|
||||
We require an email address to identify the account holder. This will not be shared with
|
||||
any other website or service. It is used to send you notifications about your account and
|
||||
perform administrative tasks such as resetting your password. You have the option to
|
||||
opt-out of all email notifications through your settings.
|
||||
|
@ -77,8 +83,7 @@ download for either archival puposes or to transfer to another compatible websit
|
|||
Your rights
|
||||
===========
|
||||
|
||||
Under the General Data Protection Regulation
|
||||
(GDPR) and The Data Protection Act 2018
|
||||
Under the General Data Protection Regulation (GDPR) and The Data Protection Act 2018
|
||||
(DPA) you have a number of rights with regard to your personal data.
|
||||
You have the right to request from us access to and rectification or erasure of your personal data,
|
||||
the right to restrict processing, object to processing as well as in certain circumstances the right
|
||||
|
@ -92,23 +97,24 @@ You have the right to lodge a complaint to the Information Commissioners’ Offi
|
|||
believe that we have not complied with the requirements of the GDPR or DPA 18 with regard
|
||||
to your personal data.
|
||||
|
||||
DMCA takedown notices (for illegal use of copyrighted information) MUST be initiated by the
|
||||
owner of the copyright and should be addressed to the data protection officer, listed below.
|
||||
|
||||
|
||||
Identity and contact details of controller and data protection officer
|
||||
======================================================================
|
||||
|
||||
[NAME OF COMPANY]
|
||||
is the controller
|
||||
[and processor]
|
||||
of data for the purposes of the DPA 18 and GDPR. 3
|
||||
is the controller [and processor] of data for the purposes of the DPA section 18 and GDPR section 3.
|
||||
|
||||
If you have any concerns as to how your data is processed you can contact:
|
||||
If you have any concerns as to how your data is processed you may contact:
|
||||
|
||||
[Website operator should include their contact details here].
|
||||
|
||||
|
||||
Terms of Service
|
||||
================
|
||||
|
||||
|
||||
This website is physically located in [COUNTRY] and all usage is subject to the laws thereof.
|
||||
|
||||
[
|
||||
[NAME]
|
||||
Data Protection Offer at
|
||||
[EMAIL ADDRESS]
|
||||
]
|
||||
[NAME] [JOB TITLE]
|
||||
at
|
||||
[EMAIL ADDRESS]
|
||||
or you can write to these
|
||||
individuals using the address of
|
||||
[]
|
5
doc/site/README.md
Normal file
5
doc/site/README.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
The site directory is for local modifications of documentation files.
|
||||
|
||||
Please copy the file doc/en/TermsOfService.md to doc/site/en/TermsOfService.md and add
|
||||
the contact details for the site owner per the GDPR. You may also translate documentation
|
||||
into other languages as desired.
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
use Michelf\MarkdownExtra;
|
||||
|
||||
use App;
|
||||
|
||||
/**
|
||||
* @brief
|
||||
|
@ -11,37 +11,26 @@ use Michelf\MarkdownExtra;
|
|||
*/
|
||||
function get_help_fullpath($path,$suffix=null) {
|
||||
|
||||
$docroot = 'doc/';
|
||||
|
||||
// Determine the language and modify the path accordingly
|
||||
// $x = determine_help_language();
|
||||
// $lang = $x['language'];
|
||||
// $url_idx = ($x['from_url'] ? 1 : 0);
|
||||
// The English translation is at the root of /doc/. Other languages are in
|
||||
// subfolders named by the language code such as "de", "es", etc.
|
||||
// if($lang !== 'en') {
|
||||
// $langpath = $lang . '/' . $path;
|
||||
// } else {
|
||||
// $langpath = $path;
|
||||
// }
|
||||
|
||||
|
||||
$newpath = $docroot . $path;
|
||||
|
||||
if ($suffix) {
|
||||
if (file_exists($newpath . $suffix)) {
|
||||
return $newpath;
|
||||
}
|
||||
} elseif (file_exists($newpath . '.md') ||
|
||||
file_exists($newpath . '.bb') ||
|
||||
file_exists($newpath . '.html')) {
|
||||
return $newpath;
|
||||
}
|
||||
|
||||
|
||||
return $newpath;
|
||||
return find_docfile($path,App::$language);
|
||||
}
|
||||
|
||||
function find_docfile($name,$language) {
|
||||
|
||||
foreach([ $language, 'en' ] as $lang) {
|
||||
if (file_exists('doc/site/' . $lang . '/' . $name . '.md')) {
|
||||
return 'doc/site/' . $lang . '/' . $name . '.md';
|
||||
}
|
||||
if (file_exists('doc/' . $lang . '/' . $name . '.md')) {
|
||||
return 'doc/' . $lang . '/' . $name . '.md';
|
||||
}
|
||||
}
|
||||
|
||||
return EMPTY_STR;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @brief
|
||||
|
@ -56,27 +45,15 @@ function get_help_content($tocpath = false) {
|
|||
|
||||
$text = '';
|
||||
|
||||
$path = '';
|
||||
$docroot = 'doc/';
|
||||
|
||||
$path = argv(1);
|
||||
|
||||
$fullpath = get_help_fullpath($path,'.md');
|
||||
$fullpath = get_help_fullpath($path);
|
||||
|
||||
|
||||
$text = load_doc_file($fullpath . '.md');
|
||||
$text = load_doc_file($fullpath);
|
||||
|
||||
App::$page['title'] = t('Help');
|
||||
|
||||
|
||||
if($doctype === 'markdown') {
|
||||
# escape #include tags
|
||||
$text = preg_replace('/#include/ism', '%%include', $text);
|
||||
$content = MarkdownExtra::defaultTransform($text);
|
||||
$content = preg_replace('/%%include/ism', '#include', $content);
|
||||
}
|
||||
|
||||
$content = preg_replace_callback("/#include (.*?)\;/ism", 'preg_callback_help_include', $content);
|
||||
$content = MarkdownExtra::defaultTransform($text);
|
||||
|
||||
return translate_projectname($content);
|
||||
}
|
||||
|
|
|
@ -1,28 +1,8 @@
|
|||
<div id="help-content" class="generic-content-wrapper">
|
||||
<div class="clearfix section-title-wrapper">
|
||||
<div class="pull-right">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-outline-secondary btn-sm dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="fa fa-language" style="font-size: 1.4em;"></i>
|
||||
</button>
|
||||
<div class="dropdown-menu dropdown-menu-right flex-column lang-selector">
|
||||
<a class="dropdown-item lang-choice" href="/help">de</a>
|
||||
<a class="dropdown-item lang-choice" href="/help">en</a>
|
||||
<a class="dropdown-item lang-choice" href="/help">es</a>
|
||||
<a class="dropdown-item lang-choice" href="/help">fr</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h2>{{$title}}: {{$heading}}</h2>
|
||||
<h2>{{$title}} {{$heading}}</h2>
|
||||
</div>
|
||||
<div class="section-content-wrapper" id="doco-content">
|
||||
<h3 id="doco-top-toc-heading">
|
||||
<span class="fakelink" onclick="docoTocToggle(); return false;">
|
||||
<i class="fa fa-fw fa-caret-right fakelink" id="doco-toc-toggle"></i>
|
||||
{{$tocHeading}}
|
||||
</span>
|
||||
</h3>
|
||||
<ul id="doco-top-toc" style="margin-bottom: 1.5em; display: none;"></ul>
|
||||
{{$content}}
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue