'; } // This is the board index (main page) in WAP 1.1. function template_wap_boardindex() { global $context, $settings, $options, $scripturl; // This is the "main" card... echo '

', $context['forum_name_html_safe'], '

'; // Show an anchor for each category. foreach ($context['categories'] as $category) { // Skip it if it's empty. if (!empty($category['boards'])) echo '

', $category['name'], '

'; } // Okay, that's it for the main card. echo '
'; // Now fill out the deck of cards with the boards in each category. foreach ($context['categories'] as $category) { // Begin the card, and make the name available. echo '

', strip_tags($category['name']), '

'; // Now show a link for each board. foreach ($category['boards'] as $board) echo '

', $board['name'], '

'; echo '
'; } } // This is the message index (list of topics in a board) for WAP 1.1. function template_wap_messageindex() { global $context, $settings, $options, $scripturl, $txt; echo '

', $context['name'], '

'; if (isset($context['boards']) && count($context['boards']) > 0) { foreach ($context['boards'] as $board) echo '

- ', $board['name'], '

'; echo '


'; } if (!empty($context['topics'])) { echo '

', $txt['pages'], ': ', !empty($context['links']['prev']) ? '<< < ' : '', '(', $context['page_info']['current_page'], '/', $context['page_info']['num_pages'], ')', !empty($context['links']['next']) ? ' > >> ' : '', '

'; foreach ($context['topics'] as $topic) echo '

', $topic['first_post']['subject'], '', (!$topic['approved'] ? ' (' . $txt['awaiting_approval'] . ')' : ''), ' - ', $topic['first_post']['member']['name'], '

'; echo '

', $txt['pages'], ': ', !empty($context['links']['prev']) ? '<< < ' : '', '(', $context['page_info']['current_page'], '/', $context['page_info']['num_pages'], ')', !empty($context['links']['next']) ? ' > >> ' : '', '

'; } echo '
'; } function template_wap_display() { global $context, $settings, $options, $txt; echo '

' . $context['linktree'][1]['name'] . ' > ' . $context['linktree'][count($context['linktree']) - 2]['name'] . '

', $context['subject'], '

', $txt['pages'], ': ', !empty($context['links']['prev']) ? '<< < ' : '', '(', $context['page_info']['current_page'], '/', $context['page_info']['num_pages'], ')', !empty($context['links']['next']) ? ' > >> ' : '', '

'; while ($message = $context['get_message']()) { // This is a special modification to the post so it will work on phones: $message['body'] = preg_replace('~
(.+?)
~', '
--- $1 ---', $message['body']); $message['body'] = strip_tags(str_replace( array( '
', '
', '', '', '
  • ', $txt['code_select'], ), array( '
    ', '
    --- ' . $txt['wireless_end_quote'] . ' ---
    ', '
    ', '
    --- ' . $txt['wireless_end_code'] . ' ---
    ', '
    * ', '', ), $message['body']), '
    '); echo '

    ', $message['member']['name'], ':', (!$message['approved'] ? ' (' . $txt['awaiting_approval'] . ')' : ''), '

    ', $message['body'], '

    '; } echo '

    ', $txt['pages'], ': ', !empty($context['links']['prev']) ? '<< < ' : '', '(', $context['page_info']['current_page'], '/', $context['page_info']['num_pages'], ')', !empty($context['links']['next']) ? ' > >> ' : '', '

    '; } function template_wap_login() { global $context, $modSettings, $scripturl, $txt; echo ' '; if (isset($context['login_errors'])) foreach ($context['login_errors'] as $error) echo '

    ', $error, '

    '; echo '

    ', $txt['username'], ':

    ', $txt['password'], ':

    '; // Open ID? if (!empty($modSettings['enableOpenID'])) echo '

    —', $txt['or'], '—

    ', $txt['openid'], ':

    '; echo '

    '; } function template_wap_recent() { global $context, $settings, $options, $scripturl, $txt; echo '

    ', $_REQUEST['action'] == 'unread' ? $txt['wireless_recent_unread_posts'] : $txt['wireless_recent_unread_replies'], '

    '; if (empty($context['topics'])) echo '

    ', $txt['old_posts'], '

    '; else { echo '

    ', $txt['pages'], ': ', !empty($context['links']['prev']) ? '<< < ' : '', '(', $context['page_info']['current_page'], '/', $context['page_info']['num_pages'], ')', !empty($context['links']['next']) ? ' > >> ' : '', '

    '; foreach ($context['topics'] as $topic) { echo '

    ', $topic['first_post']['subject'], '

    '; } } echo '
    '; } function template_wap_error() { global $context, $settings, $options, $txt, $scripturl; echo '

    ', $context['error_title'], '

    ', $context['error_message'], '

    ', $txt['wireless_error_home'], '

    '; } function template_wap_below() { global $context, $settings, $options, $txt; echo '

    ', $txt['wireless_go_to_full_version'], '

    '; } // The cHTML protocol used for i-mode starts here. function template_imode_above() { global $context, $settings, $options, $user_info; echo ' '; // Present a canonical url for search engines to prevent duplicate content in their indices. if ($user_info['is_guest'] && !empty($context['canonical_url'])) echo ' '; echo ' ', $context['page_title'], ' '; } function template_imode_boardindex() { global $context, $settings, $options, $scripturl, $txt; echo ' '; $count = 0; foreach ($context['categories'] as $category) { if (!empty($category['boards']) || $category['is_collapsed']) echo ' '; foreach ($category['boards'] as $board) { $count++; echo ' '; } } echo ' '; if ($context['user']['is_guest']) echo ' '; else { if ($context['allow_pm']) echo ' '; echo ' '; } echo '
    ', $context['forum_name_html_safe'], '
    ', $category['can_collapse'] ? '' : '', $category['name'], $category['can_collapse'] ? '' : '', '
    ', $board['new'] ? '' : '', $count < 10 ? '&#' . (59105 + $count) . ';' : '-', $board['new'] ? '' : ($board['children_new'] ? '.' : ''), ' ', $board['name'], '
    ', $txt['wireless_options'], '
    ', $txt['wireless_options_login'], '
    ', empty($context['user']['unread_messages']) ? $txt['wireless_pm_inbox'] : sprintf($txt['wireless_pm_inbox_new'], $context['user']['unread_messages']), '
    ', $txt['wireless_recent_unread_posts'], '
    ', $txt['wireless_recent_unread_replies'], '
    ', $txt['wireless_options_logout'], '
    '; } function template_imode_messageindex() { global $context, $settings, $options, $scripturl, $txt; echo ' '; if (!empty($context['boards'])) { echo ' '; foreach ($context['boards'] as $board) echo ' '; } $count = 0; if (!empty($context['topics'])) { echo ' '; foreach ($context['topics'] as $topic) { $count++; echo ' '; } } echo ' ', !empty($context['links']['next']) ? ' ' : '', !empty($context['links']['prev']) ? ' ' : '', $context['can_post_new'] ? ' ' : '', '
    ', $context['name'], '
    ', $txt['parent_boards'], '
    ', $board['new'] ? '- ' : ($board['children_new'] ? '-.' : '- '), '', $board['name'], '
    ', $txt['topics'], '
    ', !empty($context['links']['prev']) ? '<< < ' : '', '(', $context['page_info']['current_page'], '/', $context['page_info']['num_pages'], ')', !empty($context['links']['next']) ? ' > >> ' : '', '
    ', $count < 10 ? '&#' . (59105 + $count) . '; ' : '', '', $topic['first_post']['subject'], '', (!$topic['approved'] ? ' (' . $txt['awaiting_approval'] . ')' : ''), $topic['new'] && $context['user']['is_logged'] ? ' [' . $txt['new'] . ']' : '', '
    ', $txt['wireless_navigation'], '
    ', $txt['wireless_navigation_up'], '
    ' . $txt['wireless_navigation_next'] . '
    [*] ' . $txt['wireless_navigation_prev'] . '
    ' . $txt['start_new_topic'] . '
    '; } function template_imode_display() { global $context, $settings, $options, $scripturl, $board, $txt; echo ' '; while ($message = $context['get_message']()) { // This is a special modification to the post so it will work on phones: $message['body'] = preg_replace('~
    (.+?)
    ~', '
    --- $1 ---', $message['body']); $message['body'] = strip_tags(str_replace( array( '
    ', '
    ', '', '', '
  • ', $txt['code_select'], ), array( '
    ', '
    --- ' . $txt['wireless_end_quote'] . ' ---
    ', '
    ', '
    --- ' . $txt['wireless_end_code'] . ' ---
    ', '
    * ', '', ), $message['body']), '
    '); echo '
  • '; } echo ' ', $context['user']['is_logged'] ? ' ' : '', !empty($context['links']['next']) ? ' ' : '', !empty($context['links']['prev']) ? ' ' : '', $context['can_reply'] ? ' ' : ''; if (!empty($context['wireless_more']) && empty($context['wireless_moderate'])) echo ' '; elseif (!empty($context['wireless_moderate'])) { if ($context['can_sticky']) echo ' '; if ($context['can_lock']) echo ' '; } echo '
    ' . $context['linktree'][1]['name'] . ' > ' . $context['linktree'][count($context['linktree']) - 2]['name'] . '
    ', $context['subject'], '
    ', !empty($context['links']['prev']) ? '<< < ' : '', '(', $context['page_info']['current_page'], '/', $context['page_info']['num_pages'], ')', !empty($context['links']['next']) ? ' > >> ' : '', '
    ', $message['first_new'] ? ' ' : '', $context['wireless_moderate'] && $message['member']['id'] ? '' . $message['member']['name'] . '' : '' . $message['member']['name'] . '', ': ', ((empty($context['wireless_more']) && $message['can_modify']) || !empty($context['wireless_moderate']) ? '[' . $txt['wireless_display_edit'] . ']' : ''), (!$message['approved'] ? ' (' . $txt['awaiting_approval'] . ')' : ''), '
    ', $message['body'], '
    ', $txt['wireless_navigation'], '
    ', $txt['wireless_navigation_index'], '
    ' . $txt['mark_unread'] . '
    ' . $txt['wireless_navigation_next'] . '
    ' . $txt['wireless_navigation_prev'] . '
    ' . $txt['reply'] . '
    ', $txt['wireless_display_moderate'], '
    ', $txt['wireless_display_' . ($context['is_sticky'] ? 'unsticky' : 'sticky')], '
    ', $txt['wireless_display_' . ($context['is_locked'] ? 'unlock' : 'lock')], '
    '; } function template_imode_post() { global $context, $settings, $options, $scripturl, $txt, $modSettings; // @todo $modSettings['guest_post_no_email'] echo '
    '; if (!$context['becomes_approved']) echo ' '; if ($context['locked']) echo ' '; if (isset($context['name']) && isset($context['email'])) { echo ' '; if (empty($modSettings['guest_post_no_email'])) echo ' '; } // @todo Needs a more specific imode template. if ($context['require_verification']) echo ' '; echo '
    ' . $txt['wait_for_approval'] . '
    ' . $txt['topic_locked_no_reply'] . '
    ', isset($context['post_error']['long_name']) || isset($context['post_error']['no_name']) ? '' . $txt['username'] . '' : $txt['username'], ':
    ', isset($context['post_error']['no_email']) || isset($context['post_error']['bad_email']) ? '' . $txt['email'] . '' : $txt['email'], ':
    ', !empty($context['post_error']['need_qr_verification']) ? '' . $txt['verification'] . '' : $txt['verification'], ':
    ', template_control_verification($context['visual_verification_id'], 'all'), '
    ', isset($context['post_error']['no_subject']) ? '' . $txt['subject'] . '' : $txt['subject'], ':
    ', isset($context['post_error']['no_message']) || isset($context['post_error']['long_message']) ? '' . $txt['message'] . '' : $txt['message'], ':
    ', isset($context['current_topic']) ? ' ' : '', '
     ', !empty($context['current_topic']) ? '' . $txt['wireless_navigation_topic'] . '' : '' . $txt['wireless_navigation_index'] . '', '
    '; } function template_imode_login() { global $context, $settings, $options, $scripturl, $txt, $modSettings; echo '
    '; if (isset($context['login_errors'])) foreach ($context['login_errors'] as $error) echo ' '; echo ' '; // Open ID? if (!empty($modSettings['enableOpenID'])) echo ' '; echo '
    ', $txt['login'], '
    ', $error, '
    ', $txt['username'], ':
    ', $txt['password'], ':
    —', $txt['or'], '—
    ', $txt['openid'], ':
    ', $txt['wireless_navigation'], '
    [0] ', $txt['wireless_navigation_up'], '
    '; } function template_imode_pm() { global $context, $settings, $options, $scripturl, $txt, $user_info; if ($_REQUEST['action'] == 'findmember') { echo '
    '; if (!empty($context['last_search'])) { echo ' '; if (empty($context['results'])) echo ' '; else { echo ' '; $count = 0; foreach ($context['results'] as $result) { $count++; echo ' '; } } } echo ' '; if (!empty($context['results'])) echo empty($context['links']['next']) ? '' : ' ', empty($context['links']['prev']) ? '' : ' '; echo '
    ', $txt['wireless_pm_search_member'], '
    ', $txt['find_members'], '
    ', $txt['wireless_pm_search_name'], ': ', empty($_REQUEST['u']) ? '' : ' ', '
    ', $txt['find_results'], '
    [-] ', $txt['find_no_results'], '
    ', empty($context['links']['prev']) ? '' : '<< < ', '(', $context['page_info']['current_page'], '/', $context['page_info']['num_pages'], ')', empty($context['links']['next']) ? '' : ' > >> ', '
    ', $count < 10 ? '&#' . (59105 + $count) . '; ' : '', '', $result['name'], '
    ', $txt['wireless_navigation'], '
    [0] ', $txt['wireless_navigation_up'], '
    [#] ' . $txt['wireless_navigation_next'] . '
    [*] ' . $txt['wireless_navigation_prev'] . '
    '; } elseif (!empty($_GET['sa'])) { echo ' '; if ($_GET['sa'] == 'addbuddy') { echo ' '; $count = 0; foreach ($context['buddies'] as $buddy) { $count++; if ($buddy['selected']) echo ' '; else echo ' '; } echo '
    ', $txt['wireless_pm_add_buddy'], '
    ', $txt['wireless_pm_select_buddy'], '
    [-] ', $buddy['name'], '
    ', $count < 10 ? '&#' . (59105 + $count) . '; ' : '', '', $buddy['name'], '
    ', $txt['wireless_navigation'], '
    [0] ', $txt['wireless_navigation_up'], '
    '; } if ($_GET['sa'] == 'send' || $_GET['sa'] == 'send2') { echo '
    ', empty($context['post_error']['messages']) ? '' : ' ', ' '; if ($context['reply']) echo ' '; echo '
    ', $txt['new_message'], '
    ' . implode('
    ', $context['post_error']['messages']) . '
    ', $txt['pm_to'], ': '; if (empty($context['recipients']['to'])) echo $txt['wireless_pm_no_recipients']; else { $to_names = array(); $ids = array(); foreach ($context['recipients']['to'] as $to) { $ids[] = $to['id']; $to_names[] = $to['name']; } echo implode(', ', $to_names); $ids = implode(',', $ids); } echo ' ', empty($ids) ? '' : '', '
    ', $txt['wireless_pm_search_member'], '', empty($user_info['buddies']) ? '' : '
    ' . $txt['wireless_pm_add_buddy'] . '', '
    ', $txt['subject'], ':
    ', $txt['message'], ':
    ', $txt['wireless_pm_reply_to'], '
    ', $context['quoted_message']['subject'], '
    ', $context['quoted_message']['body'], '
    ', $txt['wireless_navigation'], '
    [0] ', $txt['wireless_navigation_up'], '
    '; } } elseif (empty($_GET['pmsg'])) { echo ' '; $count = 0; while ($message = $context['get_pmessage']()) { $count++; echo ' '; } if ($context['currently_using_labels']) { $labels = array(); ksort($context['labels']); foreach ($context['labels'] as $label) $labels[] = '' . $label['name'] . '' . (!empty($label['unread_messages']) ? ' (' . $label['unread_messages'] . ')' : ''); echo ' '; } echo ' ', empty($context['links']['next']) ? '' : ' ', empty($context['links']['prev']) ? '' : ' ', $context['can_send_pm'] ? ' ' : '', '
    ', $context['current_label_id'] == -1 ? $txt['wireless_pm_inbox'] : $txt['pm_current_label'] . ': ' . $context['current_label'], '
    ', empty($context['links']['prev']) ? '' : '<< < ', '(', $context['page_info']['current_page'], '/', $context['page_info']['num_pages'], ')', empty($context['links']['next']) ? '' : ' > >> ', '
    ', $count < 10 ? '&#' . (59105 + $count) . '; ' : '', '', $message['subject'], ' ', $txt['wireless_pm_by'], ' ', $message['member']['name'], '', $message['is_unread'] ? ' [' . $txt['new'] . ']' : '', '
    ', $txt['pm_labels'], '
    ', implode(', ', $labels), '
    ', $txt['wireless_navigation'], '
    [0] ', $txt['wireless_navigation_up'], '
    [#] ' . $txt['wireless_navigation_next'] . '
    [*] ' . $txt['wireless_navigation_prev'] . '
    ' . $txt['new_message'] . '
    '; } else { $message = $context['get_pmessage'](); $message['body'] = preg_replace('~
    (.+?)
    ~', '
    --- $1 ---', $message['body']); $message['body'] = strip_tags(str_replace( array( '
    ', '
    ', '', '', '
  • ', $txt['code_select'], ), array( '
    ', '
    --- ' . $txt['wireless_end_quote'] . ' ---
    ', '
    ', '
    --- ' . $txt['wireless_end_code'] . ' ---
    ', '
    * ', '', ), $message['body']), '
    '); echo ' '; if ($context['can_send_pm']) echo ' '; if ($context['can_send_pm'] && $message['number_recipients'] > 1) echo ' '; echo '
    ', $message['subject'], '
    ', $txt['wireless_pm_by'], ': ', $message['member']['name'], '
    ', $txt['on'], ': ', $message['time'], '
    ', $message['body'], '
    ', $txt['wireless_navigation'], '
    [0] ', $txt['wireless_navigation_up'], '
    ', $txt['wireless_pm_reply'], '
    ', $txt['wireless_pm_reply_all'], '
    '; } } function template_imode_recent() { global $context, $settings, $options, $scripturl, $txt; echo ' '; $count = 0; if (empty($context['topics'])) echo ' '; else { echo ' '; foreach ($context['topics'] as $topic) { $count++; echo ' '; } } echo ' ', !empty($context['links']['next']) ? ' ' : '', !empty($context['links']['prev']) ? ' ' : '', '
    ', $_REQUEST['action'] == 'unread' ? $txt['wireless_recent_unread_posts'] : $txt['wireless_recent_unread_replies'], '
    ', $txt['old_posts'], '
    ', !empty($context['links']['prev']) ? '<< < ' : '', '(', $context['page_info']['current_page'], '/', $context['page_info']['num_pages'], ')', !empty($context['links']['next']) ? ' > >> ' : '', '
    ', $count < 10 ? '&#' . (59105 + $count) . '; ' : '', '', $topic['first_post']['subject'], '
    ', $txt['wireless_navigation'], '
    [0] ', $txt['wireless_navigation_up'], '
    [#] ' . $txt['wireless_navigation_next'] . '
    [*] ' . $txt['wireless_navigation_prev'] . '
    '; } function template_imode_error() { global $context, $settings, $options, $txt, $scripturl; echo '
    ', $context['error_title'], '
    ', $context['error_message'], '
    [0] ', $txt['wireless_error_home'], '
    '; } function template_imode_profile() { global $context, $settings, $options, $scripturl, $board, $txt; echo ' '; if (!empty($context['member']['bans'])) { echo ' '; } echo ' '; if (!$context['user']['is_owner'] && $context['can_send_pm']) echo ' '; if (!$context['user']['is_owner'] && !empty($context['can_edit_ban'])) echo ' '; echo ' '; echo '
    ', $txt['summary'], ' - ', $context['member']['name'], '
    ', $txt['name'], ': ', $context['member']['name'], '
    ', $txt['position'], ': ', (!empty($context['member']['group']) ? $context['member']['group'] : $context['member']['post_group']), '
    ', $txt['lastLoggedIn'], ': ', $context['member']['last_login'], '
    ', $txt['user_banned_by_following'], ':'; foreach ($context['member']['bans'] as $ban) echo '
    ', $ban['explanation'], ''; echo '
    ', $txt['additional_info'], '
    ', $txt['wireless_profile_pm'], '.
    ', $txt['profileBanUser'], '.
    ', $txt['wireless_error_home'], '.
    '; } function template_imode_ban_edit() { global $context, $settings, $options, $scripturl, $board, $txt, $modSettings; echo '
    '; if (!empty($context['ban_suggestions'])) { echo ' '; if (empty($modSettings['disableHostnameLookup'])) echo ' '; echo ' '; } echo ' '; echo '
    ', $context['ban']['is_new'] ? $txt['ban_add_new'] : $txt['ban_edit'] . ' \'' . $context['ban']['name'] . '\'', '
    ', $txt['ban_name'], ':
    ', $txt['ban_expiration'], ':
    ', $txt['never'], '
    ', $txt['ban_will_expire_within'], ' ', $txt['ban_days'], '
    ', $txt['ban_expired'], '
    ', $txt['ban_reason'], ':
    ', $txt['ban_notes'], ':
    ', $txt['ban_restriction'], ':
    ', $txt['ban_full_ban'], '
    ', $txt['ban_cannot_post'], '
    ', $txt['ban_cannot_register'], '
    ', $txt['ban_cannot_login'], '
    ', $txt['ban_triggers'], '
    ', $txt['wireless_ban_ip'], ':
        
    ', $txt['wireless_ban_hostname'], ':
        
    ', $txt['wireless_ban_email'], ':
        
    ', $txt['ban_on_username'], ':
    '; if (empty($context['ban_suggestions']['member']['id'])) echo '     '; else echo '     ', $context['ban_suggestions']['member']['name'], ' '; echo '
    ', $txt['wireless_additional_info'], '
    ', $txt['wireless_error_home'], '.
    '; } function template_imode_below() { global $context, $settings, $options, $txt; echo '
    ', $txt['wireless_go_to_full_version'], ' '; } // XHTMLMP (XHTML Mobile Profile) templates used for WAP 2.0 start here function template_wap2_above() { global $context, $settings, $options, $user_info; echo ' ', $context['page_title'], ''; // Present a canonical url for search engines to prevent duplicate content in their indices. if ($user_info['is_guest'] && !empty($context['canonical_url'])) echo ' '; echo ' '; } function template_wap2_boardindex() { global $context, $settings, $options, $scripturl, $txt; echo '

    ', $context['forum_name_html_safe'], '

    '; $count = 0; foreach ($context['categories'] as $category) { if (!empty($category['boards']) || $category['is_collapsed']) echo '

    ', $category['can_collapse'] ? '' : '', $category['name'], $category['can_collapse'] ? '' : '', '

    '; foreach ($category['boards'] as $board) { $count++; echo '

    ', $board['new'] ? '' : '', $count < 10 ? '[' . $count . '' : '[-', $board['children_new'] && !$board['new'] ? '' : '', '] ', $board['new'] || $board['children_new'] ? '' : '', '', $board['name'], '

    '; } } echo '

    ', $txt['wireless_options'], '

    '; if ($context['user']['is_guest']) echo '

    ', $txt['wireless_options_login'], '

    '; else { if ($context['allow_pm']) echo '

    ', empty($context['user']['unread_messages']) ? $txt['wireless_pm_inbox'] : sprintf($txt['wireless_pm_inbox_new'], $context['user']['unread_messages']), '

    '; echo '

    ', $txt['wireless_recent_unread_posts'], '

    ', $txt['wireless_recent_unread_replies'], '

    ', $txt['wireless_options_logout'], '

    '; } } function template_wap2_messageindex() { global $context, $settings, $options, $scripturl, $txt; echo '

    ', $context['name'], '

    '; if (!empty($context['boards'])) { echo '

    ', $txt['parent_boards'], '

    '; foreach ($context['boards'] as $board) echo '

    ', $board['new'] ? '[-] ' : ($board['children_new'] ? '[-] ' : '[-] '), '', $board['name'], '

    '; } $count = 0; if (!empty($context['topics'])) { echo '

    ', $txt['topics'], '

    ', !empty($context['links']['prev']) ? '<< < ' : '', '(', $context['page_info']['current_page'], '/', $context['page_info']['num_pages'], ')', !empty($context['links']['next']) ? ' > >> ' : '', '

    '; foreach ($context['topics'] as $topic) { $count++; echo '

    ', $count < 10 ? '[' . $count . '] ' : '', '', $topic['first_post']['subject'], '', (!$topic['approved'] ? ' (' . $txt['awaiting_approval'] . ')' : ''), $topic['new'] && $context['user']['is_logged'] ? ' [' . $txt['new'] . ']' : '', '

    '; } } echo '

    ', $txt['wireless_navigation'], '

    [0] ', $txt['wireless_navigation_up'], '

    ', !empty($context['links']['next']) ? '

    [#] ' . $txt['wireless_navigation_next'] . '

    ' : '', !empty($context['links']['prev']) ? '

    [*] ' . $txt['wireless_navigation_prev'] . '

    ' : '', $context['can_post_new'] ? '

    ' . $txt['start_new_topic'] . '

    ' : ''; } function template_wap2_display() { global $context, $settings, $options, $scripturl, $txt; echo '

    ' . $context['linktree'][1]['name'] . ' > ' . $context['linktree'][count($context['linktree']) - 2]['name'] . '

    ', $context['subject'], '

    ', !empty($context['links']['prev']) ? '<< < ' : '', '(', $context['page_info']['current_page'], '/', $context['page_info']['num_pages'], ')', !empty($context['links']['next']) ? ' > >> ' : '', '

    '; $alternate = true; while ($message = $context['get_message']()) { // This is a special modification to the post so it will work on phones: $message['body'] = preg_replace('~
    (.+?)
    ~', '
    --- $1 ---', $message['body']); $message['body'] = strip_tags(str_replace( array( '
    ', '
    ', '', '', '
  • ', $txt['code_select'], ), array( '
    ', '
    --- ' . $txt['wireless_end_quote'] . ' ---
    ', '
    ', '
    --- ' . $txt['wireless_end_code'] . ' ---
    ', '
    * ', '', ), $message['body']), '
    '); echo $message['first_new'] ? ' ' : '', '

    ', $context['wireless_moderate'] && $message['member']['id'] ? '' . $message['member']['name'] . '' : '' . $message['member']['name'] . '', ': ', ((empty($context['wireless_more']) && $message['can_modify']) || !empty($context['wireless_moderate']) ? '[' . $txt['wireless_display_edit'] . ']' : ''), (!$message['approved'] ? ' (' . $txt['awaiting_approval'] . ')' : ''), '
    ', $message['body'], '

    '; $alternate = !$alternate; } echo '

    ', $txt['wireless_navigation'], '

    [0] ', $txt['wireless_navigation_index'], '

    ', $context['user']['is_logged'] ? '

    [1] ' . $txt['mark_unread'] . '

    ' : '', !empty($context['links']['next']) ? '

    [#] ' . $txt['wireless_navigation_next'] . '

    ' : '', !empty($context['links']['prev']) ? '

    [*] ' . $txt['wireless_navigation_prev'] . '

    ' : '', $context['can_reply'] ? '

    ' . $txt['reply'] . '

    ' : ''; if (!empty($context['wireless_more']) && empty($context['wireless_moderate'])) echo '

    ', $txt['wireless_display_moderate'], '

    '; elseif (!empty($context['wireless_moderate'])) { if ($context['can_sticky']) echo '

    ', $txt['wireless_display_' . ($context['is_sticky'] ? 'unsticky' : 'sticky')], '

    '; if ($context['can_lock']) echo '

    ', $txt['wireless_display_' . ($context['is_locked'] ? 'unlock' : 'lock')], '

    '; } } function template_wap2_login() { global $context, $modSettings, $scripturl, $txt; echo '

    ', $txt['login'], '

    '; if (isset($context['login_errors'])) foreach ($context['login_errors'] as $error) echo '

    ', $error, '

    '; echo '

    ', $txt['username'], ':

    ', $txt['password'], ':

    '; // Open ID? if (!empty($modSettings['enableOpenID'])) echo '

    —', $txt['or'], '—

    ', $txt['openid'], ':

    '; echo '

    ', $txt['wireless_navigation'], '

    [0] ', $txt['wireless_navigation_up'], '

    '; } function template_wap2_post() { global $context, $settings, $options, $scripturl, $txt, $modSettings; echo '

    ', $context['page_title'], '

    '; if (!$context['becomes_approved']) echo '

    ' . $txt['wait_for_approval'] . '

    '; if ($context['locked']) echo '

    ' . $txt['topic_locked_no_reply'] . '

    '; if (isset($context['name']) && isset($context['email'])) { echo '

    ' . $txt['username'] . ':

    '; if (empty($modSettings['guest_post_no_email'])) echo '

    ' . $txt['email'] . ':

    '; } if ($context['require_verification']) echo '

    ' . $txt['verification'] . ': ', template_control_verification($context['visual_verification_id'], 'all'), '

    '; echo '

    ', $txt['subject'], ':

    ', $txt['message'], ':

    ', isset($context['current_topic']) ? ' ' : '', '

    [0] ', !empty($context['current_topic']) ? '' . $txt['wireless_navigation_topic'] . '' : '' . $txt['wireless_navigation_index'] . '', '

    '; } function template_wap2_pm() { global $context, $settings, $options, $scripturl, $txt, $user_info; if ($_REQUEST['action'] == 'findmember') { echo '

    ', $txt['wireless_pm_search_member'], '

    ', $txt['find_members'], '

    ', $txt['wireless_pm_search_name'], ': ', empty($_REQUEST['u']) ? '' : ' ', '

    '; if (!empty($context['last_search'])) { echo '

    ', $txt['find_results'], '

    '; if (empty($context['results'])) echo '

    [-] ', $txt['find_no_results'], '

    '; else { echo '

    ', empty($context['links']['prev']) ? '' : '<< < ', '(', $context['page_info']['current_page'], '/', $context['page_info']['num_pages'], ')', empty($context['links']['next']) ? '' : ' > >> ', '

    '; $count = 0; foreach ($context['results'] as $result) { $count++; echo '

    [', $count < 10 ? $count : '-', '] ', $result['name'], '

    '; } } } echo '

    ', $txt['wireless_navigation'], '

    [0] ', $txt['wireless_navigation_up'], '

    '; if (!empty($context['results'])) echo empty($context['links']['next']) ? '' : '

    [#] ' . $txt['wireless_navigation_next'] . '

    ', empty($context['links']['prev']) ? '' : '

    [*] ' . $txt['wireless_navigation_prev'] . '

    '; } elseif (!empty($_GET['sa'])) { if ($_GET['sa'] == 'addbuddy') { echo '

    ', $txt['wireless_pm_add_buddy'], '

    ', $txt['wireless_pm_select_buddy'], '

    '; $count = 0; foreach ($context['buddies'] as $buddy) { $count++; if ($buddy['selected']) echo '

    [-] ', $buddy['name'], '

    '; else echo '

    [', $count < 10 ? $count : '-', '] ', $buddy['name'], '

    '; } echo '

    ', $txt['wireless_navigation'], '

    [0] ', $txt['wireless_navigation_up'], '

    '; } if ($_GET['sa'] == 'send' || $_GET['sa'] == 'send2') { echo '

    ', $txt['new_message'], '

    ', empty($context['post_error']['messages']) ? '' : '

    ' . implode('
    ', $context['post_error']['messages']) . '

    ', '

    ', $txt['pm_to'], ': '; if (empty($context['recipients']['to'])) echo $txt['wireless_pm_no_recipients']; else { $to_names = array(); $ids = array(); foreach ($context['recipients']['to'] as $to) { $ids[] = $to['id']; $to_names[] = $to['name']; } echo implode(', ', $to_names); $ids = implode(',', $ids); } echo ' ', empty($ids) ? '' : '', '
    ', $txt['wireless_pm_search_member'], '', empty($user_info['buddies']) ? '' : '
    ' . $txt['wireless_pm_add_buddy'] . '', '

    ', $txt['subject'], ':

    ', $txt['message'], ':

    '; if ($context['reply']) echo '

    ', $txt['wireless_pm_reply_to'], '

    ', $context['quoted_message']['subject'], '

    ', $context['quoted_message']['body'], '

    '; echo '

    ', $txt['wireless_navigation'], '

    [0] ', $txt['wireless_navigation_up'], '

    '; } } elseif (empty($_GET['pmsg'])) { echo '

    ', $context['current_label_id'] == -1 ? $txt['wireless_pm_inbox'] : $txt['pm_current_label'] . ': ' . $context['current_label'], '

    ', empty($context['links']['prev']) ? '' : '<< < ', '(', $context['page_info']['current_page'], '/', $context['page_info']['num_pages'], ')', empty($context['links']['next']) ? '' : ' > >> ', '

    '; $count = 0; while ($message = $context['get_pmessage']()) { $count++; echo '

    [', $count < 10 ? $count : '-', '] ', $message['subject'], ' ', $txt['wireless_pm_by'], ' ', $message['member']['name'], '', $message['is_unread'] ? ' [' . $txt['new'] . ']' : '', '

    '; } if ($context['currently_using_labels']) { $labels = array(); ksort($context['labels']); foreach ($context['labels'] as $label) $labels[] = '' . $label['name'] . '' . (!empty($label['unread_messages']) ? ' (' . $label['unread_messages'] . ')' : ''); echo '

    ', $txt['pm_labels'], '

    ', implode(', ', $labels), '

    '; } echo '

    ', $txt['wireless_navigation'], '

    [0] ', $txt['wireless_navigation_up'], '

    ', empty($context['links']['next']) ? '' : '

    [#] ' . $txt['wireless_navigation_next'] . '

    ', empty($context['links']['prev']) ? '' : '

    [*] ' . $txt['wireless_navigation_prev'] . '

    ', $context['can_send_pm'] ? '

    ' . $txt['new_message'] . '

    ' : ''; } else { $message = $context['get_pmessage'](); $message['body'] = preg_replace('~
    (.+?)
    ~', '
    --- $1 ---', $message['body']); $message['body'] = strip_tags(str_replace( array( '
    ', '
    ', '', '', '
  • ', $txt['code_select'], ), array( '
    ', '
    --- ' . $txt['wireless_end_quote'] . ' ---
    ', '
    ', '
    --- ' . $txt['wireless_end_code'] . ' ---
    ', '
    * ', '', ), $message['body']), '
    '); echo '

    ', $message['subject'], '

    ', $txt['wireless_pm_by'], ': ', $message['member']['name'], '
    ', $txt['on'], ': ', $message['time'], '

    ', $message['body'], '

    ', $txt['wireless_navigation'], '

    [0] ', $txt['wireless_navigation_up'], '

    '; if ($context['can_send_pm']) echo '

    ', $txt['wireless_pm_reply'], '

    '; if ($context['can_send_pm'] && $message['number_recipients'] > 1) echo '

    ', $txt['wireless_pm_reply_all'], '

    '; } } function template_wap2_recent() { global $context, $settings, $options, $scripturl, $txt; echo '

    ', $_REQUEST['action'] == 'unread' ? $txt['wireless_recent_unread_posts'] : $txt['wireless_recent_unread_replies'], '

    '; $count = 0; if (empty($context['topics'])) echo '

    ', $txt['old_posts'], '

    '; else { echo '

    ', !empty($context['links']['prev']) ? '<< < ' : '', '(', $context['page_info']['current_page'], '/', $context['page_info']['num_pages'], ')', !empty($context['links']['next']) ? ' > >> ' : '', '

    '; foreach ($context['topics'] as $topic) { $count++; echo '

    ', ($count < 10 ? '[' . $count . '] ' : ''), '', $topic['first_post']['subject'], '

    '; } } echo '

    ', $txt['wireless_navigation'], '

    [0] ', $txt['wireless_navigation_up'], '

    ', !empty($context['links']['next']) ? '

    [#] ' . $txt['wireless_navigation_next'] . '

    ' : '', !empty($context['links']['prev']) ? '

    [*] ' . $txt['wireless_navigation_prev'] . '

    ' : ''; } function template_wap2_error() { global $context, $settings, $options, $txt, $scripturl; echo '

    ', $context['error_title'], '

    ', $context['error_message'], '

    [0] ', $txt['wireless_error_home'], '

    '; } function template_wap2_profile() { global $context, $settings, $options, $scripturl, $board, $txt; echo '

    ', $txt['summary'], ' - ', $context['member']['name'], '

    ', $txt['name'], ': ', $context['member']['name'], '

    ', $txt['position'], ': ', (!empty($context['member']['group']) ? $context['member']['group'] : $context['member']['post_group']), '

    ', $txt['lastLoggedIn'], ': ', $context['member']['last_login'], '

    '; if (!empty($context['member']['bans'])) { echo '

    ', $txt['user_banned_by_following'], ':

    '; foreach ($context['member']['bans'] as $ban) echo '

    ', $ban['explanation'], '

    '; } echo '

    ', $txt['additional_info'], '

    '; if (!$context['user']['is_owner'] && $context['can_send_pm']) echo '

    ', $txt['wireless_profile_pm'], '.

    '; if (!$context['user']['is_owner'] && !empty($context['can_edit_ban'])) echo '

    ', $txt['profileBanUser'], '.

    '; echo '

    ', $txt['wireless_error_home'], '.

    '; } function template_wap2_ban_edit() { global $context, $settings, $options, $scripturl, $board, $txt, $modSettings; echo '

    ', $context['ban']['is_new'] ? $txt['ban_add_new'] : $txt['ban_edit'] . ' \'' . $context['ban']['name'] . '\'', '

    ', $txt['ban_name'], ':

    ', $txt['ban_expiration'], ':
    ', $txt['never'], '
    ', $txt['ban_will_expire_within'], ' ', $txt['ban_days'], '
    ', $txt['ban_expired'], '

    ', $txt['ban_reason'], ':

    ', $txt['ban_notes'], ':

    ', $txt['ban_restriction'], ':
    ', $txt['ban_full_ban'], '
    ', $txt['ban_cannot_post'], '
    ', $txt['ban_cannot_register'], '
    ', $txt['ban_cannot_login'], '

    '; if (!empty($context['ban_suggestions'])) { echo '

    ', $txt['ban_triggers'], '

    ', $txt['wireless_ban_ip'], ':
        

    '; if (empty($modSettings['disableHostnameLookup'])) echo '

    ', $txt['wireless_ban_hostname'], ':
        

    '; echo '

    ', $txt['wireless_ban_email'], ':
        

    ', $txt['ban_on_username'], ':
    '; if (empty($context['ban_suggestions']['member']['id'])) echo '     '; else echo '     ', $context['ban_suggestions']['member']['name'], ' '; echo '

    '; } echo '

    ', $txt['wireless_additional_info'], '

    ', $txt['wireless_error_home'], '.

    '; echo '
    '; } function template_wap2_below() { global $context, $settings, $options, $txt; echo ' ', $txt['wireless_go_to_full_version'], ' '; } ?>