Firefox PHP

Module: Bulk PM

Posted by Sean Phelan 
All files from this thread

File Name File Size   Posted by Date  
bulk_pm.php 1.7 KB open | download Sean Phelan 11/12/2010 Read message
Module: Bulk PM
April 29, 2009 11:40PM
Folks,

I needed group PM functionality for 5.2, so I took Brian & Maurice's 5.1 version of bulk PM, upgraded it to 5.2, and added the ability to send PM's to a group.

Here's a quick feature list:
- Only available to admins - normal users can't take advantage of these bulk lists
- You can send to "ALL", or to a specific group
- You can append multiple groups together - select a group, click the "Add Recipient" button (which expands the group list to actual users), then select another

Did I mention how much I love Phorum? I don't know any other tool where I could have solved my problem so easily.

Anyhow, give it a whirl, and let's see if it works for you.

Thanks,
Sp

------------------------
Sean Phelan
Sites By Sequoia - Web Marketing ... The Experts at Building Your Success Online



Edited 1 time(s). Last edit at 04/29/2009 11:40PM by sphelan.
Attachments:
open | download - bulk_pm.php (1.7 KB)
Re: Module: Bulk PM
April 30, 2009 01:18AM
Thanks for the 5.2 port and the new features!


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module: Bulk PM
April 30, 2009 01:39AM
Glad to help ... this is my first published module.

Each time I mess around with Phorum's code, I get a bit more confident. I love how simple the plugins can be.

------------------------
Sean Phelan
Sites By Sequoia - Web Marketing ... The Experts at Building Your Success Online
Re: Module: Bulk PM
December 03, 2011 05:33PM
Quote
Sean Phelan
Only available to admins

I need the possibility for all users, but just restricted to their own group(s).
Is this possible?

<hr />
usually manuals are written by experts,
so.....that's the reason why i do not understand the manuals)
Re: Module: Bulk PM
December 03, 2011 06:00PM
Terradon,

It should be possible to do what you want, if you make a few changes to the plugin.

First, you'll want to remove:
- the "ALL" code from line 15-22 and line 48-52
- the admin checks on lines 25 and 47
- Put in a line of code right after line 56 where you check if the current user is a member of the group before adding it as an option.

You'll see the phorum_db_get_group_members() function already in use, you might use that, unless there's another function that checks whether a given member belongs to a given group.

------------------------
Sean Phelan
Sites By Sequoia - Web Marketing ... The Experts at Building Your Success Online
Re: Module: Bulk PM
December 04, 2011 05:13PM
Thank you,
i will try it out in the coming week.
i will let you knoe my results then

<hr />
usually manuals are written by experts,
so.....that's the reason why i do not understand the manuals)
Re: Module: Bulk PM
December 11, 2012 09:23PM
I'm wondering along the same lines if I can change it to check that your are in a bulk_pm group? So I can make it so certain users can bulk_pm without making them admins. I imagine it would just be a change to the "if(phorum_page=="pm" && $PHORUM["user"]["admin"]" statement, but I'm a little confused as to how Phorum checks groups in an if statement.
Re: Module: Bulk PM
December 11, 2012 10:13PM
Answered my own question! Did a little digging in the Phorum API Library. (a very extensively documented place you have here!)

If you change every occurrence of $PHORUM["user"]["admin"] to (phorum_api_user_check_group_access( 1, 1, 0)) it will now check if the currently logged on user is in group.id 1. The second integer parameter is the group.id. I'm not sure if there is a version of this that uses group text names or not. You'll have to dive into the MySQL browser and see what the group.id is that you want to grant Bulk_PM access to.
Re: Module: Bulk PM
September 29, 2014 08:22PM
One problem: sending to ALL means the recepient sees all usernames in the head of message, in our case 2000+.......

I will try to detect amount of recipients and if too many dont show them,but instead replace it with some text like: * a lot of others, to much to show *

<hr />
usually manuals are written by experts,
so.....that's the reason why i do not understand the manuals)
Re: Module: Bulk PM
September 29, 2014 08:36PM
Language: PHP
// pm.php line 1010   // We do not want to show a recipient list if there are // a lot of recipients. $message["show_recipient_list"] = ($message["recipient_count"]<10);

It seems the developers already have tought about too many recipients :)
but it does not work in our case, because of showing 2000+ recipients?? (We use the bulk pm module)

Anyone any idea?

<hr />
usually manuals are written by experts,
so.....that's the reason why i do not understand the manuals)
Sorry, only registered users may post in this forum.

Click here to login