Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #2976 from live627/dev

Remove all traces of the defunct WAP code
  • Loading branch information...
commit f04a00d169c0dafa45a3bb29d0230530ca4b73ae 2 parents e03efc8 + fb90bf1
@live627 live627 authored
View
3  SSI.php
@@ -96,9 +96,6 @@
if (isset($_REQUEST['context']))
die('No direct access...');
-// Make sure wireless is always off.
-define('WIRELESS', false);
-
// Gzip output? (because it must be boolean and true, this can't be hacked.)
if (isset($ssi_gzip) && $ssi_gzip === true && ini_get('zlib.output_compression') != '1' && ini_get('output_handler') != 'ob_gzhandler' && version_compare(PHP_VERSION, '4.2.0', '>='))
ob_start('ob_gzhandler');
View
11 Sources/BoardIndex.php
@@ -20,7 +20,6 @@
/**
* This function shows the board index.
* It uses the BoardIndex template, and main sub template.
- * It may use the boardindex subtemplate for wireless support.
* It updates the most online statistics.
* It is accessed by ?action=boardindex.
*/
@@ -28,14 +27,8 @@ function BoardIndex()
{
global $txt, $user_info, $sourcedir, $modSettings, $context, $settings, $scripturl;
- // For wireless, we use the Wireless template...
- if (WIRELESS)
- $context['sub_template'] = WIRELESS_PROTOCOL . '_boardindex';
- else
- {
- loadTemplate('BoardIndex');
- $context['template_layers'][] = 'boardindex_outer';
- }
+ loadTemplate('BoardIndex');
+ $context['template_layers'][] = 'boardindex_outer';
// Set a canonical URL for this page.
$context['canonical_url'] = $scripturl;
View
2  Sources/Calendar.php
@@ -47,7 +47,7 @@ function CalendarMain()
'post' => 'CalendarPost',
);
- if (isset($_GET['sa']) && isset($subActions[$_GET['sa']]) && !WIRELESS)
+ if (isset($_GET['sa']) && isset($subActions[$_GET['sa']]))
return call_helper($subActions[$_GET['sa']]);
// You can't do anything if the calendar is off.
View
23 Sources/Display.php
@@ -20,7 +20,6 @@
/**
* The central part of the board - topic display.
* This function loads the posts in a topic up so they can be displayed.
- * It supports wireless, using wap/wap2/imode and the Wireless templates.
* It uses the main sub template of the Display template.
* It requires a topic, and can go to the previous or next topic from it.
* It jumps to the correct post depending on a number/time/IS_MSG passed.
@@ -38,11 +37,8 @@ function Display()
if (empty($topic))
fatal_lang_error('no_board', false);
- // Load the proper template and/or sub template.
- if (WIRELESS)
- $context['sub_template'] = WIRELESS_PROTOCOL . '_display';
- else
- loadTemplate('Display');
+ // Load the proper template.
+ loadTemplate('Display');
// Not only does a prefetch make things slower for the server, but it makes it impossible to know if they read it.
if (isset($_SERVER['HTTP_X_MOZ']) && $_SERVER['HTTP_X_MOZ'] == 'prefetch')
@@ -53,7 +49,7 @@ function Display()
}
// How much are we sticking on each page?
- $context['messages_per_page'] = empty($modSettings['disableCustomPerPage']) && !empty($options['messages_per_page']) && !WIRELESS ? $options['messages_per_page'] : $modSettings['defaultMaxMessages'];
+ $context['messages_per_page'] = empty($modSettings['disableCustomPerPage']) && !empty($options['messages_per_page']) ? $options['messages_per_page'] : $modSettings['defaultMaxMessages'];
// Let's do some work on what to search index.
if (count($_GET) > 2)
@@ -455,8 +451,8 @@ function Display()
'num_pages' => floor(($context['total_visible_posts'] - 1) / $context['messages_per_page']) + 1,
);
- // Figure out all the link to the next/prev/first/last/etc. for wireless mainly.
- if (WIRELESS || !($can_show_all && isset($_REQUEST['all'])))
+ // Figure out all the link to the next/prev/first/last/etc.
+ if (!($can_show_all && isset($_REQUEST['all'])))
{
$context['links'] = array(
'first' => $_REQUEST['start'] >= $context['messages_per_page'] ? $scripturl . '?topic=' . $topic . '.0' : '',
@@ -1168,13 +1164,6 @@ function Display()
$context['oldTopicError'] = $lastPostTime + $modSettings['oldTopicDays'] * 86400 < time();
}
- // Wireless shows a "more" if you can do anything special.
- if (WIRELESS && WIRELESS_PROTOCOL != 'wap')
- {
- $context['wireless_more'] = $context['can_sticky'] || $context['can_lock'] || allowedTo('modify_any');
- $context['wireless_moderate'] = isset($_GET['moderate']) ? ';moderate' : '';
- }
-
// You can't link an existing topic to the calendar unless you can modify the first post...
$context['calendar_post'] &= allowedTo('modify_any') || (allowedTo('modify_own') && $context['user']['started']);
@@ -1984,4 +1973,4 @@ function QuickInTopicModeration()
redirectexit(!empty($topicGone) ? 'board=' . $board : 'topic=' . $topic . '.' . $_REQUEST['start']);
}
-?>
+?>
View
4 Sources/Drafts.php
@@ -564,7 +564,7 @@ function showProfileDrafts($memID, $draft_type = 0)
list ($msgCount) = $smcFunc['db_fetch_row']($request);
$smcFunc['db_free_result']($request);
- $maxPerPage = empty($modSettings['disableCustomPerPage']) && !empty($options['messages_per_page']) && !WIRELESS ? $options['messages_per_page'] : $modSettings['defaultMaxMessages'];
+ $maxPerPage = empty($modSettings['disableCustomPerPage']) && !empty($options['messages_per_page']) ? $options['messages_per_page'] : $modSettings['defaultMaxMessages'];
$maxIndex = $maxPerPage;
// Make sure the starting place makes sense and construct our friend the page index.
@@ -722,7 +722,7 @@ function showPMDrafts($memID = -1)
list ($msgCount) = $smcFunc['db_fetch_row']($request);
$smcFunc['db_free_result']($request);
- $maxPerPage = empty($modSettings['disableCustomPerPage']) && !empty($options['messages_per_page']) && !WIRELESS ? $options['messages_per_page'] : $modSettings['defaultMaxMessages'];
+ $maxPerPage = empty($modSettings['disableCustomPerPage']) && !empty($options['messages_per_page']) ? $options['messages_per_page'] : $modSettings['defaultMaxMessages'];
$maxIndex = $maxPerPage;
// Make sure the starting place makes sense and construct our friend the page index.
View
13 Sources/Errors.php
@@ -277,7 +277,7 @@ function error_handler($error_level, $error_string, $file, $line)
/**
* It is called by {@link fatal_error()} and {@link fatal_lang_error()}.
- * @uses Errors template, fatal_error sub template, or Wireless template, error sub template.
+ * @uses Errors template, fatal_error sub template.
*
* @param string $error_message The error message
* @param string $error_code An error code
@@ -308,15 +308,8 @@ function setup_fatal_error_context($error_message, $error_code = null)
if (empty($context['page_title']))
$context['page_title'] = $context['error_title'];
- // Display the error message - wireless?
- if (defined('WIRELESS') && WIRELESS)
- $context['sub_template'] = WIRELESS_PROTOCOL . '_error';
- // Load the template and set the sub template.
- else
- {
- loadTemplate('Errors');
- $context['sub_template'] = 'fatal_error';
- }
+ loadTemplate('Errors');
+ $context['sub_template'] = 'fatal_error';
// If this is SSI, what do they want us to do?
if (SMF == 'SSI')
View
13 Sources/Load.php
@@ -287,7 +287,7 @@ function reloadSettings()
$context['server']['needs_login_fix'] = $context['server']['is_cgi'] && $context['server']['is_iis'];
// Define a list of icons used across multiple places.
- $context['stable_icons'] = array('xx', 'thumbup', 'thumbdown', 'exclamation', 'question', 'lamp', 'smiley', 'angry', 'cheesy', 'grin', 'sad', 'wink', 'poll', 'moved', 'recycled', 'wireless', 'clip');
+ $context['stable_icons'] = array('xx', 'thumbup', 'thumbdown', 'exclamation', 'question', 'lamp', 'smiley', 'angry', 'cheesy', 'grin', 'sad', 'wink', 'poll', 'moved', 'recycled', 'clip');
// Define an array for custom profile fields placements.
$context['cust_profile_fields_placement'] = array(
@@ -1920,15 +1920,8 @@ function loadTheme($id_theme = 0, $initialize = true)
call_integration_hook('integrate_simple_actions', array(&$simpleActions, &$simpleAreas, &$simpleSubActions));
$context['simple_action'] = in_array($context['current_action'], $simpleActions) || isset($_REQUEST['area']) && in_array($_REQUEST['area'], $simpleAreas) || in_array($context['current_subaction'], $simpleSubActions);
- // Wireless mode? Load up the wireless stuff.
- if (WIRELESS)
- {
- $context['template_layers'] = array(WIRELESS_PROTOCOL);
- loadLanguage('Wireless+index+Modifications');
- loadTemplate('Wireless');
- }
// Output is fully XML, so no need for the index template.
- elseif (isset($_REQUEST['xml']))
+ if (isset($_REQUEST['xml']))
{
loadLanguage('index+Modifications');
loadTemplate('Xml');
@@ -2812,7 +2805,7 @@ function template_include($filename, $once = false)
else
ob_start();
- if (isset($_GET['debug']) && !WIRELESS)
+ if (isset($_GET['debug']))
header('Content-Type: application/xhtml+xml; charset=' . (empty($context['character_set']) ? 'ISO-8859-1' : $context['character_set']));
// Don't cache error pages!!
View
37 Sources/LogInOut.php
@@ -23,8 +23,6 @@
* It caches the referring URL in $_SESSION['login_url'].
* It is accessed from ?action=login.
* @uses Login template and language file with the login sub-template.
- * @uses the protocol_login sub-template in the Wireless template,
- * if you are using a wireless device
*/
function Login()
{
@@ -34,22 +32,16 @@ function Login()
if (!empty($user_info['id']))
redirectexit();
- // In wireless? If so, use the correct sub template.
- if (WIRELESS)
- $context['sub_template'] = WIRELESS_PROTOCOL . '_login';
- // Otherwise, we need to load the Login template/language file.
- else
- {
- loadLanguage('Login');
- loadTemplate('Login');
+ // We need to load the Login template/language file.
+ loadLanguage('Login');
+ loadTemplate('Login');
- $context['sub_template'] = 'login';
+ $context['sub_template'] = 'login';
- if (!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest')
- {
- $context['from_ajax'] = true;
- $context['template_layers'] = array();
- }
+ if (!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest')
+ {
+ $context['from_ajax'] = true;
+ $context['template_layers'] = array();
}
// Get the template ready.... not really much else to do.
@@ -182,14 +174,9 @@ function Login2()
$modSettings['cookieTime'] = (int) $_POST['cookielength'];
loadLanguage('Login');
- // Load the template stuff - wireless or normal.
- if (WIRELESS)
- $context['sub_template'] = WIRELESS_PROTOCOL . '_login';
- else
- {
- loadTemplate('Login');
- $context['sub_template'] = 'login';
- }
+ // Load the template stuff.
+ loadTemplate('Login');
+ $context['sub_template'] = 'login';
// Set up the default/fallback stuff.
$context['default_username'] = isset($_POST['user']) ? preg_replace('~&amp;#(\\d{1,7}|x[0-9a-fA-F]{1,6});~', '&#\\1;', $smcFunc['htmlspecialchars']($_POST['user'])) : '';
@@ -849,4 +836,4 @@ function validatePasswordFlood($id_member, $password_flood_value = false, $was_c
}
-?>
+?>
View
2  Sources/Logging.php
@@ -205,7 +205,7 @@ function displayDebug()
global $db_cache, $db_count, $db_show_debug, $cache_count, $cache_hits, $smcFunc, $txt;
// Add to Settings.php if you want to show the debugging information.
- if (!isset($db_show_debug) || $db_show_debug !== true || (isset($_GET['action']) && $_GET['action'] == 'viewquery') || WIRELESS)
+ if (!isset($db_show_debug) || $db_show_debug !== true || (isset($_GET['action']) && $_GET['action'] == 'viewquery'))
return;
if (empty($_SESSION['view_queries']))
View
15 Sources/ManageBans.php
@@ -573,19 +573,8 @@ function BanEdit()
}
}
- // If we're in wireless mode remove the admin template layer and use a special template.
- if (WIRELESS && WIRELESS_PROTOCOL != 'wap')
- {
- $context['sub_template'] = WIRELESS_PROTOCOL . '_ban_edit';
- foreach ($context['template_layers'] as $k => $v)
- if (strpos($v, 'generic_menu') === 0)
- unset($context['template_layers'][$k]);
- }
- else
- {
- loadJavascriptFile('suggest.js', array('default_theme' => true), 'suggest.js');
- $context['sub_template'] = 'ban_edit';
- }
+ loadJavascriptFile('suggest.js', array('default_theme' => true), 'suggest.js');
+ $context['sub_template'] = 'ban_edit';
}
View
13 Sources/MessageIndex.php
@@ -40,10 +40,7 @@ function MessageIndex()
redirectexit($board_info['redirect']);
}
- if (WIRELESS)
- $context['sub_template'] = WIRELESS_PROTOCOL . '_messageindex';
- else
- loadTemplate('MessageIndex');
+ loadTemplate('MessageIndex');
if (!$user_info['is_guest'])
{
@@ -66,8 +63,8 @@ function MessageIndex()
$board_info['total_topics'] = allowedTo('approve_posts') ? $board_info['num_topics'] + $board_info['unapproved_topics'] : $board_info['num_topics'] + $board_info['unapproved_user_topics'];
// View all the topics, or just a few?
- $context['topics_per_page'] = empty($modSettings['disableCustomPerPage']) && !empty($options['topics_per_page']) && !WIRELESS ? $options['topics_per_page'] : $modSettings['defaultMaxTopics'];
- $context['messages_per_page'] = empty($modSettings['disableCustomPerPage']) && !empty($options['messages_per_page']) && !WIRELESS ? $options['messages_per_page'] : $modSettings['defaultMaxMessages'];
+ $context['topics_per_page'] = empty($modSettings['disableCustomPerPage']) && !empty($options['topics_per_page']) ? $options['topics_per_page'] : $modSettings['defaultMaxTopics'];
+ $context['messages_per_page'] = empty($modSettings['disableCustomPerPage']) && !empty($options['messages_per_page']) ? $options['messages_per_page'] : $modSettings['defaultMaxMessages'];
$maxindex = isset($_REQUEST['all']) && !empty($modSettings['enableAllMessages']) ? $board_info['total_topics'] : $context['topics_per_page'];
// Right, let's only index normal stuff!
@@ -107,7 +104,7 @@ function MessageIndex()
$can_show_all = !empty($modSettings['enableAllMessages']) && $maxindex > $modSettings['enableAllMessages'];
- if (WIRELESS || !($can_show_all && isset($_REQUEST['all'])))
+ if (!($can_show_all && isset($_REQUEST['all'])))
{
$context['links'] = array(
'first' => $_REQUEST['start'] >= $context['topics_per_page'] ? $scripturl . '?board=' . $board . '.0' : '',
@@ -316,7 +313,7 @@ function MessageIndex()
if (!$pre_query || !empty($topic_ids))
{
// For search engine effectiveness we'll link guests differently.
- $context['pageindex_multiplier'] = empty($modSettings['disableCustomPerPage']) && !empty($options['messages_per_page']) && !WIRELESS ? $options['messages_per_page'] : $modSettings['defaultMaxMessages'];
+ $context['pageindex_multiplier'] = empty($modSettings['disableCustomPerPage']) && !empty($options['messages_per_page']) ? $options['messages_per_page'] : $modSettings['defaultMaxMessages'];
$message_index_parameters = array(
'current_board' => $board,
View
80 Sources/PersonalMessage.php
@@ -37,11 +37,7 @@ function MessageMain()
loadLanguage('PersonalMessage+Drafts');
- if (WIRELESS && WIRELESS_PROTOCOL == 'wap')
- fatal_lang_error('wireless_error_notyet', false);
- elseif (WIRELESS)
- $context['sub_template'] = WIRELESS_PROTOCOL . '_pm';
- elseif (!isset($_REQUEST['xml']))
+ if (!isset($_REQUEST['xml']))
loadTemplate('PersonalMessage');
// Load up the members maximum message capacity.
@@ -191,11 +187,10 @@ function MessageMain()
);
// Preferences...
- $context['display_mode'] = WIRELESS ? 0 : $user_settings['pm_prefs'] & 3;
+ $context['display_mode'] = $user_settings['pm_prefs'] & 3;
$subActions = array(
'popup' => 'MessagePopup',
- 'addbuddy' => 'WirelessAddBuddy',
'manlabels' => 'ManageLabels',
'manrules' => 'ManageRules',
'pmactions' => 'MessageActionsApply',
@@ -373,7 +368,7 @@ function messageIndexBar($area)
$context['menu_item_selected'] = $current_area;
// Set the template for this area and add the profile layer.
- if (!WIRELESS && !isset($_REQUEST['xml']))
+ if (!isset($_REQUEST['xml']))
$context['template_layers'][] = 'pm';
}
@@ -583,7 +578,7 @@ function MessageFolder()
// Only show the button if there are messages to delete.
$context['show_delete'] = $max_messages > 0;
- $maxPerPage = empty($modSettings['disableCustomPerPage']) && !empty($options['messages_per_page']) && !WIRELESS ? $options['messages_per_page'] : $modSettings['defaultMaxMessages'];
+ $maxPerPage = empty($modSettings['disableCustomPerPage']) && !empty($options['messages_per_page']) ? $options['messages_per_page'] : $modSettings['defaultMaxMessages'];
// Start on the last page.
if (!is_numeric($_GET['start']) || $_GET['start'] >= $max_messages)
@@ -657,7 +652,7 @@ function MessageFolder()
$context['page_index'] = constructPageIndex($scripturl . '?action=pm;f=' . $context['folder'] . (isset($_REQUEST['l']) ? ';l=' . (int) $_REQUEST['l'] : '') . ';sort=' . $context['sort_by'] . ($descending ? ';desc' : ''), $_GET['start'], $max_messages, $maxPerPage);
$context['start'] = $_GET['start'];
- // Determine the navigation context (especially useful for the wireless template).
+ // Determine the navigation context.
$context['links'] = array(
'first' => $_GET['start'] >= $maxPerPage ? $scripturl . '?action=pm;start=0' : '',
'prev' => $_GET['start'] >= $maxPerPage ? $scripturl . '?action=pm;start=' . ($_GET['start'] - $maxPerPage) : '',
@@ -993,8 +988,7 @@ function MessageFolder()
$context['can_send_pm'] = allowedTo('pm_send');
$context['can_send_email'] = allowedTo('moderate_forum');
- if (!WIRELESS)
- $context['sub_template'] = 'folder';
+ $context['sub_template'] = 'folder';
$context['page_title'] = $txt['pm_inbox'];
// Finally mark the relevant messages as read.
@@ -1780,13 +1774,10 @@ function MessagePost()
loadLanguage('PersonalMessage');
// Just in case it was loaded from somewhere else.
- if (!WIRELESS)
- {
- loadTemplate('PersonalMessage');
- loadJavascriptFile('PersonalMessage.js', array('default_theme' => true, 'defer' => false), 'smf_pms');
- loadJavascriptFile('suggest.js', array('default_theme' => true, 'defer' => false), 'smf_suggest');
- $context['sub_template'] = 'send';
- }
+ loadTemplate('PersonalMessage');
+ loadJavascriptFile('PersonalMessage.js', array('default_theme' => true, 'defer' => false), 'smf_pms');
+ loadJavascriptFile('suggest.js', array('default_theme' => true, 'defer' => false), 'smf_suggest');
+ $context['sub_template'] = 'send';
// Extract out the spam settings - cause it's neat.
list ($modSettings['max_pm_recipients'], $modSettings['pm_posts_verification'], $modSettings['pm_posts_per_hour']) = explode(',', $modSettings['pm_spam_settings']);
@@ -2090,15 +2081,12 @@ function messagePostError($error_types, $named_recipients, $recipient_ids = arra
global $smcFunc, $user_info, $sourcedir;
if (!isset($_REQUEST['xml']))
- $context['menu_data_' . $context['pm_menu_id']]['current_area'] = 'send';
-
- if (!WIRELESS && !isset($_REQUEST['xml']))
{
- $context['sub_template'] = 'send';
+ $context['menu_data_' . $context['pm_menu_id']]['current_area'] = 'send'; $context['sub_template'] = 'send';
loadJavascriptFile('PersonalMessage.js', array('default_theme' => true, 'defer' => false), 'smf_pms');
loadJavascriptFile('suggest.js', array('default_theme' => true, 'defer' => false), 'smf_suggest');
}
- elseif (isset($_REQUEST['xml']))
+ else
$context['sub_template'] = 'pm';
$context['page_title'] = $txt['send_message'];
@@ -2551,48 +2539,6 @@ function MessagePost2()
// Go back to the where they sent from, if possible...
redirectexit($context['current_label_redirect']);
}
-
-/**
- * This function lists all buddies for wireless protocols.
- */
-function WirelessAddBuddy()
-{
- global $scripturl, $txt, $user_info, $context, $smcFunc;
-
- isAllowedTo('pm_send');
- $context['page_title'] = $txt['wireless_pm_add_buddy'];
-
- $current_buddies = empty($_REQUEST['u']) ? array() : explode(',', $_REQUEST['u']);
- foreach ($current_buddies as $key => $buddy)
- $current_buddies[$key] = (int) $buddy;
-
- $base_url = $scripturl . '?action=pm;sa=send;u=' . (empty($current_buddies) ? '' : implode(',', $current_buddies) . ',');
- $context['pm_href'] = $scripturl . '?action=pm;sa=send' . (empty($current_buddies) ? '' : ';u=' . implode(',', $current_buddies));
-
- $context['buddies'] = array();
- if (!empty($user_info['buddies']))
- {
- $request = $smcFunc['db_query']('', '
- SELECT id_member, real_name
- FROM {db_prefix}members
- WHERE id_member IN ({array_int:buddy_list})
- ORDER BY real_name
- LIMIT ' . count($user_info['buddies']),
- array(
- 'buddy_list' => $user_info['buddies'],
- )
- );
- while ($row = $smcFunc['db_fetch_assoc']($request))
- $context['buddies'][] = array(
- 'id' => $row['id_member'],
- 'name' => $row['real_name'],
- 'selected' => in_array($row['id_member'], $current_buddies),
- 'add_href' => $base_url . $row['id_member'],
- );
- $smcFunc['db_free_result']($request);
- }
-}
-
/**
* This function performs all additional stuff...
*/
@@ -4213,4 +4159,4 @@ function isAccessiblePM($pmID, $validFor = 'in_or_outbox')
}
}
-?>
+?>
View
9 Sources/Post.php
@@ -22,7 +22,6 @@
*
* - additionally handles previews of posts.
* - @uses the Post template and language file, main sub template.
- * - allows wireless access using the protocol_post sub template.
* - requires different permissions depending on the actions, but most notably post_new, post_reply_own, and post_reply_any.
* - shows options for the editing and posting of calendar events and attachments, as well as the posting of polls.
* - accessed from ?action=post.
@@ -1048,10 +1047,6 @@ function Post($post_errors = array())
'extra_after' => '<span><strong class="nav">)</strong></span>'
);
- // Give wireless a linktree url to the post screen, so that they can switch to full version.
- if (WIRELESS)
- $context['linktree'][count($context['linktree']) - 1]['url'] = $scripturl . '?action=post;' . (!empty($topic) ? 'topic=' . $topic : 'board=' . $board) . '.' . $_REQUEST['start'] . (isset($_REQUEST['msg']) ? ';msg=' . (int) $_REQUEST['msg'] . ';' . $context['session_var'] . '=' . $context['session_id'] : '');
-
$context['subject'] = addcslashes($form_subject, '"');
$context['message'] = str_replace(array('"', '<', '>', '&nbsp;'), array('&quot;', '&lt;', '&gt;', ' '), $form_message);
@@ -1179,9 +1174,7 @@ function Post($post_errors = array())
loadJavascriptFile('quotedText.js', array('default_theme' => true, 'defer' => true), 'smf_quotedText');
// Finally, load the template.
- if (WIRELESS && WIRELESS_PROTOCOL != 'wap')
- $context['sub_template'] = WIRELESS_PROTOCOL . '_post';
- elseif (!isset($_REQUEST['xml']))
+ if (!isset($_REQUEST['xml']))
loadTemplate('Post');
}
View
8 Sources/Profile-View.php
@@ -586,9 +586,9 @@ function showPosts($memID)
$range_limit = '';
if ($context['is_topics'])
- $maxPerPage = empty($modSettings['disableCustomPerPage']) && !empty($options['topics_per_page']) && !WIRELESS ? $options['topics_per_page'] : $modSettings['defaultMaxTopics'];
+ $maxPerPage = empty($modSettings['disableCustomPerPage']) && !empty($options['topics_per_page']) ? $options['topics_per_page'] : $modSettings['defaultMaxTopics'];
else
- $maxPerPage = empty($modSettings['disableCustomPerPage']) && !empty($options['messages_per_page']) && !WIRELESS ? $options['messages_per_page'] : $modSettings['defaultMaxMessages'];
+ $maxPerPage = empty($modSettings['disableCustomPerPage']) && !empty($options['messages_per_page']) ? $options['messages_per_page'] : $modSettings['defaultMaxMessages'];
$maxIndex = $maxPerPage;
@@ -1032,7 +1032,7 @@ function showUnwatched($memID)
$listOptions = array(
'id' => 'unwatched_topics',
'width' => '100%',
- 'items_per_page' => (empty($modSettings['disableCustomPerPage']) && !empty($options['topics_per_page']) && !WIRELESS) ? $options['topics_per_page'] : $modSettings['defaultMaxTopics'],
+ 'items_per_page' => (empty($modSettings['disableCustomPerPage']) && !empty($options['topics_per_page'])) ? $options['topics_per_page'] : $modSettings['defaultMaxTopics'],
'no_items_label' => $txt['unwatched_topics_none'],
'base_href' => $scripturl . '?action=profile;area=showposts;sa=unwatchedtopics;u=' . $memID,
'default_sort_col' => 'started_on',
@@ -1905,7 +1905,7 @@ function TrackIP($memID = 0)
ksort($context['ips']);
// For messages we use the "messages per page" option
- $maxPerPage = empty($modSettings['disableCustomPerPage']) && !empty($options['messages_per_page']) && !WIRELESS ? $options['messages_per_page'] : $modSettings['defaultMaxMessages'];
+ $maxPerPage = empty($modSettings['disableCustomPerPage']) && !empty($options['messages_per_page']) ? $options['messages_per_page'] : $modSettings['defaultMaxMessages'];
// Gonna want this for the list.
require_once($sourcedir . '/Subs-List.php');
View
7 Sources/Profile.php
@@ -580,12 +580,7 @@ function ModifyProfile($post_errors = array())
$check_password = $context['user']['is_owner'] && in_array($profile_include_data['current_area'], $context['password_areas']);
$context['require_password'] = $check_password;
- // If we're in wireless then we have a cut down template...
- if (WIRELESS && $context['sub_template'] == 'summary' && WIRELESS_PROTOCOL != 'wap')
- $context['sub_template'] = WIRELESS_PROTOCOL . '_profile';
-
- if (!WIRELESS)
- loadJavascriptFile('profile.js', array('default_theme' => true, 'defer' => false), 'smf_profile');
+ loadJavascriptFile('profile.js', array('default_theme' => true, 'defer' => false), 'smf_profile');
// These will get populated soon!
$post_errors = array();
View
15 Sources/Recent.php
@@ -478,7 +478,7 @@ function UnreadTopics()
$context['showing_all_topics'] = isset($_GET['all']);
$context['start'] = (int) $_REQUEST['start'];
- $context['topics_per_page'] = empty($modSettings['disableCustomPerPage']) && !empty($options['topics_per_page']) && !WIRELESS ? $options['topics_per_page'] : $modSettings['defaultMaxTopics'];
+ $context['topics_per_page'] = empty($modSettings['disableCustomPerPage']) && !empty($options['topics_per_page']) ? $options['topics_per_page'] : $modSettings['defaultMaxTopics'];
if ($_REQUEST['action'] == 'unread')
$context['page_title'] = $context['showing_all_topics'] ? $txt['unread_topics_all'] : $txt['unread_topics_visit'];
else
@@ -687,14 +687,9 @@ function UnreadTopics()
else
$txt['unread_topics_visit_none'] = strtr($txt['unread_topics_visit_none'], array('?action=unread;all' => '?action=unread;all' . sprintf($context['querystring_board_limits'], 0) . $context['querystring_sort_limits']));
- if (WIRELESS)
- $context['sub_template'] = WIRELESS_PROTOCOL . '_recent';
- else
- {
- loadTemplate('Recent');
- loadTemplate('MessageIndex');
- $context['sub_template'] = $_REQUEST['action'] == 'unread' ? 'unread' : 'replies';
- }
+ loadTemplate('Recent');
+ loadTemplate('MessageIndex');
+ $context['sub_template'] = $_REQUEST['action'] == 'unread' ? 'unread' : 'replies';
// Setup the default topic icons... for checking they exist and the like ;)
$context['icon_sources'] = array();
@@ -1236,7 +1231,7 @@ function UnreadTopics()
// Decide how many pages the topic should have.
$topic_length = $row['num_replies'] + 1;
- $messages_per_page = empty($modSettings['disableCustomPerPage']) && !empty($options['messages_per_page']) && !WIRELESS ? $options['messages_per_page'] : $modSettings['defaultMaxMessages'];
+ $messages_per_page = empty($modSettings['disableCustomPerPage']) && !empty($options['messages_per_page']) ? $options['messages_per_page'] : $modSettings['defaultMaxMessages'];
if ($topic_length > $messages_per_page)
{
$tmppages = array();
View
10 Sources/Security.php
@@ -109,7 +109,7 @@ function is_not_guest($message = '')
obExit(false);
// Attempt to detect if they came from dlattach.
- if (!WIRELESS && SMF != 'SSI' && empty($context['theme_loaded']))
+ if (SMF != 'SSI' && empty($context['theme_loaded']))
loadTheme();
// Never redirect to an attachment
@@ -119,14 +119,8 @@ function is_not_guest($message = '')
// Load the Login template and language file.
loadLanguage('Login');
- // Are we in wireless mode?
- if (WIRELESS)
- {
- $context['login_error'] = $message ? $message : $txt['only_members_can_access'];
- $context['sub_template'] = WIRELESS_PROTOCOL . '_login';
- }
// Apparently we're not in a position to handle this now. Let's go to a safer location for now.
- elseif (empty($context['template_layers']))
+ if (empty($context['template_layers']))
{
$_SESSION['login_url'] = $scripturl . '?' . $_SERVER['QUERY_STRING'];
redirectexit('action=login');
View
15 Sources/Subs-Auth.php
@@ -443,16 +443,11 @@ function JSMembers()
checkSession('get');
- if (WIRELESS)
- $context['sub_template'] = WIRELESS_PROTOCOL . '_pm';
- else
- {
- // Why is this in the Help template, you ask? Well, erm... it helps you. Does that work?
- loadTemplate('Help');
+ // Why is this in the Help template, you ask? Well, erm... it helps you. Does that work?
+ loadTemplate('Help');
- $context['template_layers'] = array();
- $context['sub_template'] = 'find_members';
- }
+ $context['template_layers'] = array();
+ $context['sub_template'] = 'find_members';
if (isset($_REQUEST['search']))
$context['last_search'] = $smcFunc['htmlspecialchars']($_REQUEST['search'], ENT_QUOTES);
@@ -483,7 +478,7 @@ function JSMembers()
$context['page_index'] = constructPageIndex($scripturl . '?action=findmember;search=' . $context['last_search'] . ';' . $context['session_var'] . '=' . $context['session_id'] . ';input=' . $context['input_box_name'] . ($context['quote_results'] ? ';quote=1' : '') . ($context['buddy_search'] ? ';buddies' : ''), $_REQUEST['start'], $total_results, 7);
- // Determine the navigation context (especially useful for the wireless template).
+ // Determine the navigation context.
$base_url = $scripturl . '?action=findmember;search=' . urlencode($context['last_search']) . (empty($_REQUEST['u']) ? '' : ';u=' . $_REQUEST['u']) . ';' . $context['session_var'] . '=' . $context['session_id'];
$context['links'] = array(
'first' => $_REQUEST['start'] >= 7 ? $base_url . ';start=0' : '',
View
2  Sources/Subs-Editor.php
@@ -2080,7 +2080,7 @@ function create_control_verification(&$verificationOptions, $do_test = false)
$thisVerification = &$context['controls']['verification'][$verificationOptions['id']];
// Add javascript for the object.
- if ($context['controls']['verification'][$verificationOptions['id']]['show_visual'] && !WIRELESS)
+ if ($context['controls']['verification'][$verificationOptions['id']]['show_visual'])
$context['insert_after_template'] .= '
<script>
var verification' . $verificationOptions['id'] . 'Handle = new smfCaptcha("' . $thisVerification['image_href'] . '", "' . $verificationOptions['id'] . '", ' . ($context['use_graphic_library'] ? 1 : 0) . ');
View
9 Sources/Subs-Menu.php
@@ -264,12 +264,9 @@ function createMenu($menuData, $menuOptions = array())
}
// Almost there - load the template and add to the template layers.
- if (!WIRELESS)
- {
- loadTemplate(isset($menuOptions['template_name']) ? $menuOptions['template_name'] : 'GenericMenu');
- $menu_context['layer_name'] = (isset($menuOptions['layer_name']) ? $menuOptions['layer_name'] : 'generic_menu') . '_dropdown';
- $context['template_layers'][] = $menu_context['layer_name'];
- }
+ loadTemplate(isset($menuOptions['template_name']) ? $menuOptions['template_name'] : 'GenericMenu');
+ $menu_context['layer_name'] = (isset($menuOptions['layer_name']) ? $menuOptions['layer_name'] : 'generic_menu') . '_dropdown';
+ $context['template_layers'][] = $menu_context['layer_name'];
// Check we had something - for sanity sake.
if (empty($include_data))
View
40 Sources/Subs.php
@@ -523,7 +523,6 @@ function updateSettings($changeArray, $update = false)
*
* - builds the page list, e.g. 1 ... 6 7 [8] 9 10 ... 15.
* - flexible_start causes it to use "url.page" instead of "url;start=page".
- * - handles any wireless settings (adding special things to URLs.)
* - very importantly, cleans up the start value passed, and forces it to
* be a multiple of num_per_page.
* - checks that start is not more than max_value.
@@ -563,10 +562,6 @@ function constructPageIndex($base_url, &$start, $max_value, $num_per_page, $flex
$context['current_page'] = $start / $num_per_page;
- // Wireless will need the protocol on the URL somewhere.
- if (WIRELESS)
- $base_url .= ';' . WIRELESS_PROTOCOL;
-
// Define some default page index settings if we don't already have it...
if (!isset($settings['page_index']))
{
@@ -996,10 +991,7 @@ function parse_bbc($message, $smileys = true, $cache_id = '', $parse_tags = arra
return $message;
}
- // Never show smileys for wireless clients. More bytes, can't see it anyway :P.
- if (WIRELESS)
- $smileys = false;
- elseif ($smileys !== null && ($smileys == '1' || $smileys == '0'))
+ if ($smileys !== null && ($smileys == '1' || $smileys == '0'))
$smileys = (bool) $smileys;
if (empty($modSettings['enableBBC']) && $message !== false)
@@ -2723,20 +2715,7 @@ function redirectexit($setLocation = '', $refresh = false, $permanent = false)
$add = preg_match('~^(ftp|http)[s]?://~', $setLocation) == 0 && substr($setLocation, 0, 6) != 'about:';
- if (WIRELESS)
- {
- // Add the scripturl on if needed.
- if ($add)
- $setLocation = $scripturl . '?' . $setLocation;
-
- $char = strpos($setLocation, '?') === false ? '?' : ';';
-
- if (strpos($setLocation, '#') !== false)
- $setLocation = strtr($setLocation, array('#' => $char . WIRELESS_PROTOCOL . '#'));
- else
- $setLocation .= $char . WIRELESS_PROTOCOL;
- }
- elseif ($add)
+ if ($add)
$setLocation = $scripturl . ($setLocation != '' ? '?' . $setLocation : '');
// Put the session ID in.
@@ -2842,10 +2821,6 @@ function obExit($header = null, $do_footer = null, $from_index = false, $from_fa
}
if ($do_footer)
{
- if (WIRELESS && !isset($context['sub_template']))
- fatal_lang_error('wireless_error_notyet', false);
-
- // Just show the footer, then.
loadSubTemplate(isset($context['sub_template']) ? $context['sub_template'] : 'main');
// Anything special to put out?
@@ -2872,10 +2847,10 @@ function obExit($header = null, $do_footer = null, $from_index = false, $from_fa
$_SESSION['USER_AGENT'] = empty($_SERVER['HTTP_USER_AGENT']) ? '' : $_SERVER['HTTP_USER_AGENT'];
// Hand off the output to the portal, etc. we're integrated with.
- call_integration_hook('integrate_exit', array($do_footer && !WIRELESS));
+ call_integration_hook('integrate_exit', array($do_footer));
// Don't exit if we're coming from index.php; that will pass through normally.
- if (!$from_index || WIRELESS)
+ if (!$from_index)
exit;
}
@@ -3194,14 +3169,13 @@ function template_header()
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
// Are we debugging the template/html content?
- if (!isset($_REQUEST['xml']) && isset($_GET['debug']) && !isBrowser('ie') && !WIRELESS)
+ if (!isset($_REQUEST['xml']) && isset($_GET['debug']) && !isBrowser('ie'))
header('Content-Type: application/xhtml+xml');
- elseif (!isset($_REQUEST['xml']) && !WIRELESS)
+ elseif (!isset($_REQUEST['xml']))
header('Content-Type: text/html; charset=' . (empty($context['character_set']) ? 'ISO-8859-1' : $context['character_set']));
}
- if (!WIRELESS || WIRELESS_PROTOCOL != 'wap')
- header('Content-Type: text/' . (isset($_REQUEST['xml']) ? 'xml' : 'html') . '; charset=' . (empty($context['character_set']) ? 'ISO-8859-1' : $context['character_set']));
+ header('Content-Type: text/' . (isset($_REQUEST['xml']) ? 'xml' : 'html') . '; charset=' . (empty($context['character_set']) ? 'ISO-8859-1' : $context['character_set']));
// We need to splice this in after the body layer, or after the main layer for older stuff.
if ($context['in_maintenance'] && $context['user']['is_admin'])
View
4 Sources/Topic.php
@@ -91,7 +91,7 @@ function LockTopic()
sendNotifications($topic, empty($locked) ? 'unlock' : 'lock');
// Back to the topic!
- redirectexit('topic=' . $topic . '.' . $_REQUEST['start'] . (WIRELESS ? ';moderate' : ''));
+ redirectexit('topic=' . $topic . '.' . $_REQUEST['start'] . ';moderate');
}
/**
@@ -151,7 +151,7 @@ function Sticky()
sendNotifications($topic, 'sticky');
// Take them back to the now stickied topic.
- redirectexit('topic=' . $topic . '.' . $_REQUEST['start'] . (WIRELESS ? ';moderate' : ''));
+ redirectexit('topic=' . $topic . '.' . $_REQUEST['start'] . ';moderate');
}
?>
View
8 Themes/default/GenericControls.template.php
@@ -279,13 +279,7 @@ function template_control_verification($verify_id, $display_type = 'all', $reset
<img src="', $verify_context['image_href'], ';letter=3" alt="', $txt['visual_verification_description'], '" id="verification_image_', $verify_id, '_3">
<img src="', $verify_context['image_href'], ';letter=4" alt="', $txt['visual_verification_description'], '" id="verification_image_', $verify_id, '_4">
<img src="', $verify_context['image_href'], ';letter=5" alt="', $txt['visual_verification_description'], '" id="verification_image_', $verify_id, '_5">
- <img src="', $verify_context['image_href'], ';letter=6" alt="', $txt['visual_verification_description'], '" id="verification_image_', $verify_id, '_6">';
-
- if (WIRELESS)
- echo '<br>
- <input type="text" name="', $verify_id, '_vv[code]" value="', !empty($verify_context['text_value']) ? $verify_context['text_value'] : '', '" size="30" tabindex="', $context['tabindex']++, '" class="input_text" required>';
- else
- echo '
+ <img src="', $verify_context['image_href'], ';letter=6" alt="', $txt['visual_verification_description'], '" id="verification_image_', $verify_id, '_6">
<div class="smalltext" style="margin: 4px 0 8px 0;">
<a href="', $verify_context['image_href'], ';sound" id="visual_verification_', $verify_id, '_sound" rel="nofollow">', $txt['visual_verification_sound'], '</a> / <a href="#visual_verification_', $verify_id, '_refresh" id="visual_verification_', $verify_id, '_refresh">', $txt['visual_verification_request_new'], '</a>', $display_type != 'quick_reply' ? '<br>' : '', '<br>
', $txt['visual_verification_description'], ':', $display_type != 'quick_reply' ? '<br>' : '', '
View
1,510 Themes/default/Wireless.template.php
@@ -1,1510 +0,0 @@
-<?php
-/**
- * Simple Machines Forum (SMF)
- *
- * @package SMF
- * @author Simple Machines http://www.simplemachines.org
- * @copyright 2015 Simple Machines and individual contributors
- * @license http://www.simplemachines.org/about/smf/license.php BSD
- *
- * @version 2.1 Beta 2
- */
-
-// Define page index info for wireless templates
-function template_wireless_init()
-{
- global $settings, $txt;
-
- // This defines the formatting for the page indexes used throughout the forumm.
- $settings['page_index'] = array(
- 'extra_before' => '<span class="pages">' . $txt['pages'] . ': </span>',
- 'previous_page' => '<span class="previous_page"></span>',
- 'current_page' => '<span class="current_page">[%1$d]</span> ',
- 'page' => '<a class="navPages" href="{URL}">%2$s</a> ',
- 'expand_pages' => '<span class="expand_pages" onclick="expandPages(this, {LINK}, {FIRST_PAGE}, {LAST_PAGE}, {PER_PAGE});"> ... </span>',
- 'next_page' => '<span class="next_page"></span>',
- 'extra_after' => '',
- );
-}
-
-// This is the header for WAP 1.1 output. You can view it with ?wap in the URL.
-function template_wap_above()
-{
- // Show the xml declaration...
- echo '<?xml version="1.0"?', '>
-<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
-<wml>
-<head>
-</head>';
-}
-
-// This is the board index (main page) in WAP 1.1.
-function template_wap_boardindex()
-{
- global $context, $scripturl;
-
- // This is the "main" card...
- echo '
- <card id="main" title="', $context['page_title'], '">
- <p><strong>', $context['forum_name_html_safe'], '</strong><br /></p>';
-
- // Show an anchor for each category.
- foreach ($context['categories'] as $category)
- {
- // Skip it if it's empty.
- if (!empty($category['boards']))
- echo '
- <p><a href="#c', $category['id'], '">', $category['name'], '</a><br /></p>';
- }
-
- // Okay, that's it for the main card.
- echo '
- </card>';
-
- // 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 '
- <card id="c', $category['id'], '" title="', strip_tags($category['name']), '">
- <p><strong>', strip_tags($category['name']), '</strong><br /></p>';
-
- // Now show a link for each board.
- foreach ($category['boards'] as $board)
- echo '
- <p><a href="', $scripturl, '?board=', $board['id'], '.0;wap">', $board['name'], '</a><br /></p>';
-
- echo '
- </card>';
- }
-}
-
-// This is the message index (list of topics in a board) for WAP 1.1.
-function template_wap_messageindex()
-{
- global $context, $scripturl, $txt;
-
- echo '
- <card id="main" title="', $context['page_title'], '">
- <p><strong>', $context['name'], '</strong></p>';
-
- if (isset($context['boards']) && count($context['boards']) > 0)
- {
- foreach ($context['boards'] as $board)
- echo '
- <p>- <a href="', $scripturl, '?board=', $board['id'], '.0;wap">', $board['name'], '</a><br /></p>';
- echo '
- <p><br /></p>';
- }
-
- if (!empty($context['topics']))
- {
- echo '
- <p>', $txt['pages'], ': ', !empty($context['links']['prev']) ? '<a href="' . $context['links']['first'] . ';wap">&lt;&lt;</a> <a href="' . $context['links']['prev'] . ';wap">&lt;</a> ' : '', '(', $context['page_info']['current_page'], '/', $context['page_info']['num_pages'], ')', !empty($context['links']['next']) ? ' <a href="' . $context['links']['next'] . ';wap">&gt;</a> <a href="' . $context['links']['last'] . ';wap">&gt;&gt;</a> ' : '', '<br /></p>';
-
- foreach ($context['topics'] as $topic)
- echo '
- <p><a href="', $scripturl, '?topic=', $topic['id'], '.0;wap">', $topic['first_post']['subject'], '</a>', (!$topic['approved'] ? '&nbsp;<em>(' . $txt['awaiting_approval'] . ')</em>' : ''), ' - ', $topic['first_post']['member']['name'], '<br /></p>';
-
- echo '
- <p>', $txt['pages'], ': ', !empty($context['links']['prev']) ? '<a href="' . $context['links']['first'] . ';wap">&lt;&lt;</a> <a href="' . $context['links']['prev'] . ';wap">&lt;</a> ' : '', '(', $context['page_info']['current_page'], '/', $context['page_info']['num_pages'], ')', !empty($context['links']['next']) ? ' <a href="' . $context['links']['next'] . ';wap">&gt;</a> <a href="' . $context['links']['last'] . ';wap">&gt;&gt;</a> ' : '', '</p>';
- }
-
- echo '
- </card>';
-}
-
-function template_wap_display()
-{
- global $context, $txt;
-
- echo '
- <card id="main" title="', $context['page_title'], '">
- <p><strong>' . $context['linktree'][1]['name'] . ' > ' . $context['linktree'][count($context['linktree']) - 2]['name'] . '</strong></p>
- <p><strong>', $context['subject'], '</strong></p>
- <p>', $txt['pages'], ': ', !empty($context['links']['prev']) ? '<a href="' . $context['links']['first'] . ';wap">&lt;&lt;</a> <a href="' . $context['links']['prev'] . ';wap">&lt;</a> ' : '', '(', $context['page_info']['current_page'], '/', $context['page_info']['num_pages'], ')', !empty($context['links']['next']) ? ' <a href="' . $context['links']['next'] . ';wap">&gt;</a> <a href="' . $context['links']['last'] . ';wap">&gt;&gt;</a> ' : '', '<br /><br /></p>';
-
- while ($message = $context['get_message']())
- {
- // This is a special modification to the post so it will work on phones:
- $message['body'] = preg_replace('~<div class="(?:quote|code)header">(.+?)</div>~', '<br />--- $1 ---', $message['body']);
- $message['body'] = strip_tags(str_replace(
- array(
- '<blockquote>',
- '</blockquote>',
- '<code>',
- '</code>',
- '<li>',
- $txt['code_select'],
- ),
- array(
- '<br>',
- '<br>--- ' . $txt['wireless_end_quote'] . ' ---<br>',
- '<br>',
- '<br>--- ' . $txt['wireless_end_code'] . ' ---<br>',
- '<br>* ',
- '',
- ), $message['body']), '<br>');
-
- echo '
- <p><u>', $message['member']['name'], '</u>:', (!$message['approved'] ? '&nbsp;<em>(' . $txt['awaiting_approval'] . ')</em>' : ''), '<br /></p>
- <p>', $message['body'], '<br /><br /></p>';
- }
-
- echo '
- <p>', $txt['pages'], ': ', !empty($context['links']['prev']) ? '<a href="' . $context['links']['first'] . ';wap">&lt;&lt;</a> <a href="' . $context['links']['prev'] . ';wap">&lt;</a> ' : '', '(', $context['page_info']['current_page'], '/', $context['page_info']['num_pages'], ')', !empty($context['links']['next']) ? ' <a href="' . $context['links']['next'] . ';wap">&gt;</a> <a href="' . $context['links']['last'] . ';wap">&gt;&gt;</a> ' : '', '</p>
- </card>';
-}
-
-function template_wap_login()
-{
- global $context, $modSettings, $scripturl, $txt;
-
- echo '
- <card id="login" title="', $context['page_title'], '">';
-
- if (isset($context['login_errors']))
- foreach ($context['login_errors'] as $error)
- echo '
- <p><strong>', $error, '</strong></p>';
-
- echo '
- <p>', $txt['username'], ':<br />
- <input type="text" name="user" class="input_text" /></p>
-
- <p>', $txt['password'], ':<br />
- <input type="password" name="passwrd" class="input_password" /></p>
- <p><do type="accept" label="', $txt['login'], '">
- <go method="post" href="', $scripturl, '?action=login2;wap">
- <postfield name="user" value="$user" />
- <postfield name="passwrd" value="$passwrd" />
- <postfield name="cookieneverexp" value="1" />
- </go>
- </do></p>
- </card>';
-}
-
-function template_wap_recent()
-{
- global $context, $scripturl, $txt;
-
- echo '
- <card id="recent" title="', $context['page_title'], '">
- <p><strong>', $_REQUEST['action'] == 'unread' ? $txt['wireless_recent_unread_posts'] : $txt['wireless_recent_unread_replies'], '</strong></p>';
-
- if (empty($context['topics']))
- echo '
- <p>', $txt['old_posts'], '</p>';
- else
- {
- echo '
- <p>', $txt['pages'], ': ', !empty($context['links']['prev']) ? '<a href="' . $context['links']['first'] . ';wap">&lt;&lt;</a> <a href="' . $context['links']['prev'] . ';wap">&lt;</a> ' : '', '(', $context['page_info']['current_page'], '/', $context['page_info']['num_pages'], ')', !empty($context['links']['next']) ? ' <a href="' . $context['links']['next'] . ';wap">&gt;</a> <a href="' . $context['links']['last'] . ';wap">&gt;&gt;</a> ' : '', '<br /><br /></p>';
- foreach ($context['topics'] as $topic)
- {
- echo '
- <p><a href="', $scripturl, '?topic=', $topic['id'], '.msg', $topic['new_from'], ';topicseen;imode#new">', $topic['first_post']['subject'], '</a></p>';
- }
- }
-
- echo '
- </card>';
-}
-
-function template_wap_error()
-{
- global $context, $txt, $scripturl;
-
- echo '
- <card id="main" title="', $context['page_title'], '">
- <p><strong>', $context['error_title'], '</strong></p>
- <p>', $context['error_message'], '</p>
- <p><a href="', $scripturl, '?wap">', $txt['wireless_error_home'], '</a></p>
- </card>';
-}
-
-function template_wap_below()
-{
- global $context, $txt;
-
- echo '
- <card id="switch" title="', $txt['wireless_go_to_full_version'], '">
- <p>
- <a href="', $context['linktree'][count($context['linktree']) - 1]['url'], (count($context['linktree']) > 1 ? ';' : '?'), 'nowap" rel="nofollow">', $txt['wireless_go_to_full_version'], '</a>
- </p>
- </card>
-</wml>';
-}
-
-// The cHTML protocol used for i-mode starts here.
-function template_imode_above()
-{
- global $context, $user_info;
-
- echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD Compact HTML 1.0 Draft//EN">
-<html', $context['right_to_left'] ? ' dir="rtl"' : '', '>
- <head>
- <meta charset="', $context['character_set'], '" />';
-
- // Present a canonical url for search engines to prevent duplicate content in their indices.
- if ($user_info['is_guest'] && !empty($context['canonical_url']))
- echo '
- <link rel="canonical" href="', $context['canonical_url'], '" />';
-
- echo '
- <title>', $context['page_title'], '</title>
- </head>
- <body>';
-}
-
-function template_imode_boardindex()
-{
- global $context, $scripturl, $txt;
-
- echo '
- <table border="0" cellspacing="0" cellpadding="0">
- <tr bgcolor="#6d92aa"><td><font color="#ffffff">', $context['forum_name_html_safe'], '</font></td></tr>';
- if (!$context['user']['is_guest'])
- echo '
- <tr><td><a href="', $scripturl, '?action=unread;imode">', $txt['wireless_recent_unread_posts'], '</a></td></tr>
- <tr><td><a href="', $scripturl, '?action=unreadreplies;imode">', $txt['wireless_recent_unread_replies'], '</a></td></tr>';
-
- $count = 0;
- foreach ($context['categories'] as $category)
- {
- if (!empty($category['boards']) || $category['is_collapsed'])
- echo '
- <tr bgcolor="#b6dbff"><td>', $category['can_collapse'] ? '<a href="' . $scripturl . '?action=collapse;c=' . $category['id'] . ';sa=' . ($category['is_collapsed'] ? 'expand;' : 'collapse;') . $context['session_var'] . '=' . $context['session_id'] . ';imode">' : '', $category['name'], $category['can_collapse'] ? '</a>' : '', '</td></tr>';
-
- foreach ($category['boards'] as $board)
- {
- $count++;
- echo '
- <tr><td>', $board['new'] ? '<font color="#ff0000">' : '', $count < 10 ? '&#' . (59105 + $count) . ';' : '<strong>-</strong>', $board['new'] ? '</font>' : ($board['children_new'] ? '<font color="#ff0000">.</font>' : ''), ' <a href="', $scripturl, '?board=', $board['id'], '.0;imode"', $count < 10 ? ' accesskey="' . $count . '"' : '', '>', $board['name'], '</a></td></tr>';
- }
- }
- echo '
- <tr bgcolor="#6d92aa"><td>', $txt['wireless_options'], '</td></tr>';
- if ($context['user']['is_guest'])
- echo '
- <tr><td><a href="', $scripturl, '?action=login;imode">', $txt['wireless_options_login'], '</a></td></tr>';
- else
- {
- if ($context['allow_pm'])
- echo '
- <tr><td><a href="', $scripturl, '?action=pm;imode">', empty($context['user']['unread_messages']) ? $txt['wireless_pm_inbox'] : sprintf($txt['wireless_pm_inbox_new'], $context['user']['unread_messages']), '</a></td></tr>';
- echo '
- <tr><td><a href="', $scripturl, '?action=logout;', $context['session_var'], '=', $context['session_id'], ';imode">', $txt['wireless_options_logout'], '</a></td></tr>';
- }
- echo '
- </table>';
-}
-
-function template_imode_messageindex()
-{
- global $context, $scripturl, $txt;
-
- echo '
- <table border="0" cellspacing="0" cellpadding="0">
- <tr bgcolor="#6d92aa"><td><font color="#ffffff">', $context['name'], '</font></td></tr>';
-
- if (!empty($context['boards']))
- {
- echo '
- <tr bgcolor="#b6dbff"><td>', $txt['sub_boards'], '</td></tr>';
- foreach ($context['boards'] as $board)
- echo '
- <tr><td>', $board['new'] ? '<font color="#ff0000">-</font> ' : ($board['children_new'] ? '-<font color="#ff0000">.</font>' : '- '), '<a href="', $scripturl, '?board=', $board['id'], '.0;imode">', $board['name'], '</a></td></tr>';
- }
-
- $count = 0;
- if (!empty($context['topics']))
- {
- echo '
- <tr bgcolor="#b6dbff"><td>', $txt['topics'], '</td></tr>
- <tr><td>', !empty($context['links']['prev']) ? '<a href="' . $context['links']['first'] . ';imode">&lt;&lt;</a> <a href="' . $context['links']['prev'] . ';imode">&lt;</a> ' : '', '(', $context['page_info']['current_page'], '/', $context['page_info']['num_pages'], ')', !empty($context['links']['next']) ? ' <a href="' . $context['links']['next'] . ';imode">&gt;</a> <a href="' . $context['links']['last'] . ';imode">&gt;&gt;</a> ' : '', '</td></tr>';
- foreach ($context['topics'] as $topic)
- {
- $count++;
- echo '
- <tr><td>', $count < 10 ? '&#' . (59105 + $count) . '; ' : '', '<a href="', $scripturl, '?topic=', $topic['id'], '.0;imode"', $count < 10 ? ' accesskey="' . $count . '"' : '', '>', $topic['first_post']['subject'], '</a>', (!$topic['approved'] ? '&nbsp;<em>(' . $txt['awaiting_approval'] . ')</em>' : ''), $topic['new'] && $context['user']['is_logged'] ? ' [<a href="' . $scripturl . '?topic=' . $topic['id'] . '.msg' . $topic['new_from'] . ';imode#new">' . $txt['new'] . '</a>]' : '', '</td></tr>';
- }
- }
- echo '
- <tr bgcolor="#b6dbff"><td>', $txt['wireless_navigation'], '</td></tr>
- <tr><td>&#59115; <a href="', $context['links']['up'], ($context['links']['up'] == $scripturl . '?' ? '' : ';'), 'imode" accesskey="0">', $txt['wireless_navigation_up'], '</a></td></tr>', !empty($context['links']['next']) ? '
- <tr><td>&#59104; <a href="' . $context['links']['next'] . ';imode" accesskey="#">' . $txt['wireless_navigation_next'] . '</a></td></tr>' : '', !empty($context['links']['prev']) ? '
- <tr><td><strong>[*]</strong> <a href="' . $context['links']['prev'] . ';imode" accesskey="*">' . $txt['wireless_navigation_prev'] . '</a></td></tr>' : '', $context['can_post_new'] ? '
- <tr><td><a href="' . $scripturl . '?action=post;board=' . $context['current_board'] . '.0;imode">' . $txt['start_new_topic'] . '</a></td></tr>' : '', '
- </table>';
-}
-
-function template_imode_display()
-{
- global $context, $scripturl, $txt;
-
- echo '
- <table border="0" cellspacing="0" cellpadding="0">
- <tr bgcolor="#b6dbff"><td>' . $context['linktree'][1]['name'] . ' > ' . $context['linktree'][count($context['linktree']) - 2]['name'] . '</td></tr>
- <tr bgcolor="#6d92aa"><td><font color="#ffffff">', $context['subject'], '</font></td></tr>
- <tr><td>', !empty($context['links']['prev']) ? '<a href="' . $context['links']['first'] . ';imode">&lt;&lt;</a> <a href="' . $context['links']['prev'] . ';imode">&lt;</a> ' : '', '(', $context['page_info']['current_page'], '/', $context['page_info']['num_pages'], ')', !empty($context['links']['next']) ? ' <a href="' . $context['links']['next'] . ';imode">&gt;</a> <a href="' . $context['links']['last'] . ';imode">&gt;&gt;</a> ' : '', '</td></tr>';
- while ($message = $context['get_message']())
- {
- // This is a special modification to the post so it will work on phones:
- $message['body'] = preg_replace('~<div class="(?:quote|code)header">(.+?)</div>~', '<br />--- $1 ---', $message['body']);
- $message['body'] = strip_tags(str_replace(
- array(
- '<blockquote>',
- '</blockquote>',
- '<code>',
- '</code>',
- '<li>',
- $txt['code_select'],
- ),
- array(
- '<br />',
- '<br />--- ' . $txt['wireless_end_quote'] . ' ---<br />',
- '<br />',
- '<br />--- ' . $txt['wireless_end_code'] . ' ---<br />',
- '<br />* ',
- '',
- ), $message['body']), '<br>');
-
- echo '
- <tr><td>', $message['first_new'] ? '
- <a id="new"></a>' : '',
- $context['wireless_moderate'] && $message['member']['id'] ? '<a href="' . $scripturl . '?action=profile;u=' . $message['member']['id'] . ';imode">' . $message['member']['name'] . '</a>' : '<strong>' . $message['member']['name'] . '</strong>', ':
- ', ((empty($context['wireless_more']) && $message['can_modify']) || !empty($context['wireless_moderate']) ? '[<a href="' . $scripturl . '?action=post;msg=' . $message['id'] . ';topic=' . $context['current_topic'] . '.' . $context['start'] . ';imode">' . $txt['wireless_display_edit'] . '</a>]' : ''), (!$message['approved'] ? '&nbsp;<em>(' . $txt['awaiting_approval'] . ')</em>' : ''), '<br />
- ', $message['body'], '
- </td></tr>';
- }
- echo '
- <tr bgcolor="#b6dbff"><td>', $txt['wireless_navigation'], '</td></tr>
- <tr><td>&#59115; <a href="', $context['links']['up'], ';imode" accesskey="0">', $txt['wireless_navigation_index'], '</a></td></tr>', $context['user']['is_logged'] ? '
- <tr><td>&#59115; <a href="' . $scripturl . '?action=markasread;sa=topic;t=' . $context['mark_unread_time']. ';topic=' . $context['current_topic'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'] . ';imode" accesskey="1">' . $txt['mark_unread'] . '</a></td></tr>' : '', !empty($context['links']['next']) ? '
- <tr><td><a href="' . $context['links']['next'] . ';imode' . $context['wireless_moderate'] . '" accesskey="#">' . $txt['wireless_navigation_next'] . '</a></td></tr>' : '', !empty($context['links']['prev']) ? '
- <tr><td><a href="' . $context['links']['prev'] . ';imode' . $context['wireless_moderate'] . '" accesskey="*">' . $txt['wireless_navigation_prev'] . '</a></td></tr>' : '', $context['can_reply'] ? '
- <tr><td><a href="' . $scripturl . '?action=post;topic=' . $context['current_topic'] . '.' . $context['start'] . ';imode">' . $txt['reply'] . '</a></td></tr>' : '';
-
- if (!empty($context['wireless_more']) && empty($context['wireless_moderate']))
- echo '
- <tr><td><a href="', $scripturl, '?topic=', $context['current_topic'], '.', $context['start'], ';moderate;imode">', $txt['wireless_display_moderate'], '</a></td></tr>';
- elseif (!empty($context['wireless_moderate']))
- {
- if ($context['can_sticky'])
- echo '
- <tr><td><a href="', $scripturl, '?action=sticky;topic=', $context['current_topic'], '.', $context['start'], ';', $context['session_var'], '=', $context['session_id'], ';imode">', $txt['wireless_display_' . ($context['is_sticky'] ? 'unsticky' : 'sticky')], '</a></td></tr>';
- if ($context['can_lock'])
- echo '
- <tr><td><a href="', $scripturl, '?action=lock;topic=', $context['current_topic'], '.', $context['start'], ';', $context['session_var'], '=', $context['session_id'], ';imode">', $txt['wireless_display_' . ($context['is_locked'] ? 'unlock' : 'lock')], '</a></td></tr>';
- }
-
- echo '
- </table>';
-}
-
-function template_imode_post()
-{
- global $context, $options, $scripturl, $txt, $modSettings;
-
- // @todo $modSettings['guest_post_no_email']
- echo '
- <form action="', $scripturl, '?action=', $context['destination'], ';board=', $context['current_board'], '.0;imode" method="post">
- <table border="0" cellspacing="0" cellpadding="0">';
-
- if (!$context['becomes_approved'])
- echo '
- <tr><td>' . $txt['wait_for_approval'] . '<input type="hidden" name="not_approved" value="1" /></td></tr>';
-
- if ($context['locked'])
- echo '
- <tr><td>' . $txt['topic_locked_no_reply'] . '</td></tr>';
-
- if (isset($context['name']) && isset($context['email']))
- {
- echo '
- <tr><td>', isset($context['post_error']['long_name']) || isset($context['post_error']['no_name']) ? '<font color="#cc0000">' . $txt['username'] . '</font>' : $txt['username'], ':</td></tr>
- <tr><td><input type="text" name="guestname" value="', $context['name'], '" class="input_text" /></td></tr>';
-
- if (empty($modSettings['guest_post_no_email']))
- echo '
- <tr><td>', isset($context['post_error']['no_email']) || isset($context['post_error']['bad_email']) ? '<font color="#cc0000">' . $txt['email'] . '</font>' : $txt['email'], ':</td></tr>
- <tr><td><input type="text" name="email" value="', $context['email'], '" class="input_text" /></td></tr>';
- }
-
- // @todo Needs a more specific imode template.
- if ($context['require_verification'])
- echo '
- <tr><td>', !empty($context['post_error']['need_qr_verification']) ? '<font color="#cc0000">' . $txt['verification'] . '</font>' : $txt['verification'], ':</td></tr>
- <tr><td>', template_control_verification($context['visual_verification_id'], 'all'), '</td></tr>';
-
- echo '
- <tr><td>', isset($context['post_error']['no_subject']) ? '<font color="#FF0000">' . $txt['subject'] . '</font>' : $txt['subject'], ':</td></tr>
- <tr><td><input type="text" name="subject"', $context['subject'] == '' ? '' : ' value="' . $context['subject'] . '"', ' maxlength="80" class="input_text" /></td></tr>
- <tr><td>', isset($context['post_error']['no_message']) || isset($context['post_error']['long_message']) ? '<font color="#ff0000">' . $txt['message'] . '</font>' : $txt['message'], ':</td></tr>
- <tr><td><textarea name="message" id="message" rows="5" cols="20">', $context['message'], '</textarea></td></tr>
- <tr><td>
- <input type="submit" name="post" value="', $context['submit_label'], '" class="button_submit" />
- <input type="hidden" name="icon" value="wireless" />
- <input type="hidden" name="goback" value="', $context['back_to_topic'] || !empty($options['return_to_post']) ? '1' : '0', '" />
- <input type="hidden" name="seqnum" value="', $context['form_sequence_number'], '" />
- <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />', isset($context['current_topic']) ? '
- <input type="hidden" name="topic" value="' . $context['current_topic'] . '" />' : '', '
- <input type="hidden" name="notify" value="', $context['notify'] || !empty($options['auto_notify']) ? '1' : '0', '" />
- </td></tr>
- <tr><td>
- &#59115; ', !empty($context['current_topic']) ? '<a href="' . $scripturl . '?topic=' . $context['current_topic'] . '.new;imode">' . $txt['wireless_navigation_topic'] . '</a>' : '<a href="' . $scripturl . '?board=' . $context['current_board'] . '.0;imode" accesskey="0">' . $txt['wireless_navigation_index'] . '</a>', '
- </td></tr>
- </table>
- </form>';
-}
-
-function template_imode_login()
-{
- global $context, $scripturl, $txt, $modSettings;
-
- echo '
- <form action="', $scripturl, '?action=login2;imode" method="post">
- <table border="0" cellspacing="0" cellpadding="0">
- <tr bgcolor="#b6dbff"><td>', $txt['login'], '</td></tr>';
- if (isset($context['login_errors']))
- foreach ($context['login_errors'] as $error)
- echo '
- <tr><td><strong><font color="#ff00000">', $error, '</strong></td></tr>';
- echo '
- <tr><td>', $txt['username'], ':</td></tr>
- <tr><td><input type="text" name="user" size="10" class="input_text" /></td></tr>
- <tr><td>', $txt['password'], ':</td></tr>
- <tr><td><input type="password" name="passwrd" size="10" class="input_password" /></td></tr>
- <tr><td><input type="submit" value="', $txt['login'], '" class="button_submit" /><input type="hidden" name="cookieneverexp" value="1" /></td></tr>
- <tr bgcolor="#b6dbff"><td>', $txt['wireless_navigation'], '</td></tr>
- <tr><td>[0] <a href="', $scripturl, '?imode" accesskey="0">', $txt['wireless_navigation_up'], '</a></td></tr>
- </table>
- </form>';
-}
-
-function template_imode_pm()
-{
- global $context, $scripturl, $txt, $user_info;
-
- if ($_REQUEST['action'] == 'findmember')
- {
- echo '
- <form action="', $scripturl, '?action=findmember;', $context['session_var'], '=', $context['session_id'], ';imode" method="post">
- <table border="0" cellspacing="0" cellpadding="0">
- <tr bgcolor="#6d92aa"><td><font color="#ffffff">', $txt['wireless_pm_search_member'], '</font></td></tr>
- <tr bgcolor="#b6dbff"><td>', $txt['find_members'], '</td></tr>
- <tr><td>
- <strong>', $txt['wireless_pm_search_name'], ':</strong>
- <input type="text" name="search" value="', isset($context['last_search']) ? $context['last_search'] : '', '" class="input_text" />', empty($_REQUEST['u']) ? '' : '
- <input type="hidden" name="u" value="' . $_REQUEST['u'] . '" />', '
- </td></tr>
- <tr><td><input type="submit" value="', $txt['search'], '" class="button_submit" /></td></tr>';
- if (!empty($context['last_search']))
- {
- echo '
- <tr bgcolor="#b6dbff"><td>', $txt['find_results'], '</td></tr>';
- if (empty($context['results']))
- echo '
- <tr bgcolor="#b6dbff"><td>[-] ', $txt['find_no_results'], '</tr></td>';
- else
- {
- echo '
- <tr bgcolor="#b6dbff"><td>', empty($context['links']['prev']) ? '' : '<a href="' . $context['links']['first'] . ';imode">&lt;&lt;</a> <a href="' . $context['links']['prev'] . ';imode">&lt;</a> ', '(', $context['page_info']['current_page'], '/', $context['page_info']['num_pages'], ')', empty($context['links']['next']) ? '' : ' <a href="' . $context['links']['next'] . ';imode">&gt;</a> <a href="' . $context['links']['last'] . ';imode">&gt;&gt;</a> ', '</tr></td>';
- $count = 0;
- foreach ($context['results'] as $result)
- {
- $count++;
- echo '
- <tr bgcolor="#b6dbff"><td>
- ', $count < 10 ? '&#' . (59105 + $count) . '; ' : '', '<a href="', $scripturl, '?action=pm;sa=send;u=', empty($_REQUEST['u']) ? $result['id'] : $_REQUEST['u'] . ',' . $result['id'], ';imode"', $count < 10 ? ' accesskey="' . $count . '"' : '', '>', $result['name'], '</a>
- </tr></td>';
- }
- }
- }
- echo '
- <tr bgcolor="#b6dbff"><td>', $txt['wireless_navigation'], '</tr></td>
- <tr><td>[0] <a href="', $context['links']['up'], ';imode" accesskey="0">', $txt['wireless_navigation_up'], '</a></tr></td>';
- if (!empty($context['results']))
- echo empty($context['links']['next']) ? '' : '
- <tr><td>[#] <a href="' . $context['links']['next'] . ';imode" accesskey="#">' . $txt['wireless_navigation_next'] . '</a></tr></td>', empty($context['links']['prev']) ? '' : '
- <tr><td>[*] <a href="' . $context['links']['prev'] . ';imode" accesskey="*">' . $txt['wireless_navigation_prev'] . '</a></tr></td>';
- echo '
- </table>
- </form>';
- }
- elseif (!empty($_GET['sa']))
- {
- echo '
- <table border="0" cellspacing="0" cellpadding="0">';
- if ($_GET['sa'] == 'addbuddy')
- {
- echo '
- <tr bgcolor="#6d92aa"><td><font color="#ffffff">', $txt['wireless_pm_add_buddy'], '</font></td></tr>
- <tr bgcolor="#b6dbff"><td>', $txt['wireless_pm_select_buddy'], '</td></tr>';
- $count = 0;
- foreach ($context['buddies'] as $buddy)
- {
- $count++;
- if ($buddy['selected'])
- echo '
- <tr><td>[-] <span style="color: gray">', $buddy['name'], '</span></tr></td>';
- else
- echo '
- <tr><td>
- ', $count < 10 ? '&#' . (59105 + $count) . '; ' : '', '<a href="', $buddy['add_href'], ';imode"', $count < 10 ? ' accesskey="' . $count . '"' : '', '>', $buddy['name'], '</a>
- </tr></td>';
- }
- echo '
- <tr bgcolor="#b6dbff"><td>', $txt['wireless_navigation'], '</tr></td>
- <tr><td>[0] <a href="', $context['pm_href'], ';imode" accesskey="0">', $txt['wireless_navigation_up'], '</a></tr></td>
- </table>';
- }
- if ($_GET['sa'] == 'send' || $_GET['sa'] == 'send2')
- {
- echo '
- <form action="', $scripturl, '?action=pm;sa=send2;imode" method="post">
- <table border="0" cellspacing="0" cellpadding="0">
- <tr bgcolor="#6d92aa"><td><font color="#ffffff">', $txt['new_message'], '</tr></td>', empty($context['post_error']['messages']) ? '' : '
- <tr><td><font color="#ff0000">' . implode('<br />', $context['post_error']['messages']) . '</font></tr></td>', '
- <tr><td>
- <strong>', $txt['pm_to'], ':</strong> ';
- 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) ? '' : '<input type="hidden" name="u" value="' . $ids . '" />', '<br />
- <a href="', $scripturl, '?action=findmember', empty($ids) ? '' : ';u=' . $ids, ';', $context['session_var'], '=', $context['session_id'], ';imode">', $txt['wireless_pm_search_member'], '</a>', empty($user_info['buddies']) ? '' : '<br />
- <a href="' . $scripturl . '?action=pm;sa=addbuddy' . (empty($ids) ? '' : ';u=' . $ids) . ';imode">' . $txt['wireless_pm_add_buddy'] . '</a>', '
- </tr></td>
- <tr><td>
- <strong>', $txt['subject'], ':</strong> <input type="text" name="subject" value="', $context['subject'], '" class="input_text" />
- </tr></td>
- <tr><td>
- <strong>', $txt['message'], ':</strong><br />
- <textarea name="message" id="message" rows="5" cols="20">', $context['message'], '</textarea>
- </tr></td>
- <tr><td>
- <input type="submit" value="', $txt['send_message'], '" class="button_submit" />
- <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
- <input type="hidden" name="seqnum" value="', $context['form_sequence_number'], '" />
- <input type="hidden" name="replied_to" value="', !empty($context['quoted_message']['id']) ? $context['quoted_message']['id'] : 0, '" />
- <input type="hidden" name="pm_head" value="', !empty($context['quoted_message']['pm_head']) ? $context['quoted_message']['pm_head'] : 0, '" />
- <input type="hidden" name="f" value="', isset($context['folder']) ? $context['folder'] : '', '" />
- <input type="hidden" name="l" value="', isset($context['current_label_id']) ? $context['current_label_id'] : -1, '" />
- </tr></td>';
- if ($context['reply'])
- echo '
- <tr bgcolor="#b6dbff"><td>', $txt['wireless_pm_reply_to'], '</tr></td>
- <tr><td><strong>', $context['quoted_message']['subject'], '</strong></tr></td>
- <tr><td>', $context['quoted_message']['body'], '</tr></td>';
- echo '
- <tr bgcolor="#b6dbff"><td>', $txt['wireless_navigation'], '</tr></td>
- <tr><td>[0] <a href="', $scripturl, '?action=pm;imode" accesskey="0">', $txt['wireless_navigation_up'], '</a></tr></td>
- </table>
- </form>';
- }
- }
- elseif (empty($_GET['pmsg']))
- {
- echo '
- <table border="0" cellspacing="0" cellpadding="0">
- <tr bgcolor="#6d92aa"><td><font color="#ffffff">', $context['current_label_id'] == -1 ? $txt['wireless_pm_inbox'] : $txt['pm_current_label'] . ': ' . $context['current_label'], '</td></tr>
- <tr><td>', empty($context['links']['prev']) ? '' : '<a href="' . $context['links']['first'] . ';imode">&lt;&lt;</a> <a href="' . $context['links']['prev'] . ';imode">&lt;</a> ', '(', $context['page_info']['current_page'], '/', $context['page_info']['num_pages'], ')', empty($context['links']['next']) ? '' : ' <a href="' . $context['links']['next'] . ';imode">&gt;</a> <a href="' . $context['links']['last'] . ';imode">&gt;&gt;</a> ', '</tr></td>';
- $count = 0;
- while ($message = $context['get_pmessage']())
- {
- $count++;
- echo '
- <tr><td>
- ', $count < 10 ? '&#' . (59105 + $count) . '; ' : '', '<a href="', $scripturl, '?action=pm;start=', $context['start'], ';pmsg=', $message['id'], ';l=', $context['current_label_id'], ';imode"', $count < 10 ? ' accesskey="' . $count . '"' : '', '>', $message['subject'], ' <em>', $txt['wireless_pm_by'], '</em> ', $message['member']['name'], '</a>', $message['is_unread'] ? ' [' . $txt['new'] . ']' : '', '
- </td></tr>';
- }
-
- if ($context['currently_using_labels'])
- {
- $labels = array();
- ksort($context['labels']);
- foreach ($context['labels'] as $label)
- $labels[] = '<a href="' . $scripturl . '?action=pm;l=' . $label['id'] . ';imode">' . $label['name'] . '</a>' . (!empty($label['unread_messages']) ? ' (' . $label['unread_messages'] . ')' : '');
- echo '
- <tr bgcolor="#6d92aa"><td><font color="#ffffff">', $txt['pm_labels'], '</font></td></tr>
- <tr><td>
- ', implode(', ', $labels), '
- </td></tr>';
- }
- echo '
- <tr bgcolor="#b6dbff"><td>', $txt['wireless_navigation'], '</tr></td>
- <tr><td>[0] <a href="', $scripturl, '?imode" accesskey="0">', $txt['wireless_navigation_up'], '</a></tr></td>', empty($context['links']['next']) ? '' : '
- <tr><td>[#] <a href="' . $context['links']['next'] . ';imode" accesskey="#">' . $txt['wireless_navigation_next'] . '</a></tr></td>', empty($context['links']['prev']) ? '' : '
- <tr><td>[*] <a href="' . $context['links']['prev'] . ';imode" accesskey="*">' . $txt['wireless_navigation_prev'] . '</a></tr></td>', $context['can_send_pm'] ? '
- <tr><td><a href="' . $scripturl . '?action=pm;sa=send;imode">' . $txt['new_message'] . '</a></tr></td>' : '', '
- </table>';
- }
- else
- {
- $message = $context['get_pmessage']();
- $message['body'] = preg_replace('~<div class="(?:quote|code)header">(.+?)</div>~', '<br />--- $1 ---', $message['body']);
- $message['body'] = strip_tags(str_replace(
- array(
- '<blockquote>',
- '</blockquote>',
- '<code>',
- '</code>',
- '<li>',
- $txt['code_select'],
- ),
- array(
- '<br />',
- '<br />--- ' . $txt['wireless_end_quote'] . ' ---<br />',
- '<br />',
- '<br />--- ' . $txt['wireless_end_code'] . ' ---<br />',
- '<br />* ',
- '',
- ), $message['body']), '<br>');
-
- echo '
- <table border="0" cellspacing="0" cellpadding="0">
- <tr bgcolor="#6d92aa"><td><font color="#ffffff">', $message['subject'], '</td></tr>
- <tr bgcolor="#b6dbff"><td>
- <strong>', $txt['wireless_pm_by'], ':</strong> ', $message['member']['name'], '<br />
- <strong>', $txt['on'], ':</strong> ', $message['time'], '
- </td></tr>
- <tr><td>
- ', $message['body'], '
- </td></tr>
- <tr bgcolor="#b6dbff"><td>', $txt['wireless_navigation'], '</tr></td>
- <tr><td>[0] <a href="', $scripturl, '?action=pm;start=', $context['start'], ';l=', $context['current_label_id'], ';imode" accesskey="0">', $txt['wireless_navigation_up'], '</a></tr></td>';
- if ($context['can_send_pm'])
- echo '
- <tr><td><a href="', $scripturl, '?action=pm;sa=send;pmsg=', $message['id'], ';u=', $message['member']['id'], ';reply;imode">', $txt['wireless_pm_reply'], '</a></tr></td>';
-
- if ($context['can_send_pm'] && $message['number_recipients'] > 1)
- echo '
- <tr><td><a href="', $scripturl, '?action=pm;sa=send;pmsg=', $message['id'], ';u=all;reply;imode">', $txt['wireless_pm_reply_all'], '</a></tr></td>';
-
- echo '
- </table>';
- }
-}
-
-function template_imode_recent()
-{
- global $context, $scripturl, $txt;
-
- echo '
- <table border="0" cellspacing="0" cellpadding="0">
- <tr bgcolor="#6d92aa"><td><font color="#ffffff">', $_REQUEST['action'] == 'unread' ? $txt['wireless_recent_unread_posts'] : $txt['wireless_recent_unread_replies'], '</tr></td>';
-
- $count = 0;
- if (empty($context['topics']))
- echo '
- <tr><td>', $txt['old_posts'], '</td></tr>';
- else
- {
- echo '
- <tr><td>', !empty($context['links']['prev']) ? '<a href="' . $context['links']['first'] . ';imode">&lt;&lt;</a> <a href="' . $context['links']['prev'] . ';imode">&lt;</a> ' : '', '(', $context['page_info']['current_page'], '/', $context['page_info']['num_pages'], ')', !empty($context['links']['next']) ? ' <a href="' . $context['links']['next'] . ';imode">&gt;</a> <a href="' . $context['links']['last'] . ';imode">&gt;&gt;</a> ' : '', '</td></tr>';
- foreach ($context['topics'] as $topic)
- {
- $count++;
- echo '
- <tr><td>', $count < 10 ? '&#' . (59105 + $count) . '; ' : '', '<a href="', $scripturl, '?topic=', $topic['id'], '.msg', $topic['new_from'], ';topicseen;imode#new"', $count < 10 ? ' accesskey="' . $count . '"' : '', '>', $topic['first_post']['subject'], '</a></td></tr>';
- }
- }
- echo '
- <tr bgcolor="#b6dbff"><td>', $txt['wireless_navigation'], '</td></tr>
- <tr><td>[0] <a href="', $context['links']['up'], '?imode" accesskey="0">', $txt['wireless_navigation_up'], '</a></td></tr>', !empty($context['links']['next']) ? '
- <tr><td>[#] <a href="' . $context['links']['next'] . ';imode" accesskey="#">' . $txt['wireless_navigation_next'] . '</a></td></tr>' : '', !empty($context['links']['prev']) ? '
- <tr><td>[*] <a href="' . $context['links']['prev'] . ';imode" accesskey="*">' . $txt['wireless_navigation_prev'] . '</a></td></tr>' : '', '
- </table>';
-}
-
-function template_imode_error()
-{
- global $context, $txt, $scripturl;
-
- echo '
- <table border="0" cellspacing="0" cellpadding="0">
- <tr bgcolor="#6d92aa"><td><font color="#ffffff">', $context['error_title'], '</font></td></tr>
- <tr><td>', $context['error_message'], '</td></tr>
- <tr class="windowbg"><td>[0] <a href="', $scripturl, '?imode" accesskey="0">', $txt['wireless_error_home'], '</a></td></tr>
- </table>';
-}
-
-function template_imode_profile()
-{
- global $context, $scripturl, $txt;
-
- echo '
- <table border="0" cellspacing="0" cellpadding="0">
- <tr bgcolor="#6d92aa"><td><font color="#ffffff">', $txt['summary'], ' - ', $context['member']['name'], '</font></td></tr>
- <tr><td>
- <strong>', $txt['name'], ':</strong> ', $context['member']['name'], '
- </td></tr>
- <tr><td>
- <strong>', $txt['position'], ': </strong>', (!empty($context['member']['group']) ? $context['member']['group'] : $context['member']['post_group']), '
- </td></tr>
- <tr><td>
- <strong>', $txt['lastLoggedIn'], ':</strong> ', $context['member']['last_login'], '
- </td></tr>';
-
- if (!empty($context['member']['bans']))
- {
- echo '
- <tr><td>
- <font color="red"><strong>', $txt['user_banned_by_following'], ':</strong></font>';
-
- foreach ($context['member']['bans'] as $ban)
- echo '
- <br />', $ban['explanation'], '';
-
- echo '
- </td></tr>';
- }
-
- echo '
-
- <tr bgcolor="#b6dbff"><td>', $txt['additional_info'], '</td></tr>';
-
- if (!$context['user']['is_owner'] && $context['can_send_pm'])
- echo '
- <tr><td><a href="', $scripturl, '?action=pm;sa=send;u=', $context['id_member'], ';imode">', $txt['wireless_profile_pm'], '.</a></td></tr>';
-
- if (!$context['user']['is_owner'] && !empty($context['can_edit_ban']))
- echo '
- <tr><td><a href="', $scripturl, '?action=admin;area=ban;sa=add;u=', $context['id_member'], ';imode">', $txt['profileBanUser'], '.</a></td></tr>';
-
- echo '
- <tr><td><a href="', $scripturl, '?imode">', $txt['wireless_error_home'], '.</a></td></tr>';
-
- echo '
- </table>';
-}
-
-function template_imode_ban_edit()
-{
- global $context, $scripturl, $board, $txt, $modSettings;
-
- echo '
- <form action="', $scripturl, '?action=admin;area=ban;sa=add;imode" method="post">
- <table border="0" cellspacing="0" cellpadding="0">
- <tr bgcolor="#6d92aa"><td><font color="#ffffff">', $context['ban']['is_new'] ? $txt['ban_add_new'] : $txt['ban_edit'] . ' \'' . $context['ban']['name'] . '\'', '</font></td></tr>
- <tr><td>
- <strong>', $txt['ban_name'], ': </strong>
- <input type="text" name="ban_name" value="', $context['ban']['name'], '" size="20" class="input_text" />
- </td></tr>
- <tr><td>
- <strong>', $txt['ban_expiration'], ': </strong><br />
- <input type="radio" name="expiration" value="never" ', $context['ban']['expiration']['status'] == 'never' ? ' checked="checked"' : '', ' class="input_radio" /> ', $txt['never'], '<br />
- <input type="radio" name="expiration" value="one_day" ', $context['ban']['expiration']['status'] == 'one_day' ? ' checked="checked"' : '', ' class="input_radio" /> ', $txt['ban_will_expire_within'], ' <input type="text" name="expire_date" size="3" value="', $context['ban']['expiration']['days'], '" /> ', $txt['ban_days'], '<br />
- <input type="radio" name="expiration" value="expired" ', $context['ban']['expiration']['status'] == 'expired' ? ' checked="checked"' : '', ' class="input_radio" /> ', $txt['ban_expired'], '<br />
- </td></tr>
- <tr><td>
- <strong>', $txt['ban_reason'], ': </strong>
- <input type="text" name="reason" value="', $context['ban']['reason'], '" size="20" class="input_text" />
- </td></tr>
- <tr><td>
- <strong>', $txt['ban_notes'], ': </strong><br />
- <textarea name="notes" cols="20" rows="3">', $context['ban']['notes'], '</textarea>
- </td></tr>
- <tr><td>
- <strong>', $txt['ban_restriction'], ': </strong><br />
- <input type="checkbox" name="full_ban" value="1"', $context['ban']['cannot']['access'] ? ' checked="checked"' : '', ' class="input_check" /> ', $txt['ban_full_ban'], '<br />
- <input type="checkbox" name="cannot_post" value="1"', $context['ban']['cannot']['post'] ? ' checked="checked"' : '', ' class="input_check" /> ', $txt['ban_cannot_post'], '<br />
- <input type="checkbox" name="cannot_register" value="1"', $context['ban']['cannot']['register'] ? ' checked="checked"' : '', ' class="input_check" /> ', $txt['ban_cannot_register'], '<br />
- <input type="checkbox" name="cannot_login" value="1"', $context['ban']['cannot']['login'] ? ' checked="checked"' : '', ' class="input_check" /> ', $txt['ban_cannot_login'], '
- </td></tr>';
-
- if (!empty($context['ban_suggestions']))
- {
- echo '
- <tr bgcolor="#b6dbff"><td>', $txt['ban_triggers'], '</td></tr>
- <tr><td>
- <input type="checkbox" name="ban_suggestions[]" value="main_ip" class="input_check" /> <strong>', $txt['wireless_ban_ip'], ':</strong><br />
- &nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="main_ip" value="', $context['ban_suggestions']['main_ip'], '" size="20" class="input_text" />
- </td></tr>';
-
- if (empty($modSettings['disableHostnameLookup']))
- echo '
- <tr><td>
- <input type="checkbox" name="ban_suggestions[]" value="hostname" class="input_check" /> <strong>', $txt['wireless_ban_hostname'], ':</strong><br />
- &nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="hostname" value="', $context['ban_suggestions']['hostname'], '" size="20" class="input_text" />
- </td></tr>';
-
- echo '
- <tr><td>
- <input type="checkbox" name="ban_suggestions[]" value="email" class="input_check" /> <strong>', $txt['wireless_ban_email'], ':</strong><br />
- &nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="email" value="', $context['ban_suggestions']['email'], '" size="20" class="input_text" />
- </td></tr>
- <tr><td>
- <input type="checkbox" name="ban_suggestions[]" value="user" class="input_check" /> <strong>', $txt['ban_on_username'], ':</strong><br />';
-
- if (empty($context['ban_suggestions']['member']['id']))
- echo '
- &nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="user" value="" size="20" class="input_text" />';
- else
- echo '
- &nbsp;&nbsp;&nbsp;&nbsp;', $context['ban_suggestions']['member']['name'], '
- <input type="hidden" name="bannedUser" value="', $context['ban_suggestions']['member']['id'], '" />';
-
- echo '
- </td></tr>';
- }
-
- echo '
- <tr><td><input type="submit" name="', $context['ban']['is_new'] ? 'add_ban' : 'modify_ban', '" value="', $context['ban']['is_new'] ? $txt['ban_add'] : $txt['ban_modify'], '" class="button_submit" /></td></tr>
- <tr bgcolor="#b6dbff"><td>', $txt['wireless_additional_info'], '</td></tr>
- <tr><td><a href="', $scripturl, '?imode">', $txt['wireless_error_home'], '.</a></td></tr>';
-
- echo '
- </table>
- <input type="hidden" name="old_expire" value="', $context['ban']['expiration']['days'], '" />
- <input type="hidden" name="bg" value="', $context['ban']['id'], '" />
- <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
- </form>';
-}
-
-function template_imode_below()
-{
- global $context, $txt;
-
- echo '
- <br /><a href="', $context['linktree'][count($context['linktree']) - 1]['url'], (count($context['linktree']) > 1 ? ';' : '?'), 'nowap" rel="nofollow">', $txt['wireless_go_to_full_version'], '</a>
- </body>
-</html>';
-}
-
-// XHTMLMP (XHTML Mobile Profile) templates used for WAP 2.0 start here
-function template_wap2_above()
-{
- global $context, $settings, $user_info, $modSettings;
-
- echo '<?xml version="1.0" encoding="', $context['character_set'], '"?', '>
-<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"', $context['right_to_left'] ? ' dir="rtl"' : '', '>
- <head>
- <title>', $context['page_title'], '</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 '
- <link rel="canonical" href="', $context['canonical_url'], '" />';
-
- echo '
- <link rel="stylesheet" href="', $settings['default_theme_url'], '/css/wireless.css" type="text/css', $modSettings['browser_cache'] ,'" />
- </head>
- <body>';
-}
-
-function template_wap2_boardindex()
-{
- global $context, $scripturl, $txt;
-
- echo '
- <p class="catbg">', $context['forum_name_html_safe'], '</p>';
- if (!$context['user']['is_guest'])
- echo '
- <p class="windowbg"><a href="', $scripturl, '?action=unread;wap2">', $txt['wireless_recent_unread_posts'], '</a></p>
- <p class="windowbg"><a href="', $scripturl, '?action=unreadreplies;wap2">', $txt['wireless_recent_unread_replies'], '</a></p>';
-
- $count = 0;
- foreach ($context['categories'] as $category)
- {
- if (!empty($category['boards']) || $category['is_collapsed'])
- echo '
- <p class="titlebg">', $category['can_collapse'] ? '<a href="' . $scripturl . '?action=collapse;c=' . $category['id'] . ';sa=' . ($category['is_collapsed'] ? 'expand;' : 'collapse;') . $context['session_var'] . '=' . $context['session_id'] . ';wap2">' : '', $category['name'], $category['can_collapse'] ? '</a>' : '', '</p>';
-
- foreach ($category['boards'] as $board)
- {
- $count++;
- echo '
- <p class="windowbg">', $board['new'] ? '<span class="updated">' : '', $count < 10 ? '[' . $count . '' : '[-', $board['children_new'] && !$board['new'] ? '<span class="updated">' : '', '] ', $board['new'] || $board['children_new'] ? '</span>' : '', '<a href="', $scripturl, '?board=', $board['id'], '.0;wap2"', $count < 10 ? ' accesskey="' . $count . '"' : '', '>', $board['name'], '</a></p>';
- }
- }
-
- echo '
- <p class="titlebg">', $txt['wireless_options'], '</p>';
- if ($context['user']['is_guest'])
- echo '
- <p class="windowbg"><a href="', $scripturl, '?action=login;wap2">', $txt['wireless_options_login'], '</a></p>';
- else
- {
- if ($context['allow_pm'])
- echo '
- <p class="windowbg"><a href="', $scripturl, '?action=pm;wap2">', empty($context['user']['unread_messages']) ? $txt['wireless_pm_inbox'] : sprintf($txt['wireless_pm_inbox_new'], $context['user']['unread_messages']), '</a></p>';
- echo '
- <p class="windowbg"><a href="', $scripturl, '?action=logout;', $context['session_var'], '=', $context['session_id'], ';wap2">', $txt['wireless_options_logout'], '</a></p>';
- }
-}
-
-function template_wap2_messageindex()
-{
- global $context, $scripturl, $txt;
-
- echo '
- <p class="catbg">', $context['name'], '</p>';
-
- if (!empty($context['boards']))
- {
- echo '
- <p class="titlebg">', $txt['sub_boards'], '</p>';
- foreach ($context['boards'] as $board)
- echo '
- <p class="windowbg">', $board['new'] ? '<span class="updated">[-] </span>' : ($board['children_new'] ? '[-<span class="updated">] </span>' : '[-] '), '<a href="', $scripturl, '?board=', $board['id'], '.0;wap2">', $board['name'], '</a></p>';
- }
-
- $count = 0;
- if (!empty($context['topics']))
- {
- echo '
- <p class="titlebg">', $txt['topics'], '</p>
- <p class="windowbg">', !empty($context['links']['prev']) ? '<a href="' . $context['links']['first'] . ';wap2">&lt;&lt;</a> <a href="' . $context['links']['prev'] . ';wap2">&lt;</a> ' : '', '(', $context['page_info']['current_page'], '/', $context['page_info']['num_pages'], ')', !empty($context['links']['next']) ? ' <a href="' . $context['links']['next'] . ';wap2">&gt;</a> <a href="' . $context['links']['last'] . ';wap2">&gt;&gt;</a> ' : '', '</p>';
- foreach ($context['topics'] as $topic)
- {
- $count++;
- echo '
- <p class="windowbg">', $count < 10 ? '[' . $count . '] ' : '', '<a href="', $scripturl, '?topic=', $topic['id'], '.0;wap2"', $count < 10 ? ' accesskey="' . $count . '"' : '', '>', $topic['first_post']['subject'], '</a>', (!$topic['approved'] ? '&nbsp;<em>(' . $txt['awaiting_approval'] . ')</em>' : ''), $topic['new'] && $context['user']['is_logged'] ? ' [<a href="' . $scripturl . '?topic=' . $topic['id'] . '.msg' . $topic['new_from'] . ';wap2#new" class="new">' . $txt['new'] . '</a>]' : '', '</p>';
- }
- }
-
- echo '
- <p class="titlebg">', $txt['wireless_navigation'], '</p>
- <p class="windowbg">[0] <a href="', $context['links']['up'], ($context['links']['up'] == $scripturl . '?' ? '' : ';'), 'wap2" accesskey="0">', $txt['wireless_navigation_up'], '</a></p>', !empty($context['links']['next']) ? '
- <p class="windowbg">[#] <a href="' . $context['links']['next'] . ';wap2" accesskey="#">' . $txt['wireless_navigation_next'] . '</a></p>' : '', !empty($context['links']['prev']) ? '
- <p class="windowbg">[*] <a href="' . $context['links']['prev'] . ';wap2" accesskey="*">' . $txt['wireless_navigation_prev'] . '</a></p>' : '', $context['can_post_new'] ? '
- <p class="windowbg"><a href="' . $scripturl . '?action=post;board=' . $context['current_board'] . '.0;wap2">' . $txt['start_new_topic'] . '</a></p>' : '';
-}
-
-function template_wap2_display()
-{
- global $context, $scripturl, $txt;
-
- echo '
- <p class="titlebg">' . $context['linktree'][1]['name'] . ' > ' . $context['linktree'][count($context['linktree']) - 2]['name'] . '</p>
- <p class="catbg">', $context['subject'], '</p>
- <p class="windowbg">', !empty($context['links']['prev']) ? '<a href="' . $context['links']['first'] . ';wap2">&lt;&lt;</a> <a href="' . $context['links']['prev'] . ';wap2">&lt;</a> ' : '', '(', $context['page_info']['current_page'], '/', $context['page_info']['num_pages'], ')', !empty($context['links']['next']) ? ' <a href="' . $context['links']['next'] . ';wap2">&gt;</a> <a href="' . $context['links']['last'] . ';wap2">&gt;&gt;</a> ' : '', '</p>';
-
- while ($message = $context['get_message']())
- {
- // This is a special modification to the post so it will work on phones:
- $message['body'] = preg_replace('~<div class="(?:quote|code)header">(.+?)</div>~', '<br />--- $1 ---', $message['body']);
- $message['body'] = strip_tags(str_replace(
- array(
- '<blockquote>',
- '</blockquote>',
- '<code>',
- '</code>',
- '<li>',
- $txt['code_select'],
- ),
- array(
- '<br />',
- '<br />--- ' . $txt['wireless_end_quote'] . ' ---<br />',
- '<br />',
- '<br />--- ' . $txt['wireless_end_code'] . ' ---<br />',
- '<br />* ',
- '',
- ), $message['body']), '<br>');
-
- echo $message['first_new'] ? '
- <a id="new"></a>' : '', '
- <p class="windowbg">
- ', $context['wireless_moderate'] && $message['member']['id'] ? '<a href="' . $scripturl . '?action=profile;u=' . $message['member']['id'] . ';wap2">' . $message['member']['name'] . '</a>' : '<strong>' . $message['member']['name'] . '</strong>', ':
- ', ((empty($context['wireless_more']) && $message['can_modify']) || !empty($context['wireless_moderate']) ? '[<a href="' . $scripturl . '?action=post;msg=' . $message['id'] . ';topic=' . $context['current_topic'] . '.' . $context['start'] . ';wap2">' . $txt['wireless_display_edit'] . '</a>]' : ''), (!$message['approved'] ? '&nbsp;<em>(' . $txt['awaiting_approval'] . ')</em>' : ''), '<br />
- ', $message['body'], '
- </p>';
- }
- echo '
- <p class="titlebg">', $txt['wireless_navigation'], '</p>
- <p class="windowbg">[0] <a href="', $context['links']['up'], ';wap2" accesskey="0">', $txt['wireless_navigation_index'], '</a></p>', $context['user']['is_logged'] ? '
- <p class="windowbg">[1] <a href="' . $scripturl . '?action=markasread;sa=topic;t=' . $context['mark_unread_time']. ';topic=' . $context['current_topic'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'] . ';wap2" accesskey="1">' . $txt['mark_unread'] . '</a></p>' : '', !empty($context['links']['next']) ? '
- <p class="windowbg">[#] <a href="' . $context['links']['next'] . ';wap2' . $context['wireless_moderate'] . '" accesskey="#">' . $txt['wireless_navigation_next'] . '</a></p>' : '', !empty($context['links']['prev']) ? '
- <p class="windowbg">[*] <a href="' . $context['links']['prev'] . ';wap2' . $context['wireless_moderate'] . '" accesskey="*">' . $txt['wireless_navigation_prev'] . '</a></p>' : '', $context['can_reply'] ? '
- <p class="windowbg"><a href="' . $scripturl . '?action=post;topic=' . $context['current_topic'] . '.' . $context['start'] . ';wap2">' . $txt['reply'] . '</a></p>' : '';
-
- if (!empty($context['wireless_more']) && empty($context['wireless_moderate']))
- echo '
- <p class="windowbg"><a href="', $scripturl, '?topic=', $context['current_topic'], '.', $context['start'], ';moderate;wap2">', $txt['wireless_display_moderate'], '</a></p>';
- elseif (!empty($context['wireless_moderate']))
- {
- if ($context['can_sticky'])
- echo '
- <p class="windowbg"><a href="', $scripturl, '?action=sticky;topic=', $context['current_topic'], '.', $context['start'], ';', $context['session_var'], '=', $context['session_id'], ';wap2">', $txt['wireless_display_' . ($context['is_sticky'] ? 'unsticky' : 'sticky')], '</a></p>';
- if ($context['can_lock'])
- echo '
- <p class="windowbg"><a href="', $scripturl, '?action=lock;topic=', $context['current_topic'], '.', $context['start'], ';', $context['session_var'], '=', $context['session_id'], ';wap2">', $txt['wireless_display_' . ($context['is_locked'] ? 'unlock' : 'lock')], '</a></p>';
- }
-}
-
-function template_wap2_login()
-{
- global $context, $modSettings, $scripturl, $txt;
-
- echo '
- <form action="', $scripturl, '?action=login2;wap2" method="post">
- <p class="catbg">', $txt['login'], '</p>';
-
- if (isset($context['login_errors']))
- foreach ($context['login_errors'] as $error)
- echo '
- <p class="windowbg" style="color: #ff0000;"><strong>', $error, '</strong></p>';
-
- echo '
- <p class="windowbg">', $txt['username'], ':</p>
- <p class="windowbg"><input type="text" name="user" size="10" class="input_text" /></p>
- <p class="windowbg">', $txt['password'], ':</p>
- <p class="windowbg"><input type="password" name="passwrd" size="10" class="input_password" /></p>
- <p class="windowbg"><input type="submit" value="', $txt['login'], '" class="button_submit" /><input type="hidden" name="cookieneverexp" value="1" /></p>
- <p class="catbg">', $txt['wireless_navigation'], '</p>
- <p class="windowbg">[0] <a href="', $scripturl, '?wap2" accesskey="0">', $txt['wireless_navigation_up'], '</a></p>
- </form>';
-}
-
-function template_wap2_post()
-{
- global $context, $options, $scripturl, $txt, $modSettings;
-
- echo '
- <form action="', $scripturl, '?action=', $context['destination'], ';board=', $context['current_board'], '.0;wap2" method="post">
- <p class="titlebg">', $context['page_title'], '</p>';
-
- if (!$context['becomes_approved'])
- echo '
- <p class="windowbg">
- ' . $txt['wait_for_approval'] . '
- <input type="hidden" name="not_approved" value="1" />
- </p>';
-
- if ($context['locked'])
- echo '
- <p class="windowbg">
- ' . $txt['topic_locked_no_reply'] . '
- </p>';
-
- if (isset($context['name']) && isset($context['email']))
- {
- echo '
- <p class="windowbg"' . (isset($context['post_error']['long_name']) || isset($context['post_error']['no_name']) ? ' style="color: #ff0000"' : '') . '>
- ' . $txt['username'] . ': <input type="text" name="guestname" value="' . $context['name'] . '" class="input_text" />
- </p>';
-
- if (empty($modSettings['guest_post_no_email']))
- echo '
- <p class="windowbg"' . (isset($context['post_error']['no_email']) || isset($context['post_error']['bad_email']) ? ' style="color: #ff0000"' : '') . '>
- ' . $txt['email'] . ': <input type="text" name="email" value="' . $context['email'] . '" class="input_text" />
- </p>';
- }
-
- if ($context['require_verification'])
- echo '
- <p class="windowbg"', !empty($context['post_error']['need_qr_verification']) ? ' style="color: #ff0000"' : '', '>
- ' . $txt['verification'] . ': ', template_control_verification($context['visual_verification_id'], 'all'), '
- </p>';
-
- echo '
- <p class="windowbg"', isset($context['post_error']['no_subject']) ? ' style="color: #ff0000"' : '', '>
- ', $txt['subject'], ': <input type="text" name="subject"', $context['subject'] == '' ? '' : ' value="' . $context['subject'] . '"', ' maxlength="80" class="input_text" />
- </p>
- <p class="windowbg"', isset($context['post_error']['no_message']) || isset($context['post_error']['long_message']) ? ' style="color: #ff0000;"' : '', '>
- ', $txt['message'], ': <br />
- <textarea name="message" id="message" rows="5" cols="20">', $context['message'], '</textarea>
- </p>
- <p class="windowbg">
- <input type="submit" name="post" value="', $context['submit_label'], '" class="button_submit" />
- <input type="hidden" name="icon" value="wireless" />
- <input type="hidden" name="goback" value="', $context['back_to_topic'] || !empty($options['return_to_post']) ? '1' : '0', '" />
- <input type="hidden" name="seqnum" value="', $context['form_sequence_number'], '" />
- <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />', isset($context['current_topic']) ? '
- <input type="hidden" name="topic" value="' . $context['current_topic'] . '" />' : '', '
- <input type="hidden" name="notify" value="', $context['notify'] || !empty($options['auto_notify']) ? '1' : '0', '" />
- </p>
- <p class="windowbg">[0] ', !empty($context['current_topic']) ? '<a href="' . $scripturl . '?topic=' . $context['current_topic'] . '.new;wap2">' . $txt['wireless_navigation_topic'] . '</a>' : '<a href="' . $scripturl . '?board=' . $context['current_board'] . '.0;wap2" accesskey="0">' . $txt['wireless_navigation_index'] . '</a>', '</p>
- </form>';
-}
-
-function template_wap2_pm()
-{
- global $context, $scripturl, $txt, $user_info;
-
- if ($_REQUEST['action'] == 'findmember')
- {
- echo '
- <form action="', $scripturl, '?action=findmember;', $context['session_var'], '=', $context['session_id'], ';wap2" method="post">
- <p class="catbg">', $txt['wireless_pm_search_member'], '</p>
- <p class="titlebg">', $txt['find_members'], '</p>
- <p class="windowbg">
- <strong>', $txt['wireless_pm_search_name'], ':</strong>
- <input type="text" name="search" value="', isset($context['last_search']) ? $context['last_search'] : '', '" class="input_text" />', empty($_REQUEST['u']) ? '' : '
- <input type="hidden" name="u" value="' . $_REQUEST['u'] . '" />', '
- </p>
- <p class="windowbg"><input type="submit" value="', $txt['search'], '" class="button_submit" /></p>
- </form>';
- if (!empty($context['last_search']))
- {
- echo '
- <p class="titlebg">', $txt['find_results'], '</p>';
- if (empty($context['results']))
- echo '
- <p class="windowbg">[-] ', $txt['find_no_results'], '</p>';
- else
- {
- echo '
- <p class="windowbg">', empty($context['links']['prev']) ? '' : '<a href="' . $context['links']['first'] . ';wap2">&lt;&lt;</a> <a href="' . $context['links']['prev'] . ';wap2">&lt;</a> ', '(', $context['page_info']['current_page'], '/', $context['page_info']['num_pages'], ')', empty($context['links']['next']) ? '' : ' <a href="' . $context['links']['next'] . ';wap2">&gt;</a> <a href="' . $context['links']['last'] . ';wap2">&gt;&gt;</a> ', '</p>';
- $count = 0;
- foreach ($context['results'] as $result)
- {
- $count++;
- echo '
- <p class="windowbg">
- [', $count < 10 ? $count : '-', '] <a href="', $scripturl, '?action=pm;sa=send;u=', empty($_REQUEST['u']) ? $result['id'] : $_REQUEST['u'] . ',' . $result['id'], ';wap2"', $count < 10 ? ' accesskey="' . $count . '"' : '', '>', $result['name'], '</a>
- </p>';
- }
- }
- }
- echo '
- <p class="titlebg">', $txt['wireless_navigation'], '</p>
- <p class="windowbg">[0] <a href="', $context['links']['up'], ';wap2" accesskey="0">', $txt['wireless_navigation_up'], '</a></p>';
- if (!empty($context['results']))
- echo empty($context['links']['next']) ? '' : '
- <p class="windowbg">[#] <a href="' . $context['links']['next'] . ';wap2" accesskey="#">' . $txt['wireless_navigation_next'] . '</a></p>', empty($context['links']['prev']) ? '' : '
- <p class="windowbg">[*] <a href="' . $context['links']['prev'] . ';wap2" accesskey="*">' . $txt['wireless_navigation_prev'] . '</a></p>';
- }
- elseif (!empty($_GET['sa']))
- {
- if ($_GET['sa'] == 'addbuddy')
- {
- echo '
- <p class="catbg">', $txt['wireless_pm_add_buddy'], '</p>
- <p class="titlebg">', $txt['wireless_pm_select_buddy'], '</p>';
- $count = 0;
- foreach ($context['buddies'] as $buddy)
- {
- $count++;
- if ($buddy['selected'])
- echo '
- <p class="windowbg">[-] <span style="color: gray">', $buddy['name'], '</span></p>';
- else
- echo '
- <p class="windowbg">
- [', $count < 10 ? $count : '-', '] <a href="', $buddy['add_href'], ';wap2"', $count < 10 ? ' accesskey="' . $count . '"' : '', '>', $buddy['name'], '</a>
- </p>';
- }
- echo '
- <p class="titlebg">', $txt['wireless_navigation'], '</p>
- <p class="windowbg">[0] <a href="', $context['pm_href'], ';wap2" accesskey="0">', $txt['wireless_navigation_up'], '</a></p>';
- }
- if ($_GET['sa'] == 'send' || $_GET['sa'] == 'send2')
- {
- echo '
- <form action="', $scripturl, '?action=pm;sa=send2;wap2" method="post">
- <p class="catbg">', $txt['new_message'], '</p>', empty($context['post_error']['messages']) ? '' : '
- <p class="windowbg error">' . implode('<br />', $context['post_error']['messages']) . '</p>', '
- <p class="windowbg">
- <strong>', $txt['pm_to'], ':</strong> ';
- 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) ? '' : '<input type="hidden" name="u" value="' . $ids . '" />', '<br />
- <a href="', $scripturl, '?action=findmember', empty($ids) ? '' : ';u=' . $ids, ';', $context['session_var'], '=', $context['session_id'], ';wap2">', $txt['wireless_pm_search_member'], '</a>', empty($user_info['buddies']) ? '' : '<br />
- <a href="' . $scripturl . '?action=pm;sa=addbuddy' . (empty($ids) ? '' : ';u=' . $ids) . ';wap2">' . $txt['wireless_pm_add_buddy'] . '</a>', '
- </p>
- <p class="windowbg">
- <strong>', $txt['subject'], ':</strong> <input type="text" name="subject" value="', $context['subject'], '" />
- </p>
- <p class="windowbg">
- <strong>', $txt['message'], ':</strong><br />
- <textarea name="message" id="message" rows="5" cols="20">', $context['message'], '</textarea>
- </p>
- <p class="windowbg">
- <input type="submit" value="', $txt['send_message'], '" class="button_submit" />
- <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
- <input type="hidden" name="seqnum" value="', $context['form_sequence_number'], '" />
- <input type="hidden" name="replied_to" value="', !empty($context['quoted_message']['id']) ? $context['quoted_message']['id'] : 0, '" />
- <input type="hidden" name="pm_head" value="', !empty($context['quoted_message']['pm_head']) ? $context['quoted_message']['pm_head'] : 0, '" />
- <input type="hidden" name="f" value="', isset($context['folder']) ? $context['folder'] : '', '" />
- <input type="hidden" name="l" value="', isset($context['current_label_id']) ? $context['current_label_id'] : -1, '" />
- </p>';
- if ($context['reply'])
- echo '
- <p class="titlebg">', $txt['wireless_pm_reply_to'], '</p>
- <p class="windowbg"><strong>', $context['quoted_message']['subject'], '</strong></p>
- <p class="windowbg">', $context['quoted_message']['body'], '</p>';
- echo '
- <p class="titlebg">', $txt['wireless_navigation'], '</p>
- <p class="windowbg">[0] <a href="', $scripturl, '?action=pm;wap2" accesskey="0">', $txt['wireless_navigation_up'], '</a></p>
- </form>';
- }
- }
- elseif (empty($_GET['pmsg']))
- {
- echo '
- <p class="catbg">', $context['current_label_id'] == -1 ? $txt['wireless_pm_inbox'] : $txt['pm_current_label'] . ': ' . $context['current_label'], '</p>
- <p class="windowbg">', empty($context['links']['prev']) ? '' : '<a href="' . $context['links']['first'] . ';wap2">&lt;&lt;</a> <a href="' . $context['links']['prev'] . ';wap2">&lt;</a> ', '(', $context['page_info']['current_page'], '/', $context['page_info']['num_pages'], ')', empty($context['links']['next']) ? '' : ' <a href="' . $context['links']['next'] . ';wap2">&gt;</a> <a href="' . $context['links']['last'] . ';wap2">&gt;&gt;</a> ', '</p>';
- $count = 0;
- while ($message = $context['get_pmessage']())
- {
- $count++;
- echo '
- <p class="windowbg">
- [', $count < 10 ? $count : '-', '] <a href="', $scripturl, '?action=pm;start=', $context['start'], ';pmsg=', $message['id'], ';l=', $context['current_label_id'], ';wap2"', $count < 10 ? ' accesskey="' . $count . '"' : '', '>', $message['subject'], ' <em>', $txt['wireless_pm_by'], '</em> ', $message['member']['name'], '</a>', $message['is_unread'] ? ' [' . $txt['new'] . ']' : '', '
- </p>';
- }
-
- if ($context['currently_using_labels'])
- {
- $labels = array();
- ksort($context['labels']);
- foreach ($context['labels'] as $label)
- $labels[] = '<a href="' . $scripturl . '?action=pm;l=' . $label['id'] . ';wap2">' . $label['name'] . '</a>' . (!empty($label['unread_messages']) ? ' (' . $label['unread_messages'] . ')' : '');
- echo '
- <p class="catbg">
- ', $txt['pm_labels'], '
- </p>
- <p class="windowbg">
- ', implode(', ', $labels), '
- </p>';
- }
-
- echo '
- <p class="titlebg">', $txt['wireless_navigation'], '</p>
- <p class="windowbg">[0] <a href="', $scripturl, '?wap2" accesskey="0">', $txt['wireless_navigation_up'], '</a></p>', empty($context['links']['next']) ? '' : '
- <p class="windowbg">[#] <a href="' . $context['links']['next'] . ';wap2" accesskey="#">' . $txt['wireless_navigation_next'] . '</a></p>', empty($context['links']['prev']) ? '' : '
- <p class="windowbg">[*] <a href="' . $context['links']['prev'] . ';wap2" accesskey="*">' . $txt['wireless_navigation_prev'] . '</a></p>', $context['can_send_pm'] ? '
- <p class="windowbg"><a href="' . $scripturl . '?action=pm;sa=send;wap2">' . $txt['new_message'] . '</a></p>' : '';
- }
- else
- {
- $message = $context['get_pmessage']();
- $message['body'] = preg_replace('~<div class="(?:quote|code)header">(.+?)</div>~', '<br />--- $1 ---', $message['body']);
- $message['body'] = strip_tags(str_replace(
- array(
- '<blockquote>',
- '</blockquote>',
- '<code>',
- '</code>',
- '<li>',
- $txt['code_select'],
- ),
- array(
- '<br />',
- '<br />--- ' . $txt['wireless_end_quote'] . ' ---<br />',
- '<br />',
- '<br />--- ' . $txt['wireless_end_code'] . ' ---<br />',
- '<br />* ',
- '',
- ), $message['body']), '<br>');
-
- echo '
- <p class="catbg">', $message['subject'], '</p>
- <p class="titlebg">
- <strong>', $txt['wireless_pm_by'], ':</strong> ', $message['member']['name'], '<br />
- <strong>', $txt['on'], ':</strong> ', $message['time'], '
- </p>
- <p class="windowbg">
- ', $message['body'], '
- </p>
- <p class="titlebg">', $txt['wireless_navigation'], '</p>
- <p class="windowbg">[0] <a href="', $scripturl, '?action=pm;start=', $context['start'], ';l=', $context['current_label_id'], ';wap2" accesskey="0">', $txt['wireless_navigation_up'], '</a></p>';
- if ($context['can_send_pm'])
- echo '
- <p class="windowbg"><a href="', $scripturl, '?action=pm;sa=send;pmsg=', $message['id'], ';u=', $message['member']['id'], ';reply;wap2">', $txt['wireless_pm_reply'], '</a></p>';
-
- if ($context['can_send_pm'] && $message['number_recipients'] > 1)
- echo '
- <p class="windowbg"><a href="', $scripturl, '?action=pm;sa=send;pmsg=', $message['id'], ';u=all;reply;wap2">', $txt['wireless_pm_reply_all'], '</a></p>';
-
- }
-}
-
-function template_wap2_recent()
-{
- global $context, $scripturl, $txt;
-
- echo '
- <p class="catbg">', $_REQUEST['action'] == 'unread' ? $txt['wireless_recent_unread_posts'] : $txt['wireless_recent_unread_replies'], '</p>';
-
- $count = 0;
- if (empty($context['topics']))
- echo '
- <p class="windowbg">', $txt['old_posts'], '</p>';
- else
- {
- echo '
- <p class="windowbg">', !empty($context['links']['prev']) ? '<a href="' . $context['links']['first'] . ';wap2">&lt;&lt;</a> <a href="' . $context['links']['prev'] . ';wap2">&lt;</a> ' : '', '(', $context['page_info']['current_page'], '/', $context['page_info']['num_pages'], ')', !empty($context['links']['next']) ? ' <a href="' . $context['links']['next'] . ';wap2">&gt;</a> <a href="' . $context['links']['last'] . ';wap2">&gt;&gt;</a> ' : '', '</p>';
- foreach ($context['topics'] as $topic)
- {
- $count++;
- echo '
- <p class="windowbg">', ($count < 10 ? '[' . $count . '] ' : ''), '<a href="', $scripturl, '?topic=', $topic['id'], '.msg', $topic['new_from'], ';topicseen;wap2#new"', ($count < 10 ? ' accesskey="' . $count . '"' : ''), '>', $topic['first_post']['subject'], '</a></p>';
- }
- }
- echo '
- <p class="titlebg">', $txt['wireless_navigation'], '</p>
- <p class="windowbg">[0] <a href="', $context['links']['up'], '?wap2" accesskey="0">', $txt['wireless_navigation_up'], '</a></p>', !empty($context['links']['next']) ? '
- <p class="windowbg">[#] <a href="' . $context['links']['next'] . ';wap2" accesskey="#">' . $txt['wireless_navigation_next'] . '</a></p>' : '', !empty($context['links']['prev']) ? '
- <p class="windowbg">[*] <a href="' . $context['links']['prev'] . ';wap2" accesskey="*">' . $txt['wireless_navigation_prev'] . '</a></p>' : '';
-}
-
-function template_wap2_error()
-{
- global $context, $txt, $scripturl;
-
- echo '
- <p class="catbg">', $context['error_title'], '</p>
- <p class="windowbg">', $context['error_message'], '</p>
- <p class="windowbg">[0] <a href="', $scripturl, '?wap2" accesskey="0">', $txt['wireless_error_home'], '</a></p>';
-}
-
-function template_wap2_profile()
-{
- global $context, $scripturl, $txt;
-
- echo '
- <p class="catbg">', $txt['summary'], ' - ', $context['member']['name'], '</p>
- <p class="windowbg"><strong>', $txt['name'], ':</strong> ', $context['member']['name'], '</p>
- <p class="windowbg"><strong>', $txt['position'], ': </strong>', (!empty($context['member']['group']) ? $context['member']['group'] : $context['member']['post_group']), '</p>
- <p class="windowbg"><strong>', $txt['lastLoggedIn'], ':</strong> ', $context['member']['last_login'], '</p>';
-
- if (!empty($context['member']['bans']))
- {
- echo '
- <p class="titlebg"><strong>', $txt['user_banned_by_following'], ':</strong></p>';
-
- foreach ($context['member']['bans'] as $ban)
- echo '
- <p class="windowbg">', $ban['explanation'], '</p>';
-
- }
-
- echo '
-
- <p class="titlebg">', $txt['additional_info'], '</p>';
-
- if (!$context['user']['is_owner'] && $context['can_send_pm'])
- echo '
- <p class="windowbg"><a href="', $scripturl, '?action=pm;sa=send;u=', $context['id_member'], ';wap2">', $txt['wireless_profile_pm'], '.</a></p>';
-
- if (!$context['user']['is_owner'] && !empty($context['can_edit_ban']))
- echo '
- <p class="windowbg"><a href="', $scripturl, '?action=admin;area=ban;sa=add;u=', $context['id_member'], ';wap2">', $txt['profileBanUser'], '.</a></p>';
-
- echo '
- <p class="windowbg"><a href="', $scripturl, '?wap2">', $txt['wireless_error_home'], '.</a></p>';
-
-}
-
-function template_wap2_ban_edit()
-{
- global $context, $scripturl, $txt, $modSettings;
-
- echo '
- <form action="', $scripturl, '?action=admin;area=ban;sa=add;wap2" method="post">
- <p class="catbg">', $context['ban']['is_new'] ? $txt['ban_add_new'] : $txt['ban_edit'] . ' \'' . $context['ban']['name'] . '\'', '</p>
- <p class="windowbg">
- <strong>', $txt['ban_name'], ': </strong>
- <input type="text" name="ban_name" value="', $context['ban']['name'], '" size="20" class="input_text" />
- </p>
- <p class="windowbg">
- <strong>', $txt['ban_expiration'], ': </strong><br />
- <input type="radio" name="expiration" value="never" ', $context['ban']['expiration']['status'] == 'never' ? ' checked="checked"' : '', ' class="input_radio" /> ', $txt['never'], '<br />
- <input type="radio" name="expiration" value="one_day" ', $context['ban']['expiration']['status'] == 'one_day' ? ' checked="checked"' : '', ' class="input_radio" /> ', $txt['ban_will_expire_within'], ' <input type="text" name="expire_date" size="3" value="', $context['ban']['expiration']['days'], '" /> ', $txt['ban_days'], '<br />
- <input type="radio" name="expiration" value="expired" ', $context['ban']['expiration']['status'] == 'expired' ? ' checked="checked"' : '', ' class="input_radio" /> ', $txt['ban_expired'], '<br />
- </p>
- <p class="windowbg">
- <strong>', $txt['ban_reason'], ': </strong>
- <input type="text" name="reason" value="', $context['ban']['reason'], '" size="20" class="input_text" />
- </p>
- <p class="windowbg">
- <strong>', $txt['ban_notes'], ': </strong><br />
- <textarea name="notes" cols="20" rows="3">', $context['ban']['notes'], '</textarea>
- </p>
- <p class="windowbg">
- <strong>', $txt['ban_restriction'], ': </strong><br />
- <input type="checkbox" name="full_ban" value="1"', $context['ban']['cannot']['access'] ? ' checked="checked"' : '', ' class="input_check" /> ', $txt['ban_full_ban'], '<br />
- <input type="checkbox" name="cannot_post" value="1"', $context['ban']['cannot']['post'] ? ' checked="checked"' : '', ' class="input_check" /> ', $txt['ban_cannot_post'], '<br />
- <input type="checkbox" name="cannot_register" value="1"', $context['ban']['cannot']['register'] ? ' checked="checked"' : '', ' class="input_check" /> ', $txt['ban_cannot_register'], '<br />
- <input type="checkbox" name="cannot_login" value="1"', $context['ban']['cannot']['login'] ? ' checked="checked"' : '', ' class="input_check" /> ', $txt['ban_cannot_login'], '
- </p>';
-
- if (!empty($context['ban_suggestions']))
- {
- echo '
- <p class="titlebg">', $txt['ban_triggers'], '</p>
- <p class="windowbg">
- <input type="checkbox" name="ban_suggestions[]" value="main_ip" class="input_check" /> <strong>', $txt['wireless_ban_ip'], ':</strong><br />
- &nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="main_ip" value="', $context['ban_suggestions']['main_ip'], '" size="20" class="input_text" />
- </p>';
-
- if (empty($modSettings['disableHostnameLookup']))
- echo '
- <p class="windowbg">
- <input type="checkbox" name="ban_suggestions[]" value="hostname" class="input_check" /> <strong>', $txt['wireless_ban_hostname'], ':</strong><br />
- &nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="hostname" value="', $context['ban_suggestions']['hostname'], '" size="20" class="input_text" />
- <p>';
-
- echo '
- <p class="windowbg">
- <input type="checkbox" name="ban_suggestions[]" value="email" class="input_check" /> <strong>', $txt['wireless_ban_email'], ':</strong><br />
- &nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="email" value="', $context['ban_suggestions']['email'], '" size="20" class="input_text" />
- </p>
- <p class="windowbg">
- <input type="checkbox" name="ban_suggestions[]" value="user" class="input_check" /> <strong>', $txt['ban_on_username'], ':</strong><br />';
-
- if (empty($context['ban_suggestions']['member']['id']))
- echo '
- &nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="user" value="" size="20" class="input_text" />';
- else
- echo '
- &nbsp;&nbsp;&nbsp;&nbsp;', $context['ban_suggestions']['member']['name'], '
- <input type="hidden" name="bannedUser" value="', $context['ban_suggestions']['member']['id'], '" />';
-
- echo '
- </p>';
- }
-
- echo '
-
- <p class="windowbg"><input type="submit" name="', $context['ban']['is_new'] ? 'add_ban' : 'modify_ban', '" value="', $context['ban']['is_new'] ? $txt['ban_add'] : $txt['ban_modify'], '" class="button_submit" /></p>
- <p class="titlebg">', $txt['wireless_additional_info'], '</p>
- <p class="windowbg"><a href="', $scripturl, '?wap2">', $txt['wireless_error_home'], '.</a></p>';
-
- echo '
- <input type="hidden" name="old_expire" value="', $context['ban']['expiration']['days'], '" />
- <input type="hidden" name="bg" value="', $context['ban']['id'], '" />
- <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
- </form>';
-}
-
-function template_wap2_below()
-{
- global $context, $txt;
-
- echo '
- <a href="', $context['linktree'][count($context['linktree']) - 1]['url'], (count($context['linktree']) > 1 ? ';' : '?'), 'nowap" rel="nofollow">', $txt['wireless_go_to_full_version'], '</a>
- </body>
-</html>';
-}
-
-?>
View
1  Themes/default/languages/Errors.english.php
@@ -5,7 +5,6 @@
$txt['no_access'] = 'You are not allowed to access this section';
$txt['not_found'] = 'Sorry, this section isn\'t available at this time.';
-$txt['wireless_error_notyet'] = 'Sorry, this section isn\'t available for wireless users at this time.';
$txt['mods_only'] = 'Only Moderators can use the direct remove function, please remove this message through the modify feature.';
$txt['no_name'] = 'You didn\'t fill the name field out. It is required.';
View
49 Themes/default/languages/Wireless.english.php
@@ -1,49 +0,0 @@
-<?php
-// Version: 2.1 Beta 2; Wireless
-
-$txt['wireless_error_home'] = 'Board index';
-
-$txt['wireless_options'] = 'Additional options';
-$txt['wireless_options_login'] = 'Login';
-$txt['wireless_options_logout'] = 'Logout';
-
-$txt['wireless_navigation'] = 'Navigation';
-$txt['wireless_navigation_up'] = 'Up one level';
-$txt['wireless_navigation_next'] = 'Next page';
-$txt['wireless_navigation_prev'] = 'Previous page';
-$txt['wireless_navigation_index'] = 'Message Index';
-$txt['wireless_navigation_topic'] = 'Back to topic';
-
-$txt['wireless_pm_inbox'] = 'PM inbox';
-$txt['wireless_pm_inbox_new'] = 'PM inbox (<span class="red">%1$d new</span>)';
-$txt['wireless_pm_by'] = 'by';
-$txt['wireless_pm_add_buddy'] = 'Add buddy';
-$txt['wireless_pm_select_buddy'] = 'Select a buddy';
-$txt['wireless_pm_search_member'] = 'Search member';
-$txt['wireless_pm_search_name'] = 'Name';
-$txt['wireless_pm_no_recipients'] = 'No recipients (yet)';
-$txt['wireless_pm_reply'] = 'Reply';
-$txt['wireless_pm_reply_all'] = 'Reply All';
-$txt['wireless_pm_reply_to'] = 'Reply to';
-
-$txt['wireless_recent_unread_posts'] = 'Unread posts';
-$txt['wireless_recent_unread_replies'] = 'Unread replies';
-
-$txt['wireless_display_edit'] = 'Edit';
-$txt['wireless_display_moderate'] = 'Moderate';
-$txt['wireless_display_sticky'] = 'Sticky';
-$txt['wireless_display_unsticky'] = 'Un-Sticky';
-$txt['wireless_display_lock'] = 'Lock';
-$txt['wireless_display_unlock'] = 'Unlock';
-
-$txt['wireless_end_code'] = 'End code';
-$txt['wireless_end_quote'] = 'End quote';
-
-$txt['wireless_profile_pm'] = 'Send Personal Message';
-$txt['wireless_ban_ip'] = 'Ban on IP';
-$txt['wireless_ban_hostname'] = 'Ban on Hostname';
-$txt['wireless_ban_email'] = 'Ban on Email';
-$txt['wireless_additional_info'] = 'Additional Information';
-$txt['wireless_go_to_full_version'] = 'Go to full version';
-
-?>
View
1  cron.php
@@ -22,7 +22,6 @@
define('SMF', 'BACKGROUND');
define('FROM_CLI', empty($_SERVER['REQUEST_METHOD']));
-define('WIRELESS', false);
// This one setting is worth bearing in mind. If you are running this from proper cron, make sure you
// don't run this file any more frequently than indicated here. It might turn ugly if you do.
View
38 index.php
@@ -112,44 +112,6 @@
// Start the session. (assuming it hasn't already been.)
loadSession();
-// Determine if this is using WAP, WAP2, or imode. Technically, we should check that wap comes before application/xhtml or text/html, but this doesn't work in practice as much as it should.
-if (isset($_REQUEST['wap']) || isset($_REQUEST['wap2']) || isset($_REQUEST['imode']))
- unset($_SESSION['nowap']);
-elseif (isset($_REQUEST['nowap']))
- $_SESSION['nowap'] = true;
-elseif (!isset($_SESSION['nowap']))
-{
- if (isset($_SERVER['HTTP_ACCEPT']) && strpos($_SERVER['HTTP_ACCEPT'], 'application/vnd.wap.xhtml+xml') !== false)
- $_REQUEST['wap2'] = 1;
- elseif (isset($_SERVER['HTTP_ACCEPT']) && strpos($_SERVER['HTTP_ACCEPT'], 'text/vnd.wap.wml') !== false)
- {
- if (strpos($_SERVER['HTTP_USER_AGENT'], 'DoCoMo/') !== false || strpos($_SERVER['HTTP_USER_AGENT'], 'portalmmm/') !== false)
- $_REQUEST['imode'] = 1;
- else
- $_REQUEST['wap'] = 1;
- }
-}
-
-if (!defined('WIRELESS'))
- define('WIRELESS', isset($_REQUEST['wap']) || isset($_REQUEST['wap2']) || isset($_REQUEST['imode']));
-
-// Some settings and headers are different for wireless protocols.
-if (WIRELESS)
-{
- define('WIRELESS_PROTOCOL', isset($_REQUEST['wap']) ? 'wap' : (isset($_REQUEST['wap2']) ? 'wap2' : (isset($_REQUEST['imode']) ? 'imode' : '')));
-
- // Some cellphones can't handle output compression...
- // @todo shouldn't the phone handle that?
- $modSettings['enableCompressedOutput'] = '0';
- // @todo Do we want these hard coded?
- $modSettings['defaultMaxMessages'] = 5;
- $modSettings['defaultMaxTopics'] = 9;
-
- // Wireless protocol header.
- if (WIRELESS_PROTOCOL == 'wap')
- header('Content-Type: text/vnd.wap.wml');
-}
-
// What function shall we execute? (done like this for memory's sake.)
call_user_func(smf_main());
Please sign in to comment.
Something went wrong with that request. Please try again.