Advertisement:

Author Topic: Enhanced PM System  (Read 87844 times)

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,859
  • Mod King
    • XPtsp.com Community
Re: Enhanced PM System
« Reply #20 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.....

Offline FragaCampos

  • Sophist Member
  • *****
  • Posts: 1,337
  • Gender: Male
    • docsPT
Re: Enhanced PM System
« Reply #21 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"?

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,859
  • Mod King
    • XPtsp.com Community
Re: Enhanced PM System
« Reply #22 on: June 26, 2014, 06:34:28 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)

-> 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...
« Last Edit: June 26, 2014, 07:38:26 PM by dougiefresh »

Offline FragaCampos

  • Sophist Member
  • *****
  • Posts: 1,337
  • Gender: Male
    • docsPT
Re: Enhanced PM System
« Reply #23 on: June 27, 2014, 12:51:21 AM »
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.

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,859
  • Mod King
    • XPtsp.com Community
Re: Enhanced PM System
« Reply #24 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+.....

Offline FragaCampos

  • Sophist Member
  • *****
  • Posts: 1,337
  • Gender: Male
    • docsPT
Re: Enhanced PM System
« Reply #25 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:)

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,859
  • Mod King
    • XPtsp.com Community
Re: Enhanced PM System
« Reply #26 on: June 28, 2014, 07:32:09 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....

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,859
  • Mod King
    • XPtsp.com Community
Re: Enhanced PM System
« Reply #27 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!!!
o Fixed incorrect image assigned to Outbox PMs.  Thanks, FragaCampos!
o Fixed an undefined variable error, reported by FragaCampos
o Added Mail Image tooltips, as requested by FragaCampos
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.

Offline FragaCampos

  • Sophist Member
  • *****
  • Posts: 1,337
  • Gender: Male
    • docsPT
Re: Enhanced PM System
« Reply #28 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:
Code: [Select]
Execute Modification install_1.3.xml Modification parse error
Any advise from you or should I open a new topic in SMF Support?

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,859
  • Mod King
    • XPtsp.com Community
Re: Enhanced PM System
« Reply #29 on: June 29, 2014, 08:03:46 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:
Code: [Select]
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....

Offline FragaCampos

  • Sophist Member
  • *****
  • Posts: 1,337
  • Gender: Male
    • docsPT
Re: Enhanced PM System
« Reply #30 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):
Code: [Select]
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.


- 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.

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,859
  • Mod King
    • XPtsp.com Community
Re: Enhanced PM System
« Reply #31 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
« Last Edit: June 30, 2014, 05:38:26 PM by dougiefresh »

Offline FragaCampos

  • Sophist Member
  • *****
  • Posts: 1,337
  • Gender: Male
    • docsPT
Re: Enhanced PM System
« Reply #32 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?

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,859
  • Mod King
    • XPtsp.com Community
Re: Enhanced PM System
« Reply #33 on: June 30, 2014, 06:24:57 PM »

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.....
« Last Edit: June 30, 2014, 06:46:25 PM by dougiefresh »

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,859
  • Mod King
    • XPtsp.com Community
Re: Enhanced PM System
« Reply #34 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
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....
« Last Edit: July 06, 2014, 12:16:02 PM by dougiefresh »

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,859
  • Mod King
    • XPtsp.com Community
Re: Enhanced PM System
« Reply #35 on: July 02, 2014, 12:51:26 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.
« Last Edit: July 02, 2014, 01:02:18 PM by dougiefresh »

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,859
  • Mod King
    • XPtsp.com Community
Re: Enhanced PM System
« Reply #36 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....

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....

-> 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....
« Last Edit: July 05, 2014, 01:02:03 PM by dougiefresh »

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,859
  • Mod King
    • XPtsp.com Community
Re: Enhanced PM System
« Reply #37 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.

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,859
  • Mod King
    • XPtsp.com Community
Re: Enhanced PM System
« Reply #38 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.".  Interesting idea....  Shouldn't be too hard to implement....

Offline Steve

  • Freak
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,503
  • Gender: Male
  • I have not yet begun to procrastinate.
Re: Enhanced PM System
« Reply #39 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 ...
Online Manual

Please do not PM me for support.