• Welcome to Simple Machines Community Forum. Please login or sign up.
December 03, 2021, 06:02:34 AM

News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord


PM Attachments

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

Previous topic - Next topic

stylusss

Is it possible to keep the file when it's uploaded?
For top-notch server quality and expertise, visit CoreISP.net

SoLoGHoST

Quote from: stylusss on April 18, 2014, 04:43:35 PM
Is it possible to keep the file when it's uploaded?

I'm not sure what you mean by that.  The file never gets deleted unless you purge them in the Attachment Settings in the SMF Admin.  Please be more specific as to what you mean when you say keep the file...

Biology Forums

When someone attaches a file, does it get stored on the server?

SoLoGHoST

Ofcourse... how else would it be able to be downloaded?

Biology Forums

Quote from: SoLoGHoST on April 22, 2014, 02:52:32 AM
Ofcourse... how else would it be able to be downloaded?

Makes sense... Thanks.

kamili34

Will it works on smf 2.0.7? I have some errors during the installing it.

w5hro

Quote from: kamili34 on May 03, 2014, 01:44:03 PM
Will it works on smf 2.0.7? I have some errors during the installing it.

Yes, can we get an update for SMF v2.0.7? This is a necessary mod.

Thanks...

tieskedh

That would indeed be very nice!!!

live627

Try to emulate 2.0 RC4..

kamili34

It emulate but when installing this mod many errors occurred. :/

RSI

You can install the mod, but you have to do parts of it manually.

1. Run the install to where it comes up and shows the errors, but don't execute it yet.

2. Make a back up of each of the files that show the install errors.

3. Manually edit those files (not the backed up ones).

4. Execute the install with the errors.

5. Upload the manually edited files to overwrite the ones the install tried to update.

6. If it doesn't work then just auto uninstall it.

That's basically it and what you have to do when many of these mods are not yet updated. Usually it's just something simple which requires editing some of the files manually.

SoLoGHoST

This mod has been updated to support SMF 2.0.7 and 2.0.8 as well.  ENJOY!  Thanks to GL700Wing for this update.

Itchigotim

Question: I'm running 1.6 under emulate an older version (I don't remember which one, RC4?). I have no issues at all. Should I upgrade? Does this add more options, or is it just compatible with the latest SMF? I have SMF 2.08 now on my site.

It's an excellent mod either way and I'm thankful to have it. I just don't want to break anything if I don't have to.
Roguepinball: ¡¡ɟooɹ ǝɥʇ uo ǝʇıs ןןɐquıd ʇsǝq ǝɥʇ


GL700Wing

Quote from: Itchigotim on June 27, 2014, 02:39:57 AM
Question: I'm running 1.6 under emulate an older version (I don't remember which one, RC4?). I have no issues at all. Should I upgrade? Does this add more options, or is it just compatible with the latest SMF? I have SMF 2.08 now on my site.

It's an excellent mod either way and I'm thankful to have it. I just don't want to break anything if I don't have to.
This update only adds installer/uninstaller support for SMF versions 2.0.4 and later without the need to use emulation mode - it does not change the mod functionality in any way.

Also, and by default, uninstalling earlier releases will delete the existing 'pm_attachments' directory (and all the PM Attachments in it) and it may also delete all existing associated database data (don't ask me how I know this - thank goodness I make regular data and database backups).*

My recommendation is that you do not uninstall earlier releases unless you know how to backup and restore the existing directory (ie, the 'pm_attachments' directory in the default path of the forum) and the associated database data (ie, the 'pm_attachments' and 'pm_recipients' tables).

However, if you don't mind deleting the current PM Attachments directory and database data you could try removing the earlier release (you will more than likely have to manually edit some files to fully uninstall earlier releases - I also know this from experience!).

-----------------------------------------------------------------------
* I have changed the way the installer/uninstaller works so that this version will not automatically delete the attachments directory or database data.
Life doesn't have to be perfect to be wonderful ...

T3CHN0

Quote from: GL700Wing on June 27, 2014, 05:14:44 AM
My recommendation is that you do not uninstall earlier releases unless you know how to backup and restore the existing directory

Can I suggest you add this quote to the MODS Description:

Not everyone will read the posts to know this and might accidentally uninstall the old one
thinking the new one is better and end up loosing all the old Attachment Files.

This is a very handy mode.
Cheers

SoLoGHoST

The versions of the mod did not change, so people should not expect anything different from this mod, but will do this later just to be politically correct I guess.

dougiefresh

July 10, 2014, 08:52:11 AM #236 Last Edit: July 10, 2014, 09:05:56 AM by dougiefresh
I've got a bug report for ya....  I've got a clean, fresh copy of SMF v2.0.8, and I've even redownloaded v2.0.8 again to make sure.  Version 1.6 of the PM Attachments mod won't install on this without throwing an error.  The 3rd operation on ./Themes/core/PersonalMessage.template.php is the problem....  Thought you might wanna know.

EDIT: Here is the operation that throws an error:
Code (search) Select

<form action="', $scripturl, '?action=pm;sa=send2" method="post" accept-charset="', $context['character_set'], '" name="postmodify" id="postmodify" class="flow_hidden" onsubmit="submitonce(this);smc_saveEntities(\'postmodify\', [\'subject\', \'message\']);">
<div>

Where is what it should be (at least in v2.0.8 ):

<form action="', $scripturl, '?action=pm;sa=send2" method="post" accept-charset="', $context['character_set'], '" name="postmodify" id="postmodify" onsubmit="submitonce(this);smc_saveEntities(\'postmodify\', [\'subject\', \'message\']);">
<div>

Thought this might help.....

EDIT2: I really don't know what the class="flow_hidden" does, but if you replace that in that file, it installs properly....

Itchigotim

Thanks guys, I'll leave it as is. :)
Roguepinball: ¡¡ɟooɹ ǝɥʇ uo ǝʇıs ןןɐquıd ʇsǝq ǝɥʇ


KungFuJoe

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?

I like the idea of allowing users to send attachments, but as large as pics are these days, it will quickly fill up the storage quota and setting a low file size limit will just mean more questions/complaints for my userbase who are mostly non technical.

dougiefresh

Quote from: kungfujoe on September 23, 2014, 04:48:43 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?
Well, considering the PM attachments code is implemented completely separate from the core attachments code, you would have to alter your mod to make those changes to the PM attachments code, which is found in Sources/PersonalMessage.php.  Naturally, if the code doesn't exist, you'll want the installer to ignore the changes.... like this:

<operation error="ignore">


As for whether it could be integrated, sure, anything can be integrated, given enough time and patience.....  Does the author want to?  That's a whole different question....

Frankly, the mod you mentioned sounds like a good idea!  Is it your mod?  If so, are you going to publish it?  If it isn't your mod, can you point me to the mod you mentioned?  Cause I'm interested....  Thanks!

Advertisement: