PDA

View Full Version : [UPDATE] Mass PM (vB 2.0)


WreckRman2
15 Feb 2001, 10:00
An update to the hack posted by chrispadfield at http://www.vbulletin.com/forum/showthread.php?threadid=8582.

Updates:

1. Modified the look of page to match that of the email page.

2. Added select fields to send message to.

4. Fixed $adminuser and set to a hidden field.

Enjoy!



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------

15 Feb 2001, 11:00
oh wicked, glad someone made these changes, saved me doing it ;)

15 Feb 2001, 14:49
very nice man :)
thanks alot..

15 Feb 2001, 19:28
Wow, that was quick and easy --

Is there anyway you can limit who it gets sent to?
(using the last visited, or join date fields)

Our board is over a year old and I just sent all these old users a test message which is a waste since they are long gone. Since my board is event based, if they are gone for more than a few months they probablyaren't coming back (which is fine!):)

15 Feb 2001, 21:05
me2be, it is just a matter of ammending the SELECT user line and adding an extra condition after WHERE. I will try and get the exact command i don't know how to do it with dates at the moment but someone might.

15 Feb 2001, 21:08
How about an addition, to MassPM a specific group so you can send to lets say only moderators, I think that would be nice.

15 Feb 2001, 22:19
I have updated the code which adds the select user statments. Also removed the icons as they really aren't needed... Enjoy!

15 Feb 2001, 22:31
What does this mean? It still shows the forum underneath the errors:

Warning: Cannot add header information - headers already sent by (output started at /usr/local/etc/httpd/***/admin/masspm.php:2) in /usr/local/etc/httpd/***/admin/global.php on line 68

Warning: Cannot add header information - headers already sent by (output started at /usr/local/etc/httpd/***/admin/masspm.php:2) in /usr/local/etc/httpd/***/admin/global.php on line 69

Warning: Cannot add header information - headers already sent by (output started at /usr/local/etc/httpd/***/admin/masspm.php:2) in /usr/local/etc/httpd/***/admin/global.php on line 70

Warning: Cannot add header information - headers already sent by (output started at /usr/local/etc/httpd/***/admin/masspm.php:2) in /usr/local/etc/httpd/***/admin/global.php on line 71

Warning: Cannot add header information - headers already sent by (output started at /usr/local/etc/httpd/***/admin/masspm.php:2) in /usr/local/etc/httpd/***/admin/global.php on line 128

15 Feb 2001, 22:43
Not sure why you would get header errors... Maybe you have a space on the first line of your code?

Try the zipped file attached below...

15 Feb 2001, 22:56
Yay!!! It worked!!!!! ** happy dance **

16 Feb 2001, 00:44
I have updated this as well if anyone is interested, here is a screen shot and I added it to the control panel. I eliminated the other queries such as lastpost etc.. since I was only lookin to Mass PM a group or all groups. Here it is:



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



Here is the control panel addition:

find this in admin/index.php below "User Groups and Permissions:


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



add this above it:


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



Here is the pic:

16 Feb 2001, 09:49
needs to be ammeneded to send to just moderators though as moderators arn't a usergroup anymore.

16 Feb 2001, 10:08
Originally posted by chrispadfield
moderators arn't a usergroup anymore.

(COPPA) Users Awaiting Moderation [edit] [list all users]
Administrator [edit] [list all users]
Moderators [edit] [remove] [list all users]
Registered [edit] [list all users]
Super Moderator [edit] [list all users]
Unregistered / Not Logged In [edit] [list all users]
Users Awaiting Email Confirmation [edit] [list all users]

That's all folks


They are on my forum...?

16 Feb 2001, 15:15
Actually.. Unless you move them into a group on your own they are all set to the Registered User's Group when you upgrade. Moderator permissions are handled through a separate moderators table now.

01 Mar 2001, 16:59
I sent a test message to my moderators' user group last night, which is 5 people. To test it out, I included the $username, $password, and $email variables as it says you can. When it was sent out, instead of doing the person's the message was going to, all 5 messages had the info of the first person it was sent to.

i.e. I sent it to users 5, 49, 65, 100, 105 and in all of them it put the info for user 5.

Any ideas?

Thanks for a great hack otherwise. :)

02 Mar 2001, 17:46
subst:


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



with:



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------




(add slashes before $ otherwise it will parse as a var) :-)

03 Mar 2001, 01:00
I don't understand how to install this hack?

Upload masspm.php
Then I get lost?

Help?

03 Mar 2001, 02:01
that is it, the run masspm.php.

I used wreckman's and it went pearshaped and did not send the message for some reason so had to use my old one to do it. Not sure what the bug is but something not quite right i don't think?

TechTalk
14 Apr 2001, 18:00
VERSION 2.1 VERSION 2.1!!! PLEASE ADD :D

~Chris

kreker
06 May 2001, 12:21
all right! works fine

The Realist
28 Jul 2001, 11:50
I have done the below but still getting the problem were the first name in the first message is being sent in all PM'ed messages.

Help!


Originally posted by marl
subst:


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



with:



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------




(add slashes before $ otherwise it will parse as a var) :-) :confused:

fury
31 Jul 2001, 20:44
That is what I am experiencing too

Also, with the next update to this script, if possible could you make an "Are you sure" screen that allows you to select which users should and should not receive the message?

The Realist
31 Jul 2001, 20:48
Solved the problem by running the repair script.

veedee
01 Aug 2001, 09:15
great hack !!!

I havent used it yet as i havent thought of a good enough subject to PM my users with !!!

here is a screen shot !!

:):):)

Dioxin
16 Aug 2001, 11:22
ok, found the error regarding the username not correctly parsed:

change this on:



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



to this one:



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



:)

DarkReaper
21 Aug 2001, 02:45
Originally posted by The Realist
Solved the problem by running the repair script.

What repair script? I get the problem where if I have a message with something like "Your username: $username" then it says the username of me(id = 1). I've got a slash before the $ on each one of them...

JoshFink
21 Aug 2001, 02:52
Is there an updated version with all the fixes?

Thanks,

Josh

butty
26 Aug 2001, 23:04
yeah i wouldnt mind installin this one but with all the changes and stuff its baffled me a bit so il have 2 leave it for the sake of my forum!!!!!

Pulsorock
26 Aug 2001, 23:48
I install this, but it doesn't parsed the information (username, email, password). I also noticed that the user doesn't get a msg pop-up even when they specified to get a pop-up when new PM arrive.

Nam
05 Nov 2001, 01:30
is there new version for 2.2.0?

I've just install it to my new version 2.2.0, it works perfectly, just have some suggestions.

1. "search for pass" is meangless now, since new version has encrypted pass, please remove it.

2. We really need Save function that keep all of our mass PM to users in Send Folder box. To keep for the record.

KarateKid
09 Dec 2001, 22:11
does it work for 2.2.1 ?

Mystics
10 Feb 2002, 15:33
I have adjusted the script a little bit.
It's now nearly the same as the "Send eMail to users"-Feature, so now you can test the process before sending and all variables get replaced correct.

The Script works perfect for vBulletin 2.2.x!

I have attached the script (German an English version!) to this Posting.

@NAM2. We really need Save function that keep all of our mass PM to users in Send Folder box. To keep for the record.To save the sent PM in the Send Folder Box of the Admin who sent the PM, do the following (referring to my version of the script):

Search:

Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------

and replace it with:

Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------

2003-07-09:
Small update (changed code order)

2002-09-21:
Updated the archive with new versions (Bugfix + Automatic redirect Feature when sending over several pages.)

2002-07-12:
Updated the archive with new versions (Bugfix + eMail Feature)

Greetings,
Mystics

Jawelin
11 Feb 2002, 10:20
Thanks a lot. Very cool!

Actually there are - in your masspm.php - two lines with
<b>All done!</b> (one for first page, another for the multiple pages option)

Which of them should I replace with the above INSERT to save the PM in the outbox ?

Besides, the INSERT itself contains three identical values:
'$fromuserid','$fromuserid','$fromuserid',
Is it right (I shall not save the single target of each message...) ?
Hwr. that variable is NEVER defined anywhere :stupid: :stupid:

Thanks

Jawelin
11 Feb 2002, 11:49
Sorry Mystics, but I definetively think your insert queries

Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------

and the other you specified two posts above, should be replaced with something like:

Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



What do you think about ?

Thnx

Mystics
11 Feb 2002, 12:04
Originally posted by Jawelin
Actually there are - in your masspm.php - two lines with
<b>All done!</b> (one for first page, another for the multiple pages option)This line does not appear two times!!!

There is one line with <b>All done!</b> and one line with <p><b>All done!</b></p> and as I wrote you should replace the second one!Originally posted by Jawelin
Besides, the INSERT itself contains three identical values:
'$fromuserid','$fromuserid','$fromuserid',
Is it right (I shall not save the single target of each message...) ?
Hwr. that variable is NEVER defined anywhere :stupid: :stupid:
This variable is defined!

Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------

But you are right, you may replace $fromuserid with $bbuserid....I just have taken this from the original "hack".

The reason why this variable appears three times in the "Save-Sent-PM-in-My-Outbox" Feature is simple: you are the sender of the pm, you are the receiver of the pm and the PM belongs to you, so all userids have to be of course the same.

I have tested all of this before I posted it, so just believe me, it works! :rolleyes:

Jawelin
11 Feb 2002, 13:21
Thnx for having cleaned out.
Bye

bluecat
12 Jun 2002, 16:12
Great hack. I'm wondering, is there a way to put to this in my control panel for easy access (rather then enter the url manually)? Thanks.

Mystics
12 Jun 2002, 16:18
Originally posted by bluecat
Great hack. I'm wondering, is there a way to put to this in my control panel for easy access (rather then enter the url manually)? Thanks. Open admin/index.php

Find:

Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------

Add below it:

Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------

JoshFink
12 Jul 2002, 19:40
The only problem I see so far with this is that it does not send out a notification email if when someone receives a PM. Is there a way to fix this?

Thanks

Josh

Mystics
12 Jul 2002, 19:55
Originally posted by JoshFink
The only problem I see so far with this is that it does not send out a notification email if when someone receives a PM. Is there a way to fix this?I have replaced my attachment (http://www.vbulletin.org/forum/attachment.php?s=&postid=219446) with the new version.

I have done the eMail Feature + Bugfix long time ago, sorry ;)

Mystics

JoshFink
12 Jul 2002, 20:13
So, this version does fix the email notification problem? What else is fixed in there?

Thanks so much for the help.

Josh

Mystics
12 Jul 2002, 21:41
Besides the eMail notification problem, there was no "PM Popup" and the "Next Page" Button redirected to the wrong URL.

JoshFink
12 Jul 2002, 22:19
Thanks for the help. I'm going to install it now..

Mystics
21 Sep 2002, 15:14
I have uploaded a new Version:
http://www.vbulletin.org/forum/showthread.php?s=&action=showpost&postid=219446

There was a Bug when sending a PM to many users over several pages (the wrong "fromuserid" was stored).

I also added a feature for automatic redirection to the next page.

Mystics

wolfe
29 Sep 2002, 22:32
can u add something where it alerts the members of a new PM if they have chose to recieve email on new PM

Mystics
30 Sep 2002, 00:52
@wolfe

Look at my attachment....

nocturnix123
20 Feb 2003, 00:27
Okay, I installed this on my local machine to test it...and so far it seems to work fine, except some minor problems....

1. when i go to http://localhost/forum/private.php?s=

The message is not there and it says "There are no messages to display in this folder for this time period."

I can only see it if i select to display the messages from the last year 2 days or more...

The dates *seem* right, any clue why the messages arent showing up in the inbox?

nocturnix123
20 Feb 2003, 00:29
NM, i figured it out :)

AlexanderT
26 Mar 2003, 19:22
The Hack works fine but requires one fix:

The first masspm I sent out was without a subject field (I forgot to enter it). Yet the Hack sent it out. The result was that every user received a PM he or she was unable to open (usercp doesn't give a link to the PM without a subject). I was forced to run a query on my database removing all the PM's without a subject again.

lemarsu
03 Jul 2003, 12:22
Hi,

Looks great...
But (there is always a But....) is there a way to pickup the new custom User Profile Fields, that I have created ?

It has all the normal ones:

User Name contains
and usergroup is
and email contains
and parent's email contains
and is coppa user (yes, no, blank for don't mind)
and homepage contains
and ICQ Number contains
and AIM Handle contains
and Yahoo Messenger Handle contains
and Biography contains
…….

Can we add the custom ones ? they do appear at the bottom of search for users…

LeMarsu

lemarsu
03 Jul 2003, 14:40
Ok....

you can add the following to give you the custom feilds...


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------




but what to do next ?

groovesalad
11 Jul 2003, 04:26
anyone have the original code or know how to install this? that first link doesn't work.

lemarsu
11 Jul 2003, 09:03
have a look at this post :
http://www.vbulletin.org/forum/showthread.php?postid=219446#post219446

Nitesh
28 Jan 2004, 13:03
Hi, can this be modifyed to work with vb3?

voclain
12 Feb 2004, 03:17
????

Will it work with v. 2.3.0????

Kirk Voclain