Version: 1.00, by Zero Tolerance
Developer Last Online: Nov 2023
Version: 3.0.3
Rating:
Released: 10-04-2004
Last Update: Never
Installs: 134
No support by the author.
This is a minor upgrade from the first version, 1 main new feature, and a little code revision.
Features:
Number of PM's to send at a time
It's a server intensive process and you don't want to ultimatly send to everyone at once on your forum unless you have like 50 member's.
New Usergroup Selecting
Your now able to select all, 1 or certain usergroup's to which the PM is sent to, so if you wish to send to staff, Ie, Admins, SMods + Mods, you would simply check all those, making it much easier and saving time.
Very simple install, take you 3 seconds, im not joking, yet very useful, a preview is below for those desiring to see what it look's like first.
Enjoy,
- Zero Tolerance
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
Zero. I will not question your way to make hacks, but checking a few posts back, i see that the users with a lot of records in USER table in database, get stuck when trying to send this. You replied that's is a UPLOAD problem.. or any other problem like this.
I will explain this for you.. checking your hack, it's really good constructed, but you miss a little detail. when you LIMIT the send of PM's, you must LIMIT the QUERY to DB too.
I looked that the query is static in all "retries" to send PM's:
PHP Code:
$Query_Build = "select * from ".TABLE_PREFIX."user where usergroupid IN({$set_in}) order by userid"
this will return a query result with ALL your members in the usergroup / user table.. if you have 25.000 members in the group "Registered", the query result will have 25.000 records, and before you get the reply from DB, you mysql will go down.
The way to solve this, is LIMIT the query to database, in the one by one step to sending pm's. (LIKE the vB do while sending mass emails)
Example:
Sending to 150 users in usergroup 6, send amount by step is set in 50.
- START SCRIPT
- CHECK THE AMOUNT OF PM'S SENT BY STEP (50)
- QUERY DATABASE TO USERGROUP 6, LIMIT RECORDS FROM 0 TO 50
- SEND PM'S 0 TO 50
- SHOW OK RESULTS AND CONTINUE TO NEXT STEP (SEND THE "STARTAT")
- QUERY DATABASE TO USERGROUP 6, LIMIT RECORDS 51 TO 100 (START - START + AMOUNT)
- SEND PM'S 51 TO 100
AND CONTINUE... TO END
-------------------------
your actual script works like this:
Sending to 150 users in usergroup 6, send amount by step is set in 50.
- START SCRIPT
- CHECK THE AMOUNT OF PM'S SENT BY STEP (50)
- QUERY DATABASE TO USERGROUP 6, NO LIMIT RECORDS (ALL RESULTS)
*** IF THE USERS ARE A LOT, YOU GET A HANGED DB IN A SUPER BIG QUERY **
-----------------
It will be much better if you correct this issue...
Yes, it's true. I have more than 120.000 users and mass PMing can not work.
I had the same problem with mass PM'ing about 70,000 members in my "Registered" usergroup. I solved it by temporarily adjusting the memory_limit variable in my php.ini file.
I had the same problem with mass PM'ing about 70,000 members in my "Registered" usergroup. I solved it by temporarily adjusting the memory_limit variable in my php.ini file.
First, try the script, and confirm that it's failing. Then, look in your apache error log (probably /var/log/httpd/error_log). If it's failing because of a PHP memory error, you'll probably see a line like this:
Allowed memory size of 50331648 bytes exhausted (tried to allocate 0 bytes)
If you see a line like that, double the memory_limit variable, restart apache, then try again. Watch your server load while the script is running, via the "top" command. Also, you might need to limit it to send only 100 PMs at a time, rather than the default 300. You can also adjust this while the script is executing, by altering the value in the meta-refresh url.
When you're done, don't forget to change memory_limit back in php.ini, and then restart apache again.