vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Super PM (Mass PM) (https://vborg.vbsupport.ru/showthread.php?t=100314)

msgotit 11-06-2005 10:00 PM

Super PM (Mass PM)
 
-------------------------------------
Super Private Message
-------------------------------------
Hack Version: 1.0.4
vB-version: 3.5.x
Developer: msgotit
Install-difficulty: Easy

Description:
Allows specified users to send a Private Message to certain groups of people.

This is basically the same as the hack created by UAE and in talking with him I have posted this here.

Super Private Message will give you the convenience and ability to provide many different options for sending mass private messages to users by any one you choose to assign this task to based on Conditionals (if):

User's Usergroup is Y.
User's has posts greater than x posts.
User's has posts less than x posts.
User's Join Date is After (yyyy-mm-dd).
User's Join Date is Befor (yyyy-mm-dd).
User's Last Activiy is After (yyyy-mm-dd).
User's Last Activiy is Befor (yyyy-mm-dd).
User's Last Post is After (yyyy-mm-dd).
User's Last Post is Befor (yyyy-mm-dd).

Settings in the Admin CP:

Specify who gets to use the Super Private Message System by Assigning their User Names or User IDs.
Specify the Secondary and Primary usergroup they can send a mass pm to.
Select what usergroup to be visible for selection(s).
Select to have the assignee change his identity when sending.
Control what fields to be visible for each assignee.
List All assignee, delete/edit them.

Hack Installation Details:

New files for this Hack: 2
/admincp/adminsuperpm.php
/superpm.php

New templates for this Hack: 1
pm_newsuperpm

Template-edits: 1
pm_newpm

DB Tables modified for this Hack: 1
user

History:

1.0.1 BETA
Fixed bug in xml
No longer show to whom the message will be sent (if you like that don't upload the superpm.php file. If your copy is working there is really no need to upgrade, there are no major changes yet - hopefully soon there will be!

1.0.2 BETA
Changed wording in Template - Makes more sense
Changed location of SuperPM link in admincp - Contained in the "User" group
Changed insert to fix/help fix the problem with overloading the server
Added option for admin to show to whom message will be sent

1.0.3
Fixed bug causing a php error * Thanks for the report Fofer
Fixed bug saving message to sent items even if you don't send it.

1.0.4
Added Email on pm - WARNING this will most likely not work if sending to over 500 people (probably ok up to 1000) although may be server intensive. Also, to do that you will likely have to change the max number or pms in superpm.php file from 500 to 1000.
Misc. changes as requested.

To upgrade, upload files and import the new product, click on overwrite and you will be set.
-------------------------------------

PLEASE REMEMBER TO BACKUP BEFORE YOU BEGIN!

If you like this hack, please be kind and click "INSTALL" Link.

This has been tested and seems to be working fine. If you find any errors please let me know!

uae 11-07-2005 04:59 PM

yay first to click installed :)
Thanks dude, gonna try it now ....

[edit] Installed and working just fine, so far :up: [/edit]

michaelbenson 11-07-2005 07:06 PM

Screenshots please?

Snake 11-07-2005 07:41 PM

Wow works fine! Thanks!

SnowBot 11-07-2005 08:31 PM

Quote:

Description:
Allows specified users to send a Private Message to certain groups of people.

This is basically the same as the hack created by UAE and in talking with him I have posted this here.

Super Private Message will give you the convenience and ability to provide many different options for sending mass private messages to users by any one you choose to assign this task to based on Conditionals (if):
What extra options does it give....i just done get it

tokenyank 11-07-2005 09:46 PM

Just out of curiosity, the 3.0.x version killed my server load when pm'ing 1000 or more...

Does this one control the throttle or does it still hammer the system?

Watson 11-07-2005 11:29 PM

Sorry, but I seem to be missing where I send this PM from?

msgotit 11-08-2005 12:05 AM

Quote:

Originally Posted by michaelbenson
Screenshots please?

Screen shots... Sorry, I am not able to get them right now, but will do that tomorrow, however if you go to this link, the screen shots are a lot alike, this is UAE's version for 3.0.7.

https://vborg.vbsupport.ru/showthrea...rivate+Message

msgotit 11-08-2005 12:10 AM

Quote:

Originally Posted by SnowBot
What extra options does it give....i just done get it

SnowBot,

I am not sure I follow what you are asking, it allows you to send a PM to people that meet the conditions that follow what you quoted: in a specific usergroup, join date after a certain date, last post date after/before a certain date, does that answer your question?

msgotit 11-08-2005 12:14 AM

Quote:

Originally Posted by tokenyank
Just out of curiosity, the 3.0.x version killed my server load when pm'ing 1000 or more...

Does this one control the throttle or does it still hammer the system?

tokenyank,

This is something that I haven't been able to try, I am using vBulletins datamanager where as before UAE was doing the inserts in the code, so I don't know what will happen. I don't have that many members, so I can't really test it. Right now it is set up to only allow a max of 1000 PMs (which is pretty easy to change if you need to). If you had a test board you could try it on I would like to know. Also, I am hoping to add a way in the future to have it send them out in batches, 500 at a time, I know that was requested before, I am just not sure the best way to go about doing that. So honestly I don't know if it will kill your server. Sorry :ermm:

msgotit 11-08-2005 12:19 AM

Quote:

Originally Posted by Watson
Sorry, but I seem to be missing where I send this PM from?

Watson,

Once you have installed this mod, you need to set someone up to be able to use it in the admincp. Then, assuming you made the template edit, when they click on Send Private Message they will have a link in the upper right corner to send a super private message. If you look at the screen shots at the link two posts up it will probably help, sorry I didn't include those originally.

Watson 11-08-2005 10:23 AM

Done it all, but the super PM bit aint coming up mate :(

msgotit 11-08-2005 11:52 AM

Quote:

Originally Posted by Watson
Done it all, but the super PM bit aint coming up mate :(

Did you select yes to at least one of the options in the admincp, show usergroups, send as other etc.? If you didn't it won't show up, even if you selected certain usergroups. Does this help? Let me know.

Edit: I ask this because this is what the template uses to decide if they have access to the super PM if none of the options are clicked (or the spmoptions = 0 then it won't show up.

Watson 11-10-2005 10:24 AM

nope still don't show up mate. Ever tried a complete reinstall and added myself again with all options :(

msgotit 11-10-2005 11:49 PM

Quote:

Originally Posted by Watson
nope still don't show up mate. Ever tried a complete reinstall and added myself again with all options :(

Watson,

What happens if you just go to yoursite.com/forum/superpm.php. Does it take you to the page and allow you to see it?

dsvirus 11-11-2005 06:57 AM

ok, well all my icons changed, my header image changed, i cant pm anymore..errr forgot to make backup

msgotit 11-12-2005 12:21 AM

Quote:

Originally Posted by dsvirus
ok, well all my icons changed, my header image changed, i cant pm anymore..errr forgot to make backup

What do you mean you can't PM anymore, and all your icons changed, I am sorry, but I don't know why or how this would happen, so if I could get a little more information that would be helpful! Thanks and I will do what I can to help:)

Watson 11-13-2005 12:19 PM

Quote:

Originally Posted by msgotit
Watson,

What happens if you just go to yoursite.com/forum/superpm.php. Does it take you to the page and allow you to see it?

Yes mate, I can view it all via that, just seems to be the template thats not showing up :(

Also, I have around 10,000 memebrs, and when I try and send it to all of them, that page times out. Dunno if its cause I am accessing the superpm.php directly

Watson

msgotit 11-13-2005 04:27 PM

When you send a private message normally you should see just what you see when in the first screen shot. That is, in the right top corner of the box you should see a link to "Send Super Private Message", and that should take you to the superpm.php page. If that isn't there, maybe post the part of the pm_newpm template, a little before and a little after where you edited it and I will see if I can help.

The page shouldn't time out, so I would like to know what it happening, when you say the page times out, is this once you have submited the message or before that? I know that with that many members that there could be a problem, and I am working on a way to fix that, hopefully in the next week I will have that done, but I would like to know what I need to do to make it work better, especially for those with large boards. Thanks for your help :)

biggjoe 11-14-2005 01:39 AM

Msgotit;

This hack is awesome and extremely useful, running great on vB 3.5.1! It also plays nicely with another mod I have installed called: Advanced PM Options

QUESTION:

- Let's say I create a user in 'Super PM' and I choose as their only group 'Registered Users'.

- When I go into the user's 'UserCP' >> Send New Message >> Send New Private Message, I see the following:

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

Usergroups

[ ] All Usergroups
[ ] Registered Users

...If/when they click on 'All Usergroups', is that for literally all of the user groups in the forums, or all of ther usergroups that are listed for them only? Which in this case would mean only the one 'Registered Users' usergroup?

Just curious, I plan on only using this for my Admins, but just in case I want to open this up for our mods, I want to be sure.

Thanks again for the awesome hack!

Joe

msgotit 11-14-2005 03:31 AM

Quote:

Originally Posted by biggjoe
...If/when they click on 'All Usergroups', is that for literally all of the user groups in the forums, or all of ther usergroups that are listed for them only? Which in this case would mean only the one 'Registered Users' usergroup?

Thanks Joe,

The 'All Usergroups' is used to select all of the groups that are listed, I didn't think about it, but I may change that in the next version so that it says 'Select All', because that is really what it does. By selecting it, it just selects all of the groups that are available. Glad you like that hack, and if there is anything that would make it more useful let me know! :)

Mark

jellybaby 11-14-2005 07:51 AM

I get an error message with this:-

Too many recipients - you are attempting to send to 2790 users but you are only allowed to send to 1000 users.

How can I send to all?

msgotit 11-14-2005 11:22 AM

Quote:

Originally Posted by jellybaby
I get an error message with this:-

Too many recipients - you are attempting to send to 2790 users but you are only allowed to send to 1000 users.

How can I send to all?

Find this bit of code in superpm.php:
PHP Code:

if ($vbulletin->userinfo['spmoption'])
{
    
$permissions['pmsendmax'] = 1000;
    
$spmugroupid $vbulletin->userinfo['spmugroup'];
    
$spmoption convert_bits_to_array($vbulletin->userinfo['spmoption'], $_SPMOPTION);


Change 1000 to 10000 or whatever you want, I meant to change that and will in the next version possibly giving the option to limit it if desired. Sorry about that.

Watson 11-14-2005 11:22 AM

Quote:

Originally Posted by msgotit
When you send a private message normally you should see just what you see when in the first screen shot. That is, in the right top corner of the box you should see a link to "Send Super Private Message", and that should take you to the superpm.php page. If that isn't there, maybe post the part of the pm_newpm template, a little before and a little after where you edited it and I will see if I can help.

The page shouldn't time out, so I would like to know what it happening, when you say the page times out, is this once you have submited the message or before that? I know that with that many members that there could be a problem, and I am working on a way to fix that, hopefully in the next week I will have that done, but I would like to know what I need to do to make it work better, especially for those with large boards. Thanks for your help :)

With the timing out, its when I try to send to all members, but its only on the Count bit, it doesnt go to the send and confirm screen. thats when I get a page not found error.

And I found the error with the superPM template bit, I hadn't put it in the right place overwriting the old code :)

Cheers mate

hilfe-forum 11-18-2005 04:10 PM

first sorry für my bad english

i have this error:

Datenbankfehler in vBulletin 3.5.1:

Invalid SQL:
ALTER TABLE `user` ADD `spmoption` INT( 10 ) DEFAULT '0' NOT NULL;

MySQL-Fehler : Table 'abcd.user' doesn't exist
Fehler-Nr. : 1146

but "abcd" is the name of the DB not the table Prefix

can anybody help?
THX!

msgotit 11-18-2005 07:55 PM

Quote:

Originally Posted by hilfe-forum
first sorry f?r my bad english

i have this error:

Datenbankfehler in vBulletin 3.5.1:

Invalid SQL:
ALTER TABLE `user` ADD `spmoption` INT( 10 ) DEFAULT '0' NOT NULL;


MySQL-Fehler : Table 'abcd.user' doesn't exist
Fehler-Nr. : 1146

but "abcd" is the name of the DB not the table Prefix

can anybody help?
THX!

That is likely my bad, I didn't include the table prefix when I created the product, and I now realize I should of, I will get that taken care of and post it.

Mark

EDIT: I uploaded a new xml file. If you still have problems let me know! :)

hilfe-forum 11-19-2005 06:13 AM

Quote:

Originally Posted by msgotit
That is likely my bad, I didn't include the table prefix when I created the product, and I now realize I should of, I will get that taken care of and post it.

Mark

EDIT: I uploaded a new xml file. If you still have problems let me know! :)

THX for help!!!

I have now a other prob.

Fatal error: Call to undefined function: array_chunk() in /var/www/www1/rechner2/wwwneu/vbulletin/superpm.php on line 375

msgotit 11-19-2005 03:13 PM

Quote:

Originally Posted by hilfe-forum
THX for help!!!

I have now a other prob.

Fatal error: Call to undefined function: array_chunk() in /var/www/www1/rechner2/wwwneu/vbulletin/superpm.php on line 375

Sorry, I have been playing around with it and accidently uploaded the other copy, I think I got the right one now, go ahead and try it and let me know!

jellybaby 11-23-2005 07:17 AM

This caused an overload on my server when I did it as I sent PMs to over 2,500 people how do I stop that happening as it took my site down for 10 mins!:disappointed:

msgotit 11-23-2005 08:27 PM

Quote:

Originally Posted by jellybaby
This caused an overload on my server when I did it as I sent PMs to over 2,500 people how do I stop that happening as it took my site down for 10 mins!:disappointed:

Give me a couple of days and I believe that I will have a fix, I have been working on making this process less server intensive. I apologize for taking your site down, really didn't mean to do that, but I am close on having a process that won't do that. Again, sorry!!

IamPud 12-04-2005 11:05 PM

Getting "Invalid recipient username" don't think i missed anything but any hints?

msgotit 12-05-2005 03:15 PM

Quote:

Originally Posted by IamPud
Getting "Invalid recipient username" don't think i missed anything but any hints?

I would assume this is the message you get back when you click "Count and Confirm" (if not let me know). It doesn't make sense that you are getting this, when I get home and can look at this more closely I will let you know, I am actually post an update tonight so that might solve your problem. If you have any other info that will help let me know, but like I said I will look at it tonight, sorry about the delay!

IamPud 12-06-2005 02:58 AM

Actually i click that count and confirm and it returns the number that i want with the submit message button. When i click that is when i get the error.

Telegon80 12-06-2005 03:19 AM

ill install this tomorrow cool hack!

msgotit 12-06-2005 11:02 PM

Quote:

Originally Posted by IamPud
Actually i click that count and confirm and it returns the number that i want with the submit message button. When i click that is when i get the error.

I have updated the files, it isn't for your specific error, but I think that it should work. If you want to try and reupload the files and see what that does, let me know if it isn't fixed!

IamPud 12-07-2005 01:33 AM

I did an uninstall first then imported the new xml file and got this

Database error in vBulletin 3.5.0:

Invalid SQL:
ALTER TABLE `user` ADD `spmoption` INT( 10 ) DEFAULT '0' NOT NULL;

If i go into the CP and Select SuperPM i get

Invalid SQL:
SELECT count(*) as users from vb3_user
WHERE spmugroup > 0;

utw-Mephisto 12-07-2005 11:02 AM

I don't find the settings ?!?

utw-Mephisto 12-07-2005 11:11 AM

never mind, found it

Digma 12-07-2005 12:52 PM

Msgotit, this is exactly what I was looking for and am tempted to try once we upgrade to 3.5.x. :cool:

However, with around 5,000 users I am affraid to do so until some load management has been built in. Sending the PM to 250 users max at a time and a quick pause before continuing with the next 250, until you have PM-ed everyone.

You mentioned you would look into it, any luck so far?

Keep up to good work :up:

msgotit 12-07-2005 12:55 PM

Quote:

Originally Posted by IamPud
I did an uninstall first then imported the new xml file and got this

Database error in vBulletin 3.5.0:

Invalid SQL:
ALTER TABLE `user` ADD `spmoption` INT( 10 ) DEFAULT '0' NOT NULL;


If i go into the CP and Select SuperPM i get

Invalid SQL:
SELECT count(*) as users from vb3_user
WHERE spmugroup > 0;

IamPud,

I have reuploaded the file, I thought I had taken care of that problem, I didn't have the table prefix on the front of the tables when adding the fields, it should be there now so we should be good to go, let me know.


All times are GMT. The time now is 06:51 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.01502 seconds
  • Memory Usage 1,851KB
  • 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
  • (1)bbcode_php_printable
  • (19)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
  • (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