Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: dougiefresh on April 20, 2014, 04:30:16 PM

Title: Enhanced PM System
Post by: dougiefresh on April 20, 2014, 04:30:16 PM
Link to Mod (https://custom.simplemachines.org/mods/index.php?mod=3736)



ENHANCED PM SYSTEM v3.5.2
By Dougiefresh (http://www.simplemachines.org/community/index.php?action=profile;u=253913) - Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=3736)



Introduction
This mod makes some changes to the PM system, seperating the PM conversations from the PM list.  It forces all users to conversation mode and makes users click on the message they want to view.  This keeps the forum from marking the latest message as read if you glance over the message list and click on something else and want to read a message that isn't the latest message received.

It adds an Outbox to the mix and seperates unread PMs from those that have been read.  It changes the "labels" into "folders" and removes the contents of the PM from the email notification.  It will allow users to edit PMs that they have sent out, as long as NO RECIPIENT has read it.  It also allows users to unsend and delete any unread PMs to other users.

This mod adds settings in the "Features and Options" page.  By default, this mod forces the view for personal messages to Conversation mode, but there is a new switch permitting the users to select a different mode other than Conversation mode.  The "PM Remove Inbox Label" and "Copy to Outbox" options are removed from the Personal Messages Settings page and set as default.

Version 2.0 sports an enhanced PM search system, which allows you to search Sent Items and the Outbox for PMs you specify.  It also allows the user to search them by username, just like the core functionality provided for the Inbox.  You are allowed to move PMs to folders for Inbox PMs, and allowed to delete PMs from all folders.

Version 3.0 adds the PM Quick Reply box, as well as changes some options to membergroup permissions....

As a anti-spam measure, this mod can block new members from sending PMs during the 24-hour period after their account is activated.  Please note that members activated before this mod is installed will not be affected by this anti-spam measure, as the activation time is not recorded in the database prior to this mod.

Related Discussions
o [DONE] PM Separate List and View Request (http://www.simplemachines.org/community/index.php?topic=420396)
o [DONE] Always PM Conversation and Save a Copy (http://www.simplemachines.org/community/index.php?topic=427762)
o [DONE] Private Message Email Notification (http://www.simplemachines.org/community/index.php?topic=426840)
o [DONE] PM outbox/sent like phpbb (http://www.simplemachines.org/community/index.php?topic=128571)
o [DONE] Unsend PM (http://www.simplemachines.org/community/index.php?topic=29990)
o [DONE] Outbox with editable PMs (http://www.simplemachines.org/community/index.php?topic=403840)
o [DONE] Require Subject for PMs (http://www.simplemachines.org/community/index.php?topic=333117)
o [DONE] Block PM on the first day (http://www.simplemachines.org/community/index.php?topic=460098)
o [DONE] NEW FOR v2.0: Search by Sent PMs (http://www.simplemachines.org/community/index.php?topic=498600)
o [DONE] NEW FOR v2.0: Perform Actions on Searched-For PMs (http://www.simplemachines.org/community/index.php?topic=521508.msg3713864#msg3713864)
o [DONE] NEW FOR V2.0: "User xx has blocked your personal message." (http://www.simplemachines.org/community/index.php?topic=478886)
o [DONE] NEW FOR V2.1: Allow Members to Send PM's While Muted (http://www.simplemachines.org/community/index.php?topic=412263)
o [DONE] NEW FOR V2.1: PM Message Rules - Members can avoid Admin PMs & Warning PMs (http://www.simplemachines.org/community/index.php?topic=412757)
o [DONE] NEW FOR V2.2: A "Quote to All" in PM Conversation mode? (http://www.simplemachines.org/community/index.php?topic=503208.msg3539234#msg3539234)
o [DONE] NEW FOR V3.0: PM Quick Reply (http://www.simplemachines.org/community/index.php?topic=521508.msg3804931#msg3804931)
o [INCOMPLETE] Move Personal Messages (http://www.simplemachines.org/community/index.php?topic=295253)

Permission Notices
o MLM (http://www.simplemachines.org/community/index.php?action=profile;u=261314) gave permission to use his changes from Always PM Conversation and Save a copy (http://www.simplemachines.org/community/index.php?topic=427762) discussion.
o floydpink (http://www.simplemachines.org/community/index.php?action=profile;u=73143) gave permission to use his changes from Move Personal Messages (http://www.simplemachines.org/community/index.php?topic=295253) discussion.

Mail Icons
o Ultimate Gnome (http://code.google.com/p/ultimate-gnome/) iconset (released under a GPL license) found at IconFinder.com (http://www.iconfinder.com/search/?q=mail+iconset%3AUltimateGnome)

Compatibility Notes
This mod was tested on SMF 2.0.9, but should work on SMF 2.1 Beta 2, as well as SMF 2.0 and up.  SMF 1.x is not and will not be supported.

The PM Attachments (http://custom.simplemachines.org/mods/index.php?mod=1974) mod should be installed first to avoid any conflict with this mod.

Questions and Answers
Q: Will this mod ever include PM attachment support?
A: No, there is a PM Attachments (http://custom.simplemachines.org/mods/index.php?mod=1974) mod already developed that supports this.  The exception is editing PMs with attachments, which this mod will eventually support fully.

Q: Why can't I edit the attachments on a PM?
A: At present time, it is not possible to list and/or remove files attached to the PM while editing the PM.  Future versions of this mod will resolve this issue.

Q: Why can't I move messages from the Outbox and/or Sent Items folder?
A: At present time, it is not possible to mass-move messages from the Outbox or Sent Items folder.  Future versions of this mod may resolve this issue.

Translators
o @rjen (http://www.simplemachines.org/community/index.php?action=profile;u=287786) - Dutch translation
o messire_Leonard (https://www.simplemachines.org/community/index.php?action=profile;u=431601) - Russian translation!
o Rock Lee (https://www.simplemachines.org/community/index.php?action=profile;u=322597)! - Spanish Latin translation

Changelog
The changelog has been removed and can be seen at XPtsp.com (http://www.xptsp.com/board/index.php?topic=8.msg133#msg133).

License
Copyright (c) 2015 - 2018, Douglas Orend
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Title: Re: Enhanced PM System
Post by: etn991 on May 21, 2014, 12:06:55 AM
I really like this mod, since my old forum was based on phpbb and had the ability to delete messages which had not been read yet.

However, I get the following error when I go to a PM in my inbox and try to Quote or Reply.  It doesn't seem to matter which PM I select, and it happens for other users (not just the admin).  When I uninstall the mod, quote and reply work as expected.

An Error Has Occurred!
The personal message you're trying to quote is not your own or does not exist, please go back and try again.


I am using SMF 2.0.7 with the following mods:
SimplePortal    2.3.5
Switch Permissions    1.0
Custom Form Mod    1.7
Recent Topics On Board Index    1.03
Treasury    2.12
Enhanced PM System    1.0

Is anyone else having this problem?

Thanks,
Ed

(hope I posted this in the right place)
Title: Re: Enhanced PM System
Post by: dougiefresh on May 28, 2014, 06:35:20 PM
Sorry about replying so late, as I just found this message :o  I will look into the issue.....
Title: Re: Enhanced PM System
Post by: dougiefresh on June 01, 2014, 09:48:06 PM
Uploaded v1.1 - June 1st, 2014 ->
o Fixed an error that keeps users from quoting or replying to PMs...  Thanks, etn991 (http://www.simplemachines.org/community/index.php?action=profile;u=395983)!

Mod is upgradable from v1.0... Thanks, etn991!

EDIT: Post changed in order to update format of version notices....
Title: Re: Enhanced PM System
Post by: DasVON on June 03, 2014, 04:40:17 AM
I just installed this Mod with No Errors but nothing seems changed (like your example pics) and the menu its like this MY MESSAGES and not like this MY MESSAGES [1]

I am using this theme http://custom.simplemachines.org/themes/index.php?lemma=2764

Mods Installed are:

Quote1.   Download bbcode 2.0
2.   Send Pm When Rank Change 1.0     
3.   SimplePortal 2.3.5     
4.   Joinable Groups 1.0     
5.   Customize *Child Board*    2.7     
6.   Enhanced PM System 1.1     
7.   Team Page 3.6     
8.   Additional Membergroups 1.02     
9.   Quick Spoiler 0.9.5     
10.   Custom Copyright 1.0.2 
11.   Welcome Back    1.0     
12.   Event Registration Mod for SMF2: 2.26     
13.   Adk Personal Icon forums 1.0     
14.   Advance Fake Guests n Users Online 1.0     
15.   Sorted Package Manager Listing 1.2     
16.   Custom Greeting Mod 2.0     
17.   Anti-SID(PHPSESSID) canonical tag 0.5     
18.   Simple .htaccess Cache Mod 2.6     
19.   Contact Page 3.2     
20.   Adk System FAQs 1.0     
21.   NiceTooltips 1.9 
22.   Remove Help From Menu 1.0     
23.   OS & Browser Detection 1.5     
24.   Aeva ~ Auto-Embed Video & Audio 7.2     
25.   RSS Feed Poster 3.1a     
26.   Footer Menu 1.1.2     
27.   Private Profile 0.3.2     
28.   Menu Editor Lite 1.0.5

Do I need to modify anything if so what and how ?

Title: Re: Enhanced PM System
Post by: Shambles on June 03, 2014, 07:29:42 AM
I believe "Menu Editor Lite 1.0.5" may have that effect. Check the discussion thread for that mod. I'm sure I read about it there...
Title: Re: Enhanced PM System
Post by: dougiefresh on June 08, 2014, 08:01:43 PM
Uploaded v1.2 - June 8th, 2014
o Fixed an undefined variable error found in PersonalMessage.php...
o Fixed error in uninstaller from v1.1, relating to upgraded installations...
o Fixed error in uninstaller from v1.1, relating to one edit that didn't want to uninstall...

Upgrade is possible from v1.0 and v1.1 to v1.2.
Title: Re: Enhanced PM System
Post by: dougiefresh on June 09, 2014, 08:26:29 AM
@DasVON: I can verify that Menu Editor Lite v1.0.5 (http://custom.simplemachines.org/mods/index.php?mod=3310) screws extensively with the top menu, negating the top menu changes made by this mod.  Other than uninstalling the Menu Editor Lite mod, I have no idea how to resolve this particular problem....

The Regain theme doesn't have a PersonalMessages.template.php file within it, so I'm at a loss of why you wouldn't see the rest of the changes made....  Mind you, the changes aren't that big, as most of the changes are "under the hood".  But you should see a new folder labeled "Outbox" underneath the "Sent Items", in which unread PMs will show up.  Once at least one recipient reads the PM, it will disappear from the "Outbox" folder.  In the "Outbox" folder, clicking on a PM gets you to a similar screen as viewing the PM.  There you can unsend and edit a PM....

I hope this helps....
Title: Re: Enhanced PM System
Post by: Arantor on June 09, 2014, 08:46:35 AM
Also note the changes made by Menu Editor Lite are described by its author as a feature not a bug and never going to be changed.
Title: Re: Enhanced PM System
Post by: etn991 on June 12, 2014, 11:18:42 PM
Quote from: dougiefresh on June 01, 2014, 09:48:06 PM
Updated the mod to v1.1, which fixes the reply/quote issue that etn991 (http://www.simplemachines.org/community/index.php?action=profile;u=395983) reported.  Mod is upgradable from v1.0... Thanks, etn991!

No problem.  Thank you for the fix.  So far works like a charm.
Title: Re: Enhanced PM System
Post by: snake_ripken on June 21, 2014, 03:11:12 AM
thank you for mod it work well
no option to have attachment file in pm?
Title: Re: Enhanced PM System
Post by: dougiefresh on June 21, 2014, 04:01:19 AM
Quote from: snake_ripken on June 21, 2014, 03:11:12 AM
thank you for mod it work well
no option to have attachment file in pm?
You're welcome.  There is a seperate mod called PM Attachments (http://custom.simplemachines.org/mods/index.php?mod=1974) by SoLoGHoST that provides this functionality.  The Enhanced PM System will work with the PM Attachments mod, provided PM Attachments is installed FIRST...  Unfortunately, because editing PMs isn't an option in the core files, altering attachments in PMs once they are sent isn't an option from that mod.  It hasn't been implemented for this mod yet, either....  Although it is planned for a future release.
Title: Re: Enhanced PM System
Post by: butch2k on June 21, 2014, 05:25:05 AM
I noticed a few SQL errors indeed your INNER JOIN Clauses are not using any ON which results in cross joins.
You need to add ON (pmr.id_pm = pm.id_pm) in a few queries.

$request = $smcFunc['db_query']('', '
SELECT COUNT(' . ($context['display_mode'] == 2 ? 'DISTINCT pm.id_pm_head' : '*') . ')
FROM {db_prefix}personal_messages AS pm
INNER JOIN {db_prefix}pm_recipients AS pmr
WHERE pm.id_member_from = {int:current_member}
AND pmr.is_read > {int:not_read}
AND pm.deleted_by_sender = {int:not_deleted}',
array(
'current_member' => $user_info['id'],
'not_deleted' => 0,
'not_read' => 0,
)
);
Title: Re: Enhanced PM System
Post by: dougiefresh on June 22, 2014, 03:57:00 AM
It's been fixed for v1.3.  Thanks, butch2k (http://www.simplemachines.org/community/index.php?action=profile;u=90366)!!! 

Thanks to this topic (http://www.simplemachines.org/community/index.php?topic=498600.0), I've been inspired to add an easy change to this mod to search sent pms.  I'll release it in v1.3 once it's done.....
Title: Re: Enhanced PM System
Post by: dougiefresh on June 22, 2014, 07:11:53 PM
Uploaded v1.3 - June 22nd, 2014
o Fixed a few SQL errors based on the INNER JOIN clauses resulting in cross joins.  Thanks, butch2k (http://www.simplemachines.org/community/index.php?action=profile;u=90366)!



UPDATE: The ability to search sent PMs has not been added to version 1.3, as it is much more complicated than I anticipated.  There are far more places of code that need to be changed for the feature to work properly and I think that it would be better to release it as another version than to put off bug fixes until that feature is complete.  I apologize about disappointing anyone....
Title: Re: Enhanced PM System
Post by: FragaCampos on June 24, 2014, 06:59:44 PM
Hi, dougiefresh
I read your message on the search sent PMs' topic and found this great mod. Congratulations for creating this.
In my opinion, SMF PM system as always been a bit clunky and not very versatile, and this mod surely helps to improve it!

I really liked the well organized files. ;)
Here's my small contribution:
Code (Portuguese_pt-utf8) Select
<!-------------------------------------------------------------------------->
<!-- Language file edits (Portuguese - Modifications & PersonalMessage)      -->
<!-------------------------------------------------------------------------->
<file name="$languagedir/Modifications.portuguese_pt-utf8.php">
<operation>
<search position="replace"><![CDATA[// Version: 2.0; Modifications]]></search>
<add><![CDATA[// Version: 2.0; Modifications
/* Enhanced PM System mod */
$txt['eps_title'] = 'Sistema Melhorado de MPs';
$txt['eps_pm_view_switch'] = 'Permmitir que os utilizadores escolham outras vistas de MPs além do modo de conversação';
$txt['eps_deny_unsend'] = 'Impedir que os utilizadores cancelem MPs por ler';
$txt['eps_deny_edit'] = 'Impedir que os utilizadores alterem MPs por ler';
$txt['eps_block_1st_day'] = 'Impedir o envio de MPs no primeiro dia (24 horas) de registo no fórum';
/* End Enhanced PM System mod */
]]></add>
</operation>
</file>
<file name="$languagedir/PersonalMessage.portuguese_pt-utf8.php">
<operation>
<search position="replace"><![CDATA[$txt['pm_msg_label_title'] = 'Mensagem de marcador';
$txt['pm_msg_label_apply'] = 'Adicionar marcador';
$txt['pm_msg_label_remove'] = 'Remover marcador';]]></search>
<add><![CDATA[$txt['pm_msg_label_title'] = 'Mover Mensagem';
$txt['pm_msg_label_apply'] = 'Mover para';
$txt['pm_msg_label_remove'] = 'Pasta Atual';]]></add>
</operation>
<operation>
<search position="replace"><![CDATA[$txt['pm_sel_label_title'] = 'Marcador selecionado';]]></search>
<add><![CDATA[$txt['pm_sel_label_title'] = 'Mover Selecionados';]]></add>
</operation>
<operation>
<search position="replace"><![CDATA[$txt['pm_manage_labels'] = 'Gerir marcadores';
$txt['pm_labels_delete'] = 'Tem a certeza que quer apagar os marcadores selecionadas?';
$txt['pm_labels_desc'] = 'Aqui pode adicionar, editar e apagar marcadores usados nas suas mensagens.';
$txt['pm_label_add_new'] = 'Adicionar novo marcador';
$txt['pm_label_name'] = 'Nome do marcador';
$txt['pm_labels_no_exist'] = 'Atualmente não tem nenhum marcador definido!';]]></search>
<add><![CDATA[$txt['pm_manage_labels'] = 'Gerir Pastas';
$txt['pm_labels_delete'] = 'Tem a certeza que pretende apagar as pastas selecionadas?';
$txt['pm_labels_desc'] = 'Aqui pode adicionar, alterar e apagar pastas usadas no seu centro de mensagens privadas.';
$txt['pm_label_add_new'] = 'Adicionar Nova Pasta';
$txt['pm_label_name'] = 'Nome da Pasta';
$txt['pm_labels_no_exist'] = 'De momento, não tem pastas criadas!';]]></add>
</operation>
<operation>
<search position="replace"><![CDATA[$txt['pm_labels'] = 'Marcadores';]]></search>
<add><![CDATA[$txt['pm_labels'] = 'Pastas';]]></add>
</operation>
<operation>
<search position="replace"><![CDATA[$txt['pm_search_choose_label'] = 'Escolha o marcador a procurar, ou procurar tudo';]]></search>
<add><![CDATA[$txt['pm_search_choose_label'] = 'Escolha as pastas a procurar ou procure todas';]]></add>
</operation>
<operation>
<search position="replace"><![CDATA[$txt['pm_email'] = 'Acabou de receber uma Mensagem Pessoal enviada por SENDER no ' . $context['forum_name'] . '.\\n\\nIMPORTANTE: Lembre-se, isto é apenas uma notificação. Por favor não responda a este e-mail.\\n\\nA mensagem que lhe foi enviada foi a seguinte:\\n\\nMESSAGE';]]></search>
<add><![CDATA[$txt['pm_email'] = 'Acabou de receber uma mensagem privada de SENDER em ' . $context['forum_name'] . '.' . "\n\n" . 'IMPORTANTE: Lembre-se, isto é apenas uma notificação. Por favor, não responda a este e-mail.\\n\\nA mensagem que recebeu foi a seguinte:\\n\\nMESSAGE';]]></add>
</operation>
<operation>
<search position="replace"><![CDATA[$txt['sent_items'] = 'Itens Enviados';]]></search>
<add><![CDATA[$txt['sent_items'] = 'Itens Enviados';
$txt['unread_items'] = 'Caixa de Saída';
$txt['unsend_item'] = 'Cancelar Envio';]]></add>
</operation>
<operation>
<search position="replace"><![CDATA[$txt['pm_rule_label'] = 'Etiquetar mensagem com';
$txt['pm_rule_sel_label'] = 'Seleccionar Etiqueta';]]></search>
<add><![CDATA[$txt['pm_rule_label'] = 'Mover mensagem para a pasta';
$txt['pm_rule_sel_label'] = 'Escolher Pasta';]]></add>
</operation>
<operation>
<search position="replace"><![CDATA[?>]]></search>
<add><![CDATA[$txt['pm_edit'] = 'Alterar';
$txt['edit_message'] = 'Alterar Mensagem';
$txt['pm_unsent_denied'] = 'Você não pode cancelar o envio de uma mensagem.';
$txt['pm_unsent'] = 'A sua mensagem foi cancelada com sucesso para todos os destinatários.';
$txt['pm_unsent_some'] = 'A sua mensagem foi cancelada de todos os destinatários que ainda não a tinham lido.';
$txt['pm_edited'] = 'A sua mensagem foi alterada e todos os novos destinatários receberam e-mails.';
$txt['pm_no_edit'] = 'Não foi possível alterar a MP, porque pelo menos um dos destinatários já leu a MP que você pretende alterar.';
$txt['pm_send_blocked'] = 'Você não tem permissão para enviar MPs durante as primeiras 24 horas do seu registo no fórum.';
$txt['unsend_message'] = 'Cancelar o envio desta mensagem a todos os destinatários que ainda não a leram.';

?>]]></add>
</operation>
<operation>
<search position="replace"><![CDATA[$txt['pm_actions_filter_by_label'] = 'Filtrar por categoria';]]></search>
<add><![CDATA[$txt['pm_actions_filter_by_label'] = 'Filtrar Por Pasta';]]></add>
</operation>
<operation>
<search position="replace"><![CDATA[$txt['pm_current_label'] = 'Marcadores';]]></search>
<add><![CDATA[$txt['pm_current_label'] = 'Pasta';]]></add>
</operation>
<operation>
<search position="replace"><![CDATA[$txt['pm_readable_label'] = 'aplicar a etiqueta &quot;{LABEL}&quot;';]]></search>
<add><![CDATA[$txt['pm_readable_label'] = 'mover para a pasta &quot;{LABEL}&quot;';]]></add>
</operation>
</file>
Title: Re: Enhanced PM System
Post by: FragaCampos on June 24, 2014, 07:14:00 PM
## Other things ##

Problems:
-> I realized now that when you click on a PM the page takes longer to load. I believe the default PM system uses anchors or something and this system actually loads a new page. Is that correct?
-> I'm getting a "Undefined index: edit" in the error log.
-> If I understood correctly, the icons in Outbox shouldn't be "eps_mail_unread"? As it is now, all PM show the "eps_mail_read" icon.


Suggestions:
-> Is it possible to add folders to "Sent Items" too? (That way it would be also possible to move sent PMs)
-> It would be nice to add tooltips to these icons so that users could know what they mean.
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg829.imageshack.us%2Fimg829%2F2045%2Fyvyc.png&hash=ed4f6457eb229fcffec6b10c69a98b61afa69268)


Title: Re: Enhanced PM System
Post by: dougiefresh on June 25, 2014, 04:44:30 PM
Thanks!!  I agree that the core PM system needs help....  ;D  Your Portuguese language contribution has been added for the next version!

Quote from: FragaCampos on June 24, 2014, 07:14:00 PM
-> I realized now that when you click on a PM the page takes longer to load. I believe the default PM system uses anchors or something and this system actually loads a new page. Is that correct?
Huh....  Didn't realize that it takes longer to load.  You are correct when you said that the default PM system uses anchors in non-conversation mode.In Conversation mode, I do believe that it loads a new page for each convo.  However, if a message had the latest reply, that conversation would be automatically loaded.

The Enhanced PM System forces all users to conversation mode and makes users click on the message they want to view.  This keeps the forum from marking the latest message as read if you glance over the message list and click on something else and want to read a message that isn't the latest message received.

Quote from: FragaCampos on June 24, 2014, 07:14:00 PM
-> I'm getting a "Undefined index: edit" in the error log.
Can you attach your PersonalMessage.php and PersonalMessage.template.php and copy the error message so I can research it?

Quote from: FragaCampos on June 24, 2014, 07:14:00 PM
-> If I understood correctly, the icons in Outbox shouldn't be "eps_mail_unread"? As it is now, all PM show the "eps_mail_read" icon.
At one point, the code did what it was supposed to....  I'm guessing there is a problem with the logic somewhere.... Lemme research it....

EDIT: Fixed  :P

Quote from: FragaCampos on June 24, 2014, 07:14:00 PM
-> It would be nice to add tooltips to these icons so that users could know what they mean.
Easy to do.  Will be in the next version....

EDIT: DONE!  :P

Quote from: FragaCampos on June 24, 2014, 07:14:00 PM
-> Is it possible to add folders to "Sent Items" too? (That way it would be also possible to move sent PMs)
I'm sure it would be POSSIBLE, however, probable is another story....   :-[  I guess the answer is that it depends on how hard it is to modify the system.  Looking at the message rules, I noticed yet another "bug" that I need to resolve: being able to assign two folders to the same message  :P
Title: Re: Enhanced PM System
Post by: FragaCampos on June 25, 2014, 06:07:51 PM
Thank you for your considerations and changes. :)

Here goes the attached files and the error is this one (the line number varies):
- index.php?action=pm;sa=send;f=inbox;pmsg=23033;quote;u=1848
- 8: Undefined index: edit
- public_html/Sources/PersonalMessage.php
Line: 1717
Title: Re: Enhanced PM System
Post by: FragaCampos on June 25, 2014, 06:52:31 PM
Of course.

- "Unread" -> "Não lida"
- "Search group" (I would need the context of this one, but this will do for now) -> "Procurar por grupo"

Title: Re: Enhanced PM System
Post by: dougiefresh on June 25, 2014, 07:03:49 PM
Context: I am working on a feature to allow the user to select the inbox or sent items to search PMs for.  Strangely, it is a feature missing from SMF.....
Title: Re: Enhanced PM System
Post by: FragaCampos on June 25, 2014, 08:17:15 PM
That is awesome! ;)
I know SMF lacks that feature. I created that topic about this issue (where you replied), because I couldn't understand why it was never implemented in SMF. :P

Ok, as I understand, the "group" you're talking is in fact the "folders", right? Like "Search in these folders"?
Title: Re: Enhanced PM System
Post by: dougiefresh on June 26, 2014, 06:34:28 PM
Quote from: FragaCampos on June 25, 2014, 08:17:15 PM
Ok, as I understand, the "group" you're talking is in fact the "folders", right? Like "Search in these folders"?
Yeah, kinda....  It's more like "Search in these group of folders"-kinda thing.  However, I noticed that when you create multiple labels/folders for your inbox PMs, they are listed below the search box parameters....  So since my "discovery", I'm pondering how to write this correctly to maintain the "feel" and "function" of the forum software...

EDIT: If you have a better idea how to phrase this, my ears are open....  :P 8)

Quote from: FragaCampos on June 24, 2014, 07:14:00 PM
-> Is it possible to add folders to "Sent Items" too? (That way it would be also possible to move sent PMs)
UPDATE: I looked further into how the labels/folders are stored, and discovered that they are listed in the members table.  So, theoretically, if I added another field to store Sent Items folders, I could add folder support for Sent Items....  However, doing so would probably mean that extensive rewrites of core PM search functions might be involved...
Title: Re: Enhanced PM System
Post by: FragaCampos on June 27, 2014, 12:51:21 AM
Quote from: dougiefresh on June 26, 2014, 06:34:28 PM
Yeah, kinda....  It's more like "Search in these group of folders"-kinda thing.  However, I noticed that when you create multiple labels/folders for your inbox PMs, they are listed below the search box parameters....  So since my "discovery", I'm pondering how to write this correctly to maintain the "feel" and "function" of the forum software...

Ah, ok. I think I got it. You're trying to search in all folders of "Inbox", "Sent Items" or "Outbox". If you have three folders inside "Inbox", that would be a group, right? That's nice. Maybe some users would like to search inside a specific folder. I'm not a coder, but I believe it would save some load over the DB to search a specific folder, instead of an entire group (three folders at once, for example).

Please, don't waste too much time with my suggestion of adding folders to sent items if you think you'll need to change so many things... I believe it would be useful for some users and would turn this mod even better, but only if you think it's really important.
Title: Re: Enhanced PM System
Post by: dougiefresh on June 27, 2014, 07:57:17 PM
The core PM system already has the ability to search only a single selected folder.  But all folders are inbox only....

I think your suggestion is a good one.  I'm not giving up on it yet....  I just haven't had the time in the last few days to do much of anything on this project...  I'm gonna try to release version 1.4 tomorrow (it's 7pm here - yeah, it's bedtime for me, as I get up at 2:30am for work).  Updated search functionality will just have to wait for version 1.5+.....
Title: Re: Enhanced PM System
Post by: FragaCampos on June 28, 2014, 04:45:37 PM
I remembered another thing SMF's PM system doesn't do that would be a nice addition to this mod.
When searching for PMs we can't choose what to do with them (move, delete, reply, etc.)
For example: I want to search for all received PMs from user X. The system shows 10 messages but it should exist a column to select those I want to delete, move, etc.

It's a "simple" implementation that would improve PMs system even more.  O:)
Title: Re: Enhanced PM System
Post by: dougiefresh on June 28, 2014, 07:32:09 PM
Quote from: FragaCampos on June 28, 2014, 04:45:37 PM
When searching for PMs we can't choose what to do with them (move, delete, reply, etc.)
For example: I want to search for all received PMs from user X. The system shows 10 messages but it should exist a column to select those I want to delete, move, etc.

It's a "simple" implementation that would improve PMs system even more.  O:)
HA!!!  That'll be harder than the sent items folders  ;D  Completely agree, though!  Nice idea, though!  Lemme see what I can do.  No promises, though....
Title: Re: Enhanced PM System
Post by: dougiefresh on June 29, 2014, 02:56:23 PM
Uploaded v1.4 - June 29th, 2014
o Moved language modifications into seperate file for ease of translation.  (No effect on install)
o Added forgotten English UTF8 text to the installer for completeness.
o Added Portuguese (Portuguese_pt) language file to the mix.  Thanks, FragaCampos (http://www.simplemachines.org/community/index.php?action=profile;u=94593)!!!
o Fixed incorrect image assigned to Outbox PMs.  Thanks, FragaCampos (http://www.simplemachines.org/community/index.php?action=profile;u=94593)!
o Fixed an undefined variable error, reported by FragaCampos (http://www.simplemachines.org/community/index.php?action=profile;u=94593)
o Added Mail Image tooltips, as requested by FragaCampos (http://www.simplemachines.org/community/index.php?action=profile;u=94593)
o Fixed a "bug" in the Manage Rules page that allowed users to assign more than one action to a Rule

NOTE: There is still a bug in the code that would permit a single PM to occupy two folders if they match two rules.  I haven't found the code responsible for this and am still looking.
Title: Re: Enhanced PM System
Post by: FragaCampos on June 29, 2014, 03:37:35 PM
Awesome.  8)
Thanks a lot for your efforts!

But before I test it, I have a small problem which I never had and I don't know if you can help me.
When uninstalling version 1.3, I got an error which I never saw in years using SMF:
Execute Modification install_1.3.xml Modification parse error

Any advise from you or should I open a new topic in SMF Support?
Title: Re: Enhanced PM System
Post by: dougiefresh on June 29, 2014, 08:03:46 PM
Quote from: FragaCampos on June 29, 2014, 03:37:35 PM
But before I test it, I have a small problem which I never had and I don't know if you can help me.
When uninstalling version 1.3, I got an error which I never saw in years using SMF:
Execute Modification install_1.3.xml Modification parse error

Any advise from you or should I open a new topic in SMF Support?
Damn....  Sorry about that.  There's an error in version 1.3's package_info.xml file, which references install_1.3.xml, which doesn't exist.  My apologizes.  Version 1.4 doesn't have this glitch....

I just tested uninstallation of version 1.3 and everything went well on my forum, so you should be able to uninstall it without any fuss.  The missing xml file will throw an error during the testing phase of uninstallation, but not the actual uninstallation.

Hope this helps....
Title: Re: Enhanced PM System
Post by: FragaCampos on June 29, 2014, 11:47:06 PM
No problem. Everything went OK. ;)

After some testing, I can confirm this:
- Each time I go to the Send PM panel, I still get this error (it throws this error three times in three different lines):
index.php?action=pm;sa=send
8: Undefined index: edit
public_html/Sources/PersonalMessage.php
Line: 1878


- As you can see in the following screenshot, I still see the wrong icon (read instead of unread) in Outbox.
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg856.imageshack.us%2Fimg856%2F1977%2Fndth.png&hash=a356a3da73907b890021e122b85a9821b27fe063)

- Here's a perfected version of Portuguese translation. Remember that -pt and -pt_utf8 will give errors in the output depending on the codification of the language file. I'll suggest an ANSI codification for the -pt file and an ANSI as UTF-8 for the -pt_utf8 file.
Title: Re: Enhanced PM System
Post by: dougiefresh on June 30, 2014, 05:06:19 PM
Uploaded v1.5 - June 30th, 2014
o Added support for English-British and English-British UTF8 languages...
o Seperated English and English-UTF8 language file and fixed UTF8 file...
o Fixed Portuguese (Portuguese_pt) language files to make sure they install right.
o Fixed Portuguese (Portuguese_pt) UTF8 language files to make sure they install right.
o Reinstating missing problem & fix from v1.1 from install.xml....
o Reversed undefined variable error fix from v1.4 because of missing problem/fix from v1.1....
o Fixed incorrect image assigned to Outbox PMs in install.xmlupgrade_1.4.xml had correct patch.
o Fixed a "bug" in function ApplyRules that allowed one PM to be put in multiple folders.
o Fixed an incompatibility with latest version of PM Attachment that results in install error.




I apologize about the fact that the newest version of the mod wasn't available for the last 6 hours.  I posted the new version, then realized I have some big errors in it and pulled it from the mod system.  I got everything fixed and have reposted version 1.5.....

I created a clean test forum and added the language files for English UTF-8, British English, British English UTF8, Portuguese-PL, and Portuguese-PL UTF8.  Then I tested the mod against that clean test forum, which it did install correctly.  So hopefully, this will fix all the bugs in the mod  O:) :P

On another note, I've been putting off the Sent Items Search modifications for the last 2 versions and have decided that it will become version 2.0, since that will give room for "additional" bug fix releases without disturbing the new version number....  That and it makes my life a little easier  :P
Title: Re: Enhanced PM System
Post by: FragaCampos on June 30, 2014, 05:40:52 PM
No problem, but I noticed some bad behaviour from this mod... :P
I don't know if this was because of that confusion between 1.4 and 1.5, but I think this also happened with 1.3:
I noticed some PMs were disappearing from the DB and I didn't know if this was something server related or because of the mod, since it never happened since I use SMF. I had confirmation of the problem from other users, so it wasn't an isolated case on my side. From what I understood, this is what is happening:
I send a PM and receive an answer. Until here, everything is good, but if I reply again, the previous two PMs disappear from MY inbox and from the OTHER member's inbox. They disappear completely, even when uninstalling the mod. Maybe it has something to do with the conversation mode?

For now, I uninstalled it and I'll have to make more tests, this time on localhost. :P Can you test and verify this on your side?
Title: Re: Enhanced PM System
Post by: dougiefresh on June 30, 2014, 06:24:57 PM
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.montney.com%2Fimages%2Fwow.gif&hash=7d66aeff5953c7941f6e4c682f6f18f8a258730f) (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.montney.com%2Fimages%2Fargh.gif&hash=1ad619a8712d4f4a7b9c7c24bf82f19f5a631e02)
Okay, now that I've gotten that out of the way....  :P

I've narrowed that problem down to the sendpm function in Subs-Post.php.....
Title: Re: Enhanced PM System
Post by: dougiefresh on July 02, 2014, 04:25:57 AM
Uploaded v1.6 - July 2nd, 2014
o Fix for incorrect Unsend/Edit buttons showing up for PMs.
o Fix for reporting message sent correctly, instead of message edited
o Fixes for "Disappearing & Lost PM problem", reported by FragaCampos (http://www.simplemachines.org/community/index.php?action=profile;u=94593)
o Mod Updating capability removed because of problems rising from using upgrades...

NOTES ABOUT THIS VERSION:
Upgrade literally caused all sorts of problems during my testing, so it has been disabled for this version.  Uninstalling v1.0 thru v1.5 is necessary to install v1.6.

ABOUT SENT ITEMS SEARCH:
Sent Item searching has been relabeled the version 2.0 release, thus making room for additional bug fixes if necessary without my having to relabel the version with sent item searching again and again.....

EDIT: Added something I forgot....
Title: Re: Enhanced PM System
Post by: dougiefresh on July 02, 2014, 12:51:26 PM
Quote from: FragaCampos on June 30, 2014, 05:40:52 PM
No problem, but I noticed some bad behaviour from this mod... :P
I don't know if this was because of that confusion between 1.4 and 1.5, but I think this also happened with 1.3:
I noticed some PMs were disappearing from the DB and I didn't know if this was something server related or because of the mod, since it never happened since I use SMF. I had confirmation of the problem from other users, so it wasn't an isolated case on my side. From what I understood, this is what is happening:
I send a PM and receive an answer. Until here, everything is good, but if I reply again, the previous two PMs disappear from MY inbox and from the OTHER member's inbox. They disappear completely, even when uninstalling the mod. Maybe it has something to do with the conversation mode?

For now, I uninstalled it and I'll have to make more tests, this time on localhost. :P Can you test and verify this on your side?
I can confirm that this behavior was present in every version of this mod from v1.0 onwards....  It had to do with the PM sending code, in that it needs to replace the PM that is in the database with the edited version.  That particular piece of code was looking to see if the PM number was defined.  If it was, then it replaced that PM with the new text.  If not, it correctly inserted the new PM into the database.  But what it did wasn't correct, and I had overlooked that.  So the problem has been fixed in v1.6.....

BTW, the upgrade capability of this mod was removed from v1.6 because of the fact that there were conflicting upgrade changes in some of the files.  I also discovered that the changes made by the upgrade files didn't add up to what the install.xml contained....  Because it was impossible to make the changes add up correctly, the decision was made to remove the upgrade files from this mod.....  Just so ya know.
Title: Re: Enhanced PM System
Post by: dougiefresh on July 05, 2014, 11:50:21 AM
@FragaCampons: Any other problems you wanna report?

BTW, I've got ideas for the "Manage Folders" and "Manage Rules" pages, as well as an idea for additional options via the "Purge Messages" page....

Quote from: FragaCampos on June 28, 2014, 04:45:37 PM
I remembered another thing SMF's PM system doesn't do that would be a nice addition to this mod.
When searching for PMs we can't choose what to do with them (move, delete, reply, etc.)
For example: I want to search for all received PMs from user X. The system shows 10 messages but it should exist a column to select those I want to delete, move, etc.

It's a "simple" implementation that would improve PMs system even more.  O:)
UPDATE: Search functionality has been updated for version 2.0, with the ability to search "Sent Items" and "Outbox" folders separately.  I've got a checkbox for all searched PMs, along with the "Removed Selected" button implemented and working.  Moving stuff to a folder is gonna require a little (*cough*cough*) more work, but I'm working on it....  It will be a part of version 2.0....

Quote from: FragaCampos on June 24, 2014, 07:14:00 PM
-> Is it possible to add folders to "Sent Items" too? (That way it would be also possible to move sent PMs)
UPDATE: Is planned for a future release.....  Maybe not version 2.0, though....
Title: Re: Enhanced PM System
Post by: dougiefresh on July 05, 2014, 01:03:19 PM
Here's an idea: Do we need a "Deleted" folder?  You can delete the message, then undelete if you later discover that you deleted it by mistake.  Obviously, you could "really" delete it, which would just mark it a little different than a deleted message would be, but it wouldn't show up in the "Deleted" folder.....  Functionally the idea should work, but should I "waste" my time on it?

This might save an admin from having to go into the database and "recover" the deleted message, assuming all recipients hadn't deleted it....  Of course, if everybody deleted it, it's gone.... just like with SMF's core PM functionality.
Title: Re: Enhanced PM System
Post by: dougiefresh on July 06, 2014, 10:07:41 PM
UPDATE: The search results page has taken a turn for the better.  I've copied the PM display code and pasted it into the search results template.  Attached is the result.  Curve theme is the only one done as of this moment....  I've still gotta fix the search-by-user feature for sent items.  Maybe a few more days...

BTW, also found this topic: [2.1?] "User xx has blocked your personal message." (http://www.simplemachines.org/community/index.php?topic=478886.0).  Interesting idea....  Shouldn't be too hard to implement....
Title: Re: Enhanced PM System
Post by: Steve on July 07, 2014, 06:57:29 AM
Regarding the 'Deleted' folder ...

I've use software that had it and liked it. Without it, I just create a holding folder and move anything I may want to keep to there so for me, I can live with or without it. Without it doesn't cover 'accidental' deletion though ...
Title: Re: Enhanced PM System
Post by: dougiefresh on July 08, 2014, 03:53:16 PM
@FragaCampos: I have one more string for you to translate, if you will:  "To user" (As in "you sent this pm to which users?").  This string will be used in the Search template....   Thanks in advance. Used google translate.....

UPDATE: Searching SENT ITEMS and OUTBOX PMs by usernames has been completed....  Actually easier than I thought....
Title: Re: Enhanced PM System
Post by: dougiefresh on July 09, 2014, 08:56:21 AM
Uploaded v2.0 - July 9th, 2014
o If user is on recipient's PM ignore list, it is shown upon entering the reply page.
o Fix for duplicate buttons showing up for PMs in Core theme.
o Added ability to mass-delete of PMs in the Outbox.
o Added support for searching Sent Items and Outbox folders for PMs
o Search results now indicates whether the PMs found have been read or not.
o Copied PM display code for use by complete search result template...
o Added ability to mass-delete from all folders during searches.
o Added ability to mass-move messages from the Inbox and Folders during searches.
o Added ability to search Sent Items and Outbox PMs by username.
o Minor reorganization of template code to avoid duplication of necessary functions.




I've been working on version 2.0 for the last month, being interrupted by bug reports and fixes since v1.3....  I'm gonna take some time off from this, with exception of bug fixes that escaped my testing, before embarking on the next set of changes....  And, no, I haven't decided on what is getting "fixed" (or maybe I should say "enhanced") next.... Hope y'all enjoy!

BTW, I think it's just bad when you are rewriting code and find this line:
// !!! This still needs to be made pretty.
in PersonalMessages.template.php in the Core theme.....  Not trying to call anybody out, but, yeah, I thought that whole area was fugly, too....
Title: Re: Enhanced PM System
Post by: FragaCampos on July 14, 2014, 08:08:15 PM
Hi, dougiefresh.
Wow! So many good news!  8)

Sorry for the late reply. Too much work and few hours of sleep. I didn't test this new version yet, but I will as soon as I have a day off...

Thank you very much and see you soon! ;)


PS: I didn't see it in action yet, but I believe the best translation of "To user" would be (under the right context) "Enviada a".
Title: Re: Enhanced PM System
Post by: ExSpirit on July 30, 2014, 07:19:17 AM
This is really great mod, but I have 1 question - how can I change order of displayed messages in conversation? I would like to have newest on bottom, not on top.
Title: Re: Enhanced PM System
Post by: dougiefresh on August 05, 2014, 05:18:07 PM
Sorry about the lateness of the reply.  While in "My Messages" (from the top of the screen), go to "Change Settings".  You're looking for the "Show most recent personal messages at top." option.  Unchecking that option should get what you need....
Title: Re: Enhanced PM System
Post by: ExSpirit on August 06, 2014, 02:42:36 PM
This only changes the list of subjects (in inbox), but not conversation order (so when I read messages).
Title: Re: Enhanced PM System
Post by: ExSpirit on August 12, 2014, 06:28:41 PM
I found two more bugs (tested on clean install):
- when I receive a message and open it, then go back to inbox, that message is still marked as "unread"
- when I receive new message I receive popup warning about new message, but when I receive second or all next messages from that conversation I don't receive any more popups or notices about new message.
Title: Re: Enhanced PM System
Post by: dougiefresh on August 12, 2014, 07:43:43 PM
Quote from: ExSpirit on August 12, 2014, 06:28:41 PM
I found two more bugs (tested on clean install):
- when I receive a message and open it, then go back to inbox, that message is still marked as "unread"
- when I receive new message I receive popup warning about new message, but when I receive second or all next messages from that conversation I don't receive any more popups or notices about new message.
Interesting.... Lemme investigate these issues.  But it'll be tomorrow, as it's almost my bedtime :p

Quote from: ExSpirit on July 30, 2014, 07:19:17 AM
This is really great mod, but I have 1 question - how can I change order of displayed messages in conversation? I would like to have newest on bottom, not on top.
I'll have to write some more code to take care of this particular request.
Title: Re: Enhanced PM System
Post by: ExSpirit on August 13, 2014, 07:24:23 AM
Quote from: dougiefresh on August 12, 2014, 07:43:43 PM
Interesting.... Lemme investigate these issues.  But it'll be tomorrow, as it's almost my bedtime :p
OK, I hope you'll manage to find the solutions for those problems.

Quote from: dougiefresh on August 12, 2014, 07:43:43 PM
I'll have to write some more code to take care of this particular request.
There's already some setting in SMF to display messages on top or bottom and the same for personal messages, so I was hoping that along with that setting order of conversation titles would be sorted as well.  Maybe editing one line of code would be enough - where SQL call is made (ORDER BY * ASC/DESC)?
Title: Re: Enhanced PM System
Post by: -Captain Ghost- on August 13, 2014, 11:32:23 AM
hello
If you are accepting requests then i want to request one thing that can you add feature like pm readed.
Let me explain you
Ex:-Suppose x has sent a pm to y and if y has red the message then the x will get notified that the pm has been opened or readed by y.

Hope you had understood my request.

Thanks
Title: Re: Enhanced PM System
Post by: shadowandlight on August 16, 2014, 07:34:13 PM
Hello!

Is this mod compatible with sending PM's to a group?

Personal Message to Groups
http://custom.simplemachines.org/mods/index.php?mod=2178

If not, can this feature be added to this mod?
Title: Re: Enhanced PM System
Post by: dougiefresh on August 16, 2014, 09:11:54 PM
Quote from: shadowandlight on August 16, 2014, 07:34:13 PM
Is this mod compatible with sending PM's to a group?

Personal Message to Groups
http://custom.simplemachines.org/mods/index.php?mod=2178
I don't see why it wouldn't be compatible.  It installs fine without errors, installing it both before and after the Enhanced PM mod.  I personally haven't tested it yet, though....  However, when uninstalling these mods, they must be uninstalled in the same order as they were installed because of conflicts between the two mods.

Quote from: shadowandlight on August 16, 2014, 07:34:13 PM
If not, can this feature be added to this mod?
As for adding other mod's functionality to this one, I decline to do so, as it would duplicate work done by others....  Not to mention code licensing issues....

Quote from: -Captain Ghost- on August 13, 2014, 11:32:23 AM
If you are accepting requests then i want to request one thing that can you add feature like pm readed.
Let me explain you
Ex:-Suppose x has sent a pm to y and if y has red the message then the x will get notified that the pm has been opened or readed by y.
Lemme look into this request.
Title: Re: Enhanced PM System
Post by: dougiefresh on August 17, 2014, 07:52:54 AM
Quote from: ExSpirit on August 12, 2014, 06:28:41 PM
- when I receive a message and open it, then go back to inbox, that message is still marked as "unread"
- when I receive new message I receive popup warning about new message, but when I receive second or all next messages from that conversation I don't receive any more popups or notices about new message.
I reproduced both of these issues.  Will investigate....
Title: Re: Enhanced PM System
Post by: SilverWings on August 18, 2014, 03:50:34 PM
Quote from: dougiefresh on August 17, 2014, 07:52:54 AM
Quote from: ExSpirit on August 12, 2014, 06:28:41 PM
- when I receive a message and open it, then go back to inbox, that message is still marked as "unread"
- when I receive new message I receive popup warning about new message, but when I receive second or all next messages from that conversation I don't receive any more popups or notices about new message.
I reproduced both of these issues.  Will investigate....
I have the same problems and I installed latest version. How can I fix this?
Title: Re: Enhanced PM System
Post by: dougiefresh on August 18, 2014, 08:03:13 PM
Quote from: SilverWings on August 18, 2014, 03:50:34 PM
I have the same problems and I installed latest version. How can I fix this?
Well, when I figure that out, I'll post a new version....
Title: Re: Enhanced PM System
Post by: SilverWings on August 20, 2014, 09:19:23 AM
Okey. Can you please also write here which lines to change, because I would just like to fix this without reinstalling the mod. When do you expect to fix this (already have, in a few days, a few weeks, months,...)?
Title: Re: Enhanced PM System
Post by: dougiefresh on August 20, 2014, 01:28:18 PM
Quote from: SilverWings on August 20, 2014, 09:19:23 AM
Okey. Can you please also write here which lines to change, because I would just like to fix this without reinstalling the mod.
Okay dokey.... Can do.

Quote from: SilverWings on August 20, 2014, 09:19:23 AM
When do you expect to fix this (already have, in a few days, a few weeks, months,...)?
Well, considering I worked two 12-hour shifts the last two days and worked 8 hours today, all three of which were in the 90+ degree F heat, I just haven't gotten around to messing around with the code lately, as my personal life takes FAR MORE precedence over these mods....  Maybe I'll get to it today.  I don't know.  I know one thing, though: Pressuring me to fix things on YOUR schedule does not work for me.  >:(  (Unless you wanna pay me, then that becomes a different story....)  And no, I'm not being ******y....

Now, if you want to actually research the issue, then you can feel free to share your findings.  I would incorporate them into the mod and credit you properly.....
Title: Re: Enhanced PM System
Post by: SilverWings on August 20, 2014, 02:58:08 PM
Oh, okey, I understand. I wasn't trying pressuring you, it's better that you take a look at this problem when you have time and properly fix it as do something fast and not as it should be. So just take your time. I was just interested in approx timeline, because my users are also asking me when will the PM system work again, because those are really annoying bugs.

If I would be good at coding I would try to fix it myself and share the fix, but I'm not. And I don't know how big of a problems are those to fix - if that a few minutes of work, a few hours or even more complex and takes much more time?
Title: Re: Enhanced PM System
Post by: dougiefresh on August 20, 2014, 03:22:39 PM
Quote from: SilverWings on August 20, 2014, 02:58:08 PM
Oh, okey, I understand. I wasn't trying pressuring you, it's better that you take a look at this problem when you have time and properly fix it as do something fast and not as it should be. So just take your time. I was just interested in approx timeline, because my users are also asking me when will the PM system work again, because those are really annoying bugs.

If I would be good at coding I would try to fix it myself and share the fix, but I'm not. And I don't know how big of a problems are those to fix - if that a few minutes of work, a few hours or even more complex and takes much more time?
@SilverWings: I reread my response and decided I REALLY needed a nap.  So I took one....  Now I really want to apologize.  Yeah, I want to fix them right.  And I don't know how big of a bug these are.  That being said, I have to figure where the bug is coming from....  And if coding was easy, everybody would do it....

Quote from: ExSpirit on August 12, 2014, 06:28:41 PM
I found two more bugs (tested on clean install):
- when I receive a message and open it, then go back to inbox, that message is still marked as "unread"
- when I receive new message I receive popup warning about new message, but when I receive second or all next messages from that conversation I don't receive any more popups or notices about new message.
Okay, I found where the first bug is taking place.  Look in PersonalMessage.php and replace this:
Code (Find) Select
// Otherwise do just the current one!
elseif (!empty($context['current_pm']) && ($context['display_mode'] == 1 || (isset($_GET['pmid']) && $context['folder'] != 'unread')))
markMessages($display_pms, $context['current_label_id']);

with this:
Code (Replace) Select
// Otherwise do just the current one!
elseif (!empty($context['current_pm']))
markMessages($display_pms, $context['current_label_id']);

What this does is RESTORES the original coding for marking messages as read.  This fixes the first bug that ExSpirit reported from the quote.
Title: Re: Enhanced PM System
Post by: dougiefresh on August 20, 2014, 03:50:45 PM
Quote from: ExSpirit on August 12, 2014, 06:28:41 PM
I found two more bugs (tested on clean install):
- when I receive a message and open it, then go back to inbox, that message is still marked as "unread"
- when I receive new message I receive popup warning about new message, but when I receive second or all next messages from that conversation I don't receive any more popups or notices about new message.
I found the second part of the bug report.  Replace this:
Code (Find) Select
// Add one to their unread and read message counts.
if (empty($pmsg))

with this:
Code (Replace) Select
// Add one to their unread and read message counts.
if (empty($pmsg) || !isset($_REQUEST['edit']))

What this does is CORRECTLY updates the member information to reflect that there is a new PM whenever a new PM is sent.

Quote from: SilverWings on August 20, 2014, 09:19:23 AM
Okey. Can you please also write here which lines to change, because I would just like to fix this without reinstalling the mod.
You will be able to upgrade from version 2.0 to version 2.1 using the v2.1 installer when it comes out.
Title: Re: Enhanced PM System
Post by: SilverWings on August 20, 2014, 04:26:57 PM
Great, I have made those changes and I think that works now.

While doing that I found another bug and that is if I go inside some conversation with more messages (at this one which I tested last time had 9 messages) I can't delete it by clicking delete at any message or not even if I click "Delete this conversation" at the bottom. When I click the button to delete conversation I get to inbox but don't get any message. I can delete conversation by checking checkbox in inbox, but not from withing conversation.
Title: Re: Enhanced PM System
Post by: dougiefresh on August 20, 2014, 04:28:50 PM
Hmmm....  Yet another bug  ::) :P  Lemme look into it.
Title: Re: Enhanced PM System
Post by: SilverWings on August 20, 2014, 04:34:50 PM
Okey. ;D

I tested some more and sometimes when you have longer conversation and the last message is not from you and you click "Delete this conversation" button, only last message is removed (so that last message is then yours). Weird.
Title: Re: Enhanced PM System
Post by: dougiefresh on August 21, 2014, 02:08:06 PM
This bug was caused by the display mode not being set correctly during all processing of PMs.  Here's how to fix... Find this:
Code (Find) Select
// Set the PM view to conversation mode unless admin settings allow users to select a different view:
if (empty($modSettings['eps_pm_view_switch']))
$context['display_mode'] = 2;

// Make sure the starting location is valid.

Replace with this:
Code (Replace) Select
// Make sure the starting location is valid.

Second operation: Find this:
Code (Find) Select
// Preferences...
and replace it with this:
Code (Replace) Select
// Set the PM view to conversation mode unless admin settings allow users to select a different view:
if (empty($modSettings['eps_pm_view_switch']))
{
$context['display_mode'] = 2;
unset($_GET['view']);
}

// Preferences...

What this does is moves the code to the beginning of the PM processing code.   This should solve the bug in the mod.
Title: Re: Enhanced PM System
Post by: dougiefresh on August 21, 2014, 02:25:22 PM
Quote from: ExSpirit on August 06, 2014, 02:42:36 PM
Quote from: dougiefresh on August 05, 2014, 05:18:07 PM
Quote from: ExSpirit on July 30, 2014, 07:19:17 AM
This is really great mod, but I have 1 question - how can I change order of displayed messages in conversation? I would like to have newest on bottom, not on top.
Sorry about the lateness of the reply.  While in "My Messages" (from the top of the screen), go to "Change Settings".  You're looking for the "Show most recent personal messages at top." option.  Unchecking that option should get what you need....
This only changes the list of subjects (in inbox), but not conversation order (so when I read messages).
I tested the checkbox that I told you about and it changes both the list of subjects as well as the conversation order.  I can split that checkbox into two, one for the conversation order and one for the messages order, if you like.

Quote from: -Captain Ghost- on August 13, 2014, 11:32:23 AM
hello
If you are accepting requests then i want to request one thing that can you add feature like pm readed.
Let me explain you
Ex:-Suppose x has sent a pm to y and if y has red the message then the x will get notified that the pm has been opened or readed by y.

Hope you had understood my request.

Thanks
The ability to know whether your recipient has opened and/or read the PM is already present in the mod.  Just go to the "Outbox" folder to see which PMs haven't been opened/read.

Or are you wanting something on the main screen (or any screen for that matter) popping up saying the PM was opened?
Title: Re: Enhanced PM System
Post by: SilverWings on August 21, 2014, 02:47:46 PM
Fantastic, I think it works great now. Messages deletes without a problem so far. :) Thank you very much for the fix.
Title: Re: Enhanced PM System
Post by: SilverWings on August 21, 2014, 03:11:02 PM
Oh no, I wrote to soon. :( I found out that delete still doesn't work like ti should. Conversation deletes now but I have now tried to delete only one message from my friend, but entire conversation got deleted (instead of only that one specific message).
Title: Re: Enhanced PM System
Post by: dougiefresh on August 21, 2014, 03:28:36 PM
Well, I made these changes to my local copy and it works fine, both convo delete and individual PM delete....  Did you do both steps I told you to do?  Have you done any other modifications to the PersonalMessage.php file?
Title: Re: Enhanced PM System
Post by: SilverWings on August 21, 2014, 03:46:38 PM
I have done both steps and I don't have any other modification.

Looks like a bit "random" problem, because sometimes messages are deleted, but sometimes not, I can't find out why and when. The closest thing which I came to now is send someone a message, and then he should return 2 messages and then reply back and then delete both his messages - on second attempt entire conversation will be deleted. But it's not always like that, sometimes 3 messages are enough and only last one or first one is deleted and entire conversation is removed. But I don't know when, because it's not all the time.
Title: Re: Enhanced PM System
Post by: SilverWings on August 21, 2014, 03:51:44 PM
Another big problem which I discovered now:

If I am in my inbox and before I click on some new message if other person sends another new message in that conversation and after that I click on link to open conversation (without refreshing page) I get error (not enough rights), so I have to go back to inbox and click the link again. The problem is that when new message arrives in conversation, pmid changes in URL, so old one no longer works.
Title: Re: Enhanced PM System
Post by: dougiefresh on August 21, 2014, 07:40:31 PM
Lemme see if I can reproduce this issue....  If I can, I'll fix it....
Title: Re: Enhanced PM System
Post by: SilverWings on August 22, 2014, 02:27:18 AM
OK. If you still won't be able to reproduce this issue let me know I'll write a bit more details how to do it.

I found another bug and this is if I quote myself in conversation, then button for reply (on the end of conversation) no longer works as it should, because when I click it page for sending messages is opened but recipient is not selected.
Title: Re: Enhanced PM System
Post by: dougiefresh on August 22, 2014, 06:26:42 PM
Quote from: SilverWings on August 22, 2014, 02:27:18 AM
OK. If you still won't be able to reproduce this issue let me know I'll write a bit more details how to do it.
I just worked a 11 hour shift in 90+ degree heat, so I'm feeling kinda wore out.  If you wouldn't mind, can you outline how to reproduce the issue that you're seeing so that I can work on it some without having to figure out for myself how to reproduce it?  I appreciate the assistance!  Thanks!
Title: Re: Enhanced PM System
Post by: dougiefresh on August 24, 2014, 10:37:49 AM
Quote from: SilverWings on August 21, 2014, 03:11:02 PM
Oh no, I wrote to soon. :( I found out that delete still doesn't work like ti should. Conversation deletes now but I have now tried to delete only one message from my friend, but entire conversation got deleted (instead of only that one specific message).
I stared at the code some today and figured out where it is probably happening. 

First: In PersonalMessage.php, look for this:
Code (Find) Select
if ($folder == 'sent' || $folder === null)
and replace it with this:
Code (Replace) Select
if ($folder == 'sent' || $folder == 'unread' || $folder === null)


Second: Find this:
Code (Find) Select
if ($folder != 'sent' || $folder === null)
and replace it with this:
Code (Replace) Select
if (($folder != 'sent' && $folder != 'unread') || $folder === null)


Third: Find this:
Code (Find) Select
deleteMessages(null, $_REQUEST['f'] != 'sent' ? 'inbox' : 'sent');
and replace it with this:
Code (Replace) Select
deleteMessages(null, $_REQUEST['f'] != 'sent' ? ($_REQUEST['f'] != 'unread' ? 'inbox' : 'unread') : 'sent');

This should stop entire conversations from disappearing from the your PM box when you are trying to delete a message from the Outbox folder....

EDIT: Updated to include 3rd operation.
EDIT2: Fixed 1st operation so that it sees the Outbox correctly....
Title: Re: Enhanced PM System
Post by: dougiefresh on August 24, 2014, 01:16:52 PM
Quote from: SilverWings on August 22, 2014, 02:27:18 AM
I found another bug and this is if I quote myself in conversation, then button for reply (on the end of conversation) no longer works as it should, because when I click it page for sending messages is opened but recipient is not selected.
Yup, I can confirm that this is a bug within the SMF software, not specifically my mod though.  If another user quotes you, the recipient is filled in.  If you quote yourself, it is not....  This happens whether or not my mod is installed.  I'm not sure how to resolve this...

EDIT: I figured out how to resolve this.  My inspiration came from the A "Quote to All" in PM Conversation mode? (http://www.simplemachines.org/community/index.php?topic=503208.msg3539234#msg3539234) thread. 
Title: Re: Enhanced PM System
Post by: dougiefresh on August 24, 2014, 03:27:13 PM
Uploaded v2.1 - August 24th, 2014
o Fixed a bug where a PM message is read by the user and still marked NEW, reported by ExSpirit (http://www.simplemachines.org/community/index.php?action=profile;u=84861)
o Fixed a bug where user info is not updated when sent a new PM, reported by ExSpirit (http://www.simplemachines.org/community/index.php?action=profile;u=84861)
o Fixed a bug where the PM display mode not being set to conversation correctly, reported by SilverWings (http://www.simplemachines.org/community/index.php?action=profile;u=251055)
o Fixed a bug where PMs deleted from Outbox are incorrectly deleted, reported by SilverWings (http://www.simplemachines.org/community/index.php?action=profile;u=251055)
o Added option to allow muted members the ability to send PMs.  Thanks, Corelogik (http://www.simplemachines.org/community/index.php?action=profile;u=181043)!
o Added option to allow members to not block Admin PMs within the rules.  Thanks, danielwmoore (http://www.simplemachines.org/community/index.php?action=profile;u=221370)!

EDIT: Fixed typo indicating members didn't have the ability to block Admin PMs with the PM rules.  This update allows admin to block the ability to create rules that include the entire Admin group.  Existing rules aren't modified.

EDIT2: The "Quote to All" functionality was stripped out of v2.1 because of improper placement.....
Title: Re: Enhanced PM System
Post by: SilverWings on August 25, 2014, 12:42:57 PM
Great, I will test those changes in next days (I am currently out of town with bad WiFi connection).

What I see from now this one hasn't been solved yet, right?
Quote from: SilverWings on August 21, 2014, 03:51:44 PM
Another big problem which I discovered now:

If I am in my inbox and before I click on some new message if other person sends another new message in that conversation and after that I click on link to open conversation (without refreshing page) I get error (not enough rights), so I have to go back to inbox and click the link again. The problem is that when new message arrives in conversation, pmid changes in URL, so old one no longer works.

Quote from: dougiefresh on August 24, 2014, 01:16:52 PM
Quote from: SilverWings on August 22, 2014, 02:27:18 AM
I found another bug and this is if I quote myself in conversation, then button for reply (on the end of conversation) no longer works as it should, because when I click it page for sending messages is opened but recipient is not selected.
Yup, I can confirm that this is a bug within the SMF software, not specifically my mod though.  If another user quotes you, the recipient is filled in.  If you quote yourself, it is not....  This happens whether or not my mod is installed.  I'm not sure how to resolve this...

EDIT: I figured out how to resolve this.  My inspiration came from the A "Quote to All" in PM Conversation mode? (http://www.simplemachines.org/community/index.php?topic=503208.msg3539234#msg3539234) thread.
Can you write how to solve this problem (what to change)?
Title: Re: Enhanced PM System
Post by: dougiefresh on August 26, 2014, 04:43:56 PM
Quote from: SilverWings on August 25, 2014, 12:42:57 PM
What I see from now this one hasn't been solved yet, right?
Quote from: SilverWings on August 21, 2014, 03:51:44 PM
Another big problem which I discovered now:

If I am in my inbox and before I click on some new message if other person sends another new message in that conversation and after that I click on link to open conversation (without refreshing page) I get error (not enough rights), so I have to go back to inbox and click the link again. The problem is that when new message arrives in conversation, pmid changes in URL, so old one no longer works.
Honestly, I don't know because I forgot to research that issue.  I think one of the other fixes might have solved the bug you mentioned in the quotes, but I'm not sure.

Quote from: SilverWings on August 25, 2014, 12:42:57 PM
Quote from: dougiefresh on August 24, 2014, 01:16:52 PM
Quote from: SilverWings on August 22, 2014, 02:27:18 AM
I found another bug and this is if I quote myself in conversation, then button for reply (on the end of conversation) no longer works as it should, because when I click it page for sending messages is opened but recipient is not selected.
Yup, I can confirm that this is a bug within the SMF software, not specifically my mod though.  If another user quotes you, the recipient is filled in.  If you quote yourself, it is not....  This happens whether or not my mod is installed.  I'm not sure how to resolve this...

EDIT: I figured out how to resolve this.  My inspiration came from the A "Quote to All" in PM Conversation mode? (http://www.simplemachines.org/community/index.php?topic=503208.msg3539234#msg3539234) thread.
Can you write how to solve this problem (what to change)?
In Themes/default/PersonalMessage.php, find this:
Code (Find) Select
<li class="quote_button"><a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';quote', $context['folder'] == 'sent' ? '' : ';u=' . $message['member']['id'], '">', $txt['quote'], '</a></li>';
and replace it with it:
Code (Replace) Select
<li class="quote_button"><a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';quote', $context['folder'] == 'sent' ? '' : ';u=' . $message['member']['id'], '">', $txt['quote'], '</a></li>
<li class="quote_button"><a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';quote;u=all">', $txt['quote_to_all'], '</a></li>';
Title: Re: Enhanced PM System
Post by: SilverWings on August 27, 2014, 02:06:42 AM
Should I replace it with this as you wrote:

Quote<li class="quote_button"><a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';quote', $context['folder'] == 'sent' ? '' : ';u=' . $message['member']['id'], '">', $txt['quote'], '</a></li>
               <li class="quote_button"><a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';quote;u=all">', $txt['quote_to_all'], '</a></li>';

Or you copied the first line again by mistake and should be replaced like this:

Quote<li class="quote_button"><a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';quote;u=all">', $txt['quote_to_all'], '</a></li>';


I managed to make all modification which you wrote, but the bug with URL still exists, so those changes don't fix it. I have now installed latest mod version on clean SMF and tested if this is fixed (so that if it was I would compare files and see the changes), but this problem still exists even with latest version 2.1:

If I am in my inbox and before I click on some conversation if other person sends another new message in that conversation and after that I click on link to open conversation (without refreshing page) I get error "You are not allowed to access this section", so I have to go back to inbox and click the link again. The problem is that when new message arrives in conversation, pmid changes in URL, so old one no longer works.
Title: Re: Enhanced PM System
Post by: dougiefresh on August 27, 2014, 01:41:13 PM
Quote from: SilverWings on August 27, 2014, 02:06:42 AM
Should I replace it with this as you wrote:

Quote<li class="quote_button"><a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';quote', $context['folder'] == 'sent' ? '' : ';u=' . $message['member']['id'], '">', $txt['quote'], '</a></li>
               <li class="quote_button"><a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';quote;u=all">', $txt['quote_to_all'], '</a></li>';

Or you copied the first line again by mistake and should be replaced like this:

Quote<li class="quote_button"><a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';quote;u=all">', $txt['quote_to_all'], '</a></li>';
Either one should work, however, if you just add the line beneath the existing one, make sure you move the quotes and semicolon so that you don't get errors when you try to use it.

Quote from: SilverWings on August 27, 2014, 02:06:42 AM
I managed to make all modification which you wrote, but the bug with URL still exists, so those changes don't fix it. I have now installed latest mod version on clean SMF and tested if this is fixed (so that if it was I would compare files and see the changes), but this problem still exists even with latest version 2.1:

If I am in my inbox and before I click on some conversation if other person sends another new message in that conversation and after that I click on link to open conversation (without refreshing page) I get error "You are not allowed to access this section", so I have to go back to inbox and click the link again. The problem is that when new message arrives in conversation, pmid changes in URL, so old one no longer works.
Okay.  Lemme investigate this issue.
Title: Re: Enhanced PM System
Post by: NekoJonez on August 31, 2014, 12:20:45 PM
There are some options I would love to have on my forum as an admin, but there are some I dislike. There should be an option for the settings man.
Title: Re: Enhanced PM System
Post by: Arantor on August 31, 2014, 12:24:44 PM
Options such as...?
Title: Re: Enhanced PM System
Post by: ExSpirit on September 01, 2014, 05:47:29 AM
Quote from: dougiefresh on August 27, 2014, 01:41:13 PM
Quote from: SilverWings on August 27, 2014, 02:06:42 AM
I managed to make all modification which you wrote, but the bug with URL still exists, so those changes don't fix it. I have now installed latest mod version on clean SMF and tested if this is fixed (so that if it was I would compare files and see the changes), but this problem still exists even with latest version 2.1:

If I am in my inbox and before I click on some conversation if other person sends another new message in that conversation and after that I click on link to open conversation (without refreshing page) I get error "You are not allowed to access this section", so I have to go back to inbox and click the link again. The problem is that when new message arrives in conversation, pmid changes in URL, so old one no longer works.
Okay.  Lemme investigate this issue.
I have the same problem. I click on conversation and get error, because someone already replied.
Title: Re: Enhanced PM System
Post by: ExSpirit on September 03, 2014, 08:18:36 AM
And about the sorting order of messages in conversation list I changed in PersonalMessages.php from this:

ORDER BY ' . ($_GET['sort'] == 'pm.id_pm' && $context['folder'] != 'sent' ? 'id_pm' : '{raw:sort}') . ($descending ? ' DESC' : ' ASC') . (empty($_GET['pmsg']) ? '

to this:

ORDER BY ' . ($_GET['sort'] == 'pm.id_pm' && $context['folder'] != 'sent' ? 'id_pm' : '{raw:sort}') . ($descending ? ' DESC' : ' DESC') . (empty($_GET['pmsg']) ? '

...and new conversations are now on top (no longer on bottom) which is what I wanted, but there's one more problem with this - if I have more conversations so that pages are generated, I am always placed on last page when I go to inbox, so if I have 20 pages and I click on inbox I am thrown to last page (20) where old messages are shown, instead on first page so that I can see new messages on top. Any idea how can I fix this problem?
Title: Re: Enhanced PM System
Post by: dougiefresh on September 05, 2014, 10:39:57 AM
Quote from: NekoJonez on August 31, 2014, 12:20:45 PM
There are some options I would love to have on my forum as an admin, but there are some I dislike. There should be an option for the settings man.
Please be specific in what you want.  The worst that will happen is I'll say no to the options.  And "an option for the settings"?  Please explain.

EDIT: If the "option" that you are wanting is available in another mod, I'll point to it if I'm aware of such a mod......

Quote from: ExSpirit on September 01, 2014, 05:47:29 AM
Quote from: dougiefresh on August 27, 2014, 01:41:13 PM
Quote from: SilverWings on August 27, 2014, 02:06:42 AM
I managed to make all modification which you wrote, but the bug with URL still exists, so those changes don't fix it. I have now installed latest mod version on clean SMF and tested if this is fixed (so that if it was I would compare files and see the changes), but this problem still exists even with latest version 2.1:

If I am in my inbox and before I click on some conversation if other person sends another new message in that conversation and after that I click on link to open conversation (without refreshing page) I get error "You are not allowed to access this section", so I have to go back to inbox and click the link again. The problem is that when new message arrives in conversation, pmid changes in URL, so old one no longer works.
Okay.  Lemme investigate this issue.
I have the same problem. I click on conversation and get error, because someone already replied.
I managed to fix this issue for the next version.

Quote from: ExSpirit on September 03, 2014, 08:18:36 AM
And about the sorting order of messages in conversation list I changed in PersonalMessages.php from this:

ORDER BY ' . ($_GET['sort'] == 'pm.id_pm' && $context['folder'] != 'sent' ? 'id_pm' : '{raw:sort}') . ($descending ? ' DESC' : ' ASC') . (empty($_GET['pmsg']) ? '

to this:

ORDER BY ' . ($_GET['sort'] == 'pm.id_pm' && $context['folder'] != 'sent' ? 'id_pm' : '{raw:sort}') . ($descending ? ' DESC' : ' DESC') . (empty($_GET['pmsg']) ? '

...and new conversations are now on top (no longer on bottom) which is what I wanted, but there's one more problem with this - if I have more conversations so that pages are generated, I am always placed on last page when I go to inbox, so if I have 20 pages and I click on inbox I am thrown to last page (20) where old messages are shown, instead on first page so that I can see new messages on top. Any idea how can I fix this problem?
Well, my first thought is that you're using the wrong value for start variable passed.  But I'd have to look at the code a lot more to answer this question.
Title: Re: Enhanced PM System
Post by: SilverWings on September 05, 2014, 12:30:08 PM
Quote from: dougiefresh on September 05, 2014, 10:39:57 AM
I managed to fix this issue for the next version.
Great, can you please write what should be changed to fix this?
Title: Re: Enhanced PM System
Post by: dougiefresh on September 05, 2014, 01:35:21 PM
In PersonalMessage.php, replace this:
Code (Find) Select
// ... but wait - what if we want to start from a specific message?
if (isset($_GET['pmid']))
{
$pmID = (int) $_GET['pmid'];

// Make sure you have access to this PM.
if (!isAccessiblePM($pmID, $context['folder'] == 'sent' || $context['folder'] == 'unread' ? 'outbox' : 'inbox'))

with this:
Code (Replace) Select
// ... but wait - what if we want to start from a specific message?
if (isset($_GET['pmid']))
{
$pmID = (int) $_GET['pmid'];

// Make sure you have access to this PM.
if (!isAccessiblePM($pmID, $context['folder'] == 'sent' ? 'outbox' : 'inbox'))


Then find this:
Code (Find) Select
// Sanitize and validate pmsg variable if set.
if (isset($_GET['pmsg']))
{
$pmsg = (int) $_GET['pmsg'];

if (!isAccessiblePM($pmsg, $context['folder'] == 'sent' || $context['folder'] == 'unread' ? 'outbox' : 'inbox'))

and replace with this:
Code (Replace) Select
// Sanitize and validate pmsg variable if set.
if (isset($_GET['pmsg']))
{
$pmsg = (int) $_GET['pmsg'];

if (!isAccessiblePM($pmsg, $context['folder'] == 'sent' ? 'outbox' : 'inbox'))


These changes revert the code back to stock code.....
Title: Re: Enhanced PM System
Post by: SilverWings on September 05, 2014, 03:22:23 PM
I made those changes, but it's still the same - I am still getting "You are not allowed to access this section" error after clicking on conversation.
Title: Re: Enhanced PM System
Post by: dougiefresh on September 05, 2014, 09:20:54 PM
Hmmmm.....  I thought I had it cause my test actually succeeded....
Title: Re: Enhanced PM System
Post by: ExSpirit on September 06, 2014, 03:37:34 AM
Quote from: dougiefresh on September 05, 2014, 09:20:54 PM
Hmmmm.....  I thought I had it cause my test actually succeeded....
Same here - the same problem still exists.

Quote from: dougiefresh on September 05, 2014, 10:39:57 AM
Well, my first thought is that you're using the wrong value for start variable passed.  But I'd have to look at the code a lot more to answer this question.
I think I got this to work now, I made those changes:

I replaced this:
        if (!is_numeric($_GET['start']) || $_GET['start'] >= $max_messages)

With this:
if (!is_numeric($_GET['start'])) $_GET['start'] = 0;
else if (!is_numeric($_GET['start']) || $_GET['start'] >= $max_messages)


And what I already changed before:

Replaced this:
ORDER BY ' . ($_GET['sort'] == 'pm.id_pm' && $context['folder'] != 'sent' ? 'id_pm' : '{raw:sort}') . ($descending ? ' DESC' : ' ASC') . (empty($_GET['pmsg']) ? '

With this:
ORDER BY ' . ($_GET['sort'] == 'pm.id_pm' && $context['folder'] != 'sent' ? 'id_pm' : '{raw:sort}') . ($descending ? ' DESC' : ' DESC') . (empty($_GET['pmsg']) ? '

I haven't tested much but so far newest messages are on top and when I go ti inbox I start with first page, not last.
Title: Re: Enhanced PM System
Post by: Jeff B on September 06, 2014, 02:12:47 PM
I have an odd problem after installing this modification. I have no submit button on the message search!  Any ideas?
Title: Re: Enhanced PM System
Post by: dougiefresh on September 06, 2014, 04:44:36 PM
Quote from: Jeff B on September 06, 2014, 02:12:47 PM
I have an odd problem after installing this modification. I have no submit button on the message search!  Any ideas?
That's not good....  Can't believe I forgot that issue cause I fixed it in my Search Sent Personal Messages (PMs) (http://custom.simplemachines.org/mods/index.php?mod=3888) mod.  I'll fix it for the next version.

Quote from: ExSpirit on September 06, 2014, 03:37:34 AM
Quote from: dougiefresh on September 05, 2014, 09:20:54 PM
Hmmmm.....  I thought I had it cause my test actually succeeded....
Same here - the same problem still exists.

Quote from: dougiefresh on September 05, 2014, 10:39:57 AM
Well, my first thought is that you're using the wrong value for start variable passed.  But I'd have to look at the code a lot more to answer this question.
I think I got this to work now, I made those changes:

I replaced this:
        if (!is_numeric($_GET['start']) || $_GET['start'] >= $max_messages)

With this:
if (!is_numeric($_GET['start'])) $_GET['start'] = 0;
else if (!is_numeric($_GET['start']) || $_GET['start'] >= $max_messages)


And what I already changed before:

Replaced this:
ORDER BY ' . ($_GET['sort'] == 'pm.id_pm' && $context['folder'] != 'sent' ? 'id_pm' : '{raw:sort}') . ($descending ? ' DESC' : ' ASC') . (empty($_GET['pmsg']) ? '

With this:
ORDER BY ' . ($_GET['sort'] == 'pm.id_pm' && $context['folder'] != 'sent' ? 'id_pm' : '{raw:sort}') . ($descending ? ' DESC' : ' DESC') . (empty($_GET['pmsg']) ? '

I haven't tested much but so far newest messages are on top and when I go ti inbox I start with first page, not last.
Cool....  Mind if I incorporate these changes into the mod?  Will have to make a switch or something so that the option is MUCH more user-friendly....
Title: Re: Enhanced PM System
Post by: Jeff B on September 06, 2014, 06:03:21 PM
Is the fix to my issue in the code above? 
Title: Re: Enhanced PM System
Post by: ExSpirit on September 06, 2014, 06:08:28 PM
Quote from: dougiefresh on September 06, 2014, 04:44:36 PM
Cool....  Mind if I incorporate these changes into the mod?  Will have to make a switch or something so that the option is MUCH more user-friendly....
Sure, you can do that.
Title: Re: Enhanced PM System
Post by: dougiefresh on September 06, 2014, 08:39:49 PM
Quote from: Jeff B on September 06, 2014, 06:03:21 PM
Is the fix to my issue in the code above?
Unfortunately, no.   ExSpirit did a feature-request and shared how he did it in his code.  I haven't had much time to do much today.....
Title: Re: Enhanced PM System
Post by: NekoJonez on September 07, 2014, 08:09:05 AM
Quote from: dougiefresh on September 05, 2014, 10:39:57 AM
Quote from: NekoJonez on August 31, 2014, 12:20:45 PM
There are some options I would love to have on my forum as an admin, but there are some I dislike. There should be an option for the settings man.
Please be specific in what you want.  The worst that will happen is I'll say no to the options.  And "an option for the settings"?  Please explain.

EDIT: If the "option" that you are wanting is available in another mod, I'll point to it if I'm aware of such a mod......

I'll post or pm you a list, if I find the time. So, don't loose sleep over it or something ;)
Title: Re: Enhanced PM System
Post by: dougiefresh on September 07, 2014, 08:53:07 AM
Quote from: NekoJonez on September 07, 2014, 08:09:05 AM
Quote from: dougiefresh on September 05, 2014, 10:39:57 AM
Quote from: NekoJonez on August 31, 2014, 12:20:45 PM
There are some options I would love to have on my forum as an admin, but there are some I dislike. There should be an option for the settings man.
Please be specific in what you want.  The worst that will happen is I'll say no to the options.  And "an option for the settings"?  Please explain.

EDIT: If the "option" that you are wanting is available in another mod, I'll point to it if I'm aware of such a mod......

I'll post or pm you a list, if I find the time. So, don't lose sleep over it or something ;)
Sound like a plan to me!  Don't worry, I lose sleep over other things  ::)

EDIT: Prefer that you post it, since you already posted you want to see "some options"  :P
Title: Re: Enhanced PM System
Post by: SilverWings on September 07, 2014, 12:38:30 PM
dougiefresh do you have any new update for below bug?

QuoteIf I am in my inbox and before I click on some conversation if other person sends another new message in that conversation and after that I click on link to open conversation (without refreshing page) I get error "You are not allowed to access this section", so I have to go back to inbox and click the link again. The problem is that when new message arrives in conversation, pmid changes in URL, so old one no longer works.
Title: Re: Enhanced PM System
Post by: shadowandlight on September 07, 2014, 02:40:19 PM
Hello, when trying to install 2.1 of this mod, I am seeing the following errors.... ( I had 1.6 installed and I am trying to upgrade, I uninstalled 1.6 already).

http://i.imgur.com/blfTOF7.png
http://i.imgur.com/bAgyuLD.png
http://i.imgur.com/CobVw0P.png

edit - here is my installed mods
http://i.imgur.com/VoJl1Ud.png
Title: Re: Enhanced PM System
Post by: dougiefresh on September 07, 2014, 07:14:29 PM
Quote from: shadowandlight on September 07, 2014, 02:40:19 PM
Hello, when trying to install 2.1 of this mod, I am seeing the following errors.... ( I had 1.6 installed and I am trying to upgrade, I uninstalled 1.6 already).

http://i.imgur.com/blfTOF7.png
http://i.imgur.com/bAgyuLD.png
http://i.imgur.com/CobVw0P.png

edit - here is my installed mods
http://i.imgur.com/VoJl1Ud.png
It isn't PM attachments mod, Personal Messages to Membergroups, SimplePortal, eNotify, nor either Eve mod.  The others I didn't check cause their title doesn't seem like it would affect this mod....  I can't check PM to XMPP because I can't find it, but since the obvious ones aren't conflicting with the Enhanced PM system, I would assume it's that one.

Quote from: SilverWings on September 07, 2014, 12:38:30 PM
dougiefresh do you have any new update for below bug?
Nope.
Title: Re: Enhanced PM System
Post by: ExSpirit on September 08, 2014, 08:48:04 AM
dougiefresh; I found another bug with the same error  "You are not allowed to access this section" - it happens when you use search and then click one of the links. All of them return that error, so you can't search private messages anymore.
Title: Re: Enhanced PM System
Post by: dougiefresh on September 08, 2014, 09:05:50 AM
 :o Wow....  :-[ That sucks....  I'll look into it as well....
Title: Re: Enhanced PM System
Post by: dougiefresh on September 08, 2014, 02:04:53 PM
UPDATE: I've been working to rebuild this mod so that it is once again upgradable from one version to another.  A free piece of software called WinMerge (http://winmerge.org/) has helped greatly in this pursuit.  I've almost got it put back together and you'll see the labor of my work in version 2.2 when it is uploaded.

Have I done anything with the bug reports?  No, this task has taken up the last 2 days....  Sorry to disappoint.  O:)

EDIT: Why am I doing this?  Cause it makes my life easier because I don't to keep track of where my changes are in the install.xml and I'm not as likely to remove some feature like what happened in v2.1 (default subject should be blank, accidentally restored to original code).....  Plus, I can isolate what I changed from version to version, unlike the current mess....
Title: Re: Enhanced PM System
Post by: Arantor on September 08, 2014, 06:39:33 PM
Sounds like you need a versioning system to track such changes? Github will work for that kind of thing if you can brave using Git.
Title: Re: Enhanced PM System
Post by: dougiefresh on September 08, 2014, 07:38:20 PM
Nah.  I did the same thing with the Split Forum mod, only it started that way.....  Started with v1.0 as the base, and each versions' changes got put into a file called upgrade_x.x (where x.x is the version number).  Then I included all those files in the package_info.xml file.  Easy-peasy....  :o  ;D

Attached is the package_info.xml, if you wanna look at that crazy mess  ;D
Title: Re: Enhanced PM System
Post by: Arantor on September 08, 2014, 07:42:19 PM
At least you're not using <upgrade> tags, that would be serious voodoo (and not recommended)
Title: Re: Enhanced PM System
Post by: dougiefresh on September 08, 2014, 07:44:20 PM
Quote from: Arantor on September 08, 2014, 07:42:19 PM
At least you're not using <upgrade> tags, that would be serious voodoo (and not recommended)
Why are upgrade tags not recommended?  And.... um.... yeah, I am....
Title: Re: Enhanced PM System
Post by: Arantor on September 08, 2014, 07:46:35 PM
Because of the maintenance requirement.

<upgrade> lets you upgrade mods between mod versions. You can have a mod at 1.0, then a mod package that will upgrade solely from 1.0 to 1.1, but that means having from-base-SMF-to-mod-1.1 and having from-mod-1.0-to-mod-1.1 instructions in the package.

It's a lot of work to effectively maintain two sets of different but similar instructions. Couldn't recommend it.

This is why I highly recommend something like Github for this; let the tools do the version history and see what's been changed and only keep one master 'current' set of instructions. I couldn't have done SimpleDesk or currently be doing LevGal without this.
Title: Re: Enhanced PM System
Post by: dougiefresh on September 08, 2014, 07:59:03 PM
It's not that bad, if each upgrade file contains only what is necessary to go up one version, aka from v1.0 to v1.1, v1.1 to v1.2, etc.  With the installer, if you install first the base file, then ALL the upgrade files, it's actually quite easy.  Looks like garbage sometimes, but it's easy and it works.  With the uninstaller, you start at the last version and go backwards, so you would go from v1.2 to v1.1, then v1.1 to v1.0, then remove v1.0....  At least that's how I'm doing it...

Now, the upgrade part is a bit more traumatic.  Each version requires the relevant files, so if you were upgrading from v1.0 to v1.4, you would need the upgrade file for v1.1, v1.2,  v1.3, and v1.4.  But upgrading from v1.2 requires only v1.3 and v1.4....

Anyways, it's time for bed.... (again)...
Title: Re: Enhanced PM System
Post by: Arantor on September 08, 2014, 08:05:13 PM
Yes, that's why it's traumatic to specify the upgrade since you have to specify what you're upgrading from and to, and people have to remember not to uninstall each time but since almost no mod author does it because of the maintenance headache... yeah.

Couldn't recommend it, even down to the cases where during SD's development we were doing new builds from SVN every 12 hours for the testers.

But if you have a path that works for you, don't let my general meh strike you :P I'm only relaying what I found when working with the realms of the 'megamod' category (by which, anything that's going to hit 10k lines of code at some point in its life time)
Title: Re: Enhanced PM System
Post by: dougiefresh on September 09, 2014, 04:04:00 PM
Uploaded v2.2 - September 9th, 2014
o Mod now upgradable from version 2.0 to version 2.1 to version 2.2!
o "Quote to All" feature implemented, requested by SilverWings (http://www.simplemachines.org/community/index.php?action=profile;u=251055).
o Fixed a bug where no Search button was shown while searching when no labels were defined, reported by Jeff B (http://www.simplemachines.org/community/index.php?action=profile;u=11253).
o More bug fixes where the PM display mode not being set to conversation correctly, reported by SilverWings (http://www.simplemachines.org/community/index.php?action=profile;u=251055).
o Fixed a bug that marks PMs as read even though user hasn't opened the PM yet, reported by ExSpirit (http://www.simplemachines.org/community/index.php?action=profile;u=84861)
o Re-Added code that v2.1 removed by mistake which removes default subject from PMs (noticed during rebuild)
o Fixed a template bug in the Core theme's PersonalMessage.template.php.

Hopefully, this solves all of the reported bugs.....  Please note that this mod cannot upgrade from v1.x series, as there is an uninstall issue with the fully upgradable mod version that I can't nail down.....

@Arantor: I can understand not using the upgrade capability when you're cranking out updates every 12 hours.....  That'd be a nightmare and a half to use the upgrade capability with that situation....
Title: Re: Enhanced PM System
Post by: Arantor on September 09, 2014, 04:10:28 PM
It's a nightmare and a half even when you're doing one major release a year, to be honest.
Title: Re: Enhanced PM System
Post by: Jeff B on September 10, 2014, 12:22:53 AM
3.    Execute Modification    ./Themes/core/PersonalMessage.template.php    Test failed
      1.    Replace    ./Themes/core/PersonalMessage.template.php    Test failed
Title: Re: Enhanced PM System
Post by: ExSpirit on September 10, 2014, 02:22:45 AM
I have tested this bug now:

QuoteIf I am in my inbox and before I click on some conversation if other person sends another new message in that conversation and after that I click on link to open conversation (without refreshing page) I get error "You are not allowed to access this section", so I have to go back to inbox and click the link again. The problem is that when new message arrives in conversation, pmid changes in URL, so old one no longer works.

... and now new error is shown when I click conversation link: "The database value you're trying to insert does not exist: id_pm_head".
Title: Re: Enhanced PM System
Post by: dougiefresh on September 10, 2014, 07:26:52 PM
Just figured out the code I wrote is wrong.... Ugh....  Updated avatar, too....

EDIT: Just figured out the stock code for the PM stuff is also WRONG.....  Maybe the stock code is okay....
Title: Re: Enhanced PM System
Post by: SilverWings on September 13, 2014, 05:17:17 AM
dougiefresh, how's it going? Any update about those big problems in v2.2?
Title: Re: Enhanced PM System
Post by: uid_0 on September 13, 2014, 07:08:53 PM
Quote from: dougiefresh on September 09, 2014, 04:04:00 PM
o Fixed a template bug in the Core theme's PersonalMessage.template.php.
Doesn't look like this was fully corrected. With SMF 2.0.8 and EPS 2.2 I am seeing the same error as Jeff B.

Execute Modification    ./Themes/core/PersonalMessage.template.php    Test failed
        Replace    ./Themes/core/PersonalMessage.template.php    Test failed

The string of code you're searching for does not actually appear in the current (at least as of SMF 2.0.7/2.0.8 ) Core theme template.
echo '
if ($context['folder'] != 'unread' || ($context['folder'] == 'unread' && isset($message['is_unread'])))
Title: Re: Enhanced PM System
Post by: uid_0 on September 14, 2014, 03:34:32 AM
Even in install.xml of your package you do not add that exact string.


<operation>
<search position="replace"><![CDATA[echo '
<li><a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';u=', $message['member']['id'], '">', $reply_button, '</a></li>
<li><a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';quote', $context['folder'] == 'sent' ? '' : ';u=' . $message['member']['id'], '">', $quote_button, '</a></li>';]]></search>
<add><![CDATA[if ($context['folder'] != 'unread' || ($context['folder'] == 'unread' && isset($message['is_unread'])))
echo '
<li><a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';u=', $message['member']['id'], '">', $reply_button, '</a></li>
<li><a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';quote', $context['folder'] == 'sent' ? '' : ';u=' . $message['member']['id'], '">', $quote_button, '</a></li>';

elseif ($context['folder'] == 'unread' && !isset($message['is_unread']))
{
if (empty($modSettings['eps_deny_unsend']))
echo '
<li class="unsend_button"><a href="', $scripturl, '?action=pm;sa=unsend;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';u=', $message['member']['id'], '" onclick="return confirm(\'', addslashes($txt['unsend_message']), '?\');">', $txt['unsend_item'], '</a></li>';
if (empty($modSettings['eps_deny_edit']) && empty($context['can_edit_msg']))
echo '
<li class="edit_button"><a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';edit">', $txt['pm_edit'], '</a></li>';
}]]></add>
</operation>


Notice an unrelated typo in this block  "Were than more than"  => "Were there more than"
// EPS: Were than more than one recipient you can reply to? (Only shown when not in conversation mode.)
if ($message['number_recipients'] > 1 && $context['display_mode'] != 2)
echo '
<li><a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';quote;u=all">', $reply_all_button, '</a></li>';

if ($context['folder'] != 'unread' || ($context['folder'] == 'unread' && isset($message['is_unread'])))
echo '
<li><a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';u=', $message['member']['id'], '">', $reply_button, '</a></li>
<li><a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';quote', $context['folder'] == 'sent' ? '' : ';u=' . $message['member']['id'], '">', $quote_button, '</a></li>';

elseif ($context['folder'] == 'unread' && !isset($message['is_unread']))
{
if (empty($modSettings['eps_deny_unsend']))
echo '
<li class="unsend_button"><a href="', $scripturl, '?action=pm;sa=unsend;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';u=', $message['member']['id'], '" onclick="return confirm(\'', addslashes($txt['unsend_message']), '?\');">', $txt['unsend_item'], '</a></li>';
if (empty($modSettings['eps_deny_edit']) && empty($context['can_edit_msg']))
echo '
<li class="edit_button"><a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';edit">', $txt['pm_edit'], '</a></li>';
}
}


<operation>
<search position="replace"><![CDATA[echo '
<li class="reply_button"><a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';u=', $message['member']['id'], '">', $txt['reply'], '</a></li>
<li class="quote_button"><a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';quote', $context['folder'] == 'sent' ? '' : ';u=' . $message['member']['id'], '">', $txt['quote'], '</a></li>';]]></search>
<add><![CDATA[
if ($context['folder'] != 'unread' || ($context['folder'] == 'unread' && isset($message['is_unread'])))
echo '
<li class="reply_button"><a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';u=', $message['member']['id'], '">', $txt['reply'], '</a></li>
<li class="quote_button"><a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';quote', $context['folder'] == 'sent' ? '' : ';u=' . $message['member']['id'], '">', $txt['quote'], '</a></li>';

elseif ($context['folder'] == 'unread' && !isset($message['is_unread']))
{
if (empty($modSettings['eps_deny_unsend']))
echo '
<li class="unsend_button"><a href="', $scripturl, '?action=pm;sa=unsend;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';u=', $message['member']['id'], '" onclick="return confirm(\'', addslashes($txt['unsend_message']), '?\');">', $txt['unsend_item'], '</a></li>';
if (empty($modSettings['eps_deny_edit']) && empty($context['can_edit_msg']))
echo '
<li class="edit_button"><a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';edit">', $txt['pm_edit'], '</a></li>';
}
]]></add>
</operation>


Again, an unrelated typo, but not the bug you thought existed around the "is_unread" context. "Is there than more than"  => "Is there more than"
// EPS: Is there than more than one recipient you can reply to?
if ($message['number_recipients'] > 1 && $context['display_mode'] != 2)
echo '
<li class="reply_all_button"><a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';quote;u=all">', $txt['reply_to_all'], '</a></li>';


if ($context['folder'] != 'unread' || ($context['folder'] == 'unread' && isset($message['is_unread'])))
echo '
<li class="reply_button"><a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';u=', $message['member']['id'], '">', $txt['reply'], '</a></li>
<li class="quote_button"><a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';quote', $context['folder'] == 'sent' ? '' : ';u=' . $message['member']['id'], '">', $txt['quote'], '</a></li>';

elseif ($context['folder'] == 'unread' && !isset($message['is_unread']))
{
if (empty($modSettings['eps_deny_unsend']))
echo '
<li class="unsend_button"><a href="', $scripturl, '?action=pm;sa=unsend;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';u=', $message['member']['id'], '" onclick="return confirm(\'', addslashes($txt['unsend_message']), '?\');">', $txt['unsend_item'], '</a></li>';
if (empty($modSettings['eps_deny_edit']) && empty($context['can_edit_msg']))
echo '
<li class="edit_button"><a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';edit">', $txt['pm_edit'], '</a></li>';
}

}
Title: Re: Enhanced PM System
Post by: dougiefresh on September 14, 2014, 10:21:37 AM
@Everybody: I forgot to add the upgrade_v2.2.xml to the uninstall section of the mod, so as a result, it will not uninstall correctly.  It will be corrected in the v2.3 mod, and you can upgrade from v2.2 to v2.3.

Quote from: SilverWings on September 13, 2014, 05:17:17 AM
dougiefresh, how's it going? Any update about those big problems in v2.2?
I've been trying to survive the horrible outside temperatures at work lately and haven't had the energy to fix this particular bug....  Today is my first day off since the release of v2.2....

Quote from: uid_0 on September 13, 2014, 07:08:53 PM
Execute Modification    ./Themes/core/PersonalMessage.template.php    Test failed
        Replace    ./Themes/core/PersonalMessage.template.php    Test failed

The string of code you're searching for does not actually appear in the current (at least as of SMF 2.0.7/2.0.8 ) Core theme template.
echo '
if ($context['folder'] != 'unread' || ($context['folder'] == 'unread' && isset($message['is_unread'])))

That's because in the WIP mod (the one that can be upgraded from v1.0 to v2.2 in one easy step), there is a major typo that results in an error when trying to use the Core theme.  I assumed it was in the mod when I just dumped the upgrade file into the v2.1 and altered the package_info.xml file to use the upgrade file.  I've since altered the upgrade file to ignore that operation if it doesn't exist.

Quote from: uid_0 on September 14, 2014, 03:34:32 AM
Notice an unrelated typo in this block  "Were than more than"  => "Were there more than"

Again, an unrelated typo, but not the bug you thought existed around the "is_unread" context. "Is there than more than"  => "Is there more than"
I'm not going to fix typo errors within the comments, and I'm pretty sure that most of those typos exist in the original source code....
Title: Re: Enhanced PM System
Post by: dougiefresh on September 14, 2014, 11:06:00 AM
Uploaded v2.3 - September 14th, 2014
o Mod upgradable from v2.x to v2.3.
o Fixed bugs that prevented latest message from being shown if more has been added to the conversation.
o Fixed install bug so that v2.2 operation in core/PersonalMessage.template.php is now ignored if doesn't exist.
o Fixed uninstaller from v2.2 because it doesn't include reversing the upgrade_2.2.xml instructions.

NOTE: Do not attempt to uninstall v2.2, as the uninstaller doesn't include reversal of the operations in upgrade_v2.2.xml.  You may upgrade from v2.2 to v2.3 by using the v2.3 mod.
Title: Re: Enhanced PM System
Post by: Jeff B on September 14, 2014, 02:42:50 PM
Getting closer! Thank you!  However I have another bug.

I can now see the search button, and It seems that I can search inbox messages okay, however, when I switch to search sent items, I get several items returned, however when I click on any one of them to view, i get the very same unrelated message as the result.

Here are some links that go to the same message. Perhaps you can see what is going on with those?

If I copy the link location I get:
index.php?action=pm;f=sent;kstart;start=0;sort=date;pmid=190074#msg190074

But if I actually click on the link it goes here.

/index.php?action=pm;pmid=176350;kstart;f=sent;start=0;sort=date;#msg176350

And the next item. the link location copies as this:
index.php?action=pm;f=sent;kstart;start=0;sort=date;pmid=223123#msg223076

But again, actually goes here when you click on it.
index.php?action=pm;pmid=176350;kstart;f=sent;start=0;sort=date;#msg176350

No matter what I search for in sent items, or how many results return, they all the links go to
index.php?action=pm;pmid=176350;kstart;f=sent;start=0;sort=date;#msg176350

Title: Re: Enhanced PM System
Post by: dougiefresh on September 14, 2014, 04:07:50 PM
WTFF?!?!?  This is bizarre.....
Title: Re: Enhanced PM System
Post by: Jeff B on September 14, 2014, 04:44:53 PM
 :D ;D   Yea, I thought it was a bit far out. :)

When you mouse over the search result link, it appears to be right, if you copy is via a right click, it appears to be right, but if you click on it, it goes to that same spot no matter what.

are you able to reproduce that on your end?
Title: Re: Enhanced PM System
Post by: dougiefresh on September 14, 2014, 06:20:34 PM
Unfortunately not.  I can't reproduce this.....  The modification in v2.3 is to redirect you to the last PM in the conversation, but I don't understand why the forum would sent you to an earlier PM....

Is PM ID # 190074 related to PM # 176350?  Is it at least in the same conversation?  You might have to search the page source.  In Firefox, go to Tools -> Web Developer -> Page Source in order to do so....
Title: Re: Enhanced PM System
Post by: Jeff B on September 14, 2014, 06:48:54 PM
No relationship at all.   It defaults back to the oldest conversation by the looks of it, and every single search result does no matter what the search. Also in addition, those copied links also default back, and change. Apparently the action in the link does it.

Sent to: Bibbyman on: December 31, 2010, 05:16:28 pm »

index.php?action=pm;f=sent;kstart;start=0;sort=date;pmid=247251#msg247241

If I edit the link to: index.php?action=pm;f=;start=0;sort=date;pmid=247251#msg247241  it goes to the correct location. 

Title: Re: Enhanced PM System
Post by: dougiefresh on September 14, 2014, 07:10:54 PM
@Jeff B: Can you edit your file to see if this fix works?  I've adjusted the code like you said....

Find this in Sources/PersonalMessage.php:
Code (Find) Select
redirectexit('action=pm;pmid=' . $lastData['id'] . ';kstart;f=' . $context['folder'] . ';start=0;sort=date;#msg' . $lastData['id']);
and replace it with this:
Code (Replace) Select
redirectexit('action=pm;f=' . $context['folder'] . ';start=0;sort=date;pmid=' . $lastData['id'] . ';#msg' . $pmID);
Title: Re: Enhanced PM System
Post by: Jeff B on September 14, 2014, 07:24:54 PM
Unknown column 'pm.id_pm_head' in 'field list'
File: /var/www/virtual/forestryforum.com/htdocs/board/Sources/PersonalMessage.php
Line: 626

Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 2.0.8, while your database is at version 2.0.1. The above error might possibly go away if you execute the latest version of upgrade.php.
Title: Re: Enhanced PM System
Post by: dougiefresh on September 14, 2014, 07:30:19 PM
Please attach your PersonalMessage.php file....
Title: Re: Enhanced PM System
Post by: Jeff B on September 14, 2014, 07:32:49 PM
okay
Title: Re: Enhanced PM System
Post by: dougiefresh on September 14, 2014, 07:49:31 PM
Try mine....
Title: Re: Enhanced PM System
Post by: Jeff B on September 14, 2014, 08:52:22 PM
Same error

Unknown column 'pm.id_pm_head' in 'field list'
File: /var/www/virtual/forestryforum.com/htdocs/board/Sources/PersonalMessage.php
Line: 626

Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 2.0.8, while your database is at version 2.0.1. The above error might possibly go away if you execute the latest version of upgrade.php.
Title: Re: Enhanced PM System
Post by: Jeff B on September 14, 2014, 08:58:10 PM
Just a thought, and I have no idea if it could be related, but I use sphinx search on our forum due to the size.
Title: Re: Enhanced PM System
Post by: dougiefresh on September 15, 2014, 09:09:54 AM
Since your copy of PersonalMessage.php and mine were practically identical, I seriously doubt that Sphinx could be playing a role in this issue...  PM me the mod and I can check for you...
Title: Re: Enhanced PM System
Post by: ExSpirit on September 15, 2014, 09:10:57 AM
As much as I tested latest version, now all works fine. Thanks.  ;)
Title: Re: Enhanced PM System
Post by: dougiefresh on September 15, 2014, 12:02:11 PM
@ExSpirit: Did you do the modifications listed in this post (http://www.simplemachines.org/community/index.php?topic=521508.msg3743188#msg3743188)?  If not, that's excellent news....
Title: Re: Enhanced PM System
Post by: ExSpirit on September 15, 2014, 12:13:59 PM
I haven't done that modification, I just saw post of Jeff B and tried this and I have the same problem.

If I search and click on some result it takes me to wrong conversation. For example:

The link on some search result is:
/pm/?f=inbox;pmid=51774#msg51774

And when I click I come to this URL:
/pm/?pmid=51776;kstart;f=inbox;start=0;sort=date#msg51776

This is strange. Also I just searched "test" and got some result where "test" is not even inside messages (not even in title or anywhere)?

If I do that modifications which you mentioned and I click on some search result I get error: Unknown column 'pm.id_pm_head' in 'field list'.
Title: Re: Enhanced PM System
Post by: dougiefresh on September 15, 2014, 01:24:17 PM
Two people report the exact same error, so I'm guessing that Sphinx search engine can be discounted as a reason....
Title: Re: Enhanced PM System
Post by: ExSpirit on September 15, 2014, 02:20:16 PM
Well the search may be OK, but after you click the link wrong conversation opens - I don't know why pmid changes after it's opened?
Title: Re: Enhanced PM System
Post by: Jeff B on September 15, 2014, 02:50:12 PM
Yea, the search works. It returns the things it should. The problem is that the links returned have an action in them that cause the link to redirect to the oldest discussion rather than the search result printed.

ExSpirit, can you confirm that your link ends up going to your oldest conversation?
Title: Re: Enhanced PM System
Post by: Jeff B on September 15, 2014, 03:02:36 PM
Since I have quite a bit of stuff in my outbox as well, I was able to test a search there to. The same thing happens, you are returned appropriate search results, but on click, you are sent to the wrong message, and the same message regarless of what you search, or what the returns are.

An example for those URL's would be:

index.php?action=pm;f=unread;kstart;start=0;sort=date;pmid=195960#msg195961

With the resulting url:
index.php?action=pm;pmid=178735;kstart;f=unread;start=0;sort=date;#msg178735
Title: Re: Enhanced PM System
Post by: ExSpirit on September 15, 2014, 03:59:31 PM
Quote from: Jeff B on September 15, 2014, 02:50:12 PM
ExSpirit, can you confirm that your link ends up going to your oldest conversation?
Yes, all links lead to latest message (so anything I click latest message/conversation opens).
Title: Re: Enhanced PM System
Post by: dougiefresh on September 17, 2014, 11:45:51 AM
I think I know what is going on with this mod.  I will have to rewrite that line so it only includes those parameters passed, modifying only the pm id number.  I still can't figure out why it would jump to the oldest convo, though...  it could have something to do with the parameters being passed, but I'd have to look when I get home from work....
Title: Re: Enhanced PM System
Post by: Jeff B on September 17, 2014, 11:53:48 AM
dougiefresh, every time I look at your avatar, it reminds me of this commercial  :)

https://www.youtube.com/watch?v=JJkp1JXGeng
Title: Re: Enhanced PM System
Post by: dougiefresh on September 17, 2014, 06:41:47 PM
Quote from: Jeff B on September 17, 2014, 11:53:48 AM
dougiefresh, every time I look at your avatar, it reminds me of this commercial  :)

https://www.youtube.com/watch?v=JJkp1JXGeng
Yup....  That's how I feel, too.....  At least concerning this mod right now....
Title: Re: Enhanced PM System
Post by: dougiefresh on September 17, 2014, 06:54:16 PM
@ExSpirit or @Jeff B: Can one of you test something for me?  I need you to replace something and test it....

Find this:
Code (Find) Select
if ($context['display_mode'] == 2 && !empty($pmID) && in_array($pmID, $lastData['id']))
fatal_lang_error('no_access', false);

and replace it with this:
Code (Replace) Select
if ($context['display_mode'] == 2 && !empty($pmID) && !empty($lastData['id']) && $pmID != $lastData['id'])
redirectexit('action=pm;pmid=' . $lastData['id'] . (isset($_GET['kstart']) ? ';kstart' : '') . (isset($_GET['f']) ? ';f=' . $_GET['f'] : '') . (isset($_GET['start']) ? ';start=' . $_GET['start'] : '') . (isset($_GET['sort']) ? ';sort=' . $_GET['sort'] : '') . '#msg' . $lastData['id']);
elseif ($context['display_mode'] == 2 && !empty($pmID) && $pmID != $lastData['id'])
fatal_lang_error('no_access', false);

Let me know if this fixes this issue....  Thanks ahead of time!

EDIT: This is best I could come up with after a 12-hour day at work....  (keeping fingers crossed)  ::)
Title: Re: Enhanced PM System
Post by: Jeff B on September 17, 2014, 08:08:17 PM
What file is this in?   I don't find it in either Sources/PersonalMessage.php  or in Themes/default/PersonalMessage.template.php
Title: Re: Enhanced PM System
Post by: ExSpirit on September 18, 2014, 02:45:01 AM
There's no such code, but he probably thought this one (below this comment: "// Make sure that we have been given a correct head pm id!"):

if ($context['display_mode'] == 2 && !empty($pmID) && $pmID != $lastData['id'])
redirectexit('action=pm;pmid=' . $lastData['id'] . ';kstart;f=' . $context['folder'] . ';start=0;sort=date;#msg' . $lastData['id']);


I am testing right now but it doesn't seem to be working. When I click some search result, conversation is not opened, but after a few second this is displayed in my browser: "The page isn't redirecting properly".
Title: Re: Enhanced PM System
Post by: dougiefresh on September 24, 2014, 05:05:15 PM
Sorry about the late response....  Been working like crazy....

@ExSpirit or @Jeff B: Can one of you test the attached package?  You'll have to undo the changes that we talked about before upgrading to this version....
Title: Re: Enhanced PM System
Post by: ExSpirit on September 24, 2014, 05:45:35 PM
I can't reinstall the while thing, but I did replace sources/PersonalMessage.php (I hope that's enough, if there's something else which I should replace let me know), but when I do a search and click the link I am getting "The page isn't redirecting properly" error.

URL for the conversation which works - ?pmid=51630;kstart;f=inbox;start=20;sort=date#msg51630
URL which is shown on search result - ?f=inbox;pmid=51630#msg51630
URL which is opened after clicking search result link (and then error "The page isn't redirecting properly" is shown) - ?pmid=51588;f=inbox;start=0;sort=0#msg37508

I don't know why pmid is changed later to the wrong one... Looks like this "kstart" has something to do with the problem, because this is the thing which is present in first working link but not on search result links.
Title: Re: Enhanced PM System
Post by: dougiefresh on September 24, 2014, 07:14:25 PM
Reverse both of these changes that we discussed.  To make it easier for you, I've quoted both posts.... 
Quote from: dougiefresh on September 14, 2014, 07:10:54 PM
@Jeff B: Can you edit your file to see if this fix works?  I've adjusted the code like you said....

Find this in Sources/PersonalMessage.php:
Code (Find) Select
redirectexit('action=pm;pmid=' . $lastData['id'] . ';kstart;f=' . $context['folder'] . ';start=0;sort=date;#msg' . $lastData['id']);
and replace it with this:
Code (Replace) Select
redirectexit('action=pm;f=' . $context['folder'] . ';start=0;sort=date;pmid=' . $lastData['id'] . ';#msg' . $pmID);
Quote from: dougiefresh on September 17, 2014, 06:54:16 PM
@ExSpirit or @Jeff B: Can one of you test something for me?  I need you to replace something and test it....

Find this:
Code (Find) Select
if ($context['display_mode'] == 2 && !empty($pmID) && in_array($pmID, $lastData['id']))
fatal_lang_error('no_access', false);

and replace it with this:
Code (Replace) Select
if ($context['display_mode'] == 2 && !empty($pmID) && !empty($lastData['id']) && $pmID != $lastData['id'])
redirectexit('action=pm;pmid=' . $lastData['id'] . (isset($_GET['kstart']) ? ';kstart' : '') . (isset($_GET['f']) ? ';f=' . $_GET['f'] : '') . (isset($_GET['start']) ? ';start=' . $_GET['start'] : '') . (isset($_GET['sort']) ? ';sort=' . $_GET['sort'] : '') . '#msg' . $lastData['id']);
elseif ($context['display_mode'] == 2 && !empty($pmID) && $pmID != $lastData['id'])
fatal_lang_error('no_access', false);

Let me know if this fixes this issue....  Thanks ahead of time!

EDIT: This is best I could come up with after a 12-hour day at work....  (keeping fingers crossed)  ::)

Then in PersonalMessage.php, find this:
if ($context['display_mode'] == 2 && !empty($pmID) && $pmID != $lastData['id'])
redirectexit('action=pm;pmid=' . $lastData['id'] . ';kstart;f=' . $context['folder'] . ';start=0;sort=date;#msg' . $lastData['id']);

and replace it with this:
if ($context['display_mode'] == 2 && !empty($pmID) && !empty($lastData['id']) && $pmID != $lastData['id'])
redirectexit('action=pm;pmid=' . $lastData['id'] . (isset($_GET['kstart']) ? ';kstart' : '') . (isset($_GET['f']) ? ';f=' . $tmparr['f'] : '') . (isset($_GET['start']) ? ';start=' . $tmparr['start'] : '') . (isset($_GET['sort']) ? ';sort=' . $tmparr['sort'] : '') . (isset($tmparr['pmid']) ? '#msg' . $tmparr['pmid'] : ''));
elseif ($context['display_mode'] == 2 && !empty($pmID) && $pmID != $lastData['id'])
fatal_lang_error('no_access', false);


Then look for this:
// Changing view?
and add this BEFORE that comment:
// Save some variables before we start:
$tmparr = array(
'start' => isset($_GET['start']) ? $_GET['start'] : 0,
'pmid' => isset($_GET['pmid']) ? $_GET['pmid'] : 0,
'sort' => isset($_GET['sort']) ? $_GET['sort'] : 0,
'f' => isset($_GET['f']) ? $_GET['f'] : 0,
);


Let me know if this fixes the problem.  These changes are what is in the v2.4 test 1 file I updated....
Title: Re: Enhanced PM System
Post by: ExSpirit on September 25, 2014, 02:07:17 AM
I think I found out why I have this problem. It's because of this problem which I made:

ORDER BY ' . ($_GET['sort'] == 'pm.id_pm' && $context['folder'] != 'sent' ? 'id_pm' : '{raw:sort}') . ($descending ? ' DESC' : ' ASC') . (empty($_GET['pmsg']) ? '

I changed this to:

ORDER BY ' . ($_GET['sort'] == 'pm.id_pm' && $context['folder'] != 'sent' ? 'id_pm' : '{raw:sort}') . ($descending ? ' DESC' : ' DESC') . (empty($_GET['pmsg']) ? '

...because I want to sort messages by new to old (which works), but this causes problem with search. Do you think it would be better if I leave that as it is, but change this:

else
{
$context['sort_by'] = $_GET['sort'];
$_GET['sort'] = $sort_methods[$_GET['sort']];
$descending = isset($_GET['desc']);
}


...to this:

else
{
$context['sort_by'] = $_GET['sort'];
$_GET['sort'] = $sort_methods[$_GET['sort']];
$descending = isset($_GET['desc']);
}
$descending = "1";


And then for displayed messages (that those are sorted by oldest to newest on bottom) from this:

ORDER BY ' . ($context['display_mode'] == 2 ? 'pm.id_pm' : $_GET['sort']) . ($descending ? ' DESC' : ' ASC') . '

...to this:


ORDER BY ' . ($context['display_mode'] == 2 ? 'pm.id_pm' : $_GET['sort']) . ($descending ? ' ASC' : ' DESC') . '
Title: Re: Enhanced PM System
Post by: Arantor on September 25, 2014, 10:35:32 AM
Isn't there already a preference option for 'show most recent messages on top' (in the Profile > Personal Messaging area)?
Title: Re: Enhanced PM System
Post by: ExSpirit on September 25, 2014, 10:53:06 AM
It is, but that doesn't work.
Title: Re: Enhanced PM System
Post by: Arantor on September 25, 2014, 10:54:16 AM
It certainly does in core SMF because I use that all the time on every SMF site I'm at.
Title: Re: Enhanced PM System
Post by: ExSpirit on September 25, 2014, 10:56:51 AM
It doesn't work with this mod... That option is ignored.
Title: Re: Enhanced PM System
Post by: dougiefresh on September 28, 2014, 08:41:15 PM
Quote from: Arantor on September 25, 2014, 10:35:32 AM
Isn't there already a preference option for 'show most recent messages on top' (in the Profile > Personal Messaging area)?
You are correct, there is a preference option in the core SMF software.  ExSpirit requested a separate option in order to keep the list of PM conversations sorted one way and the conversation sorted another way.

Quote from: ExSpirit on September 25, 2014, 10:53:06 AM
It is, but that doesn't work.
Untrue.  I've tested it both with and without this mod and it works just fine.  No modifications were made to the code that affect the ORDER of the PM conversations and how that switch works....
Title: Re: Enhanced PM System
Post by: DanesDK on October 07, 2014, 03:03:25 PM
Hello,

I cant installe this.. Im getting alot of errors.

Does anyone know why?

Thanks
Title: Re: Enhanced PM System
Post by: NekoJonez on October 07, 2014, 03:15:23 PM
Quote from: DanesDK on October 07, 2014, 03:03:25 PM
Hello,

I cant installe this.. Im getting alot of errors.

Does anyone know why?

Thanks
Do you have by any chance other mods installed?
Title: Re: Enhanced PM System
Post by: DanesDK on October 07, 2014, 03:19:19 PM
Quote from: NekoJonez on October 07, 2014, 03:15:23 PM
Quote from: DanesDK on October 07, 2014, 03:03:25 PM
Hello,

I cant installe this.. Im getting alot of errors.

Does anyone know why?

Thanks
Do you have by any chance other mods installed?

Yes,

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FzT4BCXI.jpg&hash=1a6e89770bd136519b869959f7f62ba892aa4258)
Title: Re: Enhanced PM System
Post by: NekoJonez on October 07, 2014, 03:21:37 PM
I have a feeling that one or two of those mods added code in the files that this mod is trying to edit. Therefore not finding the exact lines and the test fails.

Maybe you should check manually?
Title: Re: Enhanced PM System
Post by: DanesDK on October 07, 2014, 03:28:44 PM
Quote from: NekoJonez on October 07, 2014, 03:21:37 PM
I have a feeling that one or two of those mods added code in the files that this mod is trying to edit. Therefore not finding the exact lines and the test fails.

Maybe you should check manually?

Hmm, im not that into SMF, so that i could do that..
Title: Re: Enhanced PM System
Post by: dougiefresh on October 07, 2014, 05:56:27 PM
One of the things I know is that a few servers seem to have difficulty with upgrade packages, where one XML file makes modifications and another XML file makes modifications to the same lines that the first XML made modifications to...  This is what you would see in one of these situations.  I am attaching versions 2.0 thru 2.2 to this post.  Please install them in order, from v2.0 to v2.3.  Do not remove the prior version before installing the next version.

Be aware that uninstalling this mod with this server "issue" will be virtually impossible, as SMF's uninstaller is an all-or-nothing uninstall.  Meaning, you can't go backwards one version by uninstalling the upgrade....

EDIT: Attachments removed.
Title: Re: Enhanced PM System
Post by: Arantor on October 07, 2014, 06:08:52 PM
(and this is why upgrade packages are strongly discouraged :()
Title: Re: Enhanced PM System
Post by: dougiefresh on October 07, 2014, 07:14:35 PM
Here a thought: Shouldn't someone make a note of this particular problem somewhere, like in the mod development resources?!?!?  Or take the upgrade ability out of SMF entirely?  Now, I've gotta rewrite the entire fricken mod so that this problem doesn't happen again....  (Sigh)
Title: Re: Enhanced PM System
Post by: dougiefresh on October 07, 2014, 08:04:41 PM
@DanesDK: I'm updating the mod so that a regular install doesn't rely on the upgrade files at all.  It'll be with version 2.4, and that version will be fully uninstallable....  Hope this helps!
Title: Re: Enhanced PM System
Post by: Arantor on October 07, 2014, 08:24:13 PM
I've been campaigning for years to get it removed, and I seem to recall specifically talking at length about why it's a bad idea to even implement in the first place... :(
Title: Re: Enhanced PM System
Post by: DanesDK on October 08, 2014, 08:21:27 AM
Quote from: dougiefresh on October 07, 2014, 05:56:27 PM
One of the things I know is that a few servers seem to have difficulty with upgrade packages, where one XML file makes modifications and another XML file makes modifications to the same lines that the first XML made modifications to...  This is what you would see in one of these situations.  I am attaching versions 2.0 thru 2.2 to this post.  Please install them in order, from v2.0 to v2.3.  Do not remove the prior version before installing the next version.

Be aware that uninstalling this mod with this server "issue" will be virtually impossible, as SMF's uninstaller is an all-or-nothing uninstall.  Meaning, you can't go backwards one version by uninstalling the upgrade....


Thanks.. Installing v2.0 went fine. But when installing v2.1, i got alot of errors.. ?
Title: Re: Enhanced PM System
Post by: dougiefresh on October 09, 2014, 04:00:03 AM
Gimme a few days and I'll rewrite the mod so it doesn't require the upgrade files during a non-upgrade install.....

EDIT: Whoops....  I meant "doesn't require".  Rewrote statement.  ::)
Title: Re: Enhanced PM System
Post by: dougiefresh on October 13, 2014, 07:36:08 PM
UPDATE: I've been working on the merged version of this mod for the last 2 days....  Right now, I've been having trouble getting the new version v2.4 to cooperate with the uninstaller for v2.3, since right now, v2.4 is basically a rebuilt version 2.3...  I'm still trying to get them resolved, so please be patient.

Another thing I've noticed is that the upgrade files aren't in sync with the installer, meaning that parts of the install are actually missing and would be reflected in the uninstaller.  This is a problem, as it makes the job MUCH MUCH harder....

EDIT: I'm starting over again, attempting to build an integrated installer for this mod.  I think my install file got corrupted somehow, which is why I've been having the issues I've been having....
Title: Re: Enhanced PM System
Post by: dougiefresh on October 18, 2014, 02:07:01 PM
Uploaded v2.4 - October 18th, 2014
o Mod rearranged due to some servers having difficulty processing this mod correctly...
o Upgrade files now correctly reflect the modifications between each version....
o 2nd attempt to fix bug that prevents latest message from being shown if more has been added to convo...

@Everybody: Sorry about the delay in releasing this version of the mod.  The upgrade files were NOT in sync with the installer, so this version should resolve those upgrade issues with this mod.  This mod also consolidates the upgrade files into a single install.xml for compatibility with servers that can't correctly deal with both install.xml and upgrade files for a non-upgrade install of this mod.
Title: Re: Enhanced PM System
Post by: dougiefresh on October 20, 2014, 06:40:34 AM
Uploaded v2.5 - October 19th, 2014
o Another bug fix to resolve PM display mode not being set to conversation correctly
Title: Re: Enhanced PM System
Post by: Ninja ZX-10RR on October 23, 2014, 08:56:53 PM
This mod is in my browse package list since it was like 1.5 but still never installed. Why? I gave up, I really gave up. I tried to install it and when I saw that it was failing I was like "oh well another one, let's go :D " but then I saw HOW MANY TIMES it failed........ Too many. Probably that is due to the other mods I have installed on my forum but I really don't feel like spending 3 or more hours to debug it, also given the fact that I could fail myself and I would have to damn revert back and waste all the time I would have spent on it.
Title: Re: Enhanced PM System
Post by: dougiefresh on October 26, 2014, 04:54:14 PM
@Ninja: Did you uninstall the version you have installed before attempting to install the new version, or did you upgrade from each version?
Title: Re: Enhanced PM System
Post by: Ninja ZX-10RR on October 26, 2014, 05:09:08 PM
No you got that wrong mate, I never installed it because it requires too many manual edits and I'm never in the right mood to spend a few hours on them XD
Title: Re: Enhanced PM System
Post by: dougiefresh on October 28, 2014, 07:21:13 PM
Ah...  Out of curiosity, what version of SMF and what mods do you have installed?
Title: Re: Enhanced PM System
Post by: Ninja ZX-10RR on October 28, 2014, 07:30:47 PM
Ofc 2.0.9 and about the mods... Ehmm... "A few" XD

1. Advanced Signature 0.3.0 beta 1 N/A [ Install Mod ] [ List Files ] [ Delete ]
2. Browser Language Detection and Loading 0.1.0 N/A [ Install Mod ] [ List Files ] [ Delete ]
3. Custom blocks 2.3.2 N/A [ Install Mod ] [ List Files ] [ Delete ]
4. detectBrowser Update 1.0.1 N/A [ Install Mod ] [ List Files ] [ Delete ]
5. Enhanced PM System 2.5 N/A [ Install Mod ] [ List Files ] [ Delete ]
6. Forum Firewall 2.0.0 N/A [ Install Mod ] [ List Files ] [ Delete ]
7. jQLightbox 0.6 N/A [ Install Mod ] [ List Files ] [ Delete ]
8. MCLegendII RC3 3.0 N/A [ Install Mod ] [ List Files ] [ Delete ]
9. nneonneo's AJAX ShoutBox 1.22 N/A [ Install Mod ] [ List Files ] [ Delete ]
10. Reason For Editing Mod 2.3.2 N/A [ Install Mod ] [ List Files ] [ Delete ]
11. ResizeImagesToFitScreen 0.1.6 N/A [ Install Mod ] [ List Files ] [ Delete ]
12. SMF Likes Plus 1.5 N/A [ Install Mod ] [ List Files ] [ Delete ]
13. User Agreement Update 1.0.3 N/A [ Install Mod ] [ List Files ] [ Delete ]
14. Delete Spam Posts 1.6  April 21, 2014, 06:33:04 PM [ Uninstall ] [ List Files ] [ Delete ]
15. ShowBannedMessage 1.3  April 21, 2014, 06:35:20 PM [ Uninstall ] [ List Files ] [ Delete ]
16. Move Topic Notification 1.2  April 21, 2014, 06:36:28 PM [ Uninstall ] [ List Files ] [ Delete ]
17. open mod reports 1.0  April 21, 2014, 06:43:56 PM [ Uninstall ] [ List Files ] [ Delete ]
18. Admin Notes 2.0  April 21, 2014, 06:45:28 PM [ Uninstall ] [ List Files ] [ Delete ]
19. Karma/Rep Limit 1.0.1  April 21, 2014, 06:48:26 PM [ Uninstall ] [ List Files ] [ Delete ]
20. Anti Bot: Are You Human/Bot? 3.0  April 21, 2014, 06:49:20 PM [ Uninstall ] [ List Files ] [ Delete ]
21. Quick Ban on Account Delete 1.0.1  April 22, 2014, 02:07:56 AM [ Uninstall ] [ List Files ] [ Delete ]
22. SMFPacks Shoutbox 1.0.5  April 22, 2014, 02:08:43 AM [ Uninstall ] [ List Files ] [ Delete ]
23. Order Custom Profile Fields 1.1.1  April 22, 2014, 02:26:56 AM [ Uninstall ] [ List Files ] [ Delete ]
24. Disable to send EMail with Forum-System for Users lower than Admin 1.0  April 22, 2014, 02:59:53 AM [ Uninstall ] [ List Files ] [ Delete ]
25. TalkBox3 2.0  April 22, 2014, 06:11:20 AM [ Uninstall ] [ List Files ] [ Delete ]
26. last login 2.9  April 23, 2014, 04:44:41 AM [ Uninstall ] [ List Files ] [ Delete ]
27. Next Post Level 1.3.3  April 24, 2014, 11:27:35 PM [ Uninstall ] [ List Files ] [ Delete ]
28. Post History 1.03  April 25, 2014, 02:31:33 AM [ Uninstall ] [ List Files ] [ Delete ]
29. Topic Solved 1.1.1  April 26, 2014, 06:35:12 AM [ Uninstall ] [ List Files ] [ Delete ]
30. Bad Behavior mod 1.5.18  April 26, 2014, 04:05:42 PM [ Uninstall ] [ List Files ] [ Delete ]
31. CloudFlare 1.1  April 26, 2014, 04:58:14 PM [ Uninstall ] [ List Files ] [ Delete ]
32. Users Online Today 2.1  April 26, 2014, 09:11:12 PM [ Uninstall ] [ List Files ] [ Delete ]
33. Ban List 2.0  April 27, 2014, 01:48:40 AM [ Uninstall ] [ List Files ] [ Delete ]
34. 'Read the Rules' Link Above Post Button 2.0  April 27, 2014, 02:28:50 AM [ Uninstall ] [ List Files ] [ Delete ]
35. Enhanced PM Popup 1.0.1  April 27, 2014, 02:54:16 AM [ Uninstall ] [ List Files ] [ Delete ]
36. Sortable Packages (and Installed Time) 1.3.5  April 30, 2014, 01:45:39 AM [ Uninstall ] [ List Files ] [ Delete ]
37. Anti-Spam Links 1.0.1  April 30, 2014, 02:36:24 PM [ Uninstall ] [ List Files ] [ Delete ]
38. Add Facebook Like to Posts 1.1  May 01, 2014, 12:40:38 AM [ Uninstall ] [ List Files ] [ Delete ]
39. PM to New Members 1.2  May 02, 2014, 06:25:55 PM [ Uninstall ] [ List Files ] [ Delete ]
40. Allow Access while in Maintenance Mode 1.2  May 03, 2014, 09:19:17 PM [ Uninstall ] [ List Files ] [ Delete ]
41. Activity in Profile 1.1  May 03, 2014, 09:27:56 PM [ Uninstall ] [ List Files ] [ Delete ]
42. Ad Managment 3.2  May 03, 2014, 09:54:28 PM [ Uninstall ] [ List Files ] [ Delete ]
43. Custom Copyright 1.0.4  May 04, 2014, 02:57:46 AM [ Uninstall ] [ List Files ] [ Delete ]
44. Fake Topic Views 0.1  May 06, 2014, 12:01:47 AM [ Uninstall ] [ List Files ] [ Delete ]
45. Ban Filter 1.0  May 06, 2014, 12:05:46 AM [ Uninstall ] [ List Files ] [ Delete ]
46. Ohara YouTube Embed 1.2  May 09, 2014, 09:12:30 AM [ Uninstall ] [ List Files ] [ Delete ]
47. Bookmarks 2.5  May 17, 2014, 12:36:49 AM [ Uninstall ] [ List Files ] [ Delete ]
48. Global Topics 2.2  May 20, 2014, 12:30:45 AM [ Uninstall ] [ List Files ] [ Delete ]
49. Register Redirect 1.0  May 28, 2014, 10:20:43 AM [ Uninstall ] [ List Files ] [ Delete ]
50. Tinypic Plugin 1.0.0  May 31, 2014, 09:51:08 PM [ Uninstall ] [ List Files ] [ Delete ]
51. SimpleDesk - Integrated Helpdesk for Simple Machines Forum 2.0  May 31, 2014, 10:37:17 PM [ Uninstall ] [ List Files ] [ Delete ]
52. To Buddies 1.01  June 01, 2014, 11:06:29 PM [ Uninstall ] [ List Files ] [ Delete ]
53. Time Online on Memberlist 1.00  June 04, 2014, 06:30:40 AM [ Uninstall ] [ List Files ] [ Delete ]
54. Profile Song Player 1.0 Beta  June 06, 2014, 05:42:26 PM [ Uninstall ] [ List Files ] [ Delete ]
55. Permissions Info 1.6  June 06, 2014, 05:48:00 PM [ Uninstall ] [ List Files ] [ Delete ]
56. Ignore Topics 2.3  June 14, 2014, 12:33:12 AM [ Uninstall ] [ List Files ] [ Delete ]
57. Caps_Lock_Detection_on_Login 1.1.0.2  June 21, 2014, 09:45:33 AM [ Uninstall ] [ List Files ] [ Delete ]
58. SimpleColorizer 1.1  June 23, 2014, 08:46:32 PM [ Uninstall ] [ List Files ] [ Delete ]
59. Board Index Unread Icon Fix 1.0  June 27, 2014, 02:28:34 PM [ Uninstall ] [ List Files ] [ Delete ]
60. Country Flags 2.1  June 28, 2014, 05:27:51 PM [ Uninstall ] [ List Files ] [ Delete ]
61. PM Settings 1.0.1  June 29, 2014, 09:13:36 PM [ Uninstall ] [ List Files ] [ Delete ]
62. Undeletables topics PMs and users 0.1.5  June 30, 2014, 05:09:57 AM [ Uninstall ] [ List Files ] [ Delete ]
63. Working top level links for drop menus 1.0  July 04, 2014, 04:21:40 AM [ Uninstall ] [ List Files ] [ Delete ]
64. Email Inactive Users 1.1  July 15, 2014, 02:10:39 PM [ Uninstall ] [ List Files ] [ Delete ]
65. Similar Topics 0.6  July 15, 2014, 03:08:26 PM [ Uninstall ] [ List Files ] [ Delete ]
66. Custom Pages and Tabs (2) SMF 2 - RC3 1.1  July 15, 2014, 06:06:40 PM [ Uninstall ] [ List Files ] [ Delete ]
67. Add [li] Button 1.0  July 24, 2014, 05:49:39 PM [ Uninstall ] [ List Files ] [ Delete ]
68. Multiple QA support 1.0.1  July 24, 2014, 05:53:51 PM [ Uninstall ] [ List Files ] [ Delete ]
69. Add Honey Pot to Track IP 1.1  August 04, 2014, 03:56:46 PM [ Uninstall ] [ List Files ] [ Delete ]
70. Misc Anti Spam 1.0  August 04, 2014, 04:00:43 PM [ Uninstall ] [ List Files ] [ Delete ]
71. Stop Forum Spam 1.0  August 04, 2014, 04:06:56 PM [ Uninstall ] [ List Files ] [ Delete ]
72. Word Censor List 1.1  August 04, 2014, 06:29:11 PM [ Uninstall ] [ List Files ] [ Delete ]
73. Prevent Topic View Increase by Author 1.0  August 06, 2014, 06:51:58 AM [ Uninstall ] [ List Files ] [ Delete ]
74. Confirmation message to Mark as Read 1.00  August 06, 2014, 06:53:27 AM [ Uninstall ] [ List Files ] [ Delete ]
75. Add [nobbc] button 1.1  August 06, 2014, 06:58:31 AM [ Uninstall ] [ List Files ] [ Delete ]
76. Admin Ban Button in Post 3.0  August 06, 2014, 07:38:48 AM [ Uninstall ] [ List Files ] [ Delete ]
77. Change All Subjects 1.3  August 06, 2014, 07:46:52 AM [ Uninstall ] [ List Files ] [ Delete ]
78. Drafts 2.0.5  August 06, 2014, 08:23:17 PM [ Uninstall ] [ List Files ] [ Delete ]
79. Minimum Characters for Search 1.2.1  August 06, 2014, 08:43:28 PM [ Uninstall ] [ List Files ] [ Delete ]
80. Order Stickied Topics 1.01  August 06, 2014, 09:38:34 PM [ Uninstall ] [ List Files ] [ Delete ]
81. Referrals System 3.1  August 06, 2014, 09:45:02 PM [ Uninstall ] [ List Files ] [ Delete ]
82. Annoy User 1.2.4  August 06, 2014, 11:24:46 PM [ Uninstall ] [ List Files ] [ Delete ]
83. Restrict Email Providers on Registration 1.2  August 06, 2014, 11:40:08 PM [ Uninstall ] [ List Files ] [ Delete ]
84. Groups See Hidden Users 1.0  August 06, 2014, 11:51:30 PM [ Uninstall ] [ List Files ] [ Delete ]
85. BBC In Custom Title 2.0r2 - SMF 2.0.x  August 07, 2014, 12:08:24 AM [ Uninstall ] [ List Files ] [ Delete ]
86. Integration Hooks Report 1.5.3  August 07, 2014, 10:03:01 PM [ Uninstall ] [ List Files ] [ Delete ]
87. Lazy Admin Menu 1.6  August 22, 2014, 12:11:19 AM [ Uninstall ] [ List Files ] [ Delete ]
88. Member Color Link 3.1  August 22, 2014, 05:45:11 PM [ List Files ] [ Delete ]
89. Invitation Message In Your Face (IMIYF) 0.3.2  August 22, 2014, 05:47:50 PM [ Uninstall ] [ List Files ] [ Delete ]
90. Google Wallet Subscriptions 1.0.3.2  August 27, 2014, 02:18:14 AM [ Uninstall ] [ List Files ] [ Delete ]
91. Additional Topic Authors 0.1.1  August 28, 2014, 05:28:21 PM [ Uninstall ] [ List Files ] [ Delete ]
92. Rank Image Drop Down 1.0  August 29, 2014, 04:56:55 PM [ Uninstall ] [ List Files ] [ Delete ]
93. Buddies List 1.0.1  August 29, 2014, 06:05:11 PM [ Uninstall ] [ List Files ] [ Delete ]
94. Moderator and Administrator Comment Tags 1.8.1  September 03, 2014, 05:11:24 PM [ Uninstall ] [ List Files ] [ Delete ]
95. Sisyphus 1.0  September 04, 2014, 07:55:40 AM [ Uninstall ] [ List Files ] [ Delete ]
96. Login Detector 1.0  September 05, 2014, 06:06:20 AM [ Uninstall ] [ List Files ] [ Delete ]
97. LUP: Logout Under Profile 1.0.0  September 05, 2014, 06:22:32 PM [ Uninstall ] [ List Files ] [ Delete ]
98. Spoiler BBCode 1.1.3  September 11, 2014, 08:21:22 PM [ Uninstall ] [ List Files ] [ Delete ]
99. Hide PM Text in Email Notifications 1.0  September 13, 2014, 06:03:20 PM [ Uninstall ] [ List Files ] [ Delete ]
100. Users mass actions 0.1.1  September 16, 2014, 12:17:50 AM [ Uninstall ] [ List Files ] [ Delete ]
101. Yellow: Highlight Package On Hover 1.1.0  September 16, 2014, 03:09:55 AM [ Uninstall ] [ List Files ] [ Delete ]
102. Group Key Order and Style 1.1  September 16, 2014, 06:14:02 PM [ Uninstall ] [ List Files ] [ Delete ]
103. Stars to Profile 2.1  September 17, 2014, 03:11:51 PM [ Uninstall ] [ List Files ] [ Delete ]
104. Back to Top 1.1  September 17, 2014, 03:39:14 PM [ Uninstall ] [ List Files ] [ Delete ]
105. Permission to Edit Display Name 1.2  September 17, 2014, 03:58:27 PM [ Uninstall ] [ List Files ] [ Delete ]
106. Permission for Website Url Of Users 1.4  September 17, 2014, 04:08:57 PM [ Uninstall ] [ List Files ] [ Delete ]
107. Topic_Locked_Message 2.2  September 17, 2014, 04:33:08 PM [ Uninstall ] [ List Files ] [ Delete ]
108. Say Thanks 1.0.2  September 17, 2014, 10:43:33 PM [ Uninstall ] [ List Files ] [ Delete ]
109. Track User Logins 1.1  September 19, 2014, 02:29:56 AM [ Uninstall ] [ List Files ] [ Delete ]
110. Off-Topic BBC 1.0  September 23, 2014, 07:22:44 PM [ Uninstall ] [ List Files ] [ Delete ]
111. EmailValidator 1.0  September 25, 2014, 09:00:21 PM [ Uninstall ] [ List Files ] [ Delete ]
112. SMF 1.1.20 / 2.0.9 Update 1.0  October 03, 2014, 09:52:39 PM [ Uninstall ] [ List Files ] [ Delete ]
113. Logout Prompt 1.0  October 13, 2014, 05:09:14 PM [ Uninstall ] [ List Files ] [ Delete ]
114. Install & Uninstall Mods Quickly 1.4  October 13, 2014, 05:20:15 PM [ Uninstall ] [ List Files ] [ Delete ]
115. Reply Button In Every Post 1.0  October 15, 2014, 02:04:50 AM [ Uninstall ] [ List Files ] [ Delete ]
116. Admin Toolbox 1.0  October 15, 2014, 08:33:46 PM [ Uninstall ] [ List Files ] [ Delete ]
117. Styled Maintenance Mode Message 1.0  October 16, 2014, 05:23:47 PM [ Uninstall ] [ List Files ] [ Delete ]
118. 6 Custom buttons / tabs with Sub Menus (4) 0.5  October 16, 2014, 06:00:28 PM [ Uninstall ] [ List Files ] [ Delete ]
119. SA Chat 0.1.5 Rev110  October 16, 2014, 09:50:29 PM [ Uninstall ] [ List Files ] [ Delete ]
120. Mark as Read Redirect 1.0  October 17, 2014, 08:15:21 AM [ Uninstall ] [ List Files ] [ Delete ]
121. Mark PM Unread 0.1.0  October 17, 2014, 09:04:00 AM [ Uninstall ] [ List Files ] [ Delete ]
122. Advance Fake Guests n Users Online (fguo) 1.0  October 17, 2014, 09:05:49 AM [ Uninstall ] [ List Files ] [ Delete ]
123. LMGTFY BBcode 3.7.4  October 17, 2014, 09:54:45 AM [ Uninstall ] [ List Files ] [ Delete ]
124. Better Profile Menu 1.5  October 17, 2014, 11:57:24 PM [ Uninstall ] [ List Files ] [ Delete ]
125. ICAP: Info Center Access Permission 1.0.0  October 18, 2014, 10:02:35 AM [ Uninstall ] [ List Files ] [ Delete ]
126. Slash through Banned Usernames 3.0  October 23, 2014, 08:50:34 PM [ Uninstall ] [ List Files ] [ Delete ]
127. Language on Register 1.0  October 23, 2014, 10:21:14 PM [ Uninstall ] [ List Files ] [ Delete ]
128. Enhancements to reattribute posts 1.5.7  October 23, 2014, 11:46:39 PM [ Uninstall ] [ List Files ] [ Delete ]
129. Switch Permissions 1.0  October 24, 2014, 02:00:40 AM [ Uninstall ] [ List Files ] [ Delete ]
130. Personalized BBC 1.8  October 24, 2014, 06:44:39 AM [ Uninstall ] [ List Files ] [ Delete ]

As you can see this one is at number 5 but never really installed.
Title: Re: Enhanced PM System
Post by: dougiefresh on November 09, 2014, 03:45:52 PM
Uploaded v2.6 - November 9th, 2014
o Fixed issue where this mod's language strings were put in the wrong file.

@Everybody: This update fixed the missing strings issue in the Configuration => Features and Options area.

@Ninja ZX-10RR: Damn....  I'm a bit swamped at the moment, but hopefully, I'll be able to help ya with it....
Title: Re: Enhanced PM System
Post by: Ninja ZX-10RR on November 09, 2014, 05:07:45 PM
No rush like I told ya in a pretty old PM I am busy as well ;) and actually I am packing themes very quickly :) basically variations of the Curve but with super-awesome colors and rounded edges everywhere, I might consider releasing them as well... Idk.
This mod is still low-priority in the to-do list, first there is the payment system (I am still waiting for a reply by nonetheless than the marketing director of an agency...), then host change asap, then alpha of the game, themes, SEO, reporting several bugs with that mod (the one time I tried it it threw me a ton of undefined) and then there is this one ;) it is good indeed but since it's pretty complicated it can wait. Still undecided about those themes, I have already 3 done... Doing the 4th in the next half an hour probably. (Thanks to Fortytwo as well, she is seriously badass with .css)
Title: Re: Enhanced PM System
Post by: Ninja ZX-10RR on November 12, 2014, 03:04:57 PM
I *strongly* think you might want to have a look at this dougie: http://www.simplemachines.org/community/index.php?topic=529950.0 that's your code there to me :/
Title: Re: Enhanced PM System
Post by: dougiefresh on November 12, 2014, 05:18:29 PM
Quote from: ♦ Ninja ZX-10RR ♦ on November 12, 2014, 03:04:57 PM
I *strongly* think you might want to have a look at this dougie: http://www.simplemachines.org/community/index.php?topic=529950.0 that's your code there to me :/
Took a look at that topic and researched that code.  Couldn't find any part of the code mentioned....  Installed v2.6 on a clean SMF 2.0.9 and I can't find it there either....  It isn't my mod.  Looks like the file got corrupted somehow.  ???
Title: Re: Enhanced PM System
Post by: Ninja ZX-10RR on November 12, 2014, 06:22:14 PM
It *looks* like one of the edits to the /Sources/PersonalMessage.php to me, I don't really have time to check since I gotta go but it looked that. Don't really have time in the following days either >_<
Title: Re: Enhanced PM System
Post by: RSI on March 04, 2015, 08:23:18 AM
Hi,

I'm getting the error below whenever PM's are sent or read, not sure which, but I've determined it is this mod.

URL: http://mydomain/index.php?action=pm;sa=send;f=inbox;pmsg=207;u=all
Error: in_array() expects parameter 2 to be array, null given
File: /home/me/public_html/Sources/PersonalMessage.php
Line: 1972

Any ideas as to what it is and how to correct it.
Title: Re: Enhanced PM System
Post by: dougiefresh on March 05, 2015, 10:51:24 AM
@RSI: This section needs to be changed from:
// Remove any recipients that have the current user in their pm ignore list:
foreach ($context['recipients']['to'] as $id => $user)
{
if (in_array($user_info['id'], $user['pm_ignore_list']))
{
$context['send_log']['failed'][] = sprintf($txt['pm_error_ignored_by_user'], $user['name']);
unset($context['recipients']['to'][$id]);
}
}
foreach ($context['recipients']['bcc'] as $id => $user)
{
if (in_array($user_info['id'], $user['pm_ignore_list']))
{
$context['send_log']['failed'][] = sprintf($txt['pm_error_ignored_by_user'], $user['name']);
unset($context['recipients']['bcc'][$id]);
}
}

to the following code:
// Remove any recipients that have the current user in their pm ignore list:
if (!empty($context['recipients']['to']))
{
foreach ($context['recipients']['to'] as $id => $user)
{
if (in_array($user_info['id'], $user['pm_ignore_list']))
{
$context['send_log']['failed'][] = sprintf($txt['pm_error_ignored_by_user'], $user['name']);
unset($context['recipients']['to'][$id]);
}
}
}
if (!empty($context['recipients']['bcc']))
{
foreach ($context['recipients']['bcc'] as $id => $user)
{
if (in_array($user_info['id'], $user['pm_ignore_list']))
{
$context['send_log']['failed'][] = sprintf($txt['pm_error_ignored_by_user'], $user['name']);
unset($context['recipients']['bcc'][$id]);
}
}
}

That should get rid of those pesky error messages....  :P  A mod update will be issued shortly.
Title: Re: Enhanced PM System
Post by: RSI on March 05, 2015, 11:05:49 AM
I just tried that and now when I reply to a PM I'm getting the 2 errors below in the log.

http://mydomain.com/index.php?action=pm;sa=send;f=inbox;pmsg=209;u=all
2: in_array() expects parameter 2 to be array, null given
File: /home/me/public_html/Sources/PersonalMessage.php
Line: 1974

http://mydomain.com/index.php?action=pm;sa=send;f=inbox;pmsg=209;u=all
8: Undefined index: pm_ignore_list
File: /home/me/public_html/Sources/PersonalMessage.php
Line: 1974
Title: Re: Enhanced PM System
Post by: dougiefresh on March 05, 2015, 11:25:16 AM
Can you try replacing the code I gave you with this?  This adds some additional error checking to the mix:
// Remove any recipients that have the current user in their pm ignore list:
if (!empty($context['recipients']['to']))
{
foreach ($context['recipients']['to'] as $id => $user)
{
if (isset($user['pm_ignore_list']) && is_array($user['pm_ignore_list']) && in_array($user_info['id'], $user['pm_ignore_list']))
{
$context['send_log']['failed'][] = sprintf($txt['pm_error_ignored_by_user'], $user['name']);
unset($context['recipients']['to'][$id]);
}
}
}
if (!empty($context['recipients']['bcc']))
{
foreach ($context['recipients']['bcc'] as $id => $user)
{
if (isset($user['pm_ignore_list']) && is_array($user['pm_ignore_list']) && in_array($user_info['id'], $user['pm_ignore_list']))
{
$context['send_log']['failed'][] = sprintf($txt['pm_error_ignored_by_user'], $user['name']);
unset($context['recipients']['bcc'][$id]);
}
}
}
Title: Re: Enhanced PM System
Post by: RSI on March 05, 2015, 11:33:15 AM
Quote from: dougiefresh on March 05, 2015, 11:25:16 AM
Can you try replacing the code I gave you with this?  This adds some additional error checking to the mix:
// Remove any recipients that have the current user in their pm ignore list:
if (!empty($context['recipients']['to']))
{
foreach ($context['recipients']['to'] as $id => $user)
{
if (isset($user['pm_ignore_list']) && is_array($user['pm_ignore_list']) && in_array($user_info['id'], $user['pm_ignore_list']))
{
$context['send_log']['failed'][] = sprintf($txt['pm_error_ignored_by_user'], $user['name']);
unset($context['recipients']['to'][$id]);
}
}
}
if (!empty($context['recipients']['bcc']))
{
foreach ($context['recipients']['bcc'] as $id => $user)
{
if (isset($user['pm_ignore_list']) && is_array($user['pm_ignore_list']) && in_array($user_info['id'], $user['pm_ignore_list']))
{
$context['send_log']['failed'][] = sprintf($txt['pm_error_ignored_by_user'], $user['name']);
unset($context['recipients']['bcc'][$id]);
}
}
}


K, it looks like the errors may be gone now. Let me play with it for a while to make sure.
Title: Re: Enhanced PM System
Post by: dougiefresh on March 05, 2015, 11:44:50 AM
Sure.  Thanks for the bug report!
Title: Re: Enhanced PM System
Post by: RSI on March 05, 2015, 12:56:02 PM
It looks like that did it. Myself and one of my members sent PM's back and forth and I even deleted one in the outbox and then resent it and I'm not seeing any more errors in the log, but if anything comes up I will let you know.

P.S. Doesn't look like they have added the necessary Outbox in v2.1 either so this mod will be needed when its ready.
Title: Re: Enhanced PM System
Post by: dougiefresh on March 06, 2015, 03:56:51 PM
Quote from: RSI on March 05, 2015, 12:56:02 PM
It looks like that did it. Myself and one of my members sent PM's back and forth and I even deleted one in the outbox and then resent it and I'm not seeing any more errors in the log, but if anything comes up I will let you know.
That's good to know!  Thanks!

Quote from: RSI on March 05, 2015, 12:56:02 PM
P.S. Doesn't look like they have added the necessary Outbox in v2.1 either so this mod will be needed when its ready.
Thanks for reminding me of the monumental task ahead of me  :P  I do plan on releasing a SMF 2.1 version at some point....
Title: Re: Enhanced PM System
Post by: dougiefresh on March 13, 2015, 09:39:31 AM
Uploaded v2.8 - March 5th, 2015
o Fixed bug where element is used before checking to see if it has been defined yet.
o Unfixed "bug" in the Manage Rules page that allowed users to assign more than one action to a Rule.
o Unfixed "bug" in function ApplyRules that allowed one PM to be put in multiple folders.
o POLICY CHANGE: Upgrade only possible from version 2.6 and 2.7.




@RSI: You should be able to upgrade to the latest v2.8, ignoring the first operation that fails due to having already made the correction/modification to the code....
Title: Re: Enhanced PM System
Post by: Geor'G on April 12, 2015, 09:16:52 PM
It would be convenient to have a "quick reply" in a dialogue mode.

p.s. Thank you for mod.
Title: Re: Enhanced PM System
Post by: dougiefresh on April 13, 2015, 03:57:59 AM
Let me see what I can do.
Title: Re: Enhanced PM System
Post by: dougiefresh on April 18, 2015, 07:16:57 PM
UPDATE:  I haven't done anything with the quick reply request yet.  However, I've been working on making this mod compatible with SMF 2.1 Beta 1.  Once I get that conversion completed, I'll look into the quick reply request.  I'll also work on a few other features that may or may not make it into the next mod release....
Title: Re: Enhanced PM System
Post by: dougiefresh on April 27, 2015, 07:22:21 PM
UPDATE: The changes for making this mod compatible with SMF 2.1 Beta 1 have been completed.  I'm going to start looking into the quick reply request now...
Title: Re: Enhanced PM System
Post by: dougiefresh on May 04, 2015, 04:55:15 PM
Quote from: Geor'G on April 12, 2015, 09:16:52 PM
It would be convenient to have a "quick reply" in a dialogue mode.

p.s. Thank you for mod.
I can already see that building the quick reply code and template is going to be fun....  :o
Title: Re: Enhanced PM System
Post by: MancerCorp on May 07, 2015, 11:32:08 PM
thanks for this mod - I am yet to install but by all accounts it looks like you have added a lot of core functionality there - congrats.

This may sound a little weird, but I am looking for a mod that will convert a submitted forum post (we review all posts before they go public) in to a private message (and possibly the same in reverse... a PM in to a post).

WHY? - We are attempting to set up SMF as our complete communications portal for our business (we administer the online ordering for many suppliers in a virtual mall arrangement) and a lot of our visitors / customers aren't tech savvy. It will make it easier if they didn't have to work out which to use when contacting us... We want them to mostly use the posting method, so we can display the answers we give to them on technical enquiries etc in the boards, but would like to deal with posts they submit of a private or sensitive nature, as PMs (specific order details, special pricing offerred etc.), sure we could just copy the contents over of any sensitive subject posts in to a reply to their PM and then delete the post at moderation stage, but it would be cleaner to have it logged as coming from them in the first place.

any ideas?
Title: Re: Enhanced PM System
Post by: dougiefresh on May 08, 2015, 07:20:15 AM
The only mod that currently exists to make PMs also a post is Post PM (http://custom.simplemachines.org/mods/index.php?mod=2511).  That might work for ya....

I could make the PM to post functionality work in my mod, specifically as you have described.  However, I would probably have to seek permission from the author of the mod in order to do so.  The post to PM functionality is a bit more difficult.  It would require modifying the posting code to do so.  Again, doable, but probably difficult...
Title: Re: Enhanced PM System
Post by: dougiefresh on May 11, 2015, 04:00:01 AM
UPDATE: PM Quick Reply is now working for SMF 2.0.x-line.  I just need to get the template working for SMF 2.1 Beta 1 now....  Still need to make a profile option like that of the Quick Reply for posts. 

PM Quick Reply (http://custom.simplemachines.org/mods/index.php?mod=4047) has also been submitted as a separate mod, for those interested in this functionality without the rest of the Enhanced PM System mod.  As of this writing, it's still waiting for approval....  (Was submitted yesterday) 
Title: Re: Enhanced PM System
Post by: MancerCorp on May 11, 2015, 08:37:28 PM
hey thet's great news... keep me... posted (sic)
Title: Re: Enhanced PM System
Post by: dougiefresh on May 16, 2015, 01:18:56 PM
Quote from: MancerCorp on May 07, 2015, 11:32:08 PM
This may sound a little weird, but I am looking for a mod that will convert a submitted forum post (we review all posts before they go public) in to a private message (and possibly the same in reverse... a PM in to a post).

WHY? - We are attempting to set up SMF as our complete communications portal for our business (we administer the online ordering for many suppliers in a virtual mall arrangement) and a lot of our visitors / customers aren't tech savvy. It will make it easier if they didn't have to work out which to use when contacting us... We want them to mostly use the posting method, so we can display the answers we give to them on technical enquiries etc in the boards, but would like to deal with posts they submit of a private or sensitive nature, as PMs (specific order details, special pricing offerred etc.), sure we could just copy the contents over of any sensitive subject posts in to a reply to their PM and then delete the post at moderation stage, but it would be cleaner to have it logged as coming from them in the first place.
I've had some time to think about this particular request.  The problem I'm having is to me, it doesn't really fit into the grand scheme of this mod real well, nor would the new functionality be easy to integrate into this mod....  I personally think it would be better suited as a seperate mod, that could complement this mod....
Title: Re: Enhanced PM System
Post by: Geor'G on May 19, 2015, 07:06:13 AM
1. Fix Error in Curve PM Template:
8: Undefined index: edit
File: ***/Themes/default/PersonalMessage.template.php
Line: 1441
Code (find) Select
$which = $txt[ $context['edit'] ? 'edit_message' : 'new_message' ];
Code (correct) Select
$which = $txt[ isset($context['edit']) ? 'edit_message' : 'new_message' ];

2. Add a filter to "Quote to ALL" (see screenshot):
Code (find) Select
<li class="quote_button"><a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';quote;u=all">', $txt['quote_to_all'], '</a></li>
Code (correct) Select
' . !empty($message['recipients']['to']) ? count($message['recipients']['to']) != 1 ? '<li class="quote_button"><a href="' . $scripturl . '?action=pm;sa=send;f=' . ($context['folder'] . $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '') . ';pmsg=' . $message['id'] . ';quote;u=all">' . $txt['quote_to_all'] . '</a></li>' : '' : '';

3. Button "Reply to All" duplicate "Quote to ALL"
Title: Re: Enhanced PM System
Post by: dougiefresh on May 19, 2015, 08:46:20 AM
I'll look at all three issues....
Title: Re: Enhanced PM System
Post by: dougiefresh on May 19, 2015, 07:30:59 PM
@Geor'G:  I've incorporated the first two code changes, as they actually make sense (especially since a bug-free installation is much desired!).

Quote from: Geor'G on May 19, 2015, 07:06:13 AM
3. Button "Reply to All" duplicate "Quote to ALL"
I strongly disagree with this statement.  "Quote to All" creates a new PM, quoting that particular message, to all conversation recipients (I think that's the right word to use here), whereas "Reply to All" simply creates an EMPTY PM, populating the recipients with everyone in that conversation.  Two different, yet similar, functions are being discussed here....
Title: Re: Enhanced PM System
Post by: harsh21 on May 22, 2015, 02:01:48 AM
Lovely & very useful mod.

Thanks
Title: Re: Enhanced PM System
Post by: Batrachian on May 28, 2015, 09:19:04 AM
Hi, currently I am trying to install the "Enhanced PM System" in my forums, but i have some strange issues.

There are some messages in my system already, and they are shown correctly.

BUT when I am trying to write a message (reply or new one), the screen is blank after I hit the send button. (Screenshot "AfterReply")

No Error message whatsoever is shown. (I also tried using different templates, none worked)

I am running SMF 2.0.10 with the following mods:

1.   Enhanced PM Popup   1.0.1     [ Deinstallieren ] [ Dateien auflisten ] [ Löschen ]
2.   Aeva Media   1.4c     [ Deinstallieren ] [ Dateien auflisten ] [ Löschen ]
3.   SMF Post Prefix   1.0     [ Deinstallieren ] [ Dateien auflisten ] [ Löschen ]
4.   Enhanced PM System   2.8   [ Modifikation installieren ] [ Dateien auflisten ] [ Löschen ]
5.   Voter Visibility   2.0     [ Deinstallieren ] [ Dateien auflisten ] [ Löschen ]
6.   SimplePortal   2.3.6     [ Deinstallieren ] [ Dateien auflisten ] [ Löschen ]
Title: Re: Enhanced PM System
Post by: Kardamilas on June 01, 2015, 07:35:23 AM
Goodevening,

i am running SMF 2.0.8 to my forum and i am trying to install that mod but i am getting error.
I guess its not safe to install.
Any other with the same issue?

Title: Re: Enhanced PM System
Post by: dougiefresh on June 04, 2015, 07:38:38 PM
I'm sorry I haven't been able to get back to you lately, as I've been working somewhere around 100 hours in the last 10 days....  I'll look into the bug report(s) that y'all have reported....
Title: Re: Enhanced PM System
Post by: dougiefresh on June 05, 2015, 02:10:43 PM
Quote from: Kardamilas on June 01, 2015, 07:35:23 AM
i am running SMF 2.0.8 to my forum and i am trying to install that mod but i am getting error.
I guess its not safe to install.
Any other with the same issue?
Without a copy of Sources/PersonalMessage.php and more information (like an installed mod list), it would be impossible for me to diagnose the issue with your install.  But that operation centers on the "PM has been Sent" message displayed after sending a PM, and changes it so that it can return multiple messages, depending on what is being done.  Your suggestion that it is "not safe to install" is questionable, as it is more of a cosmetic issue than a functionality issue.

All that being said, you should also upgrade your forum from 2.0.8 to v2.0.10, as there are some security issues that have been resolved in those patches...
Title: Re: Enhanced PM System
Post by: dougiefresh on June 05, 2015, 04:24:16 PM
Uploaded v3.0 - June 5th, 2015
o Updated for SMF 2.1 Beta 1.
o Added dropdown box for PM quick reply options in the PM Settings page.
o Added PM quick reply form to the PM discussion page.
o Added missing checkbox for option to disable blocking PMs from admin.
o Seperated the settings into their own page under Modifications => Enhanced PM.
o Converted "Deny Edit", "Deny Unsend" and "Block 1st Day" checkboxes into group-based permissions.
o Moved CSS modifications into their own CSS file.
o Moved language modifications into their own language file.
o Incorporated bug fix and quote-to-all functionality change (http://www.simplemachines.org/community/index.php?topic=521508.msg3812946#msg3812946) suggested by "Geor'G".
o Fixed some undefined variable/element errors in the "pretty-fied" Search PM area.
o Reinserted the "Move PMs into folders" operation back into the SMF 2.0 install file.
o NOTE: Upgrade not possible from version 2.8 because of language and CSS file changes.




@Everybody: This update has been left cooking for a while, and I decided it was well past time to reveal the modifications I've been working on....  The "moving PMs" feature that was removed in v2.8 has been reintroduced, but it doesn't yet work in SMF 2.1 Beta 1.

@Batrachian: Let me know if this update solves the problems you're seeing.  I'll be looking to see if I can figure out what is going on, as well...  Thanks!
Title: Re: Enhanced PM System
Post by: dougiefresh on June 08, 2015, 07:19:57 PM
Uploaded v3.1 - June 8th, 2015
o Added additional restriction so PM Quick Reply isn't shown if no PMs are present.
o Fixed undefined index error in PersonalMessage.template.php for SMF 2.0.
Title: Re: Enhanced PM System
Post by: @rjen on July 05, 2015, 09:03:28 AM
Great Mod, thanks for fixing the undefined index error, that was annoying.

Now that the language strings are separated out into one file I translated the EnhancedPMSystem.english file to Dutch. EnhancedPMSystem.dutch.php

Find attached the correct translations. Just copy this file to folder: Themes > default > languages and it works...

Title: Re: Enhanced PM System
Post by: dougiefresh on July 06, 2015, 09:14:39 AM
Uploaded v3.1.1 - July 6th, 2015
o Added Dutch translation, courtsey of @rjen (http://www.simplemachines.org/community/index.php?action=profile;u=287786)




@rjen:  Thank you for the translation!  It's been included in version 3.1.1.
Title: Re: Enhanced PM System
Post by: @rjen on July 06, 2015, 02:33:12 PM
Glad to be able to contribute!
Title: Re: Enhanced PM System
Post by: ormuz on August 05, 2015, 10:12:30 AM
Sweet mod!

Question, the option to show the last messages on top, should be separate from list and view. While it makes sense to see newest to oldest on the list, on the view always make sense to see oldest to newest (at least in conversation mode).

Any quick hack here to reorder the list?
while ($message = $context['get_pmessage']('subject'))


Or the list should be order with the last "update" message, like the forum topics...
Title: Re: Enhanced PM System
Post by: ormuz on August 05, 2015, 02:15:09 PM
I've found the solution to my request here:
http://www.simplemachines.org/community/index.php?topic=521508.msg3739709#msg3739709

thanks!
Title: Re: Enhanced PM System
Post by: dougiefresh on August 07, 2015, 10:10:06 AM
Quote from: ormuz on August 05, 2015, 10:12:30 AM
Sweet mod!

Question, the option to show the last messages on top, should be separate from list and view. While it makes sense to see newest to oldest on the list, on the view always make sense to see oldest to newest (at least in conversation mode).

Any quick hack here to reorder the list?
while ($message = $context['get_pmessage']('subject'))


Or the list should be order with the last "update" message, like the forum topics...
???   Hmmmm....  I thought this was done already.  I'll update the mod so that the option to list the PM conversations newest to oldest is seperate from
the conversation messages....

EDIT: Obviously I never got around to it....  I apologize about that!

Quote from: ormuz on August 05, 2015, 02:15:09 PM
I've found the solution to my request here:
http://www.simplemachines.org/community/index.php?topic=521508.msg3739709#msg3739709
IMHO, the post you mentioned is more of a hack than a proper solution....
Title: Re: Enhanced PM System
Post by: DSystem on August 07, 2015, 01:20:58 PM
I tested and loved this mod. ;)

But I have a problem with comparability with mod "Slash through Banned Usernames" -> http://custom.simplemachines.org/mods/index.php?mod=2266

It would be possible to leave this mod compatible with it?
Title: Re: Enhanced PM System
Post by: dougiefresh on August 07, 2015, 03:05:36 PM
Let me see what I can do about this....
Title: Re: Enhanced PM System
Post by: dougiefresh on August 07, 2015, 05:35:56 PM
Quote from: DSystem on August 07, 2015, 01:20:58 PM
I tested and loved this mod. ;)
Thank you!

Quote from: DSystem on August 07, 2015, 01:20:58 PM
But I have a problem with comparability with mod "Slash through Banned Usernames" -> http://custom.simplemachines.org/mods/index.php?mod=2266

It would be possible to leave this mod compatible with it?
That's done for version 3.2....  Once I get the other feature request complete, I'll release the new version....
Title: Re: Enhanced PM System
Post by: dougiefresh on August 07, 2015, 07:37:16 PM
Uploaded v3.2 - August 7th, 2015
o Modifications made so that it can be installed beside "Slash through Banned Usernames" mod.
o Changed "most recent personal message" into "most recent conversation" on PM settings page.
o Added "Show most recent personal messages in conversation at top" to PM settings page.




@Everybody: I apologize to everybody that was waiting for the ability to sort individual conversations separate from the list of conversations.
Title: Re: Enhanced PM System
Post by: DSystem on August 07, 2015, 08:55:08 PM
On installation I had no errors. But the usenames everybody as if they were banned.

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Ffotos.eletronicabr.com.br%2Fimages%2F2015%2F08%2F08%2FMPs.png&hash=f3b65e01678a52206753c07b595e9e20ed355287)

Thank you very much for your attention.
Title: Re: Enhanced PM System
Post by: DSystem on August 07, 2015, 09:28:13 PM
In annex Brazil Portuguese translation.

Title: Re: Enhanced PM System
Post by: dougiefresh on August 07, 2015, 09:40:28 PM
Thanks, DSystem!  I'll include the new language files in the next version.  Let me look into the bug you reported....

Quote from: DSystem on August 07, 2015, 08:55:08 PM
On installation I had no errors. But the usenames everybody as if they were banned.
Strange....  I can confirm the existance of this bug when both mods are installed together....  I can't think of anything that might have caused this....
Title: Re: Enhanced PM System
Post by: dougiefresh on August 08, 2015, 08:38:56 AM
Quote from: dougiefresh on August 07, 2015, 09:40:28 PM
Quote from: DSystem on August 07, 2015, 08:55:08 PM
On installation I had no errors. But the usenames everybody as if they were banned.
Strange....  I can confirm the existance of this bug when both mods are installed together....  I can't think of anything that might have caused this....
I did some reading in the Slash through Banned Usernames (http://www.simplemachines.org/community/index.php?topic=347716.0).  I found that that your report regarding the Personal Message area is a known issue that never got fixed.  So my mod has NOTHING to do with that particular bug!

Just to make sure, I enabled the Enhanced PM mod's ability for users to choose PM modes other than conversation mode, then went under the settings and changed the PM mod to All at Once.  Usernames weren't crossed out.  One at a time and Conversation mode has usernames crosssed out.  I uninstalled the Enhanced PM mod and same results.....  So I posted this in the Slash through Banned Usernames thread:
Quote from: dougiefresh on August 08, 2015, 08:32:20 AM
This old bug report is still present and reproducable in the current SMF 2.0.x line under Personal Messages....
Quote from: ExWizzard on December 18, 2009, 04:18:48 PM
Allright , think i see where the problem is , when you choose the message options:

Display personal messages: 
All at once <-- works fine
One at a time  <-- all names are crossed here
As a conversations <-- all names are crossed here
In conclusion, this bug report doesn't come from my mod.....




@DSystem: Can you translate these two strings for both of the language files you provided?
Quote$txt['recent_pms_at_top'] = 'Show most recent conversation at top of list.';
$txt['recent_msgs_at_top'] = 'Show most recent personal messages in conversation at top.';
Title: Re: Enhanced PM System
Post by: DSystem on August 23, 2015, 08:35:31 PM
Thank you very much for your help. With your tip I was able to figure out the solution to the bug.

http://www.simplemachines.org/community/index.php?topic=347716.msg3832078#msg3832078
Title: Re: Enhanced PM System
Post by: dougiefresh on August 24, 2015, 06:07:01 PM
@DSystem: I'm glad you found an answer to the problem!
Title: Re: Enhanced PM System
Post by: dougiefresh on September 02, 2015, 04:11:18 PM
Uploaded v3.3 - September 2nd, 2015
o Removed support for SMF 2.1 Beta 1
o Added support for SMF 2.1 Beta 2
Title: Re: Enhanced PM System
Post by: Geor'G on September 02, 2015, 08:10:45 PM
Search sent to the PM, is not working.
At the opening of an error
Title: Re: Enhanced PM System
Post by: dougiefresh on September 06, 2015, 01:23:23 PM
I'll look into it.  Can you give me more information about what you did that may have caused that message?
Title: Re: Enhanced PM System
Post by: Geor'G on September 07, 2015, 01:57:22 AM
I find it difficult to explain in English, I did not know much.
Search for messages sent and try to pass on any link in the message itself.
Title: Re: Enhanced PM System
Post by: dougiefresh on December 01, 2015, 04:20:49 PM
@Geor'G: OMG....  I'm so sorry.  This topic kinda got lost in the mix.  I'm going to look into the bug report you posted in September!
Title: Re: Enhanced PM System
Post by: dougiefresh on December 02, 2015, 04:45:40 PM
Uploaded v3.4 - December 2nd, 2015
o Fixed issue where searching for sent items resulted in error message.
o Fixed several undefined variable error messages in PersonalMessage.php.
o Fixed permission to allow member to send PMs 24 hours after registering.




@Geor'G: Sorry this bug report took so long to fix, but fixed it is!  Thanks for the bug report!
Title: Re: Enhanced PM System
Post by: flamechica on December 28, 2015, 11:36:36 AM
I got 2 errors in my error log right after installing this mod

Quote
2: copy(/home/rsdlaugh/public_html/upgradeforum/Packages/temp/EnhancedPMSystem.portuguese_brazilian-utf8.php): failed to open stream: No such file or directory (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.rsdlaughter.com%2Fupgradeforum%2FThemes%2Fdefault%2Fimages%2Ffilter.gif&hash=f4c89af87c866d815af4df0b37bbfba02bb7feae) (http://www.rsdlaughter.com/upgradeforum/index.php?action=admin;area=logs;sa=errorlog;desc;filter=file;value=L2hvbWUvcnNkbGF1Z2gvcHVibGljX2h0bWwvdXBncmFkZWZvcnVtL1NvdXJjZXMvU3Vicy1QYWNrYWdlLnBocA==)  File: /home/rsdlaugh/public_html/upgradeforum/Sources/Subs-Package.php (http://www.rsdlaughter.com/upgradeforum/index.php?action=admin;area=logs;sa=errorlog;file=L2hvbWUvcnNkbGF1Z2gvcHVibGljX2h0bWwvdXBncmFkZWZvcnVtL1NvdXJjZXMvU3Vicy1QYWNrYWdlLnBocA==;line=1392)
Line: 1392

Quote
2: file_get_contents(/home/rsdlaugh/public_html/upgradeforum/Packages/temp/EnhancedPMSystem.portuguese_brazilian-utf8.php): failed to open stream: No such file or directory (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.rsdlaughter.com%2Fupgradeforum%2FThemes%2Fdefault%2Fimages%2Ffilter.gif&hash=f4c89af87c866d815af4df0b37bbfba02bb7feae) (http://www.rsdlaughter.com/upgradeforum/index.php?action=admin;area=logs;sa=errorlog;desc;filter=file;value=L2hvbWUvcnNkbGF1Z2gvcHVibGljX2h0bWwvdXBncmFkZWZvcnVtL1NvdXJjZXMvU3Vicy1QYWNrYWdlLnBocA==)  File: /home/rsdlaugh/public_html/upgradeforum/Sources/Subs-Package.php (http://www.rsdlaughter.com/upgradeforum/index.php?action=admin;area=logs;sa=errorlog;file=L2hvbWUvcnNkbGF1Z2gvcHVibGljX2h0bWwvdXBncmFkZWZvcnVtL1NvdXJjZXMvU3Vicy1QYWNrYWdlLnBocA==;line=2467)
Line: 2467
Title: Re: Enhanced PM System
Post by: d3vcho on December 28, 2015, 01:51:38 PM
Hello again Doughie,

Just finished translations for Spanish_es-utf8 and Spanish_es

Great Mod! Just fabulous...
Title: Re: Enhanced PM System
Post by: dougiefresh on December 28, 2015, 09:04:00 PM
Uploaded v3.5 - December 28th, 2015
o Added Spanish translation to the mod.  Thanks, d3vcho (http://www.simplemachines.org/community/index.php?action=profile;u=422971)!
o Fixed installation issue with UTF8 Brazilian Portuguese language file.




@d3vcho: Thank you for the translations!  They've been included in this version!

@flamechica:  Thank you for the bug report!  It's been fixed for this version!
Title: Re: Enhanced PM System
Post by: runningtrades on January 10, 2016, 10:23:44 AM
There seems to be compatibility issues with Windows 10....the user is unable to clear a new PM even if they delete it. Works fine with a Mac running 10.11.2. The SMF i am using is 2.0.11
Title: Re: Enhanced PM System
Post by: dougiefresh on January 10, 2016, 03:13:41 PM
That's really odd....  I'll look into this bug report....
Title: Re: Enhanced PM System
Post by: Kardamilas on January 20, 2016, 05:12:47 PM
Goodevening my friend,i am facing a strange problem.
When i use this mod i can only read my last conversation,in any other i click below
it opens the first one on the top.
Title: Re: Enhanced PM System
Post by: Circa on January 31, 2016, 04:19:54 PM
I'm having the same issue as above ^ Cleared caches and all that and still happening.
Title: Re: Enhanced PM System
Post by: messire_Leonard on February 02, 2016, 06:54:14 AM
Good day!
I tried to make the Russian translation for the mod (UTF-8).
Try it if yo want.
Title: Re: Enhanced PM System
Post by: dougiefresh on February 02, 2016, 06:15:01 PM
I won't be able to included for a few days as I just had knee surgery.  I hope you understand. Thank you.
Title: Re: Enhanced PM System
Post by: Geor'G on February 06, 2016, 02:28:10 AM
Do not operate the settings mode.
Options are not saved:

Reseyge personal messages from
Notify by email every time you receive a personal messag

If the option is disabled in the settings:
Allow users to select PM views other than conversation mode
Title: Re: Enhanced PM System
Post by: dougiefresh on February 13, 2016, 09:40:33 PM
Regarding settings not being saved, I've noticed that happening on my localhost server, and not just in the Enhanced PM settings page.  Removing the cached mod settings file (mine is data_9b8c40e6a18fdc0d0bc5a111bdc9934e-SMF-modSettings) fixes the problem until the next time you need to change a setting, however, I haven't found a good explanation for this to be happening.....  Further research is required before I can fix this issue....

EDIT: Spoke too soon.... The Cannot save Admin/Forum/Smileys/Settings changes (http://www.simplemachines.org/community/index.php?topic=493232.msg3457344#msg3457344) thread seems to have some solutions to this problem....

EDIT2: I am looking into the other issues....  Please be patient....  O:)
Title: Re: Enhanced PM System
Post by: dougiefresh on February 24, 2016, 09:24:49 PM
@Geor'G: I can duplicate the PM settings page in the Personal Messages not being able to save certain settings.  I'll look into it.

@Circa, @Kardamilas and @runningtrades:  I haven't forgotten your bug reports.  I'm looking into them.

@messire_Leonard: The Russian translation will be included in the next version of the mod.  Thank you for submitting it!
Title: Re: Enhanced PM System
Post by: runningtrades on March 31, 2016, 10:41:00 PM
Tried installing this mod a few times, and have to keep deleting it. When someone receives a new PM, the notification keeps reappearing every time you log into the site, as if it's a new message, but it's not. Only way around it is to delete the messages after you read them.
Title: Re: Enhanced PM System
Post by: runningtrades on April 12, 2016, 02:00:48 PM
Is there a fix in the works for the issue noted in my last post?
Title: Re: Enhanced PM System
Post by: dougiefresh on April 12, 2016, 07:09:50 PM
Quote from: runningtrades on April 12, 2016, 02:00:48 PM
Is there a fix in the works for the issue noted in my last post?
I haven't been able to find the issue in the mod.  Honestly, I'm considering rewriting the entire mod from the ground up, in order to address some of the issues/reports that have been reported....
Title: Re: Enhanced PM System
Post by: -Rock Lee- on April 13, 2016, 12:36:25 PM
@dougefresh I see there is a translation into Spanish but Spain so now I leave the Latin version which has some changes and improvements that I think should go ...

Regards!
Title: Re: Enhanced PM System
Post by: RizwaN on June 04, 2016, 12:51:21 AM
i have installed this PM System but when some one PM to anybody the receiver can not see notification of PM plz help.i am using SMF 2.0.1 and have installed LEVEL them.
Title: Re: Enhanced PM System
Post by: James Gryphon on June 15, 2016, 09:21:56 PM
Hi Doug,
I hate to pile on a fellow, but my forum's been running the enhanced PM system for a while now, and we've bumped into a major bug.

Everything seemed to work mostly fine for a while (at least enough that nobody complained too much). The default view has one irritating characteristic in that, if you don't use "Recent messages at the top", you start out at page 1 (your oldest conversations) every time you go to your PMs, and have to click to get to the newest ones, but I made the switch and things worked fine for a time.

It turned out, though, that I couldn't load any conversation except for the top one, no matter which one that I clicked. If I have two conversations, #1 and #2, and click on #2, it would load #1 anyway. Changing from conversation mode to "All at once" made things workable for me again. Within the last few days, though, somebody else reported the same issue. (This has happened before. I "fixed" it back then by uininstalling the mod, but some of our members just loved it and wanted it back in, so I crossed my fingers, hoped it was a fluke before, and put it back in.)

If you're really going to rewrite the mod from the ground up, I'm not sure how much this bug report will help, but I thought it was worth mentioning. As far as the forum goes, I'm not sure whether I'll simply advise everybody to use non-conversation mode, or just scrap the mod and put in a smaller one like the "Sent PM" search to help tide people over. I guess we'll see.
Title: Re: Enhanced PM System
Post by: skb on June 15, 2016, 10:23:36 PM
Quote from: James Gryphon on June 15, 2016, 09:21:56 PM
It turned out, though, that I couldn't load any conversation except for the top one, no matter which one that I clicked. If I have two conversations, #1 and #2, and click on #2, it would load #1 anyway. Changing from conversation mode to "All at once" made things workable for me again. Within the last few days, though, somebody else reported the same issue. (This has happened before. I "fixed" it back then by uininstalling the mod, but some of our members just loved it and wanted it back in, so I crossed my fingers, hoped it was a fluke before, and put it back in.)

I had this same problem for ONE day & then it resolved on its own. Didn't make the changes that you did. The previous day I had installed Tiny Portal & I thought it was having some conflict with a Mod. Since the issue resolved on its own, I put it down to some server side maintenance error & forgot about it. But I will keep your advice in mind, just in case.
Title: Re: Enhanced PM System
Post by: JF3000 on June 19, 2016, 04:38:49 PM
I just installed this mod on a fresh system and the messages section even after sending a PM doesn't change, what could I be doing wrong?
Title: Re: Enhanced PM System
Post by: dougiefresh on June 19, 2016, 06:50:46 PM
Life has been kicking me while I'm down lately....  I really haven't had much time to work on these mods lately.  I'd apologize for any inconvenience this causes, but my workplace has been firing people and expecting everybody else to pick up the load left....  (Sigh)

I'll try to look into these bug reports when I have some time.  I have some vacation coming up in 2 weeks, so maybe then....
Title: Re: Enhanced PM System
Post by: JF3000 on June 20, 2016, 05:33:29 AM
Thank you dougie
Title: Re: Enhanced PM System
Post by: dougiefresh on August 20, 2016, 06:20:07 PM
About a month ago, I've lost my job and have been severely depressed.  I need some help, so if you want to help, please do so!

I've uploaded this mod to GitHub here: https://github.com/douglasorend/Enhanced_PM_System
Title: Re: Enhanced PM System
Post by: FragaCampos on August 24, 2016, 09:07:06 PM
I'm sorry to know that, but hey, life goes on, and there are surely many opportunities out there.
Believe me, loosing the job is bad but it's not the end of the world. Keep your eyes pointing to the sky, rather to the floor!

Cheers.
Title: Re: Enhanced PM System
Post by: foxesdancingonsnow on August 31, 2016, 06:11:45 PM
Quote from: dougiefresh on February 13, 2016, 09:40:33 PM
Regarding settings not being saved, I've noticed that happening on my localhost server, and not just in the Enhanced PM settings page.  Removing the cached mod settings file (mine is data_9b8c40e6a18fdc0d0bc5a111bdc9934e-SMF-modSettings) fixes the problem until the next time you need to change a setting, however, I haven't found a good explanation for this to be happening.....  Further research is required before I can fix this issue....

EDIT: Spoke too soon.... The Cannot save Admin/Forum/Smileys/Settings changes (http://www.simplemachines.org/community/index.php?topic=493232.msg3457344#msg3457344) thread seems to have some solutions to this problem....

EDIT2: I am looking into the other issues....  Please be patient....  O:)

Just to be sure I understand as I got a bit lost on this last page...is the issue/problem with users not being able to change their settings (specifically not being able to choose "never" to receive e-mails with PMs) a file permissions issue or a bug in the mod?
Title: Re: Enhanced PM System
Post by: James Gryphon on September 10, 2016, 01:09:53 AM
Quote from: skb on June 15, 2016, 10:23:36 PM
Quote from: James Gryphon on June 15, 2016, 09:21:56 PM
It turned out, though, that I couldn't load any conversation except for the top one, no matter which one that I clicked. If I have two conversations, #1 and #2, and click on #2, it would load #1 anyway. Changing from conversation mode to "All at once" made things workable for me again. Within the last few days, though, somebody else reported the same issue. (This has happened before. I "fixed" it back then by uininstalling the mod, but some of our members just loved it and wanted it back in, so I crossed my fingers, hoped it was a fluke before, and put it back in.)

I had this same problem for ONE day & then it resolved on its own. Didn't make the changes that you did. ... But I will keep your advice in mind, just in case.
Noticed something interesting, testing it again today.

There are two options in the "Personal Messaging" profile setting section, "Show most recent conversation at top of list", and "Show most recent personal messages in conversation at top".

If you have one of these options checked, but not the other, it will reliably trigger the bug as described in my previous post. You start out at the top of the page, with no jump.

If you have both or neither checked, however, you can view any conversation normally. However, after loading that conversation, it then jumps you a currently unpredictable distance down the page.

My analysis of what happens depending on what checkboxes are checked:
Unchkd./U
Loading any conversation works
1st page is oldest conversations, 14 is newest
Jumps down after opening conversation
Inside convo, bottom of page is newest PM

Chckd./C
Loading any conversation works
1st page is newest conversations, 14 is oldest
Jumps down after opening conversation
Inside convo, bottom of page is oldest PM

C/U
Conversation loaded is always the one at the top of the page of conversations
1st page is newest conversations, 14 is oldest
No jump
Inside convo, bottom of the page is oldest PM

U/C
Conversation loaded is always the one at the top of the page of conversations
1st page is oldest conversations, 14 is newest
No jump
Inside convo, bottom of the page is newest PM

So, having the first box unselected and the second one checked is no different from having both boxes unselected, and it breaks your ability to pick any conversation besides the one at the top of the list; conversely, checking the first box but not the second one is exactly the same as checking both boxes, but also breaks picking conversations.

I don't know what the cause of any of this is, but hopefully somebody who has a better knowledge of this mod than me can figure out the underlying problems.
Title: Re: Enhanced PM System
Post by: MaryLouW on January 10, 2017, 08:54:12 PM
I"m not sure where I'm supposed to post this but I'm sure you guys will move it to where it should go.

I just installed the Enhanced PM System, which I liked the look of it.  However, no matter which message I wanted to read, it would only display the last message posted.  I uninstalled it so my users wouldn't get confused. 

Is there something that I didn't do right maybe?
Title: Re: Enhanced PM System
Post by: dougiefresh on January 10, 2017, 08:59:37 PM
(https://upload.wikimedia.org/wikipedia/commons/thumb/9/95/SMirC-facepalm.svg/320px-SMirC-facepalm.svg.png) 

God, I need to do something with that mod.  It's a known issue with that mod.

I can't seem to find the issue with it, and It's a big fricken mod....  I am honestly considering stopping support for that mod altogether....
Title: Re: Enhanced PM System
Post by: MaryLouW on January 10, 2017, 09:05:05 PM
LOL!!  Don't let it upset you!!  Life is much too short for that.  It's okay, honest!!!  You have a ton of mods and I'm having fun looking through them.  Saw a few more I want to try.

One thing, is there a mod that lets you justify text?
Title: Re: Enhanced PM System
Post by: dougiefresh on January 10, 2017, 09:16:49 PM
Normally, I don't give up on a mod.....  I just did.  It's no longer available to download from the Customization area....

I've been putting it off for too long....
Title: Re: Enhanced PM System
Post by: MaryLouW on January 10, 2017, 09:21:10 PM
Well..... it's only one and you have a lot of them!!  :)  I just instaled the 2.1 admin panel mod and it's AWESOME!!  I love the cute little icons!!  Now I can't wait for 2.1 to be released!!  Going back to your mods to see what else I can find!  THANKS for the great mods!!  I shall say a prayer for the one that "died".
Title: Re: Enhanced PM System
Post by: Steve on January 11, 2017, 09:29:22 AM
Quote from: MaryLouW on January 10, 2017, 09:05:05 PMOne thing, is there a mod that lets you justify text?

I'm not sure I understand. SMF has justify text buttons by default in a reply window.
Title: Re: Enhanced PM System
Post by: MaryLouW on January 11, 2017, 02:57:58 PM
I'm replying but I don't see an icon to justify text - just preformatted, left, center, and right.  In justified text, every line is the same length.   It's in almost every program I have where one can use text.

I've attached an example of what I mean.
Title: Re: Enhanced PM System
Post by: Shambles on January 11, 2017, 03:14:47 PM
It's a bit (well, a lot) off topic for this thread, but there are a few mods that provide this

http://custom.simplemachines.org/mods/index.php?action=search;basic_search=justify
Title: Re: Enhanced PM System
Post by: MaryLouW on January 11, 2017, 03:36:33 PM
Thanks for the link!!  Yes, I agree, it's WAY off topic...  feel free to remove the wayward parts.   :)
Title: Re: Enhanced PM System
Post by: Steve on January 11, 2017, 04:23:52 PM
Oh carp! I don't know what I was thinking. Sorry about that MaryLou.

And I'll go ahead and mark this solved. :)
Title: Re: Enhanced PM System
Post by: Irisado on January 12, 2017, 11:50:55 AM
Moved this discussion here, so that anyone wondering why the mod has been withdrawn will be able to find the reason more easily.