No PMs to self 0.3.0

Stand-alone scripts designed for a specific function, but not neccessarily part of normal forum browsing.
Forum rules
Image Please feel free to download any Scripts here, support for each Script is located it's own thread.

To post your own Script, please first read the MOD / Script Guidelines

No PMs to self 0.3.0

Postby nedka » 27 Aug 2006, 12:47

Classification: Add-on
phpBB Part: UCP

MOD Name: No PMs to self
MOD Version: 0.3.0
Author: nedka
MOD Description: Prevents users to sending private messages to themselves. You can enable/disable this option in ACP.

Works with:
  • phpBB 3.0 BETA2
  • Every CVS version between BETA2 and snapshot from 2006-08-xx.

Language: English

Licence: GNU General Public License v2

Installation Level: Easy
Installation Time: 4 Minutes
Format: MOD
Download: http://www.wonasti.com/viewtopic.php?f=4&t=42
Attachments
No_PMs_to_self_0.1.0.zip
(14.79 KiB) Downloaded 130 times
Last edited by nedka on 10 Nov 2006, 22:02, edited 4 times in total.
User avatar
nedka
MOD Author
MOD Author
 
Posts: 47
Joined: 17 Aug 2006, 18:59
Location: Viet Nam
Gender: Male


Re: No PMs to self 0.1.0

Postby tannie » 28 Aug 2006, 08:57

Do you really require this one?

I usually send a PM to self when I want to store some personal notes or files that I usually don't want anyone else peeking into them.. Mod
Image
User avatar
tannie
Supporter
Supporter
 
Posts: 427
Joined: 09 Jul 2006, 10:50
Gender: Male

Re: No PMs to self 0.1.0

Postby LEW21 » 30 Aug 2006, 08:09

This mod is more like a bugfix than normal mod. Code can be optimized - replace:
Code: Select all
      // Check PM Sender and Recipient
      $to_username = ${$type}[$id]['name'];
      $from_username = $user->data['username'];
      if (strtolower($to_username) == strtolower($from_username))
      {
         trigger_error('SENDER_IS_RECIPIENT');
      }

with:
Code: Select all
      // Check PM Sender and Recipient
      if (strtolower(${$type}[$id]['name']) == strtolower($user->data['username'];))
      {
         trigger_error('SENDER_IS_RECIPIENT');
      }
phpBB3.PL - User-friendly Polish phpBB 3.0 support
LEW21    
Translator
Translator
 
Posts: 901
Joined: 01 Jun 2006, 03:51
Location: Warsaw, Poland
Gender: Male
phpBB Knowledge: 10

Re: No PMs to self 0.1.0

Postby Highway of Life » 30 Aug 2006, 12:07

Hmm... then perhaps it should be reported as a Bug?

On the other hand, what's wrong with people PMing themselves? Confused
Watch out! I might do a code wheelie!

User avatar
Highway of Life    
STG Jedi Master
STG Jedi Master
 
Posts: 10458
Joined: 08 May 2006, 05:23
Location: Beware of Programmers carrying screwdrivers
Gender: Male
phpBB Knowledge: 10

Re: No PMs to self 0.1.0

Postby LEW21 » 30 Aug 2006, 12:25

If attachments in PMs option is enabled then it can be a problem - users can use forum as private file store server. Example: tannie Tongue
phpBB3.PL - User-friendly Polish phpBB 3.0 support
LEW21    
Translator
Translator
 
Posts: 901
Joined: 01 Jun 2006, 03:51
Location: Warsaw, Poland
Gender: Male
phpBB Knowledge: 10

Re: No PMs to self 0.1.0

Postby Highway of Life » 30 Aug 2006, 12:29

Ah, I see... that makes sense.

So if you had a forum where you allow attachments in PMs, it's a good idea to disable send-to-self PMs.

The other thing would be to disable guests from viewing/downloading files... there is one other, or two... options available for downloads as well... but I don't remember the names of them at the moment.
Watch out! I might do a code wheelie!

User avatar
Highway of Life    
STG Jedi Master
STG Jedi Master
 
Posts: 10458
Joined: 08 May 2006, 05:23
Location: Beware of Programmers carrying screwdrivers
Gender: Male
phpBB Knowledge: 10

Re: No PMs to self 0.1.0

Postby harmlessgoat22 » 30 Aug 2006, 14:31

Yah, it's like Gmail. I use it as my own personal filestorer. I would use my webhosting, but, well, I don't have quite 2 gig of webhost space, and gmail does. It just takes FOREVER to upload the files if they have any significant size whatsoever.
User avatar
harmlessgoat22    
STG Support Team
STG Support Team
 
Posts: 2886
Joined: 13 Jul 2006, 17:38
Gender: Male
phpBB Knowledge: 8

Re: No PMs to self 0.1.0

Postby tannie » 31 Aug 2006, 06:24

[quote="LEW21":769cc]
If attachments in PMs option is enabled then it can be a problem - users can use forum as private file store server. Example: tannie Tongue
[/quote:769cc]
Did I mention anything about storing files on StarTrekGuide? Beee

And about people using the PM facility as a file storage option I think you have forgotten the attachment quota & permissions for a user given in the ACP.. Tongue
Image
User avatar
tannie
Supporter
Supporter
 
Posts: 427
Joined: 09 Jul 2006, 10:50
Gender: Male

Re: No PMs to self 0.1.0

Postby Highway of Life » 31 Aug 2006, 08:59

Wait... do people even have attachment quotas? Confused
Watch out! I might do a code wheelie!

User avatar
Highway of Life    
STG Jedi Master
STG Jedi Master
 
Posts: 10458
Joined: 08 May 2006, 05:23
Location: Beware of Programmers carrying screwdrivers
Gender: Male
phpBB Knowledge: 10

Re: No PMs to self 0.1.0

Postby tannie » 01 Sep 2006, 06:12

Well.. atleast my BETA1 install has.. Good
Attachments
pm_quota.gif
PM attachment quota
Image
User avatar
tannie
Supporter
Supporter
 
Posts: 427
Joined: 09 Jul 2006, 10:50
Gender: Male

Next

Return to Scripts

Who is online

Users browsing this forum: No registered users and 2 guests