Advertisement:

Author Topic: PM Attachments  (Read 101902 times)

Offline SoLoGHoST

  • SMF Hero
  • ******
  • Posts: 1,795
  • Gender: Male
  • Real coders do not need to comment their code!
    • Dream Portal
PM Attachments
« on: August 20, 2009, 09:08:18 AM »
Link to Mod




Introduction
Gives your users the ability to attach files and send them to other members via Personal Messages.  Based from the same code used to display attachments via posts.  Completely secure!  Only users who have sent or received these files are able to view and/or download them based on their View Attachments Permission for the usergroup they belong to.  Administrators don't even have access to these attachments, unless you report the PM to them via "Report to Admin" link if enabled in Admin Settings.

Important Note:  To ensure PM Attachment Settings are correctly placed and loaded, you will be redirected so that your File Cache will be cleared, directly after installing PM Attachments.  After which, go to: [p]Admin[/b] => Forum => Attachments and Avatars => PM Attachment Settings and complete setup.  Than make sure you have your permissions set for each usergroup.  You will notice the permissions for PM Attachments have been added to the Personal Message Permissions.

Admin Settings
There are two new areas underneath the Admin => Forum => Attachments and Avatars area, called:
o PM Attachments => All options relating to PM attachment functionality
o PM File Maintenance => All maintenance options (moved from File Maintenance tab)

Two new permissions have been added to the Admin => Members => Permissions area:
o View PM Attachments
o Upload PM Attachments

Compatibility Notes
This mod was tested on SMF 2.0.13 and SMF 2.1 Beta 3, but should work on SMF 2.0.3 and up.  SMF 1.x is not and will not be supported.

Translators
> SoLoGHoST - English translation
> Bugo - Russian translation

Changelog
The changelog has been removed and can be seen at XPtsp.com.

License
Quote
Copyright (c) 2009 to 2016, Solomon Closson (aka SoLoGHoST)
Copyright (c) 2017, Solomon Closson (aka SoLoGHoST) and 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.
« Last Edit: May 28, 2011, 04:09:10 AM by SoLoGHoST »

Offline Dzonny

  • Lead Localizer
  • SMF Super Hero
  • *
  • Posts: 11,616
  • Gender: Male
  • No sleep...
    • dzontra.nikola on Facebook
    • Dzonny on GitHub
    • dzontranikola on LinkedIn
    • @opusteniforum on Twitter
    • Samo opusteno
Re: PM Attachments
« Reply #1 on: August 20, 2009, 11:08:44 AM »
Nice one SoLoGHoST, i like it...
Will you integrate this with 1.1.10 version maybe?

Offline JungleBunny

  • Jr. Member
  • **
  • Posts: 125
Re: PM Attachments
« Reply #2 on: August 22, 2009, 10:27:21 AM »
Jep, the costs would not be the biggest problem 8)
Would need this mod for 1.1.xxxxx, too. :)

Offline Sudhakar Arjunan

  • Sophist Member
  • *****
  • Posts: 1,226
  • Gender: Male
  • SMF is the best forum tool
    • IT Acumens - Webdesigning & Webhositing services in Chennai
Re: PM Attachments
« Reply #3 on: August 25, 2009, 02:42:35 PM »
Excellent mod.

I will be installing my forum now.
Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

Offline SoLoGHoST

  • SMF Hero
  • ******
  • Posts: 1,795
  • Gender: Male
  • Real coders do not need to comment their code!
    • Dream Portal
Re: PM Attachments
« Reply #4 on: August 25, 2009, 10:18:28 PM »
Thank You!

Offline Yağız...

  • SMF Super Hero
  • *******
  • Posts: 10,809
  • Gender: Male
    • MMO Browser
Re: PM Attachments
« Reply #5 on: August 27, 2009, 06:58:47 PM »
Ok, have given this some more thought and kinda in a good mood today... so will do this for SMF 1.1.x for FREE as it will help me get more familiar with 1.1.x versions of SMF.  Just 1 condition...  Need someone to set up a site with SMF 1.1.10 freshly installed on it with all DEFAULT settings (with No MODs installed, and in English language), give me FTP access to it, and setup an Admin Account for me on this forum as well as have PhpMyAdmin installed so that I can check the database for the forum if needed.  Will need account and passwords for the following:  PhpMyAdmin, Forum, and FTP.  You can PM me all of the details.  Will be doing all of my testing for a PM Attachments MOD compatible with SMF 1.1.x at this forum, so will need it to remain up while I test and code for it.  I could use my server for this, however, would rather not, which is why, if someone is willing to do this, I will do it for FREE!

Cheers :)
Solomon
I can help you but why not making them on a localhost?

Offline SoLoGHoST

  • SMF Hero
  • ******
  • Posts: 1,795
  • Gender: Male
  • Real coders do not need to comment their code!
    • Dream Portal
Re: PM Attachments
« Reply #6 on: August 30, 2009, 04:27:43 AM »
New update - Version 1.4.  Added by REQUEST direct links for all attachments via PM sent to email addy if the user has "Notify by email every time you receive a personal message" set to Always within their Profile -> Personal Messaging Options.
« Last Edit: September 25, 2009, 12:10:21 AM by SoLoGHoST »

TheListener

  • Guest
Re: PM Attachments
« Reply #7 on: September 01, 2009, 07:49:58 PM »
Sologhost

I found this mod in the Mod of the Month topic.

Have installed it already with no problems at all.

Offline SoLoGHoST

  • SMF Hero
  • ******
  • Posts: 1,795
  • Gender: Male
  • Real coders do not need to comment their code!
    • Dream Portal
Re: PM Attachments
« Reply #8 on: September 01, 2009, 08:53:50 PM »
Glad to hear that.  Where is the Mod of the Month topic?

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 68,051
    • Arantor on GitHub
Re: PM Attachments
« Reply #9 on: September 04, 2009, 09:29:46 PM »
Note that any mod installed after this one that modifies the help files will cause a fatal error due to the last line of the help modifications in this mod not being terminated with a semicolon.

The line in question:
Code: [Select]
$helptxt['pmattachments_remove_all'] = 'This will remove all PM Attachments from and sent to all members, including yourself.  Should be used as a last resort.<br /><br />Some scenario\'s that may warrant a need for you to do this, are as follows:<br />If you just don\'t have the space on your server for these files anymore.  If you plan on starting fresh and/or want to reduce or increase the size for the PM Attachments Directory, or change the directory and you don\'t want any files in this directory before you make any changes.  If many users are abusing the use of PM Attachments on your server, and many other reasons for this as well.'
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen which, and now I must do the same.

Offline SoLoGHoST

  • SMF Hero
  • ******
  • Posts: 1,795
  • Gender: Male
  • Real coders do not need to comment their code!
    • Dream Portal
Re: PM Attachments
« Reply #10 on: September 05, 2009, 09:31:01 AM »
WoW, thanks for pointing that out Arantor, just now fixed and re-upped. :-[

Cheers :)

Offline cme1st2302

  • Sophist Member
  • *****
  • Posts: 1,075
  • Gender: Male
    • East Coast Astro
Re: PM Attachments
« Reply #11 on: September 08, 2009, 11:02:43 PM »
I would be interested in having this work for 1.1.X as well.  What kind of price are we talking about here though?

Chris
SMF Version: 1.1.11
SimplePortal Version: 2.3.2

Admin

He who waits for perfect conditions sees nothing!!
If you need help adding a button or tab PM me!!

Offline JungleBunny

  • Jr. Member
  • **
  • Posts: 125
Re: PM Attachments
« Reply #12 on: September 10, 2009, 07:04:22 AM »
The price is OK.
When do we have our 10 people ?! :D

Re: PM Attachments
« Reply #13 on: September 13, 2009, 08:00:53 PM »
Nice one SoLoGHoST, i like it...
Will you integrate this with 1.1.10 version maybe?

Just wanted to ask the same question...

Offline SoLoGHoST

  • SMF Hero
  • ******
  • Posts: 1,795
  • Gender: Male
  • Real coders do not need to comment their code!
    • Dream Portal
Re: PM Attachments
« Reply #14 on: September 13, 2009, 10:01:36 PM »
Are you saying you are willing to pay 30 US Dollars for an SMF 1.1.10 Compatible version of the PM Attachments MOD with 1 year FREE Updates??  If so, you make 2 people.  Let me know either way.

Cheers :)

Offline allisondk

  • Semi-Newbie
  • *
  • Posts: 32
Re: PM Attachments
« Reply #15 on: September 30, 2009, 11:47:30 AM »
Hi, awesome mod.

I´m using 2.0RC1-1 and have set it up some days ago.

Now members will need to send a file to me, but i cant seem to open up the files (.rar) just jumps me back onto login screen.

Any idea whats wrong?

Offline SoLoGHoST

  • SMF Hero
  • ******
  • Posts: 1,795
  • Gender: Male
  • Real coders do not need to comment their code!
    • Dream Portal
Re: PM Attachments
« Reply #16 on: September 30, 2009, 09:55:48 PM »
Make sure you are logged in, and try again.  Also, you can try deleting the following code from within ./Sources/PersonalMessage.php file, within the PMDownload() function:
Code: [Select]
// No guests allowed!
is_not_guest();
It's just in there for extra security, but doesn't need to be there as it just brings users who are not logged in to the login screen.  So omitting it should just bring up an error message instead.

Try the following and let me know how this works for ya k?

Cheers :)

Offline allisondk

  • Semi-Newbie
  • *
  • Posts: 32
Re: PM Attachments
« Reply #17 on: October 01, 2009, 01:05:29 AM »
Thanks for the reply appriciate it

First off, i´m logged in either as admin or a member allowed to add attachments and read them.

However the only thing i can find is this:
Code: [Select]
// This helps organize things...
function MessageMain()
{
global $txt, $scripturl, $sourcedir, $context, $user_info, $user_settings, $smcFunc;

// No guests!
is_not_guest();

// You're not supposed to be here at all, if you can't even read PMs.
isAllowedTo('pm_read');

Its basicly below all the VOIDS in the Personalmessages.php, but i dont see it within the PMDownload() function :S

Offline SoLoGHoST

  • SMF Hero
  • ******
  • Posts: 1,795
  • Gender: Male
  • Real coders do not need to comment their code!
    • Dream Portal
Re: PM Attachments
« Reply #18 on: October 01, 2009, 01:34:23 AM »
Hello again, if you installed this MOD you will see it in the PersonalMessage.php file just under function PMDownload() as the pic attached shows, as I just now did a quick parse on PM Attachments and located the code for you.  I suggest you have another look.  Should be kinda close to the bottom of the file.

Refer to pic attached!

Offline samurai-lupin

  • Full Member
  • ***
  • Posts: 521
Re: PM Attachments
« Reply #19 on: October 15, 2009, 02:22:41 AM »
I woudld buy it, too!