Main
Index
Search
Posts
Who's
Online
Log
In

Home: Products: CMS Builder: Plugins & Add-ons:
outgoing SMS

 

 


Toledoh
Enthusiast

Jan 22, 2012, 5:44 PM

Post #1 of 19 (3087 views)
Shortcut
outgoing SMS Can't Post

Hi Guys,

It's been ages since I set this up, and it hasn't been used. However trying to use it now and an error occurs as attached... can you suggest where I should start looking?

Send Errors : No 'to' value specified in message!
Cheers,

Tim Forrest
Toledoh Enterprises
www.toledoh.com.au

(This post was edited by Toledoh on Jan 22, 2012, 5:49 PM)
Attachments: SMS_error.pdf (133 KB)


Jason
Staff / Moderator


Jan 23, 2012, 9:44 AM

Post #2 of 19 (3054 views)
Shortcut
Re: [Toledoh] outgoing SMS [In reply to] Can't Post

Hi Tim,

So this happens when you try to send a test message? Are you able to send a live message?

The first thing I noticed is that the "To" field was missing, replaced by just text. Was this a customization of the plugin or a customization by another plugin?

The To field requires number only values. Since nothing was being submitted by your form, this would explain the error.

You could try sending a live message like this:


Code
list($errors, $response) = outgoingSMS_sendMessage($from, $to, $text);


Make sure the $to is numbers only (no hyphens).

Hope this helps
---------------------------------------------------
Jason Sauchuk - Programmer 
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/ 


Toledoh
Enthusiast

Jan 23, 2012, 1:03 PM

Post #3 of 19 (3043 views)
Shortcut
Re: [Jason] outgoing SMS [In reply to] Can't Post

Hi Jason,

This was purchased prior to the release as a plugin, so I'm not sure whther it's customised or not...

Where do I place that code?
Cheers,

Tim Forrest
Toledoh Enterprises
www.toledoh.com.au


Dave
Staff / Moderator


Jan 23, 2012, 8:20 PM

Post #4 of 19 (3024 views)
Shortcut
Re: [Toledoh] outgoing SMS [In reply to] Can't Post

Tim,

Maybe as a first step let's get you on the official version. Can you try and download it and/or send me an email so I can add it to your account? Then we can figure out if there are any differences.

Let me know if that works. Thanks!

Dave Edis - Senior Developer
interactivetools.com
 


Toledoh
Enthusiast

Jan 25, 2012, 3:11 PM

Post #5 of 19 (2987 views)
Shortcut
Re: [Dave] outgoing SMS [In reply to] Can't Post

Hey Dave,

The official version sends a test message just fine. But I think I've identified the custom part.

Previously I could search my users table, select a bunch of users and then send via the Advanced Commands drop down. Is this not part of the standard plugin?
Cheers,

Tim Forrest
Toledoh Enterprises
www.toledoh.com.au


Dave
Staff / Moderator


Jan 26, 2012, 11:04 AM

Post #6 of 19 (2899 views)
Shortcut
Re: [Toledoh] outgoing SMS [In reply to] Can't Post

No, I think that's a custom bit. So everything works except that feature? Let me know how we can help.

Dave Edis - Senior Developer
interactivetools.com
 


Toledoh
Enthusiast

Jan 26, 2012, 4:27 PM

Post #7 of 19 (2887 views)
Shortcut
Re: [Dave] outgoing SMS [In reply to] Can't Post

Hi Dave,

I'll send the custom file through and maybe you can tell me if there's an obvious problem?
Cheers,

Tim Forrest
Toledoh Enterprises
www.toledoh.com.au


Toledoh
Enthusiast

Jan 29, 2012, 5:18 PM

Post #8 of 19 (2708 views)
Shortcut
Re: [Toledoh] outgoing SMS [In reply to] Can't Post

Hi Guys,

That's working now - thanks for your help!

It seems however that an "Editor" gets the send SMS option in the advanced commands, is able to insert the from and message fields and "send" but is then redirected to the admin.php? page without getting the send report, or indeed sending the SMS.

Where in the code do I set usage rights? I would like all "editors" to have the ability to send SMS, not just administrators... OR be able to give editors the rights to that section.
Cheers,

Tim Forrest
Toledoh Enterprises
www.toledoh.com.au


Jason
Staff / Moderator


Jan 30, 2012, 10:28 AM

Post #9 of 19 (2674 views)
Shortcut
Re: [Toledoh] outgoing SMS [In reply to] Can't Post

Hi Tim,

You can change it so editors have access through the advanced commands drop down by uncommenting a line in the _outgoingSMS_addAdvancedOption function


Code
function _outgoingSMS_addAdvancedOption($labelsToValues) { 
global $schema;
if (@$schema['phone']) {

$allowedAccess = array_key_exists('hasEditorAccess', $GLOBALS);
#$allowedAccess = $GLOBALS['CURRENT_USER']['isAdmin'];

if ($allowedAccess) {
$labelsToValues['Send SMS (Search Results)'] = 'smsSearch';
}
}
return $labelsToValues;
}


hope this helps
---------------------------------------------------
Jason Sauchuk - Programmer 
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/ 


Toledoh
Enthusiast

Jan 30, 2012, 2:01 PM

Post #10 of 19 (2669 views)
Shortcut
Re: [Jason] outgoing SMS [In reply to] Can't Post

Thanks Jason,

My current code is actually a bit different... it shows;


Code
addFilter('list_advancedCommands',      '_outgoingSMS_addAdvancedOption', null, 1); 
function _outgoingSMS_addAdvancedOption($labelsToValues) {
global $tableName;
if ($tableName == 'accounts') {
$labelsToValues['Send SMS (Search Results)'] = 'smsSearch';
}
return $labelsToValues;
}
addAction('section_unknownAction', '_outgoingSMS_displayForm', null, 2);
function _outgoingSMS_displayForm($tableName, $action) {
global $schema, $CURRENT_USER;
if ($action != 'smsSearch') { return; }

// error checking
//if (!@$CURRENT_USER) { die("CURRENT_USER not defined!"); }
//if (!array_key_exists('hasEditorAccess', $GLOBALS)) { die("hasEditorAccess not defined!"); }

$where = '1';
if (@$_REQUEST['to']) {
$where = "num IN (" . implode(',', array_map('intval', explode(',', $_REQUEST['to']))) . ")";
}

Cheers,

Tim Forrest
Toledoh Enterprises
www.toledoh.com.au


Jason
Staff / Moderator


Jan 31, 2012, 9:48 AM

Post #11 of 19 (2647 views)
Shortcut
Re: [Toledoh] outgoing SMS [In reply to] Can't Post

Hi Tim,

First, make a local backup of your current version of the plugin. Then try replacing your version of _outgoingSMS_addAdvancedOption with the one posted above.

Let me know if you run into any problems.
---------------------------------------------------
Jason Sauchuk - Programmer 
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/ 


Toledoh
Enthusiast

Feb 6, 2012, 11:32 PM

Post #12 of 19 (2525 views)
Shortcut
Re: [Jason] outgoing SMS [In reply to] Can't Post

Sorry Jason - if I make that change, then the SMS function doesn't appear in the advanced commands at all...
Cheers,

Tim Forrest
Toledoh Enterprises
www.toledoh.com.au


Jason
Staff / Moderator


Feb 7, 2012, 11:08 PM

Post #13 of 19 (2448 views)
Shortcut
Re: [Toledoh] outgoing SMS [In reply to] Can't Post

Hi Tim,

Please send in a 2nd Level Support Request. In the request, please let us know which section you are working with and reference this thread.

Thanks,
---------------------------------------------------
Jason Sauchuk - Programmer 
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/ 


Toledoh
Enthusiast

Feb 12, 2012, 10:13 PM

Post #14 of 19 (2211 views)
Shortcut
Re: [Jason] outgoing SMS [In reply to] Can't Post

Hi Jason,

I've sent through the 2nd level request, and have been playing more since. I've got the advvanced commands working now, and everything seems to be fine.

However, when I send to multiple, it returns the error: Message 'to' can only contain numbers (was '61411422274,61411422274')!

Any thoughts?
Cheers,

Tim Forrest
Toledoh Enterprises
www.toledoh.com.au


Jason
Staff / Moderator


Feb 13, 2012, 9:20 AM

Post #15 of 19 (2163 views)
Shortcut
Re: [Toledoh] outgoing SMS [In reply to] Can't Post

Hi Tim,

Currently, the SMS plugin only allows for one number at a time. The comma in your string is what was causing the error.

Hope this helps
---------------------------------------------------
Jason Sauchuk - Programmer 
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/ 


Toledoh
Enthusiast

Feb 13, 2012, 1:31 PM

Post #16 of 19 (2143 views)
Shortcut
Re: [Jason] outgoing SMS [In reply to] Can't Post

Hey Jason. The bulk emails is the intent of the customization, and the reason for the send from search results.
Cheers,

Tim Forrest
Toledoh Enterprises
www.toledoh.com.au


Jason
Staff / Moderator


Feb 14, 2012, 11:43 PM

Post #17 of 19 (2043 views)
Shortcut
Re: [Toledoh] outgoing SMS [In reply to] Can't Post

Hi Tim,

Was this customization done by us? From what I am seeing, it seems that you would not be able to send an SMS message to multiple people by comma separating their numbers. The simpliest solution would probably be to loop through each number one at a time, sending out a message to each number individually.

Let me know what you think,
---------------------------------------------------
Jason Sauchuk - Programmer 
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/ 


Toledoh
Enthusiast

Feb 15, 2012, 12:12 AM

Post #18 of 19 (2042 views)
Shortcut
Re: [Jason] outgoing SMS [In reply to] Can't Post

Yes, it was done by iTools. I'll see if I can track down the original stuff and get back to you.

Thanks.
Cheers,

Tim Forrest
Toledoh Enterprises
www.toledoh.com.au


Toledoh
Enthusiast

Feb 15, 2012, 3:33 PM

Post #19 of 19 (2014 views)
Shortcut
Re: [Jason] outgoing SMS [In reply to] Can't Post

Hi Jason,
I've sent you an email with all the details.
Cheers,

Tim Forrest
Toledoh Enterprises
www.toledoh.com.au