I was wondering if any knew of a way of pre-filling the recipient box with more than one user via a web link.
On the site I've built www.campaigncentral.org.uk users can sign up and join each others network using the flag friend module. What I'd like to do is enable users to click a link and post a PM to their own network of friends.
Current URL
http://www.campaigncentral.org.uk/messages/new/80
Wished for URL
http://www.campaigncentral.org.uk/messages/new/80,81,1,34,3,9
Appreciate any help, suggestions or patches for this.
Matt
Comments
Comment #1
berdirHave you tried out your suggestion? :)
It should already work exactly like you suggested, you can specify multiple user ids with a ,.
If it does not work, then it's a bug but I've just tested it on a website with 1.0 and it works correctly.
Comment #2
mattybThanks for the quick response.
Yes I have, the To box is blank, when I try it.
The client asked for a lot of mods to PM, which made upgrading next to impossible. Which part of the module handles url to form population. I'll download the latest copy of the script and transfer bits of it across.
version = "6.x-1.x-dev"
core = "6.x"
project = "privatemsg"
datestamp = "1241268374"
Comment #3
berdir02.05.2009
Oh yeah, there were some chances since then :)
The part that does this is in http://blog.worldempire.ch/de/api/function/privatemsg_new/1, especially that part:
That function probably doesn't exist in your version so you need to copy that one too.
Also you need to change more then just the above lines in privatemsg_new(), good luck with that :)
PS: Atleast the current version of privatemsg is designed to be as flexible as possible and offer many hooks that allow to customize the module without changing the source code. If you need to change something, you're welcome to ask here or look through the apidocs (see link above) before hacking the code.
Also, Patches which add functionally that is also interesting for other users are always welcome :)
Comment #4
mattybIt's my own stupid fault for altering the code.
Your a Gent.
Thanks very much
Matt