Advertisement:

Author Topic: PM Attachments  (Read 117965 times)

Offline SoLoGHoST

  • SMF Hero
  • ******
  • Posts: 1,796
  • Gender: Male
  • Real coders do not need to comment their code!
    • Dream Portal
Re: PM Attachments
« Reply #240 on: September 25, 2014, 11:50:38 PM »
I have a mod that auto resizes images sent as attachments.  This helps immensely to keep file usage on my server low.  Do you know if such a mod will work with this mod or is there a way to integrate such a feature into it?

Max size per attachment sets the filesize.  This is more accurate... but to each their own.  It is not hard to resize images down.  In fact, SMF does this, index.php?action=admin;area=featuresettings;sa=layout (at the bottom are Max Width and Max Height of posted pictures).  Not entirely sure if this will take effect in Personal Messages also, but you can try and see...

Offline RSI

  • Jr. Member
  • **
  • Posts: 123
Re: PM Attachments
« Reply #241 on: February 03, 2015, 12:26:40 PM »
Hello,

I'm getting the error below in the error log after installing this mod. Any idea what it is and how to correct it?

http://mydomain/index.php?action=pm;sa=send;f=inbox;pmsg=182;u=all

2: in_array() expects parameter 2 to be array, null given

File: /home/me/public_html/Sources/PersonalMessage.php

Line: 2067

Offline SoLoGHoST

  • SMF Hero
  • ******
  • Posts: 1,796
  • Gender: Male
  • Real coders do not need to comment their code!
    • Dream Portal
Re: PM Attachments
« Reply #242 on: February 09, 2015, 02:59:07 AM »
Well, the error looks exactly as it says.  So go to that file, open it, go to line 2067, just before in_array is called, the 2nd parameter in there will be the variable you need to target, and put in

Code: [Select]
if (!empty($variable))
{
    // wrap the in_array code in here...


}

So, just wrap all in_array code within the above code, where $variable is the variable name that gets used in the 2nd parameter of in_array.

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,859
  • Mod King
    • XPtsp.com Community
Re: PM Attachments
« Reply #243 on: March 31, 2015, 07:16:35 PM »
@SoLoGHoST:  I'm sorry to hear about your situation.  I hope things get better for you!!!

I would be interested in taking over support and care of this mod, if you're okay with it.  Yes, I realize it's a big mod....

Offline vomito

  • Newbie
  • *
  • Posts: 5
Re: PM Attachments
« Reply #244 on: April 25, 2015, 07:28:01 AM »
I've just installed pm_attachments 1.6 on SMF 2.09
Now I have an error in the section admin/manage attachments. When hitting the button in my admin-area smf crashes and I will get this error:

Fatal error: Cannot redeclare template_pm_attachment_repair() (previously declared in /homepages/19/d127221452/htdocs/Daciakrempel/smf/Sources/Load.php(2240) : eval()'d code:353) in /homepages/19/d127221452/htdocs/Daciakrempel/smf/Sources/Load.php(2240) : eval()'d code on line 513

Does anybody know what might have gone wrong?

Offline vomito

  • Newbie
  • *
  • Posts: 5
Re: PM Attachments
« Reply #245 on: April 25, 2015, 11:11:18 AM »
Mistake found!  :)

The installer of the modification added some lines twice in ./Themes/default/PersonalMessage.template.php

these ones:

function template_pm_attachment_repair() ... template_show_list('pmattach_paths');
}

Offline stucki

  • Semi-Newbie
  • *
  • Posts: 48
Re: PM Attachments
« Reply #246 on: May 28, 2015, 05:16:22 AM »
Hello,

on 2.0.10, the application can not be installed I get some errors. Will there be a new version of PM attachments?

Offline BrainDead Fish

  • Newbie
  • *
  • Posts: 9
Re: PM Attachments
« Reply #247 on: September 24, 2015, 10:09:27 AM »
Hi, I have this mod installed on forums that I've had for many years.

I'm running SMF 2.0.11, with version 1.6 of the PM Attachments mod installed.

This has been working fine for a long time, but suddenly attachments to PM messages are no longer working. I get no errors and there is no indication that there is no attachment until the message is sent and no attachment comes through with it.

I've checked to make sure permissions are set properly, but it still doesn't work. Like I said, it has been working fine for years, but suddenly stopped recently.

Can someone help me troubleshoot this? Let me know what info I need to provide in addition to what I've already given.

Thanks in advance.

P.S. Also, I'm willing to pay someone a reasonable fee to help troubleshoot this.

Offline SoLoGHoST

  • SMF Hero
  • ******
  • Posts: 1,796
  • Gender: Male
  • Real coders do not need to comment their code!
    • Dream Portal
Re: PM Attachments
« Reply #248 on: October 05, 2015, 11:31:13 PM »
You may have reached your storage space limit on the server-side.  Also, you should try pruning all attachments and than try it again.

About upgrading this mod for future versions of SMF, honestly, I'm not interested in doing this.  Why?  Because there will be another version of SMF, and another, and another to upgrade this mod for.  I'm sick of it all.  This is a never-ending struggle to upgrade mods for a forum software that is, 1.  Unimportant and obsolete, and 2. A waste of my time, not to mention 3. Nothing to gain from it.

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,859
  • Mod King
    • XPtsp.com Community
Re: PM Attachments
« Reply #249 on: September 26, 2016, 09:55:20 AM »
About upgrading this mod for future versions of SMF, honestly, I'm not interested in doing this.  Why?  Because there will be another version of SMF, and another, and another to upgrade this mod for.  I'm sick of it all.  This is a never-ending struggle to upgrade mods for a forum software that is, 1.  Unimportant and obsolete, and 2. A waste of my time, not to mention 3. Nothing to gain from it.
I once again extend my previous offer to take over this mod for you.....

Offline SoLoGHoST

  • SMF Hero
  • ******
  • Posts: 1,796
  • Gender: Male
  • Real coders do not need to comment their code!
    • Dream Portal
Re: PM Attachments
« Reply #250 on: December 29, 2016, 11:01:01 PM »
If you will upgrade this mod for all future releases of SMF and provide support for it in this topic, I will be happy to transfer it to you, otherwise, if you only plan on supporting it in this topic and will not actually address future upgrades for current and future SMF versions than I would have to decline this.  There are many people taking over mods that never even get around to doing any actual work on the mod.  This is not what I would want from someone who wants to take over this mod, as you put it.

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,859
  • Mod King
    • XPtsp.com Community
Re: PM Attachments
« Reply #251 on: December 30, 2016, 10:03:42 AM »
If you will upgrade this mod for all future releases of SMF and provide support for it in this topic, I will be happy to transfer it to you, otherwise, if you only plan on supporting it in this topic and will not actually address future upgrades for current and future SMF versions than I would have to decline this.  There are many people taking over mods that never even get around to doing any actual work on the mod.  This is not what I would want from someone who wants to take over this mod, as you put it.
Of course I'll upgrade the mod for future releases and provide support for it in this topic....  What would be the point of "taking over a mod" if you don't do anything with it, support or otherwise?  I mean, besides the mod count increase, which if you can't write a few yourself, why bother getting someone else's mods to hold on to....  Kinda pointless to me, I'd think....

I'd ask you to look at my mod list to see what kind of variety of mods I've written.  Only the first two weren't started by me.....  And I've got 6 or 7 in the approval queue at the moment....  Yes, I've got tons of mods to support, but also look at the threads.  I do pay attention to my users, as well as make sure that my mods work for the current version, not to mention SMF 2.1 Beta 2.....

Offline SoLoGHoST

  • SMF Hero
  • ******
  • Posts: 1,796
  • Gender: Male
  • Real coders do not need to comment their code!
    • Dream Portal
Re: PM Attachments
« Reply #252 on: January 06, 2017, 08:39:32 PM »
Ok, done, I've added you as an Additional Author for this mod:  http://custom.simplemachines.org/mods/index.php?mod=1974

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,859
  • Mod King
    • XPtsp.com Community
Re: PM Attachments
« Reply #253 on: January 06, 2017, 09:25:18 PM »
Thank you, SoLoGHoST!

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,859
  • Mod King
    • XPtsp.com Community
Re: PM Attachments
« Reply #254 on: January 30, 2017, 12:40:32 PM »
UPDATE:  I never thought I'd see so much duplication in one mod....  It's kinda ridiculus....   :P O:)  Yeah, I realize it's to support multiple versions of SMF....

I've gotten almost all the duplication for the source files removed from the mod, and am trying to decipher the template changes, since they seem to be all over the place.  My goal is one unified installer that will work across every v2.0.x install....  Once that has been acheived, I'll start looking at bug reports....

Offline landyvlad

  • Sr. Member
  • ****
  • Posts: 874
  • Gender: Male
    • Michael Reed on Facebook
    • GSX1400 Owners ORG
Re: PM Attachments
« Reply #255 on: February 10, 2017, 06:20:46 AM »
Wondering if you can help./ I went to instal and got:

Quote
   1.   Adapt Database   pmAttachmentsInstall-204.php   
*   2.   Execute Modification   ./index.php   Test successful
*   3.   Execute Modification   ./Sources/Subs.php   Test successful
*   4.   Execute Modification   ./Sources/Subs-Post.php   Test successful
*   5.   Execute Modification   ./Sources/Admin.php   Test successful
*   6.   Execute Modification   ./Sources/PersonalMessage.php   Test successful
*   7.   Execute Modification   ./Sources/ManageAttachments.php   Test successful
*   8.   Execute Modification   ./Sources/ManagePermissions.php   Test successful
*   9.   Execute Modification   ./Themes/default/PersonalMessage.template.php   Test successful
*   10.   Execute Modification   ./Themes/default/ManageAttachments.template.php   Test failed
   1.   Add After   ./Themes/default/ManageAttachments.template.php   Test successful
   2.   Replace   ./Themes/default/ManageAttachments.template.php   Test failed
   3.   Add Before   ./Themes/default/ManageAttachments.template.php   Test successful
*   11.   Execute Modification   ./Themes/default/languages/Modifications.english.php   Test successful
*   12.   Execute Modification   ./Themes/default/languages/Help.english.php   Test successful
*   13.   Execute Modification   ./Themes/default/languages/EmailTemplates.english.php   Test successful
*   14.   Execute Modification   ./Themes/default/languages/PersonalMessage.english.php   Test successful
15.   Execute Modification   ./Themes/default/languages/Modifications.english-utf8.php   Skipping file
16.   Execute Modification   ./Themes/default/languages/Help.english-utf8.php   Skipping file
17.   Execute Modification   ./Themes/default/languages/EmailTemplates.english-utf8.php   Skipping file
18.   Execute Modification   ./Themes/default/languages/PersonalMessage.english-utf8.php   Skipping file
19.   Execute Modification   ./Themes/default/languages/Modifications.russian.php   Skipping file
20.   Execute Modification   ./Themes/default/languages/Help.russian.php   Skipping file
21.   Execute Modification   ./Themes/default/languages/EmailTemplates.russian.php   Skipping file
22.   Execute Modification   ./Themes/default/languages/PersonalMessage.russian.php   Skipping file
23.   Execute Modification   ./Themes/default/languages/Modifications.russian-utf8.php   Skipping file
24.   Execute Modification   ./Themes/default/languages/Help.russian-utf8.php   Skipping file
25.   Execute Modification   ./Themes/default/languages/EmailTemplates.russian-utf8.php   Skipping file
26.   Execute Modification   ./Themes/default/languages/PersonalMessage.russian-utf8.php   Skipping file
27.   Extract Tree   ./pm_attachments


Install in Other Themes
To use this modification in themes other than the default, the package manager needs to make additional changes to the other themes. If you'd like to install this modification in the other themes, please select these themes below.
   Core Theme
   Execute Modification   ./Themes/core/PersonalMessage.template.php   Test failed
   1.   Add After   ./Themes/core/PersonalMessage.template.php   Test successful
   2.   Add Before   ./Themes/core/PersonalMessage.template.php   Test successful
   3.   Replace   ./Themes/core/PersonalMessage.template.php   Test failed
   4.   Add Before   ./Themes/core/PersonalMessage.template.php   Test successful


Existing mods as per attachment below.

My users are crying out for this so would be great to fix it if we can.
Advice welcome.

Cheers.

Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

To paraphrase Kindred: "There are no technical solutions to social problems."

No hack nor blackhats, just persistent asshats.

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,859
  • Mod King
    • XPtsp.com Community
Re: PM Attachments
« Reply #256 on: February 10, 2017, 10:21:53 PM »
@landyvlad: I've almost got the Version 2.0 Beta 1 version ready to put up on the mod page.  I need to sort out a few minor template issues, and the remainder of the language files.  Please be patient.....

Offline landyvlad

  • Sr. Member
  • ****
  • Posts: 874
  • Gender: Male
    • Michael Reed on Facebook
    • GSX1400 Owners ORG
Re: PM Attachments
« Reply #257 on: February 11, 2017, 01:44:35 AM »
Cool, thanks mate :)
Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

To paraphrase Kindred: "There are no technical solutions to social problems."

No hack nor blackhats, just persistent asshats.

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,859
  • Mod King
    • XPtsp.com Community
Re: PM Attachments
« Reply #258 on: February 12, 2017, 11:15:09 AM »
Uploaded v2.0 Beta 1 - February 12th, 2017
o Moved PM Attachment functionality into Subs-PMAttachments.php.
o Moved PM Attachment admin functions into Subs-PMAttachmentsAdmin.php.
o Moved PM Attachment admin templates into PMAttachments.template.php.
o Moved PM File Maintenance stuff to new PM File Maintenance tab.



@Everybody:  I've tried very hard to tidy up the mod so that it is easier to maintain, so hopefully this will solve some of the issues that have been seen.  The installer still supports the older versions of the SMF 2.0, specifically RC2, RC3, and RC4 (I frankly considered dropping them); however, I do not guarantee that the UI will be correct in every regard.  Each of the SMF versions supported by mod v1.6 had a common code base, and that is what I have been working to consolidate....

Please note that the mod no longer removes the settings from the database upon uninstallation.  I don't see the point of doing so, and the various uninstallers each seemed to do things a little differently....

I am going to continue to work on it and see if I can't resolve some of the older bug reports.  The mod description will also get a revisement, eventually.....  Version 1.6 will continue to be downloadable for the foreseeable future.  Hope this helps someone.....
« Last Edit: February 12, 2017, 11:26:09 AM by dougiefresh »

Offline landyvlad

  • Sr. Member
  • ****
  • Posts: 874
  • Gender: Male
    • Michael Reed on Facebook
    • GSX1400 Owners ORG
Re: PM Attachments
« Reply #259 on: February 12, 2017, 06:51:36 PM »
Thanks so much for taking up the torch and running with this one.
Cheers
Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

To paraphrase Kindred: "There are no technical solutions to social problems."

No hack nor blackhats, just persistent asshats.