PM All users
Posted by Brian Moon
All files from this thread
File Name | File Size | Posted by | Date | ||
---|---|---|---|---|---|
bulk_pm.php | 414 bytes | open | download | Brian Moon | 08/30/2006 | Read message |
bulk_pm.php | 869 bytes | open | download | Maurice Makaay | 07/10/2007 | Read message |
bulk_pm.php | 913 bytes | open | download | Maurice Makaay | 07/11/2007 | Read message |
PM All users August 30, 2006 11:48PM |
Admin Registered: 23 years ago Posts: 4,495 |
This is a short little module to let an admin (only an admin, not a moderator) send a PM to all users. Simply type the word ALL in the To: field. Of course, if you enable the drop down of users, it does not work.
If you use this module, you may want to consider a template hack I have used on other sites. It basically keeps the PM read page from listing thousands of usernames. That can be a lot of HTML.
Edited 1 time(s). Last edit at 11/15/2006 06:01PM by brianlmoon.
If you use this module, you may want to consider a template hack I have used on other sites. It basically keeps the PM read page from listing thousands of usernames. That can be a lot of HTML.
{LANG->To}: <?php if(count($PHORUM["DATA"]["MESSAGE"]["recipients"])>10){ ?> {USERINFO->username} <?php $count = number_format(count($PHORUM["DATA"]["MESSAGE"]["recipients"])-1); echo "and $count other users"; ?> <?php } else { ?> {ASSIGN ISFIRST true} {LOOP MESSAGE->recipients} <div style="display:inline; white-space: nowrap"> {IF NOT ISFIRST}, {/IF} <a href="{MESSAGE->recipients->to_profile_url}">{MESSAGE->recipients->username}</a> {IF USERINFO->user_id MESSAGE->from_user_id} {IF NOT MESSAGE->recipients->read_flag}({LANG->PMUnread}){/IF} {/IF} {ASSIGN ISFIRST false} </div> {/LOOP MESSAGE->recipients} <?php } ?>
Brian - Cowboy Ninja Coder - Personal Blog - Twitter
Edited 1 time(s). Last edit at 11/15/2006 06:01PM by brianlmoon.
Re: PM All users September 01, 2006 10:44AM |
Registered: 18 years ago Posts: 117 |
Re: PM All users September 01, 2006 10:46AM |
Admin Registered: 19 years ago Posts: 8,532 |
No, he means "if you enable". Because if you do that, you won't have a text entry where you can type the word "ALL". You only can select users from a predefined list in that way.
Did you use "ALL" in capitals?
Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Did you use "ALL" in capitals?
Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: PM All users September 01, 2006 10:55AM |
Registered: 18 years ago Posts: 117 |
Re: PM All users September 01, 2006 11:21AM |
Admin Registered: 19 years ago Posts: 8,532 |
That would be easy to check out. I do think they might collide. Change "ALL" in Brian's mod to "ALLUSERS" and use that string for posting.
Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: PM All users September 12, 2006 02:58PM |
Admin Registered: 23 years ago Posts: 4,495 |
I hijack the request pretty early I thought. I would not think having a user named All would be a problem.
Brian - Cowboy Ninja Coder - Personal Blog - Twitter
Re: PM All users July 10, 2007 04:37PM |
Registered: 16 years ago Posts: 27 |
Re: PM All users July 10, 2007 04:54PM |
Admin Registered: 19 years ago Posts: 8,532 |
1) Upload it to mods/bulk_pm.php in your Phorum install directory.
2) Enable the module.
3) Enjoy!
Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
2) Enable the module.
3) Enjoy!
Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: PM All users July 10, 2007 05:08PM |
Registered: 16 years ago Posts: 27 |
Thanks :-)
Having enabled by default the drop down list of users for my little community (since we are not thousands), I cannot access the text entry field where I can input the "ALL" command.
I can change that option in the admin. but will that affect the global settings of the forum and affect my users?
Constantin.
Edited 2 time(s). Last edit at 07/10/2007 05:09PM by Constantin.
Having enabled by default the drop down list of users for my little community (since we are not thousands), I cannot access the text entry field where I can input the "ALL" command.
I can change that option in the admin. but will that affect the global settings of the forum and affect my users?
Constantin.
Edited 2 time(s). Last edit at 07/10/2007 05:09PM by Constantin.
Re: PM All users July 10, 2007 05:27PM |
Admin Registered: 19 years ago Posts: 8,532 |
I see. Please try the attached modified version of the module (fully untested code, so I'm not sure if it works). After putting it in de mods directory, go to the modules screen and disable the module. After that, re-enable it to have the new code loaded. If things work like I meant to, then you have an extra option "PM to all users" in the drop down list.
Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Sorry, only registered users may post in this forum.