vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Private Messages Enhancements - Limit PMs Sent Per-Day (https://vborg.vbsupport.ru/showthread.php?t=148150)

criscokid 06-10-2007 05:45 PM

Quote:

Originally Posted by Sim9
This configuration reads as "Limit users who have less than 50 posts to making no more than 5 PMs within 24 hours." Tweak to your liking.

Any chance of a similar mod so that it's usergroup based?
ie: registered users get 15 PMs per day, premium users get unlimited PMs per day.

Lionel 08-07-2007 02:06 AM

This is a cool mod. I'd like to add to it the functionality of sending me a PM when someone in the "waiting period" attempts to send more than X PM per day. I am able to send and receive the alert. But it also gives me a database error even though transaction was successful. This is what I included before the closing bracket

PHP Code:

 $pmtitle "Spammer Alert"
                
$pmmessage "A new member, " $vbulletin->userinfo['username'] . " is attempting to send numerous PM. Please verify for possible spammer."
        
$sendtoname="Lionel";
        
// create the DM to do error checking and insert the new PM
        
$botpermissions['adminpermissions'] = 2;  
        
$pmdm =& datamanager_init('PM'$vbulletinERRTYPE_ARRAY);
        
$pmdm->set('fromuserid'$vbulletin->userinfo['userid']);
        
$pmdm->set('fromusername'$vbulletin->userinfo['username']);
        
$pmdm->set('title'$pmtitle);
        
$pmdm->set('message'$pmmessage);
        
$pmdm->set_recipients($sendtoname$botpermissions);
        
$pmdm->set('dateline'TIMENOW 5);  
        
// If no errors, save.
        
if ($pmdm->errors) {
            return 
$pmdm->errors;
        }
        
$pmdm->save(); 

Like I said, transaction is fine but the next page is about a duplicate entry. Do you still save the blocked PM ?

Quote:

MySQL Error : Duplicate entry '25031' for key 1
Error Number : 1062

JadedSouls 09-19-2007 11:31 PM

I like!
*installed*

qdin 02-11-2008 12:55 PM

Thanx it works fine with 3.6.8

qdin 02-17-2008 12:04 PM

There is a bug with this hack guys. I installed it 1 week ago. But unfortunately when my guests try to register the result of the register is a blank page. And the Error is like that

Code:

Fatal error: Call to a member function query_read() on a non-object in
/var/www/vhosts/******.net/httpdocs/forum/includes/class_dm_user.php(2449) : eval()'d code on line 13

When I disable this hack everything works fine. Could anyone find the problem :S I am not a good coder :S

P:S. the version of my board is 3.6.8

Sim9 02-17-2008 07:38 PM

Konstantinos/criscokid - if you're interested in usergroup permissions, this is the line to change:
Code:

if ($vbulletin->userinfo['posts'] < $arc_exempt_postcount)
Off the top of my head, I'm not sure what the check usergroup code is, but you could change that condition to check for it. Should only be a one line change :)

Lionel - I like the idea of warning an admin about PM spam, but you wouldn't want to send one warning per attempt or your inbox would be badly spammed. I'm guessing that the reason you can't send a pm at that time is that another PM (the user's) is being constructed at that time. Maybe try erroring out and clearing the user's PM first, then send the admin pm (being sure to initialize a fresh PM with a unique ID)?

qdin, are you running a PM member on register plugin? It's possible this plugin is not compatible with that, though it runs fine on my board with other automated PMs (though I don't have a registration PM). Try sending automated PMs from a user account with a postcount higher than the spam check postcount

adwade 02-23-2008 01:03 AM

One other question, not being a 'coder' I guess this

Code:

$arc_timeperiod_secs = 60 * 60 * 24; // How long (One Day)
is probably what controls the 60 second new posting delay? If one wanted to make the forced delay between postings 120secs (instead of 1min) would you change one of the 60's above, and if so which one?

Update: Nevermind, I found Private Messaging Options in AdminCP that controls the delay between sending PMs!

INSTALLED!

Sim9 02-23-2008 02:53 AM

Sounds like you cleared it up, but just so everyone knows the distinction in case all they really need is the stock vB functionality:

Stock vBulletin provides an option to control the timeout between two individual PMs (adwade's post) - this lets you say a normal user can PM no more than once per sixty seconds. With a sixty second delay, a user can potentially send 1,440 privates messages a day (1,440 minutes in a day). Setting this to an hour interval mitigates this down to 24 private messages a day, at the cost of potentially annoying legitimate users who now have to wait a full hour between sending PMs.

This plugin lets you restrict the number of PMs sent over a span of a full day (or whatever other interval you set). So you could set the vBulletin delay between PMs to a negligible five seconds, but only allow five PMs per day for new users. This shouldn't affect legitimate new users, but will significantly limit the damage a spam bot could do.

Hope that makes the plugin clearer :)

adwade 02-24-2008 04:44 AM

I'm running vB v3.6.4 and when I installed and tested your MOD, everything acted normally until :( I 'clicked' on the LINK in the verification email sent out when a new user registers. Then, this is what I got:

Code:

Fatal error: Call to a member function on a non-object in /home/*******/public_html/forums/includes/class_dm_user.php(2385) : eval()'d code on line 11
Toggle the MOD OFF and the error went away, whenever I signed up as a new user and clicked the verification LINK in the email. I get the same error using MS-IE or FireFox either one with the MOD Enabled. Any ideas??

EDIT: One other thing I forgot to add, is the Verification LINK actually works, regardless of this error. It's just seeing the Fatal Error vs. the You're Registered Now screen confuses new users.

adwade 02-24-2008 05:01 AM

Quote:

Originally Posted by Sim9 (Post 1445432)
qdin, are you running a PM member on register plugin? It's possible this plugin is not compatible with that, though it runs fine on my board with other automated PMs (though I don't have a registration PM). Try sending automated PMs from a user account with a postcount higher than the spam check postcount

FWIW, I'm not. However, I am running Cyb - PM System Enhancements Could that be doing it, when installed alongside your MOD? I disabled it and re-tried signing up as a new user with your MOD enabled and still got the Fatal Error above.


All times are GMT. The time now is 06:52 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.01098 seconds
  • Memory Usage 1,759KB
  • 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
  • (1)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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