This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
echo "SugarChimp Webhook Receiver is setup properly!"; | |
require_once('modules/SugarChimp/includes/classes/SugarChimp/Helper.php'); | |
require_once('modules/SugarChimp/includes/classes/SugarChimp/FieldMap.php'); | |
require_once('modules/SugarChimp/includes/classes/SugarChimp/Activity.php'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$layout_defs['Contacts']['subpanel_setup']['sugarchimpactivity'] = array( | |
'top_buttons' => array(array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'SugarChimpActivity', 'mode' => 'MultiSelect'),), | |
'order' => 900, | |
'sort_by' => 'timestamp', | |
'sort_order' => 'desc', | |
'module' => 'SugarChimpActivity', | |
'refresh_page'=>1, | |
'subpanel_name' => 'default', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// load up mandrill | |
require_once('vendor/mandrill/src/Mandrill.php'); | |
define(MANDRILL_APIKEY,'MANDRILL_API_KEY_GOES_HERE'); | |
// get the webhook response | |
// decode the json data into a php object | |
$body = @file_get_contents('php://input'); | |
$response = json_decode($body); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.parent.SUGAR.App.sync({callback: function(){ | |
window.parent.SUGAR.App.router.navigate('#your_module/layout/license', {trigger:true, replace:true}); | |
}}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.parent.SUGAR.App.sync() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$db_time = date($timedate->get_db_date_format(), strtotime("-20 DAY")); | |
$query = "DELETE FROM atc_sugarchimpclient WHERE (status = 'Processed' OR status = 'Error') AND date_entered <= '{$db_time}'"; | |
$db->query($query); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Having issues grabbing the account_id of a contact when using BeanFactory | |
// in version 6.5.15 to create/load the contact | |
// To test this out, put this in custom/modules/Contacts/test.php and go | |
// to http://instance/index.php?module=Contacts&action=test to see the results | |
// Only "CASE 4" below returns the expected results. | |
$account_id = "11c5a47e-49a8-c077-4c6a-524304ac91ca"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import division | |
import collections | |
from texttable import Texttable | |
by_status = collections.defaultdict(list) | |
per_page = 100 | |
offset = 0 | |
while True: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// get the webhook response | |
$body = @file_get_contents('php://input'); | |
// decode the json data into a php object | |
$response = json_decode($body); | |
// the webhook property tells us exactly which webhook event was fired | |
// so let's create a case for a few webhooks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
echo “Hello, world!”; |