Results 1 to 2 of 2

Thread: Add a button

  1. #1
    RattleHunter is offline Member
    Join Date
    Dec 2008
    Posts
    12

    Default Add a button

    My SMS provider has some code on their site .. ...

    How can I add a button next to the mobile number field in leads or contacts so when I press it I can enter an SMS message and it is recorded as history (just like a call)??


    The SMS code

    <?php
    // Authorisation details
    $uname = "youremailaddress";
    $pword = "yourpassword";

    // Configuration variables
    $info = "1";
    $test = "0";

    // Data for text message
    $from = "Jims Autos";
    $selectednums = "440000000000";
    $message = "Test with an ampersand (&) and a £5 note";
    $message = urlencode($message);

    // Prepare data for POST request
    $data = "uname=".$uname."&pword=".$pword."&message=".$mess age."&from=". $from."&selectednums=".$selectednums."&info=".$inf o."&test=".$test; // Send the POST request with cURL
    $ch = curl_init('http://www.txtlocal.com/sendsmspost.php');
    curl_setopt($ch, CURLOPT_POST, true);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    $result = curl_exec($ch); //This is the result from Txtlocal
    curl_close($ch);
    ?>

  2. #2
    salesagility's Avatar
    salesagility is offline Sugar Community Member
    Join Date
    Aug 2006
    Location
    UK
    Posts
    2,379

    Default Re: Add a button

    There are a number of pre-packaged sms integrations in sugarforge ... we tested this one a while (year or so) ago. With a little work it should be OK with 5.5.x and your service provider

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 5
    Last Post: 2012-02-15, 10:06 AM
  2. Custom Button (list view) w/ Custom button
    By sugarmeso in forum Help
    Replies: 1
    Last Post: 2010-03-30, 09:54 PM
  3. Replies: 1
    Last Post: 2009-07-01, 01:35 PM
  4. Add New Button
    By asokanstar in forum Developer Help
    Replies: 2
    Last Post: 2009-06-23, 05:49 AM
  5. Add new button
    By asokanstar in forum Developer Tutorials
    Replies: 2
    Last Post: 2009-06-20, 03:15 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •