Chris@76
|
1 <?php
|
Chris@76
|
2 /**
|
Chris@76
|
3 * Simple Machines Forum (SMF)
|
Chris@76
|
4 *
|
Chris@76
|
5 * @package SMF
|
Chris@76
|
6 * @author Simple Machines
|
Chris@76
|
7 * @copyright 2011 Simple Machines
|
Chris@76
|
8 * @license http://www.simplemachines.org/about/smf/license.php BSD
|
Chris@76
|
9 *
|
Chris@76
|
10 * @version 2.0
|
Chris@76
|
11 */
|
Chris@76
|
12
|
Chris@76
|
13 function template_popup()
|
Chris@76
|
14 {
|
Chris@76
|
15 global $context, $settings, $options, $txt;
|
Chris@76
|
16
|
Chris@76
|
17 // Since this is a popup of its own we need to start the html, etc.
|
Chris@76
|
18 echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
Chris@76
|
19 <html xmlns="http://www.w3.org/1999/xhtml"', $context['right_to_left'] ? ' dir="rtl"' : '', '>
|
Chris@76
|
20 <head>
|
Chris@76
|
21 <meta http-equiv="Content-Type" content="text/html; charset=', $context['character_set'], '" />
|
Chris@76
|
22 <meta name="robots" content="noindex" />
|
Chris@76
|
23 <title>', $context['page_title'], '</title>
|
Chris@76
|
24 <link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/index.css" />
|
Chris@76
|
25 <script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/script.js"></script>
|
Chris@76
|
26 </head>
|
Chris@76
|
27 <body id="help_popup">
|
Chris@76
|
28 <div class="windowbg description">
|
Chris@76
|
29 ', $context['help_text'], '<br />
|
Chris@76
|
30 <br />
|
Chris@76
|
31 <a href="javascript:self.close();">', $txt['close_window'], '</a>
|
Chris@76
|
32 </div>
|
Chris@76
|
33 </body>
|
Chris@76
|
34 </html>';
|
Chris@76
|
35 }
|
Chris@76
|
36
|
Chris@76
|
37 function template_find_members()
|
Chris@76
|
38 {
|
Chris@76
|
39 global $context, $settings, $options, $scripturl, $modSettings, $txt;
|
Chris@76
|
40
|
Chris@76
|
41 echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
Chris@76
|
42 <html xmlns="http://www.w3.org/1999/xhtml"', $context['right_to_left'] ? ' dir="rtl"' : '', '>
|
Chris@76
|
43 <head>
|
Chris@76
|
44 <title>', $txt['find_members'], '</title>
|
Chris@76
|
45 <meta http-equiv="Content-Type" content="text/html; charset=', $context['character_set'], '" />
|
Chris@76
|
46 <meta name="robots" content="noindex" />
|
Chris@76
|
47 <link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/index.css" />
|
Chris@76
|
48 <script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/script.js"></script>
|
Chris@76
|
49 <script type="text/javascript"><!-- // --><![CDATA[
|
Chris@76
|
50 var membersAdded = [];
|
Chris@76
|
51 function addMember(name)
|
Chris@76
|
52 {
|
Chris@76
|
53 var theTextBox = window.opener.document.getElementById("', $context['input_box_name'], '");
|
Chris@76
|
54
|
Chris@76
|
55 if (name in membersAdded)
|
Chris@76
|
56 return;
|
Chris@76
|
57
|
Chris@76
|
58 // If we only accept one name don\'t remember what is there.
|
Chris@76
|
59 if (', JavaScriptEscape($context['delimiter']), ' != \'null\')
|
Chris@76
|
60 membersAdded[name] = true;
|
Chris@76
|
61
|
Chris@76
|
62 if (theTextBox.value.length < 1 || ', JavaScriptEscape($context['delimiter']), ' == \'null\')
|
Chris@76
|
63 theTextBox.value = ', $context['quote_results'] ? '"\"" + name + "\""' : 'name', ';
|
Chris@76
|
64 else
|
Chris@76
|
65 theTextBox.value += ', JavaScriptEscape($context['delimiter']), ' + ', $context['quote_results'] ? '"\"" + name + "\""' : 'name', ';
|
Chris@76
|
66
|
Chris@76
|
67 window.focus();
|
Chris@76
|
68 }
|
Chris@76
|
69 // ]]></script>
|
Chris@76
|
70 </head>
|
Chris@76
|
71 <body id="help_popup">
|
Chris@76
|
72 <form action="', $scripturl, '?action=findmember;', $context['session_var'], '=', $context['session_id'], '" method="post" accept-charset="', $context['character_set'], '" class="padding description">
|
Chris@76
|
73 <span class="upperframe"><span></span></span>
|
Chris@76
|
74 <div class="roundframe">
|
Chris@76
|
75 <div class="innerframe">
|
Chris@76
|
76 <div class="cat_bar">
|
Chris@76
|
77 <h3 class="catbg">', $txt['find_members'], '</h3>
|
Chris@76
|
78 </div>
|
Chris@76
|
79 <div class="padding">
|
Chris@76
|
80 <strong>', $txt['find_username'], ':</strong><br />
|
Chris@76
|
81 <input type="text" name="search" id="search" value="', isset($context['last_search']) ? $context['last_search'] : '', '" style="margin-top: 4px; width: 96%;" class="input_text" /><br />
|
Chris@76
|
82 <span class="smalltext"><em>', $txt['find_wildcards'], '</em></span><br />';
|
Chris@76
|
83
|
Chris@76
|
84 // Only offer to search for buddies if we have some!
|
Chris@76
|
85 if (!empty($context['show_buddies']))
|
Chris@76
|
86 echo '
|
Chris@76
|
87 <span class="smalltext"><label for="buddies"><input type="checkbox" class="input_check" name="buddies" id="buddies"', !empty($context['buddy_search']) ? ' checked="checked"' : '', ' /> ', $txt['find_buddies'], '</label></span><br />';
|
Chris@76
|
88
|
Chris@76
|
89 echo '
|
Chris@76
|
90 <div class="padding righttext">
|
Chris@76
|
91 <input type="submit" value="', $txt['search'], '" class="button_submit" />
|
Chris@76
|
92 <input type="button" value="', $txt['find_close'], '" onclick="window.close();" class="button_submit" />
|
Chris@76
|
93 </div>
|
Chris@76
|
94 </div>
|
Chris@76
|
95 </div>
|
Chris@76
|
96 </div>
|
Chris@76
|
97 <span class="lowerframe"><span></span></span>
|
Chris@76
|
98 <br />
|
Chris@76
|
99 <span class="upperframe"><span></span></span>
|
Chris@76
|
100 <div class="roundframe">
|
Chris@76
|
101 <div class="innerframe">
|
Chris@76
|
102 <div class="cat_bar">
|
Chris@76
|
103 <h3 class="catbg">', $txt['find_results'], '</h3>
|
Chris@76
|
104 </div>';
|
Chris@76
|
105
|
Chris@76
|
106 if (empty($context['results']))
|
Chris@76
|
107 echo '
|
Chris@76
|
108 <p class="error">', $txt['find_no_results'], '</p>';
|
Chris@76
|
109 else
|
Chris@76
|
110 {
|
Chris@76
|
111 echo '
|
Chris@76
|
112 <ul class="reset padding">';
|
Chris@76
|
113
|
Chris@76
|
114 $alternate = true;
|
Chris@76
|
115 foreach ($context['results'] as $result)
|
Chris@76
|
116 {
|
Chris@76
|
117 echo '
|
Chris@76
|
118 <li class="', $alternate ? 'windowbg2' : 'windowbg', '">
|
Chris@76
|
119 <a href="', $result['href'], '" target="_blank" class="new_win"><img src="', $settings['images_url'], '/icons/profile_sm.gif" alt="', $txt['view_profile'], '" title="', $txt['view_profile'], '" /></a>
|
Chris@76
|
120 <a href="javascript:void(0);" onclick="addMember(this.innerHTML); return false;">', $result['name'], '</a>
|
Chris@76
|
121 </li>';
|
Chris@76
|
122
|
Chris@76
|
123 $alternate = !$alternate;
|
Chris@76
|
124 }
|
Chris@76
|
125
|
Chris@76
|
126 echo '
|
Chris@76
|
127 </ul>
|
Chris@76
|
128 <div class="pagesection">
|
Chris@76
|
129 ', $txt['pages'], ': ', $context['page_index'], '
|
Chris@76
|
130 </div>';
|
Chris@76
|
131 }
|
Chris@76
|
132
|
Chris@76
|
133 echo '
|
Chris@76
|
134 </div>
|
Chris@76
|
135 </div>
|
Chris@76
|
136 <span class="lowerframe"><span></span></span>
|
Chris@76
|
137 <input type="hidden" name="input" value="', $context['input_box_name'], '" />
|
Chris@76
|
138 <input type="hidden" name="delim" value="', $context['delimiter'], '" />
|
Chris@76
|
139 <input type="hidden" name="quote" value="', $context['quote_results'] ? '1' : '0', '" />
|
Chris@76
|
140 </form>';
|
Chris@76
|
141
|
Chris@76
|
142 if (empty($context['results']))
|
Chris@76
|
143 echo '
|
Chris@76
|
144 <script type="text/javascript"><!-- // --><![CDATA[
|
Chris@76
|
145 document.getElementById("search").focus();
|
Chris@76
|
146 // ]]></script>';
|
Chris@76
|
147
|
Chris@76
|
148 echo '
|
Chris@76
|
149 </body>
|
Chris@76
|
150 </html>';
|
Chris@76
|
151 }
|
Chris@76
|
152
|
Chris@76
|
153 // The main help page.
|
Chris@76
|
154 function template_manual()
|
Chris@76
|
155 {
|
Chris@76
|
156 global $context, $scripturl, $txt;
|
Chris@76
|
157
|
Chris@76
|
158 echo '
|
Chris@76
|
159 <div class="cat_bar">
|
Chris@76
|
160 <h3 class="catbg">', $txt['manual_smf_user_help'], '</h3>
|
Chris@76
|
161 </div>
|
Chris@76
|
162 <div id="help_container">
|
Chris@76
|
163 <div class="windowbg2">
|
Chris@76
|
164 <span class="topslice"><span></span></span>
|
Chris@76
|
165 <div id="helpmain">
|
Chris@76
|
166 <p>', sprintf($txt['manual_welcome'], $context['forum_name']), '</p>
|
Chris@76
|
167 <p>', $txt['manual_introduction'], '</p>
|
Chris@76
|
168 <ul>';
|
Chris@76
|
169
|
Chris@76
|
170 foreach ($context['manual_sections'] as $section_id => $wiki_id)
|
Chris@76
|
171 {
|
Chris@76
|
172 echo '
|
Chris@76
|
173 <li><a href="', $context['wiki_url'], '/', $wiki_id, ($txt['lang_dictionary'] != 'en' ? '/' . $txt['lang_dictionary'] : ''), '" target="_blank" class="new_win">', $txt['manual_section_' . $section_id . '_title'], '</a> - ', $txt['manual_section_' . $section_id . '_desc'], '</li>';
|
Chris@76
|
174 }
|
Chris@76
|
175
|
Chris@76
|
176 echo '
|
Chris@76
|
177 </ul>
|
Chris@76
|
178 <p>', sprintf($txt['manual_docs_and_credits'], $context['wiki_url'], $scripturl . '?action=credits'), '</p>
|
Chris@76
|
179 </div>
|
Chris@76
|
180 <span class="botslice"><span></span></span>
|
Chris@76
|
181 </div>
|
Chris@76
|
182 </div>';
|
Chris@76
|
183 }
|
Chris@76
|
184
|
Chris@76
|
185 ?> |