News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

BxK's WAP Mod

Started by BxK, October 05, 2014, 12:38:12 PM

Previous topic - Next topic

Sagar_king

can you make supported for 2.1 beta
http://mobiletek.in Smf 2.1
<hr>
Really Thankful to SMF community members for helping
All people are on this forum have their own website that's cool :D

dougiefresh

Here's the xml code for the Subs-MembersOnline.php modification:

<file name="$sourcedir/Subs-MembersOnline.php">
<operation>
<search position="before"><![CDATA['list_users_online' => array(),]]></search>
<add><![CDATA[
'users_online_wap' => array_unique(array()),
'list_users_online_wap' => array_unique(array()),]]></add>
</operation>
<operation>
<search position="replace"><![CDATA['num_users_online' => 0,
);

// Get any spiders if enabled.]]></search>
<add><![CDATA['num_users_online' => 0,
'num_spy' => 0,
);

@$context['num_spy'] = 0;

// Get any spiders if enabled.]]></add>
</operation>
<operation>
<search position="before"><![CDATA[// Load the users online right now.
$request = $smcFunc['db_query']('', '
SELECT]]></search>
<add><![CDATA[ DISTINCT]]></add>
</operation>
<operation>
<search position="after"><![CDATA[if (empty($row['real_name']))]]></search>
<add><![CDATA[if (@!empty($row['spy']) && $context['user']['id'] != 1)
{
$context['num_spy']++;
continue;
}
else]]></add>
</operation>
<operation>
<search position="replace"><![CDATA[if (!empty($row['online_color']))
$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['id_member'] . '" style="color: ' . $row['online_color'] . ';">' . $row['real_name'] . '</a>';
else
$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['id_member'] . '">' . $row['real_name'] . '</a>';]]></search>
<add><![CDATA[if (!empty($row['online_color']))
{
$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['id_member'] . '" style="color: ' . $row['online_color'] . '">' . $row['real_name'] . '</a>';
$linkwap = '<a href="' . $scripturl . '?action=profile;u=' . $row['id_member'] . ';wap2" style="color: ' . $row['online_color'] . '">' . $row['real_name'] . '</a>';
}
else
{
$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['id_member'] . '">' . $row['real_name'] . '</a>';
$linkwap = '<a href="' . $scripturl . '?action=profile;u=' . $row['id_member'] . ';wap2">' . $row['real_name'] . '</a>';
}

if (@$row['spy'] == 1)
$link = $link . $txt['spy_stat'];]]></add>
</operation>
<operation>
<search position="before"><![CDATA[$link = '<strong>' . $link . '</strong>';]]></search>
<add><![CDATA[
$linkwap = '<strong>' . $linkwap . '</strong>';]]></add>
</operation>
<operation>
<search position="after"><![CDATA[// This is the compact version, simply implode it to show.]]></search>
<add><![CDATA[$membersOnlineStats['users_online_wap'][$row[$membersOnlineOptions['sort']] . $row['member_name']] = array(
'id' => $row['id_member'],
'username' => $row['member_name'],
'name' => $row['real_name'],
'group' => $row['id_group'],
'href' => $scripturl . '?action=profile;u=' . $row['id_member'] . ';wap2',
'link' => $linkwap,
'is_buddy' => $is_buddy,
'hidden' => empty($row['show_online']),
'is_last' => false,
);

]]></add>
</operation>
<operation>
<search position="before"><![CDATA[$membersOnlineStats['list_users_online'][$row[$membersOnlineOptions['sort']] . $row['member_name']] = empty($row['show_online']) ? '<em>' . $link . '</em>' : $link;]]></search>
<add><![CDATA[
$membersOnlineStats['list_users_online_wap'][$row[$membersOnlineOptions['sort']] . $row['member_name']] = empty($row['show_online']) ? '<em>' . $linkwap . '</em>' : $linkwap;]]></add>
</operation>
<operation>
<search position="after"><![CDATA[// Time to sort the list a bit.]]></search>
<add><![CDATA[if (!empty($spider_finds) && $modSettings['show_spider_online'] > 1)
foreach ($spider_finds as $id => $count)
{
$link = $spiders[$id] . ($count > 1 ? ' (' . $count . ')' : '');
$sort = $membersOnlineOptions['sort'] = 'log_time' && $membersOnlineOptions['reverse_sort'] ? 0 : 'zzz_';
$membersOnlineStats['users_online_wap'][$sort . $spiders[$id]] = array(
'id' => 0,
'username' => $spiders[$id],
'name' => $link,
'group' => $txt['spiders'],
'href' => '',
'link' => $link,
'is_buddy' => false,
'hidden' => false,
'is_last' => false,
);
$membersOnlineStats['list_users_online_wap'][$sort . $spiders[$id]] = $link;
}

]]></add>
</operation>
<operation>
<search position="replace"><![CDATA[$membersOnlineStats['users_online'][end($userKeys)]['is_last'] = true;

}]]></search>
<add><![CDATA[$membersOnlineStats['users_online'][end($userKeys)]['is_last'] = true;

}
if (!empty($membersOnlineStats['users_online_wap']))
{
// Determine the sort direction.
$sortFunction = empty($membersOnlineOptions['reverse_sort']) ? 'ksort' : 'krsort';

$sortFunction($membersOnlineStats['users_online_wap']);
$sortFunction($membersOnlineStats['list_users_online_wap']);

// Mark the last list item as 'is_last'.
$userKeys = array_keys($membersOnlineStats['users_online_wap']);
$membersOnlineStats['users_online_wap'][end($userKeys)]['is_last'] = true;
}]]></add>
</operation>
<operation>
<search position="before"><![CDATA[$membersOnlineStats['num_users_online'] = count($membersOnlineStats['users_online']) + $membersOnlineStats['num_users_hidden'] - (isset($modSettings['show_spider_online']) && $modSettings['show_spider_online'] > 1 ? count($spider_finds) : 0);]]></search>
<add><![CDATA[
$membersOnlineStats['num_users_online'] = count($membersOnlineStats['users_online_wap']) + $membersOnlineStats['num_users_hidden'] - (isset($modSettings['show_spider_online']) && $modSettings['show_spider_online'] > 1 ? count($spider_finds) : 0);]]></add>
</operation>
</file>

The only difference between what you have and that I'm posting is a few empty lines.  Functionality is the same as your version....

Hope this helps you.  I know it helps me a lot!

babalola olasehinde

i just downloaded this mod and trying to install it on my smf 2.0.9 but  see screenshot below for error

Rumpa

which mobile theme you have installed.

babalola olasehinde

Quote from: Rumpa on January 07, 2015, 02:39:46 PM
which mobile theme you have installed.

i did not have any mobile theme installed apart from the fact that the theme i am using came with its own mobile theme and the name of the theme is mobil-desktop  ,  then Mobile Device Detect mod is installed

Rumpa

Quote from: babalola olasehinde on January 07, 2015, 09:26:55 PM

i did not have any mobile theme installed apart from the fact that the theme i am using came with its own mobile theme and the name of the theme is mobil-desktop  ,  then Mobile Device Detect mod is installed

That mod might be cause. Try to install after uninstalled Mobile Device Detect mod.

Get a backup before doing anything.

babalola olasehinde

Quote from: Rumpa on January 08, 2015, 03:55:03 AM
Quote from: babalola olasehinde on January 07, 2015, 09:26:55 PM

i did not have any mobile theme installed apart from the fact that the theme i am using came with its own mobile theme and the name of the theme is mobil-desktop  ,  then Mobile Device Detect mod is installed

That mod might be cause. Try to install after uninstalled Mobile Device Detect mod.

Get a backup before doing anything.

i just did that but the problem is still thesame

can i install it maually and will it work ?

Rumpa

Yes you can do it through manual edit and it's work.

but take a backup for anything wrong.

babalola olasehinde

Quote from: Rumpa on January 08, 2015, 07:17:10 AM
Yes you can do it through manual edit and it's work.

but take a backup for anything wrong.

it will take me a whole year to install the mod manually  with all the find and replace of a thing

i guess i should just forget about the mod

margarett

You don't need to install it *all* manually. Just the edits that now "fail".
So you should:
a) analyze the edits that fail and see why they fail. Once you get to "why", see if you can find "how" to fix them.
b) if you could find the "how", good! Document the fixes so that you can easily deploy them and BACKUP ALL YOUR FORUM :) If not, well, then it's complicated and should probably ditch the idea ;)
c) choose a time of day of low activity as there's a possibility that your forum momentarily breaks ;)
d) install the MOD even with errors. All changes will be performed, except the ones that "failed" (but that you already know how to fix)
e) fire up your FTP client and get the files that had a "failed" operation --> index.php and ManageSettings.php
f) perform the fixes that you documented, save and upload the files again.
g) TA-DA! * inserts TA-DA Windows sound here *

If your forum goes berserk and it seems everything failed, the backup you created will save the day :)

Good luck ;)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Burke ♞ Knight

#30
Has there been any changes in the /Themes/default/Wireless.template.php file in any of the recent updates?
Or maybe the Responsive Curve mod?

Here is the code as should be, for the mod:
function template_wap2_pm()
{
global $context, $settings, $options, $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="outbox" value="', $context['copy_to_outbox'] ? '1' : '0', '" />
<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>';

}
}


Here is what my current file has:

function template_wap2_pm()
{
global $context, $settings, $options, $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>';

}
}


I am unsure if installing this, by changing that to default, would ruin what updates or the Responsive Curve mod had done.


EDIT:

I found this line was missing from my file:

<input type="hidden" name="outbox" value="', $context['copy_to_outbox'] ? '1' : '0', '" />

Anyone know why that seems to have been removed?
I have no mod installed that has edited that file...

Advertisement: