Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Mass Private Messages Details »»
Mass Private Messages
Version: 1.00, by ThorstenA ThorstenA is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Category: Private Messages Enhancements - Version: 3.8.x Rating:
Released: 01-07-2009 Last Update: Never Installs: 17
Template Edits
Re-useable Code Translations  
No support by the author.

Notice: This mod uses Re-usable Code, so please feel free to port it to vbulletin 4 under your username. Thanks.

What does this modification do?
On memberlist select multiple users for Mass Private Messages them. This is done by only 2 template edits
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 the second instance this code appears:
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 View Post
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>

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 01-09-2009, 04:34 PM
ThorstenA's Avatar
ThorstenA ThorstenA is offline
 
Join Date: Nov 2004
Posts: 669
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry, this mod is unsupported.
Reply With Quote
  #13  
Old 01-09-2009, 04:38 PM
NFLfbJunkie NFLfbJunkie is offline
 
Join Date: Sep 2006
Posts: 327
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can you at least help with the second edit. I have the one you already helped with and I try and do the other two on my own. I'm afraid I won't be able to figure out the big edit.
Reply With Quote
  #14  
Old 01-09-2009, 04:42 PM
ThorstenA's Avatar
ThorstenA ThorstenA is offline
 
Join Date: Nov 2004
Posts: 669
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry, this mod is unsupported. If you want to code yourself and have questions about coding, please go to appropriate forums on vbulletin.org. Thank you.
Reply With Quote
  #15  
Old 03-11-2009, 01:48 AM
ThorstenA's Avatar
ThorstenA ThorstenA is offline
 
Join Date: Nov 2004
Posts: 669
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Re-Use: This code may be used in other modifications as long as the original author is credited.
Reply With Quote
  #16  
Old 09-27-2009, 12:36 PM
Matt Lathrop Matt Lathrop is offline
 
Join Date: Dec 2008
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there a way to select all?
Reply With Quote
  #17  
Old 09-27-2009, 06:04 PM
ThorstenA's Avatar
ThorstenA ThorstenA is offline
 
Join Date: Nov 2004
Posts: 669
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Matt Lathrop View Post
Is there a way to select all?
Yes. There is a "Check / Uncheck All" box.
Reply With Quote
  #18  
Old 11-17-2009, 10:39 PM
ThorstenA's Avatar
ThorstenA ThorstenA is offline
 
Join Date: Nov 2004
Posts: 669
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Notice: This mod uses Re-usable Code, so please feel free to port it to vbulletin 4 under your username. Thanks.
Reply With Quote
  #19  
Old 07-30-2010, 08:23 PM
nando99 nando99 is offline
 
Join Date: Dec 2005
Location: South Florida
Posts: 218
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

just installed this and reinstalled it like 3 times... i really doubt i'm doing something wrong but you never know ... it does't work for me... every time i click on "send a private message to selected users" it says "no users selected"...

v3.8.2 here...

any help is appreciated...
Reply With Quote
  #20  
Old 08-01-2010, 03:05 PM
togebi33's Avatar
togebi33 togebi33 is offline
 
Join Date: Dec 2008
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Where is demo ?
Reply With Quote
  #21  
Old 08-01-2010, 03:36 PM
ThorstenA's Avatar
ThorstenA ThorstenA is offline
 
Join Date: Nov 2004
Posts: 669
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No demo available, sorry. I upgraded my board to vb 4 and did not port this product to vb 4.

Notice: This mod uses Re-usable Code, so please feel free to port it to vbulletin 4 under your username. Thanks.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:22 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04947 seconds
  • Memory Usage 2,331KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (9)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete