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
  #22  
Old 10-08-2010, 08:01 PM
Jorrit787 Jorrit787 is offline
 
Join Date: Nov 2005
Location: The Netherlands
Posts: 63
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

These instructions aren't very precise. There are multiple instances of </form> in the memberlist template. If you don't specify which one to make the edit to, people will mess up their Member List page.
Reply With Quote
  #23  
Old 10-08-2010, 09:42 PM
ThorstenA's Avatar
ThorstenA ThorstenA is offline
 
Join Date: Nov 2004
Posts: 669
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am unfimiliar with this modification for now. I am using vb 4.0.x and do not use this any more.

You may try to take the first </form> on the template.
Reply With Quote
  #24  
Old 10-08-2010, 10:19 PM
Jorrit787 Jorrit787 is offline
 
Join Date: Nov 2005
Location: The Netherlands
Posts: 63
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ThorstenA View Post
I am unfimiliar with this modification for now. I am using vb 4.0.x and do not use this any more.

You may try to take the first </form> on the template.
Nice try but it's actually the second instance
Reply With Quote
  #25  
Old 10-09-2010, 09:43 AM
ThorstenA's Avatar
ThorstenA ThorstenA is offline
 
Join Date: Nov 2004
Posts: 669
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for your clarification! I have updated my description.
Reply With Quote
  #26  
Old 11-26-2010, 12:22 PM
mgurain's Avatar
mgurain mgurain is offline
 
Join Date: Apr 2005
Location: KSA - Qatif - Al-Jarodiah
Posts: 345
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

We are waiting for somebody to make it available for vb 4.x ?

Thanks,,
Reply With Quote
  #27  
Old 11-30-2010, 01:20 PM
maryx maryx is offline
 
Join Date: Jan 2006
Posts: 116
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

in 4.x this does not appear in the template:

</tr>
$memberlistbits

so I can't do the last template edit.

Anyone have any ideas about how to change this for 4.x?

I did the other template edits OK.

Anyone have any success with this for 4.x?
Reply With Quote
  #28  
Old 12-16-2010, 07:29 PM
oldfan's Avatar
oldfan oldfan is offline
 
Join Date: Jul 2004
Posts: 813
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Any luck porting this to 4.x yet?
thanks
Reply With Quote
  #29  
Old 03-03-2013, 01:00 AM
Tyran1 Tyran1 is offline
 
Join Date: Jan 2007
Location: Deutsches Reich
Posts: 297
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Not works with 3.8.7
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:47 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.04644 seconds
  • Memory Usage 2,308KB
  • 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
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (8)postbit
  • (9)postbit_onlinestatus
  • (9)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_postinfo_query
  • fetch_postinfo
  • 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