PDA

View Full Version : Minimum posts to use pm's


Dean C
06 Feb 2003, 19:13
Minimum posts to use pm's

What does this hack do?

This allows you to have an option in your admin cp where you can define a minimum number of posts that a user must have to use pm's. If the user doesn't have enough posts they will get an error telling them they need so many posts (which you defined in the admin cp) to view the pm's.

Regards

- miSt

Logik
06 Feb 2003, 19:15
Whoa mist. Making lots of hacks?

Dean C
06 Feb 2003, 19:28
Indeed ;)

Logik
06 Feb 2003, 19:35
Crazy hacker. :)

Logik
06 Feb 2003, 19:36
I bet you woke up this morning and said, "I'm going to make every hack that is possible."

Dean C
06 Feb 2003, 19:42
I bet you woke up this morning and said i'm going to increase my post count by double-posting in threads :p

- miSt

Logik
06 Feb 2003, 19:44
;). darn, you caught me. No not really.. But that is a good idea. :). J/K

Kars10
06 Feb 2003, 19:45
Good work buddy. :)

Logik
06 Feb 2003, 19:49
Uh oh, mist, in the TXT file, at the top it says
+ Minimum Posts to do a search +

Dean C
06 Feb 2003, 20:05
*Fixed*

Smoothie
07 Feb 2003, 16:42
Mist- Can a user still receive PM's if they are under the post limit?

Dean C
07 Feb 2003, 16:47
Yes but they can't view them. They will get a pop up message still if it is set in the usercp. I could easily cut out the pop-up message too if you would like that?

Regards

- miSt

Smoothie
07 Feb 2003, 16:50
I send pm's to new users when they register, and would like them to view. Also, if I set say the min to 15 posts, or whatever, and they have 5 posts, and I need to pm them for one reason or another, they wouldn't be able to read the pm. It would be great if they could read, but not send until they have the req number of posts.

Dean C
07 Feb 2003, 16:52
Gimme a few days to think about that :)

Smoothie
07 Feb 2003, 16:52
my biggest problem with the pm system is knowing that someone can register, not post, and send pm's to other members.

Smoothie
07 Feb 2003, 17:00
maybe a check box; can view but cannot send as an option?

Smoothie
12 Feb 2003, 11:07
H-e-l-l-o M-i-s-t.

Dean C
12 Feb 2003, 16:25
Sorry Smoothie i've been busy... i'll post the addon here when i have some time. Keep reminding me though because i have soooo much client work at the moment i easily forget.

- miSt

wooolF[RM]
12 Feb 2003, 17:17
/me clicks install

nice idea, I actually needed it

Smoothie
14 Feb 2003, 09:43
Originally posted by Mist
Sorry Smoothie i've been busy... i'll post the addon here when i have some time. Keep reminding me though because i have soooo much client work at the moment i easily forget.

- miSt Reminding you! :)

Dean C
14 Feb 2003, 16:51
Ok smoothie i'll post it up within the hour - PROMISE!

- miSt

Dean C
14 Feb 2003, 16:59
Ok here you go Smoothie. You cannot send PM's but you can edit folders and view PM's :)

Now i'm off to have my curry

Bonsoir

- miSt

Smoothie
15 Feb 2003, 04:04
oye! It lives....

I will drop everything I'm doing right now, and install this puppy.....

Thanks Mist! I'll post back and let you know how it goes...

Smoothie
15 Feb 2003, 04:05
You cannot send PM's but you can edit folders and view PM's By viewing pm's I hope you mean read them, not just view the pm title.....

Smoothie
15 Feb 2003, 04:25
getting an error when I run the query....

Dean C
15 Feb 2003, 11:25
Post up the error?

And yes you can read them and not just view the pm title....

- miSt

Smoothie
15 Feb 2003, 18:01
Teck helped me, here is the correct query: INSERT INTO setting (settingid,settinggroupid,title,varname,value,description,optioncode,displayorde r) VALUES (NULL,'19','Minimum Posts','pmminposts','0','Here you define the number of posts a user must have before he/she can use the private message system.','','18')Yes, it works fine. Might want to update the hack. :laugh:

freeshares1
14 Mar 2003, 07:10
Thanks mist just what i needed

freeshares1
14 Mar 2003, 13:00
Mist,

MASSIVE THANKS, Using your pm hack i have understood VB a lot more and have created a hack that does the same except for the quiz hack. As a lot of my users just joined to do the quiz and were not posting.

Thanks

Phil

Dean C
14 Mar 2003, 17:00
Your Welcome :)

- miSt

Aseerha
26 Mar 2003, 19:57
It didnt work :-(
When i ran that Sql query in PhpMyadmin:
This showed up:

Error

SQL-query :

$DB_site * > query(

"INSERT INTO setting(settingid,settinggroupid,title,varname,value,description,optioncode,disp layorder) VALUES (NULL,19,'Minimum Posts','pmminposts','0','Here you define the number of posts a user must have before he/she can use the private message system.','','18')"
)

MySQL said:


You have an error in your SQL syntax near '$DB_site->query("INSERT INTO setting(settingid,settinggroupid,title,varname,valu' at line 1

I'm using Vb 2.2.5

N9ne
26 Mar 2003, 20:05
Run this query instead:


INSERT INTO setting(settingid,settinggroupid,title,varname,value,description,optioncode,disp layorder) VALUES (NULL,19,'Minimum Posts','pmminposts','0','Here you define the number of posts a user must have before he/she can use the private message system.','','18');

Dean C
09 Apr 2003, 12:39
*updated installation instructions*

- miSt

Oblivion Knight
09 Apr 2003, 13:37
Thankyou very much Mist,
Very useful hack so that people don't register just to send advertisements about their site via PM..

One thing you may want to update in your instructions though..

Find in private.php:

----------------------------

require ("./global.php");

----------------------------

Should be:

Find in private.php:

----------------------------

require("./global.php");

----------------------------

(There's no space between the "e" from require and the opening bracket "(").

/me clicks install.

Dean C
09 Apr 2003, 13:56
*updated installation instructions again* ;)

- miSt

FWF
02 Sep 2003, 22:47
this is VERY helpful

*installs*

Thomas P
29 Nov 2003, 16:13
Great hack, easy and simple and works for vb 2.3.3

To add this functionality for the eMail feature, too, add this to member.php

Look for this:


if (!$bbuserinfo['userid'] or $bbuserinfo['usergroupid']==3) {
//don't let people awaiting email confirmation use it either as their email may be fake
show_nopermission();
}


add below


if ($bbuserinfo[posts] < $pmminposts) {
eval("standarderror(\"".gettemplate("error_pmminposts")."\");");
}


Edit the template to reflect the change:

Sorry you need to have $pmminposts posts before you can use the private message system or the email function.


That's it :)

Thomas P
12 Dec 2003, 01:44
Hmm, how to prevent other users from sending them a PN?

Thomas P
16 Feb 2004, 16:32
Hmm, how to prevent other users from sending them a PN?
^^^moderate bump

>Hmm, how to prevent other users from sending them a PN?

Thomas P
06 Mar 2004, 12:21
^^^moderate bump

>Hmm, how to prevent other users from sending them a PN?
Nevermind, I placed a.m. code in the member.php where the sending mechanism is, so people can read and do stuff, but don't send. :)

Gio~Logist
10 Oct 2004, 12:43
ha this hak is very helpful for people wanting to spam and stuff, good job mist, ill be using this

LaPiba
23 Apr 2006, 03:55
This hack is very useful and i have it installed. But i have discovered that people can still send PMīs if they use the option "Send PM to buddies" in their control panel.

The hack only affects private.php and not private2.php... so if someone:

- adds some users to his/her "buddy list"
- uses the option "send PM to buddies"
- chooses at least two users to PM

... then a message composition window appears, which "comes" from private2.php and not from private.php

I think i have solved this problem by adding:

if ($bbuserinfo[posts] < $pmminposts) {
eval("standarderror(\"".gettemplate("error_pmminposts")."\");");
}

after

if ($action == "sendtobuddies") {

in private2.php