PDA

View Full Version : Private Messages Enhancements - Mass Private Messages on Memberlist


ThorstenA
19 Aug 2008, 15:03
What does this modification do?
On memberlist select multiple users for Mass Private Messages them. This is done by only 2 template edits :D
What is Mass PM? It's like Mass Mail in admincp. You write one pm to multiple users.

How to
In template memberlist_resultsbit replace
</tr>
with

<td class="$bgclass"><input type="checkbox" name="deletebox[$userinfo[userid]]" value="$userinfo[userid]" /></td>
</tr>


In template memberlist replace

<form action="profile.php?do=deleteusergroups&amp;usergroupid=$usergroupid" method="post">
<input type="hidden" name="do" value="deleteusergroups" />
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
<input type="hidden" name="usergroupid" value="$usergroupid" />

with

<script type="text/javascript">
<!--
function pm(tform)
{
var users = new Array();
var arrCount = 0;
for (i = 0; i < tform.elements.length; i++)
{
var element = tform.elements[i];
if ((element.name != "allbox") && (element.type == "checkbox") && (element.checked == true))
{
users[arrCount] = element.value;
arrCount++;
}
}
if (arrCount == 0)
{
alert("$vbphrase[no_users_selected]");
}
else
{
var querystring = "";
for (i = 0; i < users.length; i++)
{
querystring += "&userid[]=" + users[i];
}

self.location= "private.php?$session[sessionurl]do=newpm" + querystring;

}
}
// -->
</script>
<if condition="$totalcols++"></if>
<form action="private.php" method="post" name="vbform">

In template memberlist also replace

</form>
with

<input type="button" class="button" value="$vbphrase[send_private_message_to_selected_users]" onclick="pm(this.form);" title="title" style="float:right"/>
</form>

In template memberlist also replace

</tr>
$memberlistbits
with

<td class="thead" align="right"><input type="checkbox" name="allbox" title="$vbphrase[check_uncheck_all]" onclick="js_check_all(this.form);" />$vbphrase[check_uncheck_all]</td>
</tr>
$memberlistbits



How does this template modification work?
This template edit puts a checkbox right to each user. If you click on "Send PMs", the small javascript generates a custom url "private.php?do=newpm&userid[]=1&userid[]=2&userid[]=3" and refreshes actual window with this url. Javascript code is mostly from Quick Links > Open Buddy List.

FAQ
I installed this product. But I don't want to show this feature to everyone. Is there a way to restrict few usergroups, such as admin, supermoderators and moderators?
You can for example only show this mod for moderators, supermoderators and administrators (usergroups 5,7,6). Note that you have to put this condition for any template edit you want to only show to these usergroups.

<if condition="in_array($bbuserinfo[usergroupid], array(5,6,7))">
here you do put template edits
</if>

princeedward
19 Aug 2008, 18:52
:erm: what is Mass PN :confused:

ThorstenA
19 Aug 2008, 18:58
It's like Mass Mail in admincp. You write one pm to multiple users.

steve1966
19 Aug 2008, 18:58
:erm: what is Mass PN :confused:

Private message i presume

blind-eddie
19 Aug 2008, 19:07
Finally, great job.
I tried to get this very same edit to work for me long ago.

I assume this picks up usergroup permissions?

ThorstenA
19 Aug 2008, 19:11
Finally, great job.
I tried to get this very same edit to work for me long ago.

I assume this picks up usergroup permissions?

All usergroup permissions are used from vbulletin.

This template edit just puts a checkbox right to each user. If you click on "Send PMs", the small javascript just generates a custom url "private.php?do=newpm&userid[]=1&userid[]=2&userid[]=3" and refreshes actual window with this url. Nothing special here, javascript code is mostly from Quick Links > Open Buddy List.

blind-eddie
19 Aug 2008, 19:13
Awesome, Thank you.

ThorstenA
19 Aug 2008, 19:15
I am also working on a "Select All" checkbox, help is appreciated :D

blind-eddie
19 Aug 2008, 19:26
I am also working on a "Select All" checkbox, help is appreciated :D

Incorporate this into it.

<td class="thead" align="right"><input type="checkbox" name="allbox" title="Check All" onclick="js_check_all(this.form);" />Check All</td>

ThorstenA
19 Aug 2008, 19:35
Incorporate this into it.

<td class="thead" align="right"><input type="checkbox" name="allbox" title="Check All" onclick="js_check_all(this.form);" />Check All</td>

Thank you very much! It works great. I have added this to my template modification how to.

alqloob alsahya
19 Aug 2008, 20:59
Excellent:erm::up: good jop

ThorstenA
19 Aug 2008, 21:44
If you install this mod, please click install. The more user install, the more effort I take into this mod :)

Gene Steinberg
20 Aug 2008, 17:52
If you install this mod, please click install. The more user install, the more effort I take into this mod :)
How about a way to do this within the Admin CP, so you can send a PM to an entire usergroup at once? Right now, that feature seems to be limited to just email. Thoughts?

Peace,
Gene Steinberg

ThorstenA
20 Aug 2008, 17:59
How about a way to do this within the Admin CP, so you can send a PM to an entire usergroup at once? Right now, that feature seems to be limited to just email. Thoughts?

You need a modification that displays only users within a usergroup on memberlist. Maybe there is also a modification about that on vb.org. Then you can just use this mod to pm them all :)

Gene Steinberg
20 Aug 2008, 18:14
You need a modification that displays only users within a usergroup on memberlist. Maybe there is also a modification about that on vb.org. Then you can just use this mod to pm them all :)
I'll check. But how about considering this as a full-blown product rather than a simple hack? I think it would be a lot easier to handle with a large membership.

Peace,
Gene

ThorstenA
20 Aug 2008, 18:56
I'll check. But how about considering this as a full-blown product rather than a simple hack? I think it would be a lot easier to handle with a large
I'll write a product of this template modification if lots of users install this mod and show interest in this.

Gene Steinberg
20 Aug 2008, 19:50
I'll write a product of this template modification if lots of users install this mod and show interest in this.
I'll install if you do this :)

Peace,
Gene Steinberg

m3rl1nuk
20 Aug 2008, 21:00
I like this but how about making it so it appears as an option for new pm like the old super pm did?

I would rather have the option in pm's than the member list if its possible as an additional option.

Hornstar
20 Aug 2008, 21:38
I think this should have extra permissions. eg. only x usergroup be allowed to see the check boxes.

blind-eddie
20 Aug 2008, 21:54
I think this should have extra permissions. eg. only x usergroup be allowed to see the check boxes.

It picks up all usergroup settings, You can sent how many members each usergroup can send at any 1 time.

MarkoP
21 Aug 2008, 06:33
Is this the only PM mod available?

I'd like to be able to have the option to send a mass PM to a whole usergroup 'without' also sending an email notification.

The reason is we imported thousands of users from another system and many of these are no longer really members. If I pm'ed the whole list and everyone got an email I'd probably get shut down for spam.

ThorstenA
21 Aug 2008, 07:02
I like this but how about making it so it appears as an option for new pm like the old super pm did?
I would rather have the option in pm's than the member list if its possible as an additional option.
I think this should have extra permissions. eg. only x usergroup be allowed to see the check boxes.
I'd like to be able to have the option to send a mass PM to a whole usergroup 'without' also sending an email notification.
New options are available once I write an auto-template product. I write this product if more members install this product.

Gene Steinberg
21 Aug 2008, 13:23
This is a cart before the horse argument. I'll install the product that performs the tasks I want, and yours doesn't -- yet. As MarkP says, I'd like to be able to send a mass PM to an entire usergroup, which is an option that should probably be added in -- what? -- Admin CP?

Peace,
Gene

ThorstenA
21 Aug 2008, 13:43
This is a cart before the horse argument. I'll install the product that performs the tasks I want, and yours doesn't -- yet. As MarkP says, I'd like to be able to send a mass PM to an entire usergroup, which is an option that should probably be added in -- what? -- Admin CP?

This modification will never be in admincp as it uses memberlist.php. I wanted to express that you can mass pm all users that are shown on memberlist. If there is a modification available, that only shows members of a specific usergroup within memberlist (I remember a mod like this), then you can mass pm a usergroup with this template modification.

Gene Steinberg
21 Aug 2008, 13:54
I understand your point. But going through a member list when you have a thousand members or more can take a little time. However, being able to globally send PM to an entire usergroup in Admin CP would be a whole lot faster, don't you think? Just a suggestion.

Peace,
Gene

ThorstenA
21 Aug 2008, 14:23
I understand your point. But going through a member list when you have a thousand members or more can take a little time. However, being able to globally send PM to an entire usergroup in Admin CP would be a whole lot faster, don't you think? Just a suggestion.
I would also like to have a admincp mass pm product. I think there was one online for vbulletin 3.5 or vbulletin 3.6. However it has two downside points

it's somewhat complicated and therefore an advanced programmer should write this modification
only administrators can access this modification

What I am looking forward to is, that my moderators write regularly pms to members they specify in advanced memberlist search. For example all users, that drive a bmw (profile field), have registered in the last five days and did not write any post.

While writing another modification about buddylist, I saw that a memberlist mass pm could be possible with a template modification, so here we are and if this template mod becomes more famous, I am putting more energy inside :D

samiro
02 Sep 2008, 07:47
nice one.
but i also wat to send Mass PM without sendin Email notification ...

yotsume
06 Sep 2008, 09:40
If you make this a product I will install this as well. PLEASE make this a product. I am not going to do all the edits and then install a product. So please make this ASAP! THANKS!

ThorstenA
06 Sep 2008, 09:45
If you make this a product I will install this as well. PLEASE make this a product. I am not going to do all the edits and then install a product. So please make this ASAP! THANKS!

Only 2 templates need to be edited. There are only 12 installs that far, so I consider a mass pm solution as not that important to most administrators.

yotsume
06 Sep 2008, 09:53
I am sorry but your math thinking is way off! Such a features is of critical importance. I need it to be for admins only so I hope you consider doing it.

ShMilO
26 Sep 2008, 18:16
I am sorry but your math thinking is way off! Such a features is of critical importance. I need it to be for admins only so I hope you consider doing it.

i agree i also need a mass pm option for admins

there was one for 3.6 but not for 3.7

i think that if someone will make a product for mass pm
many will install

Gene Steinberg
26 Sep 2008, 20:13
i agree i also need a mass pm option for admins

there was one for 3.6 but not for 3.7

i think that if someone will make a product for mass pm
many will install
Does the 3.6 version work with 3.7?

Peace,
Gene

ArnyVee
03 Oct 2008, 12:50
I would also LOVE to have this as a product. I'd rather not do the template edits if I don't have to. :D

Any update on this?

ThorstenA
03 Oct 2008, 12:57
I would also LOVE to have this as a product. I'd rather not do the template edits if I don't have to. :D

Any update on this?

with only 13 installs there seems very low interest in a product version.

chikkoo
06 Nov 2008, 04:22
with only 13 installs there seems very low interest in a product version.

I think people are not clicking Instal button, becos it's not a product and lazy to do template edit.

If you make it as a product, I am sure it will increase.

chikkoo
19 Nov 2008, 12:09
I installed this product. But I don't want to show this feature to everyone. Is there a way to restrict few usergroups, such as admin, supermoderators and moderators?

ThorstenA
19 Nov 2008, 12:24
I installed this product. But I don't want to show this feature to everyone. Is there a way to restrict few usergroups, such as admin, supermoderators and moderators?

You can for example only show this mod for moderators, supermoderators and administrators (usergroups 5,7,6):

<if condition="in_array($bbuserinfo[usergroupid], array(5,6,7))">
here you do put template edits
</if>


Note that you have to put this condition for any template edit you want to only show to these usergroups.

chikkoo
19 Nov 2008, 13:53
Thanks ThorstenA,

Works how I wanted it.

You can for example only show this mod for moderators, supermoderators and administrators (usergroups 5,7,6):

<if condition="in_array($bbuserinfo[usergroupid], array(5,6,7))">
here you do put template edits
</if>


Note that you have to put this condition for any template edit you want to only show to these usergroups.

eglyntine
26 Nov 2008, 10:22
Installed! Thanks for your time on this. :)

pigpog
10 Dec 2008, 23:17
Fantastic, thank you.

gdguide
13 Dec 2008, 21:46
Can you guys clarify where you are putting this:

<if condition="in_array($bbuserinfo[usergroupid], array(5,6,7))">
here you do put template edits
</if>

Are you putting that around every edit in the templates that are listed? Can you give an example of how this is integrated with the code? It's not working for me at all.

ThorstenA
14 Dec 2008, 08:57
Can you guys clarify where you are putting this:

<if condition="in_array($bbuserinfo[usergroupid], array(5,6,7))">
here you do put template edits
</if>

Are you putting that around every edit in the templates that are listed? Can you give an example of how this is integrated with the code? It's not working for me at all.

Yes, you have to put any template edit within this conditional. For example first template edit would be

<if condition="in_array($bbuserinfo[usergroupid], array(5,6,7))">
<td class="$bgclass"><input type="checkbox" name="deletebox[$userinfo[userid]]" value="$userinfo[userid]" /></td>
</tr>
</if>
instead of
<td class="$bgclass"><input type="checkbox" name="deletebox[$userinfo[userid]]" value="$userinfo[userid]" /></td>
</tr>

Idawg
14 Dec 2008, 17:30
I clicked install so it runs the install count up. Instead of userlist, I would like to see, on the pm page, a list of the usergroups and a checkbox so I dont have to send to individuals, but just to the usergroups. Make it to where only certain usergroups can do this as per the admincp

I have 12 boards to install something like this on, and would be willing to donate if you actually put it out as a product

x YNWA x
30 Dec 2008, 12:40
Hi
This is great. Can this be used on showgroups.php?

My site would be a lot easier if people were able to look at all the villa owners and tick the ones they want to PM from the list. THanks

ThorstenA
08 Jan 2009, 12:14
For vbulletin 3.8 please install & discuss this product here:

http://www.vbulletin.org/forum/showthread.php?t=201059

Thanks.

relaxiha
17 Feb 2009, 00:12
plz upgrade XML hack for 3.8

ThorstenA
17 Feb 2009, 05:59
plz upgrade XML hack for 3.8

3.8 comments please put to Mass Private Messages (version 3.8) (http://www.vbulletin.org/forum/showthread.php?t=201059) I ' ll do an xml hack once there's lot of interest. There are 7 installs only for 3.8

Manic Mechanic
10 Mar 2009, 18:04
I am someone who is newer to doing these modifications and do not understand your reasoning. There may be a number of people with this modification book marked and waiting for you to make it a simple xml add on. As a simple import you would have anyone that wanted this installing it. Why exclude anyone from adding this, if it can be made easier to install?

ThorstenA
11 Mar 2009, 02:48
I am someone who is newer to doing these modifications and do not understand your reasoning. There may be a number of people with this modification book marked and waiting for you to make it a simple xml add on. As a simple import you would have anyone that wanted this installing it. Why exclude anyone from adding this, if it can be made easier to install?

Re-Use: This code may be used in other modifications as long as the original author is credited.