News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

PM Attachments

Started by SoLoGHoST, August 20, 2009, 09:08:18 AM

Previous topic - Next topic

DarkAngel612

SMF: 2.0.17Link: http://thefantasiesattic.net/attic/
Modification Packages — Installed
   
1.     Global Headers Footers     2.1a
2.     Separate the sticky topics     1.0.1
3.     Stupid bouncy BBC     1.0
4.     BK Modding Disable Decrease Post Count Option     3.0
5.     Advanced Contact Form     1.1
6.     Sorted Package Manager Listing     1.2
7.     Stop Spammer     2.3.9
8.     Float BBCODE     1.0.2
9.     Most Popular Topic Today     2.3
10.     TinyPortal     1.2
11.     httpBL     2.5.1
12.     Simple Audio Video Embedder     5.0.3
13.     Join Reason     1.5
14.     Change All Subjects     1.3
15.     PM Attachments     2.12
16.     SMF Staff Page     1.8
17.     Enhanced Dropdown     1.3

I have version 2.12 installed of this mod, since the last version it has stopped letting pm's attach .zip files. It claims to send but it doesn't send the attachment, just the text and non-zip files.
The forum has all fresh updated files, I have run repair_settings -- just in case -- to no avail. There were no errors when the mod installed.
Can someone give me an inkling of what to do? There is nothing on server errors, forum error log nor an error log in the server folders.
Fantasy Attic ::  Fantasies Realm Market :: SMF 2.0+ with various mods and TinyPortal

rcane

HI there,

Been using the mod for a while now (few months).  I've got around 900 users now, and I started seeing this today from one particular user:

Unable to load the 'PMAttachments.english' language file.


Any guidance or ideas?

GL700Wing

Quote from: rcane on November 17, 2021, 10:32:53 PMBeen using the mod for a while now (few months).  I've got around 900 users now, and I started seeing this today from one particular user:

Unable to load the 'PMAttachments.english' language file.
I can't think of any reason why SMF would only throw an error like this for one user - might be worth getting that user to try another browser and/or device to see if the error still occurs ...
Life doesn't have to be perfect to be wonderful ...

DarkAngel612

forum: 2.0.18
https://www.thefantasiesattic.net/


Now that we are on a new host...yay this mod is working again, however, I found this error message on the server for our forum:

[13-Dec-2021 22:59:45 America/Chicago] PHP Fatal error:  Call to undefined function removePMAttachments() in /home/txxx/public_html/xxx/Sources/PersonalMessage.php on line 3120

line 3120 says: 3119 to 3129
require_once($sourcedir . '/ManageAttachments.php');
removePMAttachments(array('id_attach' => $remove_attachments), '', false, true, false);
}

I'm confused since it is asking for one file but the file a different one, I then did a search in the ManageAttachments file for removePMAttachments  which was not found.


Aside from this error things seem to be working wonderfully again. Should I be worried?
Fantasy Attic ::  Fantasies Realm Market :: SMF 2.0+ with various mods and TinyPortal

GL700Wing

Looks like the removePMAttchhments function was moved to Subs-PMAttachments.php some years ago: https://www.simplemachines.org/community/index.php?topic=331969.msg3915054;topicseen#msg3915054

Changing 'require_once($sourcedir . '/ManageAttachments.php');' to 'require_once($sourcedir . '/Subs-PMAttachments.php');' should fix the problem ...
Life doesn't have to be perfect to be wonderful ...

sah62

Will this mod be updated to work with 2.1.1?

Dave J

Quote from: sah62 on February 26, 2022, 06:20:25 PMWill this mod be updated to work with 2.1.1?

Yes, can it be updated please?
If you want quizzes to add to the new SMF2.1 quiz mod go here . There are also walkthroughs in the forum to explain how to install them and other tips.

GL700Wing

Quote from: Dave J on March 08, 2022, 05:20:37 AM
Quote from: sah62 on February 26, 2022, 06:20:25 PMWill this mod be updated to work with 2.1.1?

Yes, can it be updated please?
As far as I know the current owner of this mod hasn't been active here for a few years - someone may have to write a new one ...
Life doesn't have to be perfect to be wonderful ...

GL700Wing

Quote from: sah62 on February 26, 2022, 06:20:25 PMWill this mod be updated to work with 2.1.1?
With a small code edit to the SMF 2.1 installer file (ie, install_21x.xml) this mod installs and works on SMF 2.1.1 - there is no code change required to the mod itself.

Unzip the mod package file (ie, PM_Attachments_v2.12.zip), edit the SMF 2.1 installer file as follows, recreate the mod package file using your favourite ZIP utility and install ...

Edit install_21x.xml
Find:
<file name="$themedir/PersonalMessage.template.php">
<operation>
<search position="after"><![CDATA[if ($message['can_report'] || $context['can_send_pm'])
echo '
<div class="under_message">';]]></search>

Replace With:

<file name="$themedir/PersonalMessage.template.php">
<operation>
<search position="after"><![CDATA[ // Show the member's signature?]]></search>
Life doesn't have to be perfect to be wonderful ...

Dave J

If you want quizzes to add to the new SMF2.1 quiz mod go here . There are also walkthroughs in the forum to explain how to install them and other tips.

Dave J

Hi GL,

Unfortunately, this mod gives the following error.

Error
Type of error
Undefined_vars
Error message
8: Undefined index: instant_reply
File
/public_html/Sources/Subs-Post.php
Line
1341
URL of page causing the error
https://www.quizland.co.uk/index.php?action=pm;sa=send2
Backtrace information

    #0: smf_error_handler()
    Called from /public_html/Sources/Subs-Post.php on line 1341
    #1: sendpm()
    Called from /public_html/Sources/PersonalMessage.php on line 2923
    #2: MessagePost2()
    Called from /public_html/Sources/Subs.php on line 6065
    #3: call_helper()
    Called from /public_html/Sources/PersonalMessage.php on line 223
    #4: MessageMain()
    Called from /public_html/index.php on line 189


I have tested this with the mod installed then sent a PM and then uninstalled doing the same. With the mod installed the error happens, with it uninstalled it doesn't I've tested it twice.

If you want quizzes to add to the new SMF2.1 quiz mod go here . There are also walkthroughs in the forum to explain how to install them and other tips.

FrizzleFried

I can confirm this error also appears for me... I just tested and got the very same error.


GL700Wing

Quote from: Dave J on April 23, 2022, 09:48:21 AMUnfortunately, this mod gives the following error.

...

I have tested this with the mod installed then sent a PM and then uninstalled doing the same. With the mod installed the error happens, with it uninstalled it doesn't I've tested it twice.
Weird - it doesn't happen on my SMF 2.1 test forum - I'll check it out ...
Life doesn't have to be perfect to be wonderful ...

GL700Wing

#373
Quote from: Dave J on April 23, 2022, 09:48:21 AMUnfortunately, this mod gives the following error.
8: Undefined index: instant_reply
OK - got to the bottom of this - basically the text string 'instant_reply' that existed in the PersonalMessage language file in SMF 2.0 is not there in SMF 2.1.

Found a couple of other minor bugs/annoyances also ...



Fix for '8: Undefined index: instant_reply' error
In ./Themes/default/languages/PersonalMessage.english.php
Add to end of file:
// PM Attachments mod.
$txt['instant_reply'] = 'Reply to this Personal Message here:';



Fix for 'filename_exists' error
In ./Themes/default/languages/Errors.english.php
Add to end of file:
// PM Attachments mod.
$txt['filename_exists'] = 'Sorry! There is already an attachment with the same filename as the one you tried to upload. Please rename the file and try again.';

Important Note: Enable the 'PM Attachment Settings' > 'Encrypt stored filenames' setting to avoid 'filename_exists' error - if this is not enabled PM attachment filenames must always be unique.



Fix for missing help info in 'PM Attachment Settings' and 'PM File Maintenance' menus
In ./Sources/Help.php
Find:
    // Permission specific help?Add Before:
    // PM Attachments mod
    loadLanguage('PMAttachments');

Fix for missing Help icon in 'PM Attachment Settings' and 'PM File Maintenance' menus
Copy ./Themes/default/images/helptopics.png ./Themes/default/images/helptopics.gif



Fix for 'GROUP BY' error when running 'PM File Maintenance' > 'Attachment integrity check'
In ./Sources/Subs-PMAttachmentsAdmin.php (Line 731)
Find:
                    AND tparent.id_attach IS NULL
                GROUP BY thumb.id_attach',

Replace with:
                    AND tparent.id_attach IS NULL',


I've attached the files you'll need to replace in the mod package file if you want these changes to be applied when the mod is installed and reversed when it is uninstalled.
Life doesn't have to be perfect to be wonderful ...

FrizzleFried

After implementing the changes above... all looks good thus far!

Thank you!!

Dave J

#375
Thanks GL. Like FF I'll test and let you know

UPDATE> I started from scratch and uninstalled the old version. I changed the 'package-info.xml' to <install for="2.1.1"> and it installed perfectly and it's working without errors.

Thanks again for the updated files
If you want quizzes to add to the new SMF2.1 quiz mod go here . There are also walkthroughs in the forum to explain how to install them and other tips.

moyack

#376
Quote from: GL700Wing on April 23, 2022, 10:00:47 PM...

Hi!!

As a user of this mod, and with the current version 2.1.3 I did some improvements to the general code in order to make it more compatible to the 2.1.X series.
Some of the updates done are the following:
  • It install for 2.1.* version, so any upgrade in the 2.1 line will work.
  • Now the attachments has the same presentation in the PM post as normal attachment post
  • for that reason, in 2.1.x install, the function Add_PM_JavaScript()  is not loaded
  • This allowed me to fix an annoying bug in the interface in PM which causes the
    <header>
    content were not loaded there, but in the
    <body>
    instead.
  • Removed some deprecated create_function()  in Subs-PMAttachmentsAdmin.php file.
  • Changed the settings interface in the PM maintenance section, so it can fit better with the new 2.1.x style, class and help.

NOTE: I did not make any updates to the 2.0 part. I think we should encourage to the latest version.

Feel free to use and of course all the credits are for the original authors.

bricktop

Any possibility that this might get updated to work with v2.1.3?
I need this mode and it will not work with my version.

bricktop

Nevermind @moyack saved the day! If I had only opened my eyes wider to see the download link in his reply.
Huge thank you!

bricktop

I did not like the add attachment feature that makes you click a link to add more files so I made the one file input multiple.

If you want this update I have included the file in this reply.
Enjoy.

Advertisement: