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
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
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
<?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
<?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 | |
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 | |
/** | |
* Put this immediately before line 92 in SugarModules/modules/off_Dynamic_Target_List/dynamic_AddJobsHere.php | |
**/ | |
// check if sugarchimp table exists and the list has a synced mailchimp list id | |
if (!empty($obj_custom->mailchimp_list_name_c) && $db->getRowCount($db->query("SHOW TABLES LIKE 'sugarchimp'"))==1) | |
{ | |
// insert 'remove mailchimp subscriber' jobs for each record that is getting removed from the prospect_lists_prospects table |
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 | |
$job_strings[] = 'YourJobQueue'; | |
function YourJobQueue() | |
{ | |
$queues_to_process = array( | |
'FirstQueue', | |
'SecondQueue', | |
'ThirdQueue', |
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
// assuming jquery and the cookie plugin are already included. | |
$("html").addClass("js"); | |
$(document).ready(function() { | |
if ($.cookie('exp_alert_banner_newsletter')!='hide') { | |
$("p.alert").slideDown("slow"); | |
$("p.alert span.hidealert a").click(function() { | |
$("p.alert").slideUp("slow"); |
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 | |
// custom array merging | |
// if something exists in the custom array, it should overwrite the default | |
// otherwise take the default value | |
$default = array( | |
"key1" => "val1", | |
"key2" => "val2", | |
"key3" => array( |
OlderNewer