123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 |
- <?php
- if (!defined('SMF'))
- die('Hacking attempt...');
- function ShowHelp()
- {
- global $scripturl, $context, $txt;
- loadTemplate('Help');
- loadLanguage('Manual');
-
- $context['wiki_url'] = 'http://wiki.simplemachines.org/smf';
-
- $context['manual_sections'] = array(
- 'registering' => 'Registering',
- 'logging_in' => 'Logging_In',
- 'profile' => 'Profile',
- 'search' => 'Search',
- 'posting' => 'Posting',
- 'bbc' => 'Bulletin_board_code',
- 'personal_messages' => 'Personal_messages',
- 'memberlist' => 'Memberlist',
- 'calendar' => 'Calendar',
- 'features' => 'Features',
- );
-
- $context['linktree'][] = array(
- 'url' => $scripturl . '?action=help',
- 'name' => $txt['help'],
- );
-
- $context['page_title'] = $txt['manual_smf_user_help'];
- $context['sub_template'] = 'manual';
- }
- function ShowAdminHelp()
- {
- global $txt, $helptxt, $context, $scripturl;
- if (!isset($_GET['help']) || !is_string($_GET['help']))
- fatal_lang_error('no_access', false);
- if (!isset($helptxt))
- $helptxt = array();
-
- loadLanguage('Help');
-
- if (isset($_GET['help']) && substr($_GET['help'], 0, 14) == 'permissionhelp')
- loadLanguage('ManagePermissions');
- loadTemplate('Help');
-
- call_integration_hook('integrate_helpadmin');
-
- $context['page_title'] = $context['forum_name'] . ' - ' . $txt['help'];
-
- $context['template_layers'] = array();
- $context['sub_template'] = 'popup';
-
- if (isset($helptxt[$_GET['help']]))
- $context['help_text'] = $helptxt[$_GET['help']];
- elseif (isset($txt[$_GET['help']]))
- $context['help_text'] = $txt[$_GET['help']];
- else
- $context['help_text'] = $_GET['help'];
-
- if (preg_match('~%([0-9]+\$)?s\?~', $context['help_text'], $match))
- $context['help_text'] = sprintf($context['help_text'], $scripturl, $context['session_id'], $context['session_var']);
- }
|