vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=229)
-   -   Private Messages Enhancements - Mass Private Messages on Memberlist (https://vborg.vbsupport.ru/showthread.php?t=188560)

ThorstenA 08-18-2008 10:00 PM

Mass Private Messages on Memberlist
 
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
Code:

</tr>
with
Code:

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

In template memberlist replace
Code:

<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
Code:

        <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
Code:

</form>
with
Code:

<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
Code:

</tr>
$memberlistbits

with
Code:

<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
Quote:

Originally Posted by chikkoo (Post 1668587)
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.
Code:

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


princeedward 08-19-2008 05:52 PM

:erm: what is Mass PN :confused:

ThorstenA 08-19-2008 05:58 PM

It's like Mass Mail in admincp. You write one pm to multiple users.

steve1966 08-19-2008 05:58 PM

Quote:

Originally Posted by princeedward (Post 1602473)
:erm: what is Mass PN :confused:

Private message i presume

blind-eddie 08-19-2008 06:07 PM

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 08-19-2008 06:11 PM

Quote:

Originally Posted by blind-eddie (Post 1602486)
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 08-19-2008 06:13 PM

Awesome, Thank you.

ThorstenA 08-19-2008 06:15 PM

I am also working on a "Select All" checkbox, help is appreciated :D

blind-eddie 08-19-2008 06:26 PM

Quote:

Originally Posted by ThorstenA (Post 1602500)
I am also working on a "Select All" checkbox, help is appreciated :D

Incorporate this into it.

Code:

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

ThorstenA 08-19-2008 06:35 PM

Quote:

Originally Posted by blind-eddie (Post 1602516)
Incorporate this into it.

Code:

<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 08-19-2008 07:59 PM

Excellent:erm::up: good jop

ThorstenA 08-19-2008 08:44 PM

If you install this mod, please click install. The more user install, the more effort I take into this mod :)

Gene Steinberg 08-20-2008 04:52 PM

Quote:

Originally Posted by ThorstenA (Post 1602591)
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 08-20-2008 04:59 PM

Quote:

Originally Posted by genesteinberg (Post 1603167)
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 08-20-2008 05:14 PM

Quote:

Originally Posted by ThorstenA (Post 1603170)
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 08-20-2008 05:56 PM

Quote:

Originally Posted by genesteinberg (Post 1603177)
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 08-20-2008 06:50 PM

Quote:

Originally Posted by ThorstenA (Post 1603194)
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 08-20-2008 08:00 PM

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 08-20-2008 08:38 PM

I think this should have extra permissions. eg. only x usergroup be allowed to see the check boxes.

blind-eddie 08-20-2008 08:54 PM

Quote:

Originally Posted by hornstar1337 (Post 1603268)
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 08-21-2008 05:33 AM

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 08-21-2008 06:02 AM

Quote:

Originally Posted by m3rl1nuk (Post 1603229)
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.

Quote:

Originally Posted by hornstar1337 (Post 1603268)
I think this should have extra permissions. eg. only x usergroup be allowed to see the check boxes.

Quote:

Originally Posted by MarkoP (Post 1603553)
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 08-21-2008 12:23 PM

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 08-21-2008 12:43 PM

Quote:

Originally Posted by genesteinberg (Post 1603748)
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 08-21-2008 12:54 PM

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 08-21-2008 01:23 PM

Quote:

Originally Posted by genesteinberg (Post 1603766)
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 09-02-2008 06:47 AM

nice one.
but i also wat to send Mass PM without sendin Email notification ...

yotsume 09-06-2008 08:40 AM

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 09-06-2008 08:45 AM

Quote:

Originally Posted by yotsume (Post 1615714)
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 09-06-2008 08:53 AM

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 09-26-2008 05:16 PM

Quote:

Originally Posted by yotsume (Post 1615723)
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 09-26-2008 07:13 PM

Quote:

Originally Posted by ShMilO (Post 1631086)
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 10-03-2008 11:50 AM

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 10-03-2008 11:57 AM

Quote:

Originally Posted by ArnyVee (Post 1636417)
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 11-06-2008 03:22 AM

Quote:

Originally Posted by ThorstenA (Post 1636419)
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 11-19-2008 11:09 AM

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 11-19-2008 11:24 AM

Quote:

Originally Posted by chikkoo (Post 1668587)
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):
Code:

<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 11-19-2008 12:53 PM

Thanks ThorstenA,

Works how I wanted it.

Quote:

Originally Posted by ThorstenA (Post 1668593)
You can for example only show this mod for moderators, supermoderators and administrators (usergroups 5,7,6):
Code:

<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 11-26-2008 09:22 AM

Installed! Thanks for your time on this. :)

pigpog 12-10-2008 10:17 PM

Fantastic, thank you.


All times are GMT. The time now is 04:57 PM.

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.01579 seconds
  • Memory Usage 1,848KB
  • 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
  • (13)bbcode_code_printable
  • (23)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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