News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

BxK's WAP Mod

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

Previous topic - Next topic

BxK

BxK's WAP Mod
Link to Mod  |  Demo & Support

Description

This mod adds more features to your dull and boring wap.
You can add themes , Edit and Quote posts and ALOT more!

Features

-Edit posts (Like on SMF.org)
-Register on Mobile!
-Put your own logo
-Menu bar to the top
-Who's online
-URLs Clickable
-Users Clickable
-Colored Text
-TalkBox support
-Delete Posts
-All edits are now done in the Wireless.english.php file
-Larger text field to post
-Posted via "your site name" in every mobile post
-Online now beside users account
-Change options in admin panel
-Package installation
-Account Page Fix
-Attachments
-Quick reply
-New menu bar (unread posts/replies at bottom)
-Time stamp
-More info in users profile (IM , EMAIL ect..)
-Login Page change
-Check Who's Online
-User's Status (In Profile)
-Images Scaled down for mobile
-Register from your phone
-Edit options in the Admin Panel
And more...


Installation

This mod modifies core files of the forum so please make a backup [including your sources] before installation. If you get errors such as 'Test failed' upon installation, please do not continue unless you are already familiarized with module manual install / uninstall, otherwise you might end up with the main page that does not load. I did my best to be rigorous, but depending on what other mods you have installed, etc..., it might or it might not work. You have been warned!

Usage

Once installed, you should have access to more features on your WAP Forum.

License

BSD License. Feel free to modify accordingly but keep author's link if it is in there somewhere.

Hj Ahmad Rasyid Hj Ismail

Nice one. Congratulation on your first mod. Keep it up.

Abhijit1030

This is awesome mod

Thank you BxK

Masterd

Interesting. I would've never thought about improving WAP.

Antechinus

I'd thought of it, and even made a few basic tweaks to it, but when I suggested going the whole hog on it I was told that nobody uses WAP any more anyway. :D

Still, for anyone with a low-spec phone, or with tight data limits, or a dodgey connection, I can see the point of it.

BxK

I originally made this mod in 09, but I JUST got around to making it mod site ready. LOL

Rumpa

Quote from: BxK on October 05, 2014, 11:59:41 PM
I originally made this mod in 09, but I JUST got around to making it mod site ready. LOL

yeh I see your mod installed forum in 2009

Hj Ahmad Rasyid Hj Ismail

I can see that too. But sharing it in as an approved package mod is something different altogether. :)

swaggaderby

@Bxk Perfect Mod!!! please is there a way i can add a logo to where the name is ?

BxK

mod settings > wap settings > logo url. type the full path in ex. http://www.yoursite.com/logo.jpg and save it. it will appear on your site. to remove just delete the path leaving the field blank

swaggaderby

Quote from: BxK on October 09, 2014, 07:06:51 PM
mod settings > wap settings > logo url. type the full path in ex. http://www.yoursite.com/logo.jpg and save it. it will appear on your site. to remove just delete the path leaving the field blank
Splendid Couldnt ask for more

Sagar_king

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

Rumpa

Will you add more theme and manly add karma system.
Then it will be perfect.

BxK

I'd like to add more themes but I want users to chime in on what they want before i go make more! also karma child boards ect will be added/fixed in the next update!

Rumpa

Quote from: BxK on November 10, 2014, 10:28:40 AM
I'd like to add more themes but I want users to chime in on what they want before i go make more! also karma child boards ect will be added/fixed in the next update!
wow thats great.

cojeepers

Excellent mod.  Kudos. 

Maybe in a later version allow for mobile detection to WAP and have a setting in admin to turn this autodetect off/on.  Thank you.

dougiefresh

#16
I think this is a very interesting mod.  It seems to conflict with Super Admin v1.7, which also modifies Sources/Subs-MembersOnline.php.  Your mod seems to want to replace the entire file.  Is there any way to redesign your mod so that it doesn't NEED to replace the contents of the entire file?  Thanks in advance!

EDIT: By that, I mean just replace those sections that need replacing....
EDIT2: Got the version number for Super Admin wrong.... corrected it

drfun

Hello all,
What a great mod and i want to say thank you to the author.
i just install this mod for a friend, everything went smoothly. however i noticed the login link is not work, as in, if you click on login it will refresh the page and not take you to the login form.
Any help on this will be appreciated.
Thanks

Forum version 2.0.9
BxK's WAP Mod version for 2.0.9
ECLIKS -Global Online community for Questions and Answers

BxK

cojeepers: there are settings in the menus for this. Are you saying specific phones? iPhone is supported and Opera...

dougiefresh: I will look into that, I need to change that anyways! I originally made it that way because of an error in SMF that wouldn't allow me to edit that file correctly. Thanks for the heads up and noted!.

drfun: Make sure that in the settings that dropdown menus/login is NOT checked. if not and it still is post your device its happening on and maybe a link so I can see it first hand!

Update coming soon, been working on another mod! Keep y'all posted!

krittin98

@Bxk this is a great mod. But, I am having some issues with it:
1 I was unable to login from my mobile after installing it. No drop down menus and I was not even directed to any other login page.
2 I am also using the Mobile Device Detect mod that directs iPhone users to an iPhone customised theme. It was working well with WapMod 1.5.2, but when I installed this version, it too stopped working.
3 I was unable to register a new account.

The Team K Developers
www.theteamk.co.nr

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: