'; } // 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'], '

'; // 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'], '

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

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

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

'; echo '


'; } if (!empty($context['topics'])) foreach ($context['topics'] as $topic) echo '

', $topic['first_post']['subject'], ' - ', $topic['first_post']['member']['name'], '

'; echo '

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

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

', $context['subject'], '

', $txt[139], ': ', !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: $wireless_message = strip_tags(str_replace(array('
', '
', '
'), array('', '', '
--
'), $message['body']), '
'); echo '

', $message['member']['name'], ':

', $wireless_message, '

'; } echo '

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

'; } function template_wap_login() { global $context, $settings, $options, $scripturl, $txt; echo ' '; if (isset($context['login_error'])) echo '

', $context['login_error'], '

'; echo '

', $txt[35], ':

', $txt[36], ':

'; } 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[334], '

'; else { echo '

', $txt[139], ': ', !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; echo ' '; } // The cHTML protocol used for i-mode starts here. function template_imode_above() { global $context, $settings, $options; 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'], '
', $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[64], '
', !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['new'] && $context['user']['is_logged'] ? ' [' . $txt[302] . ']' : '', '
', $txt['wireless_navigation'], '
', $txt['wireless_navigation_up'], '
' . $txt['wireless_navigation_next'] . '
[*] ' . $txt['wireless_navigation_prev'] . '
' . $txt[33] . '
'; } 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: $wireless_message = strip_tags(str_replace(array('
', '
', '
'), '
', $message['body']), '
'); echo '
'; } echo ' ', !empty($context['links']['next']) ? ' ' : '', !empty($context['links']['prev']) ? ' ' : '', $context['can_reply'] ? ' ' : '', '
', $context['subject'], '
', !empty($context['links']['prev']) ? '<< < ' : '', '(', $context['page_info']['current_page'], '/', $context['page_info']['num_pages'], ')', !empty($context['links']['next']) ? ' > >> ' : '', '
', $message['first_new'] ? ' ' : '', ' ', $message['member']['name'], ':
', $wireless_message, '
', $txt['wireless_navigation'], '
', $txt['wireless_navigation_index'], '
' . $txt['wireless_navigation_next'] . '
' . $txt['wireless_navigation_prev'] . '
' . $txt[146] . '
'; } function template_imode_post() { global $context, $settings, $options, $scripturl, $txt; // !!! $modSettings['guest_post_no_email'] echo '
', $context['locked'] ? ' ' : '', isset($context['name']) ? ' ' : '', isset($context['email']) ? ' ' : '', '
' . $txt['smf287'] . '
' . (isset($context['post_error']['long_name']) || isset($context['post_error']['no_name']) ? '' . $txt[35] . '' : $txt[35]) . ':
' . (isset($context['post_error']['no_email']) || isset($context['post_error']['bad_email']) ? '' . $txt[69] . '' : $txt[69]) . ':
', isset($context['post_error']['no_subject']) ? '' . $txt[70] . '' : $txt[70], ':
', isset($context['post_error']['no_message']) || isset($context['post_error']['long_message']) ? '' . $txt[72] . '' : $txt[72], ':
', isset($context['current_topic']) ? ' ' : '', '
 ', isset($context['current_topic']) ? '' . $txt['wireless_navigation_topic'] . '' : '' . $txt['wireless_navigation_index'] . '', '
'; } function template_imode_login() { global $context, $settings, $options, $scripturl, $txt; echo '
'; if (isset($context['login_error'])) echo ' '; echo '
', $txt[34], '
', $context['login_error'], '
', $txt[35], ':
', $txt[36], ':
', $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[321], '
' . implode('
', $context['post_error']['messages']) . '
', $txt[150], ': ', empty($context['to']) ? $txt['wireless_pm_no_recipients'] : $context['to'], empty($_REQUEST['u']) ? '' : '', '
', $txt['wireless_pm_search_member'], '', empty($user_info['buddies']) ? '' : '
' . $txt['wireless_pm_add_buddy'] . '', '
', $txt[70], ':
', $txt[72], ':
', $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 ' '; } echo ' ', empty($context['links']['next']) ? '' : ' ', empty($context['links']['prev']) ? '' : ' ', $context['can_send_pm'] ? ' ' : '', '
', $txt['wireless_pm_inbox'], '
', 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'], '
', $txt['wireless_navigation'], '
[0] ', $txt['wireless_navigation_up'], '
[#] ' . $txt['wireless_navigation_next'] . '
[*] ' . $txt['wireless_navigation_prev'] . '
' . $txt[321] . '
'; } else { $message = $context['get_pmessage'](); $message['body'] = strtr(strip_tags(strtr($message['body'], array('
' => '[br]', '
' => '[br]'))), array('[br]' => '
')); echo ' '; if ($context['can_send_pm']) echo '
', $message['subject'], '
', $txt['wireless_pm_by'], ': ', $message['member']['name'], '
', $txt[30], ': ', $message['time'], '
', $message['body'], '
', $txt['wireless_navigation'], '
[0] ', $txt['wireless_navigation_up'], '
', $txt['wireless_pm_reply'], '
'; } } 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[334], '
', !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_below() { global $context, $settings, $options; echo ' '; } // XHTMLMP (XHTML Mobile Profile) templates used for WAP 2.0 start here function template_wap2_above() { global $context, $settings, $options; echo ' ', $context['page_title'], ' '; } function template_wap2_boardindex() { global $context, $settings, $options, $scripturl, $txt; echo '

', $context['forum_name'], '

'; $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['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[64], '

', !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['new'] && $context['user']['is_logged'] ? ' [' . $txt[302] . ']' : '', '

'; } } 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[33] . '

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

', $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: $wireless_message = strip_tags(str_replace(array('
', '
', '
'), '
', $message['body']), '
'); echo $message['first_new'] ? ' ' : '', '

', $message['member']['name'], ':
', $wireless_message, '

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

', $txt['wireless_navigation'], '

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

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

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

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

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

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

' . $txt[146] . '

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

', $txt[34], '

'; if (isset($context['login_error'])) echo '

', $context['login_error'], '

'; echo '

', $txt[35], ':

', $txt[36], ':

', $txt['wireless_navigation'], '

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

'; } function template_wap2_post() { global $context, $settings, $options, $scripturl, $txt; // !!! $modSettings['guest_post_no_email'] echo '

', $context['page_title'], '

', $context['locked'] ? '

' . $txt['smf287'] . '

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

' . $txt[35] . ':

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

' . $txt[69] . ':

' : '', '

', $txt[70], ':

', $txt[72], ':

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

[0] ', isset($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[321], '

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

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

', '

', $txt[150], ': ', empty($context['to']) ? $txt['wireless_pm_no_recipients'] : $context['to'], empty($_REQUEST['u']) ? '' : '', '
', $txt['wireless_pm_search_member'], '', empty($user_info['buddies']) ? '' : '
' . $txt['wireless_pm_add_buddy'] . '', '

', $txt[70], ':

', $txt[72], ':

'; 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 '

', $txt['wireless_pm_inbox'], '

', 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'], '

'; } 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[321] . '

' : ''; } else { $message = $context['get_pmessage'](); $message['body'] = strtr(strip_tags(strtr($message['body'], array('
' => '[br]', '
' => '[br]'))), array('[br]' => '
')); echo '

', $message['subject'], '

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

', $message['body'], '

', $txt['wireless_navigation'], '

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

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

', $txt['wireless_pm_reply'], '

'; } } 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[334], '

'; 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_below() { global $context, $settings, $options; echo ' '; } ?>