Advertisement:

Author Topic: PM Quick Reply  (Read 7609 times)

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,859
  • Mod King
    • XPtsp.com Community
PM Quick Reply
« on: May 12, 2015, 11:50:25 PM »
Link to Mod


PM QUICK REPLY v1.11
By Dougiefresh -> Link to Mod


Introduction
This mod adds a quick reply box to the Personal Message (PM) area when viewing PMs, as well as per-user options to show, hide or disable the PM Quick Reply box.

Compatibility Notes
This mod was tested on SMF 2.0.10, but should work on SMF 2.1 RC2, as well as any version of SMF 2.0.x.  Versions below SMF 2.1 RC2, as well as SMF 1.x, is not and will not be supported.

This mod should NOT be used with Enhanced PM System versions 3.0 and higher, as that mod will have this mod integrated into it.  It may be used with versions below v3.0, however, the "copy to outbox" checkbox may still be active and may not properly save your quick PMs as part of the conversation.  This is due to the Enhanced PM System mod not "fixing" this member option within the source file before displaying the template.

Changelog
The changelog can be viewed at XPtsp.com.

License
Copyright (c) 2015 - 2019, 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.

Offline ahrasis

  • SMF Hero
  • ******
  • Posts: 4,916
  • Gender: Male
  • Busy mode is on.
    • ahmad.rasyid.ismail on Facebook
    • ahrasis on GitHub
    • ahrasis on LinkedIn
    • @ahrasis on Twitter
    • ElkArte Malaysia
Re: PM Quick Reply
« Reply #1 on: May 13, 2015, 01:45:05 AM »
Nice idea. I already have similar idea since I made quick reply reposition mod but haven't got time to look into it. The only extra idea I have is to make it an ajax reply and I think you can do that too. I do see the future of this promising mod, so, keep it up.

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,859
  • Mod King
    • XPtsp.com Community
Re: PM Quick Reply
« Reply #2 on: May 15, 2015, 06:33:23 PM »
Uploaded v1.1 - May 15th, 2015
o PM Quick Reply settings moved to the PM Settings template.

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,859
  • Mod King
    • XPtsp.com Community
Re: PM Quick Reply
« Reply #3 on: June 05, 2015, 05:02:35 PM »
Uploaded v1.2 - June 5th, 2015
o Updated for SMF 2.1 Beta 1.

Offline Steve

  • Freak
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,500
  • Gender: Male
  • I have not yet begun to procrastinate.
Re: PM Quick Reply
« Reply #4 on: June 05, 2015, 07:53:12 PM »
Love, love, love this. ;D
Online Manual

Please do not PM me for support.

Offline Steve

  • Freak
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,500
  • Gender: Male
  • I have not yet begun to procrastinate.
Re: PM Quick Reply
« Reply #5 on: June 05, 2015, 08:05:46 PM »
I'm seeing this error though I haven't been able to pinpoint the exact steps that cause it:

8: Undefined index: pm_quick_reply
Apply Filter: Only show the errors from this file
File: /home/*****/public_html/forums/Themes/default/PersonalMessage.template.php
Line: 561


Edit: just found that if I go to my pm box with no messages and then go to the index page of the forum, I get that error.
Online Manual

Please do not PM me for support.

Offline Steve

  • Freak
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,500
  • Gender: Male
  • I have not yet begun to procrastinate.
Re: PM Quick Reply
« Reply #6 on: June 06, 2015, 04:34:31 PM »
Btw, the error has no effect on functionality that I can find. It's just annoying to have it show up next to the admin button.
Online Manual

Please do not PM me for support.

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,859
  • Mod King
    • XPtsp.com Community
Re: PM Quick Reply
« Reply #7 on: June 06, 2015, 05:13:04 PM »
@Steve: Can't reproduce this.... Can you attach your Themes/default/PersonalMessage.template.php and Sources/PersonalMessage.php files?  Thanks in advance.

Offline Steve

  • Freak
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,500
  • Gender: Male
  • I have not yet begun to procrastinate.
Re: PM Quick Reply
« Reply #8 on: June 06, 2015, 05:17:49 PM »
Here ya go. :)
Online Manual

Please do not PM me for support.

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,859
  • Mod King
    • XPtsp.com Community
Re: PM Quick Reply
« Reply #9 on: June 06, 2015, 07:53:47 PM »
Uploaded v1.3 - June 6th, 2015
o Fixed undefined index error in PersonalMessage.template.php.



@Steve: Whoops!!  I forgot that I had to turn on the PM quick reply box in the PM settings before it would show the box.  Once I did, I could reproduce the error on the same line (not same line NUMBER) as your report.  This update fixes this issue.  Thanks for the bug report!

Offline Steve

  • Freak
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,500
  • Gender: Male
  • I have not yet begun to procrastinate.
Re: PM Quick Reply
« Reply #10 on: June 07, 2015, 08:30:35 AM »
I'm still getting the exact same error, Dougie. :(
Online Manual

Please do not PM me for support.

Offline Steve

  • Freak
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,500
  • Gender: Male
  • I have not yet begun to procrastinate.
Re: PM Quick Reply
« Reply #11 on: June 07, 2015, 03:44:15 PM »
Don't know if this helps but when I click to send a message, I get this error also:

8: Undefined index: pm_quick_reply
Apply Filter: Only show the errors from this file
File: /home/************/public_html/forums/Themes/default/PersonalMessage.template.php
Line: 625

Both errors seem to generate only when the pm box has no messages.
Online Manual

Please do not PM me for support.

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,859
  • Mod King
    • XPtsp.com Community
Re: PM Quick Reply
« Reply #12 on: June 08, 2015, 07:12:27 PM »
Uploaded v1.4 - 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.



@Steve:  I thought I fixed that error in both install.xml files.  Turns out it was only the SMF 2.1 install file....  My bad....  v1.3 Changelog should read:
Quote
v1.3 - June 6th, 2015
o Fixed undefined index error in PersonalMessage.template.php for SMF 2.1.

Offline Steve

  • Freak
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,500
  • Gender: Male
  • I have not yet begun to procrastinate.
Re: PM Quick Reply
« Reply #13 on: June 08, 2015, 07:46:52 PM »
Works a treat now Dougie. Thanks a bunch!
Online Manual

Please do not PM me for support.

Offline Costa

  • SMF Hero
  • ******
  • Posts: 3,045
  • Gender: Male
  • Do NOT feed the trolls...
Re: PM Quick Reply
« Reply #14 on: June 29, 2015, 11:27:01 AM »
Code: (portuguese_pt) [Select]
$txt['display_pm_quick_reply'] = 'Usar a resposta rápida nas mensagens privadas: ';
$txt['display_quick_reply1'] = 'Não mostrar';
$txt['display_quick_reply2'] = 'Mostrar, desligado por defeito';
$txt['display_quick_reply3'] = 'Mostrar, ligado por defeito';

Code: (portuguese_pt-utf8) [Select]
$txt['display_pm_quick_reply'] = 'Usar a resposta rápida nas mensagens privadas: ';
$txt['display_quick_reply1'] = 'Não mostrar';
$txt['display_quick_reply2'] = 'Mostrar, desligado por defeito';
$txt['display_quick_reply3'] = 'Mostrar, ligado por defeito';
Hugo "Costa" Fernandes
Todas as MP's a pedir ajuda são sujeitas a radioactividade, microondas, queimadas e atiradas borda fora.

"At least someone appreciates the fact that I am doing and not thinking..."
"Laziness is counter-revolutionary."

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,859
  • Mod King
    • XPtsp.com Community
Re: PM Quick Reply
« Reply #15 on: June 30, 2015, 07:00:50 PM »
Thank you, Costa!  I'll include it in the next version, once I figure out what the search string should be....

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,859
  • Mod King
    • XPtsp.com Community
Re: PM Quick Reply
« Reply #16 on: July 11, 2017, 12:48:35 PM »
Uploaded v1.5 - July 11th, 2017
o Added support for SMF 2.1 Beta 3.
o Removed support for SMF 2.1 Beta 1 and 2.



@Costa:  I'm sorry, I must be REALLY slow at searching for text strings....   O:)  Either that, or I completely forgot about adding them to the mod.  I apologize....

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,859
  • Mod King
    • XPtsp.com Community
Re: PM Quick Reply
« Reply #17 on: August 04, 2017, 01:01:37 PM »
Uploaded v1.6 - August 4th, 2017
o Added Portuguese_PT language translation, courtsey of Costa.  Thanks, Costa!



@Costa:  Thanks for the translation!  Sorry it took so long to get it into the mod!  (Only took 2 years.... O:) What a record!  ::))

Offline thepitster

  • Semi-Newbie
  • *
  • Posts: 28
  • Gender: Male
    • ALLRiPPED
Re: PM Quick Reply
« Reply #18 on: August 26, 2017, 03:56:00 AM »
in your language_portuguese_pt.xml & language_portuguese_pt-utf8.xml files, you might wanna change them to:
Code: (language_portuguese_pt.xml, language_portuguese_pt-utf8.xml) [Select]
<file name="$languagedir/Profile.portuguese_pt.php" error="skip">
<file name="$languagedir/Profile.portuguese_pt-utf8.php" error="skip">

that way the mod does not error right off the bat on non-portuguese forums :)

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,859
  • Mod King
    • XPtsp.com Community
Re: PM Quick Reply
« Reply #19 on: August 26, 2017, 07:18:41 AM »
Uploaded v1.7 - Agust 26th, 2017
o Fixed Portuguese_PT language files so that non-portuguese forums skip operations.



@thepitster:  You're absolutely right!  I've made that change in the mod!  Thank you for the report!