forked from SimpleMachines/SMF
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathHelp.template.php
More file actions
69 lines (63 loc) · 2.17 KB
/
Help.template.php
File metadata and controls
69 lines (63 loc) · 2.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?php
/**
* Simple Machines Forum (SMF)
*
* @package SMF
* @author Simple Machines https://www.simplemachines.org
* @copyright 2024 Simple Machines and individual contributors
* @license https://www.simplemachines.org/about/smf/license.php BSD
*
* @version 3.0 Alpha 2
*/
use SMF\Config;
use SMF\Lang;
use SMF\Theme;
use SMF\Utils;
/**
* This displays a help popup thingy
*/
function template_popup()
{
// Since this is a popup of its own we need to start the html, etc.
echo '<!DOCTYPE html>
<html', Utils::$context['right_to_left'] ? ' dir="rtl"' : '', '>
<head>
<meta charset="', Utils::$context['character_set'], '">
<meta name="robots" content="noindex">
<title>', Utils::$context['page_title'], '</title>
', Theme::template_css(), '
<script src="', Theme::$current->settings['default_theme_url'], '/scripts/script.js', Utils::$context['browser_cache'], '"></script>
</head>
<body id="help_popup">
<div class="windowbg description">
', Utils::$context['help_text'], '<br>
<br>
<a href="javascript:self.close();">', Lang::$txt['close_window'], '</a>
</div>
</body>
</html>';
}
/**
* The main help page
*/
function template_manual()
{
echo '
<div class="cat_bar">
<h3 class="catbg">', Lang::$txt['manual_smf_user_help'], '</h3>
</div>
<div id="help_container">
<div id="helpmain" class="windowbg">
<p>', Lang::getTxt('manual_welcome', ['forum_name' => Utils::$context['forum_name_html_safe']]), '</p>
<p>', Lang::$txt['manual_introduction'], '</p>
<ul>';
foreach (Utils::$context['manual_sections'] as $section_id => $wiki_id)
echo '
<li><a href="', Utils::$context['wiki_url'], '/', Utils::$context['wiki_prefix'], $wiki_id, (Lang::$txt['lang_dictionary'] != 'en' ? '/' . Lang::$txt['lang_dictionary'] : ''), '" target="_blank" rel="noopener">', Lang::$txt['manual_section_' . $section_id . '_title'], '</a> - ', Lang::$txt['manual_section_' . $section_id . '_desc'], '</li>';
echo '
</ul>
<p>', Lang::getTxt('manual_docs_and_credits', ['wiki_url' => Utils::$context['wiki_url'], 'credits_url' => Config::$scripturl . '?action=credits']), '</p>
</div><!-- #helpmain -->
</div><!-- #help_container -->';
}
?>