I'm writing a script that only Mods & Admins will see and one of the options is for the viewing Mod or Admin to send a PM to all the other Mods & Admins to notify them of an issue. They would click on a PM icon which would open a new tab using the follow link:
http://www.domain_name.com/index.php?action=pm;sa=send;u=1234,8765,10192
This works fine sending a PM to the three members in the "u=" array. But I would also like to auto fill the Subject line of the PM. I've looked around but cannot find the parameter for "subject" to include in the link. I tried a few like:
http://www.domain_name.com/index.php?action=pm;sa=send;u=1234,8765,10192;s=This is a TEST
But that didn't work. Any thoughts?
Thanks
SMF isn't currently set up to accept a GET variable to input in the subject line. However, that can be changed with a quick hack to the template. It can be done in the source file, but it's a bit more tricky.
File: /Themes/default/PersonalMessage.template.php
<input type="text" name="subject" value="', $context['subject'], '" tabindex="', $context['tabindex']++, '" size="60" maxlength="60" />
<input type="text" name="subject" value="', !empty($_GET['subject']) ? $_GET['subject'] : $context['subject'], '" tabindex="', $context['tabindex']++, '" size="60" maxlength="60" />
Now you can use a GET variable 'subject' to set the subject.
http://www.example.com/forum/index.php?action=pm;sa=send;u=1234,2345,3456;subject=This%20is%20a%20Test!
I figured that was the case. Thanks, I'll give that a try.
That seems to be working perfectly, Thanks.