Closed (fixed)
Project:
SMS Bulk
Version:
6.x-1.1
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
31 Mar 2010 at 11:06 UTC
Updated:
1 Apr 2010 at 12:58 UTC
Can I predefine a message template for a given smsbulk node/page? I need to have four message templates, and want to send using SMS Bulk in preference to the current method (an organic group for each message class, and OG notifications to send the message), to make the message recipient selection easier? If it's not possible to do it for multiple templates, is there a way to default the "SMS Text" field?
Thanks
Andy
Comments
Comment #1
gunzip commentedthere's no such functionality in smsbulk. there is a workaround: with the token module enabled you can use any field in the views row/record as the text for the sms so you can put your message text there. to have a default message you may hack the module a little (about at line 112):
or use form_alter in your custom module if you don't want this hack.
Comment #2
andybill commentedThanks! - hack works just fine, including with tokens in the default text. Might try to persuade the customer that their ad-hoc messages, which are nearly all the same template, use this, and the group messages go out as at present. Otherwise I've got to learn more about views in a hurry :)
Andy
Comment #3
gunzip commentedthank you for coming back :)
Comment #4
andybill commentedhi ,
sorry to request re-open, hope it's a quick thing:well, two things:
1) I tried to use the same hack to set the default field for "Mobile Number" but it didn't work. Can live with that.
more importantly,
2) is there a quick way to add a line that logs which drupal user sends which messages to whom? The gateway module I'm using produces syslog entries, so I guess I could bring those into a database and add a report, but it would be nicer to have an SMSBulk log to pull from .. would that just be a watchdog call around 211, along the lines of "if ($ret = TRUE) etc, or would I be better advised to look at the hook_smsbulk_sms_sent and see if I can work it from there. Happy obviously to share outcomes but just want some advice on where to look :) [as you must have guessed me & PHP = a new thing]
Oh, and not a problem but when I had Drupal Tweaks enabled I was getting a lot of call-user-func-array errors being logged from within smsbulk; disabled it at 12:51 today, and nothing since. Just for info in case anyone else sees same. Drupal Tweaks was also causing cron to time out probably nine times out of ten; that though was the multisite api.
Comment #5
gunzip commentedi suggest you to modify and then activate smsbulk_example.module (which has some example watchdog calls inside)
i don't know about drupal tweaks, i'll take a look.
Comment #6
andybill commentedthanks.
Andy