How to set number for maximum recipients?

igorik - May 16, 2009 - 05:39
Project:Privatemsg
Version:6.x-2.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

Hi

I would like to raise number of allowed recipients in input field "To:".

I found in privatemsg.module on line 631 this info:
"// Do not hardcode #maxlength, make it configurable by number of recipients, not their name length."

ok, but where and how I can set (raise) number of recipients?
I need to raise current allowed number to e.g. 80, (it is useful for people in groups)

can you help me please with this?
thanks
Igorik
http://www.somvprahe.sk

#1

nbz - May 16, 2009 - 09:51
Version:6.x-2.x-dev» 6.x-1.x-dev

Not sure how to do that - I did not think there was an artificial limit placed on the number of recipients yet?

For now you can try #398916: Remove hook_form_alter in favor of a more flexible privatemsg_new form which will allow for programmatic insertion of user names as that may be easier than writing out a list of 80 odd names, but we also need to figure out some sane manner to send messages to roles/groups without resorting to sending the messages individually - imagine a site where a person sends a message to the authenticated role...

#2

igorik - May 16, 2009 - 12:32

Hi nbz, I applied that patch, read all discussion for it, I clear the cache before applying, but I didn't see progress for adding more names (manually, into input), the max length or number of allowed recioents was the same as before.

so I added '#maxlength' => 5000, for input "To" in privatemsg.module and it works for me. I know that it is not the good idea to do changes in contributed module, (watching new privatemsg releases and to do this change again), but I tried to play with that patch a few times but it doesn't help to me) so this is quick and working fix for me.

thanks again
Igorik
http://www.somvprahe.sk

#3

nbz - May 16, 2009 - 17:18

its not directly linked, but it allows you to go to "messages/new/1,2,3,4,5,6,7,...,99" to have all those prefilled as recipients - just a possible convenience.

As for setting the maxlength without editing the module, hook_form alter would be the right way as Berdir mentioned in the other issue.

#4

Berdir - October 30, 2009 - 08:37
Version:6.x-1.x-dev» 6.x-2.x-dev
Category:support request» feature request

Setting the correct category, this is a new feature, not a support request.

 
 

Drupal is a registered trademark of Dries Buytaert.