X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FTos.php;h=417f503b8fa20d3a846cfd5e4c73ef6b3d1e6847;hb=3bca4fe2a64671d09e08346456cdfa6c12f996e9;hp=31beb665155e9317ce8910f4f6b3cab80fe20bcc;hpb=a68c790c645f41e2c6a579d4d4485f864a1d06cd;p=friendica.git diff --git a/src/Module/Tos.php b/src/Module/Tos.php index 31beb66515..417f503b8f 100644 --- a/src/Module/Tos.php +++ b/src/Module/Tos.php @@ -1,6 +1,6 @@ config->get('system', 'singleuser'))) { + if ($this->config->get('system', 'singleuser')) { $this->baseUrl->redirect('profile/' . $this->config->get('system', 'singleuser')); } $tpl = Renderer::getMarkupTemplate('tos.tpl'); if ($this->config->get('system', 'tosdisplay')) { + $lines = trim($this->config->get('system', 'tosrules') ?: ''); + if ($lines) { + $rules = "[ol]"; + foreach (explode("\n", $lines) as $line) { + if (trim($line)) { + $rules .= "\n[*]" . trim($line); + } + } + $rules .= "\n[/ol]\n"; + } else { + $rules = ''; + } + return Renderer::replaceMacros($tpl, [ '$title' => $this->t('Terms of Service'), - '$tostext' => BBCode::convert($this->config->get('system', 'tostext')), + '$tostext' => BBCode::convertForUriId(User::getSystemUriId(), $this->config->get('system', 'tostext')), + '$rulestitle' => $this->t('Rules'), + '$rules' => BBCode::convertForUriId(User::getSystemUriId(), $rules), '$displayprivstatement' => $this->config->get('system', 'tosprivstatement'), '$privstatementtitle' => $this->t('Privacy Statement'), '$privacy_operate' => $this->t('At the time of registration, and for providing communications between the user account and their contacts, the user has to provide a display name (pen name), an username (nickname) and a working email address. The names will be accessible on the profile page of the account by any visitor of the page, even if other profile details are not displayed. The email address will only be used to send the user notifications about interactions, but wont be visibly displayed. The listing of an account in the node\'s user directory or the global user directory is optional and can be controlled in the user settings, it is not necessary for communication.'),