vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Minimum posts to use pm's (https://vborg.vbsupport.ru/showthread.php?t=48607)

Dean C 02-05-2003 10:00 PM

Minimum posts to use pm's
 
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 02-06-2003 06:15 PM

Whoa mist. Making lots of hacks?

Dean C 02-06-2003 06:28 PM

Indeed ;)

Logik 02-06-2003 06:35 PM

Crazy hacker. :)

Logik 02-06-2003 06:36 PM

I bet you woke up this morning and said, "I'm going to make every hack that is possible."

Dean C 02-06-2003 06:42 PM

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 02-06-2003 06:44 PM

;). darn, you caught me. No not really.. But that is a good idea. :). J/K

Kars10 02-06-2003 06:45 PM

Good work buddy. :)

Logik 02-06-2003 06:49 PM

Uh oh, mist, in the TXT file, at the top it says
PHP Code:

+    Minimum Posts to do a search            


Dean C 02-06-2003 07:05 PM

*Fixed*

Smoothie 02-07-2003 03:42 PM

Mist- Can a user still receive PM's if they are under the post limit?

Dean C 02-07-2003 03:47 PM

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 02-07-2003 03:50 PM

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 02-07-2003 03:52 PM

Gimme a few days to think about that :)

Smoothie 02-07-2003 03:52 PM

my biggest problem with the pm system is knowing that someone can register, not post, and send pm's to other members.

Smoothie 02-07-2003 04:00 PM

maybe a check box; can view but cannot send as an option?

Smoothie 02-12-2003 10:07 AM

H-e-l-l-o M-i-s-t.

Dean C 02-12-2003 03:25 PM

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] 02-12-2003 04:17 PM

/me clicks install

nice idea, I actually needed it

Smoothie 02-14-2003 08:43 AM

Quote:

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 02-14-2003 03:51 PM

Ok smoothie i'll post it up within the hour - PROMISE!

- miSt

Dean C 02-14-2003 03:59 PM

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 02-15-2003 03:04 AM

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 02-15-2003 03:05 AM

Quote:

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 02-15-2003 03:25 AM

getting an error when I run the query....

Dean C 02-15-2003 10:25 AM

Post up the error?

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

- miSt

Smoothie 02-15-2003 05:01 PM

Teck helped me, here is the correct query:
PHP Code:

INSERT INTO setting (settingid,settinggroupid,title,varname,value,description,optioncode,displayorderVALUES (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 03-14-2003 06:10 AM

Thanks mist just what i needed

freeshares1 03-14-2003 12:00 PM

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 03-14-2003 04:00 PM

Your Welcome :)

- miSt

Aseerha 03-26-2003 06:57 PM

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,val ue,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,val u' at line 1

I'm using Vb 2.2.5

N9ne 03-26-2003 07:05 PM

Run this query instead:

PHP Code:

INSERT INTO setting(settingid,settinggroupid,title,varname,value,description,optioncode,displayorderVALUES (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 04-09-2003 11:39 AM

*updated installation instructions*

- miSt

Oblivion Knight 04-09-2003 12:37 PM

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..

Code:

Find in private.php:

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

require ("./global.php");

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

Should be:

Code:

Find in private.php:

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

require("./global.php");

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

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

[high]* Oblivion Knight clicks install.[/high]

Dean C 04-09-2003 12:56 PM

*updated installation instructions again* ;)

- miSt

FWF 09-02-2003 09:47 PM

this is VERY helpful

*installs*

Thomas P 11-29-2003 03:13 PM

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:

Code:

  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

Code:

  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-12-2003 12:44 AM

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

Thomas P 02-16-2004 03:32 PM

Quote:

Originally Posted by Thomas P
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 03-06-2004 11:21 AM

Quote:

Originally Posted by Thomas P
^^^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. :)


All times are GMT. The time now is 11:05 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01812 seconds
  • Memory Usage 1,800KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (3)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete